X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=libctsupport%2Fsyserror.cpp;h=6d0900dcda89511de3eb3c7c3286246bb7ce78b1;hp=e59449f0161c5695a4efa4b471f5af34acadbc12;hb=2203f9e98dbc4aa7cb23d00517a0f249dd1dfb03;hpb=1e88cf0f7fa4f690ea9f110e8ed3f2b5338d0a10 diff --git a/libctsupport/syserror.cpp b/libctsupport/syserror.cpp index e59449f..6d0900d 100644 --- a/libctsupport/syserror.cpp +++ b/libctsupport/syserror.cpp @@ -2,7 +2,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: syserror.cpp,v 1.4 2000/08/25 15:59:13 kevin Exp $ +** $Id: syserror.cpp,v 1.6 2000/09/07 04:31:41 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -66,7 +66,7 @@ void sys_verror (int severity, const char *msg, va_list arg) return; else if (nErrorCount == MAX_ERROR_COUNT) { cout << "*****************************************************************" << endl; - cout << "*** M A X I M U M E R R O R C O U N T R E A C H E D ***" << endl; + cout << "*** M A X I M U M E R R O R C O U N T R E A C H E D ***" << endl; cout << "*** ***" << endl; cout << "*** No further errors will be reported ***" << endl; cout << "*****************************************************************" << endl; @@ -85,11 +85,16 @@ void sys_verror (int severity, const char *msg, va_list arg) cout << "WARNING ERROR: "; break; default: - sys_error (ERR_FATAL, "illegal error code #%d [sys_error]", severity); + cout << "Illegal error code #" << severity << ": "; } char errStr[512]; +#if HAVE_VSNPRINTF vsnprintf (errStr, sizeof(errStr), msg, arg); +#elif HAVE_VSPRINTF + vsprintf (errStr, msg, arg); +#endif + cout << errStr << endl; if (severity == ERR_FATAL)