# HG changeset patch # User jwe # Date 971214141 0 # Node ID 74475587231177325e6bc060ada6a31e5ccbd14c # Parent 65c6da68ddb353a6985032f15d43fa0576a37a04 [project @ 2000-10-10 21:42:20 by jwe] diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2000-10-10 John W. Eaton + + * error.cc (pr_where_2): New function. + (pr_where_1): Use it instead of error_1 to avoid setting error_state. + +2000-10-02 John W. Eaton + + * xdiv.cc (xdiv): Warn if execution falls through to lssolve. + 2000-09-06 John W. Eaton * utils.cc (FERRNO): New function (currently commented out). diff --git a/src/error.cc b/src/error.cc --- a/src/error.cc +++ b/src/error.cc @@ -211,11 +211,37 @@ } static void +pr_where_2 (const char *fmt, va_list args) +{ + if (fmt) + { + if (*fmt) + { + int len = strlen (fmt); + if (fmt[len - 1] == '\n') + { + if (len > 1) + { + char *tmp_fmt = strsave (fmt); + tmp_fmt[len - 1] = '\0'; + verror (0, tmp_fmt, args); + delete [] tmp_fmt; + } + } + else + verror (0, fmt, args); + } + } + else + panic ("pr_where_2: invalid format"); +} + +static void pr_where_1 (const char *fmt, ...) { va_list args; va_start (args, fmt); - error_1 (0, fmt, args); + pr_where_2 (fmt, args); va_end (args); } diff --git a/src/xdiv.cc b/src/xdiv.cc --- a/src/xdiv.cc +++ b/src/xdiv.cc @@ -45,6 +45,7 @@ solve_singularity_warning (double rcond) { warning ("matrix singular to machine precision, rcond = %g", rcond); + warning ("attempting to find minimum norm solution"); } template