# HG changeset patch # User jwe # Date 769913077 0 # Node ID f7314b67a142611f4851df46202e5fd2951931d3 # Parent 5e778965b6ea93ee82e0800d529379870cabf72b [project @ 1994-05-26 00:44:37 by jwe] i diff -r 5e778965b6ea -r f7314b67a142 src/error.cc --- a/src/error.cc Wed May 25 23:59:02 1994 +0000 +++ b/src/error.cc Thu May 26 00:44:37 1994 +0000 @@ -1,7 +1,7 @@ // error.cc -*- C++ -*- /* -Copyright (C) 1992, 1993 John W. Eaton +Copyright (C) 1992, 1993, 1994 John W. Eaton This file is part of Octave. @@ -76,6 +76,9 @@ void error (const char *fmt, ...) { + if (error_state == -2) + return; + if (! error_state) error_state = 1; @@ -83,7 +86,18 @@ va_list args; va_start (args, fmt); - verror ("error", fmt, args); + + int len; + if (fmt && fmt[(len = strlen (fmt) - 1)] == '\n') + { + error_state = -2; + char *tmp_fmt = strsave (fmt); + tmp_fmt[len - 1] = '\0'; + verror ("error", tmp_fmt, args); + } + else + verror ("error", fmt, args); + va_end (args); }