X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;ds=sidebyside;f=libctsupport%2Fsyserror.cpp;h=6d0900dcda89511de3eb3c7c3286246bb7ce78b1;hb=2203f9e98dbc4aa7cb23d00517a0f249dd1dfb03;hp=939f024bee0b29a6a6bfcb99a4b9ee7fe7bb276f;hpb=a05f3cb550877e94aa118cc04b361c0c8fdb3dc3;p=ctsim.git diff --git a/libctsupport/syserror.cpp b/libctsupport/syserror.cpp index 939f024..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.5 2000/08/31 08:38:58 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 @@ -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)