Mercurial > hg > octave-lyh
changeset 3719:744755872311
[project @ 2000-10-10 21:42:20 by jwe]
author | jwe |
---|---|
date | Tue, 10 Oct 2000 21:42:21 +0000 |
parents | 65c6da68ddb3 |
children | ad3340974a7b |
files | src/ChangeLog src/error.cc src/xdiv.cc |
diffstat | 3 files changed, 37 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2000-10-10 John W. Eaton <jwe@bevo.che.wisc.edu> + + * 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 <jwe@bevo.che.wisc.edu> + + * xdiv.cc (xdiv): Warn if execution falls through to lssolve. + 2000-09-06 John W. Eaton <jwe@bevo.che.wisc.edu> * utils.cc (FERRNO): New function (currently commented out).
--- 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); }