From: karahalios Date: Fri, 16 Nov 2001 16:55:12 +0000 (+0000) Subject: Modified error message format to conform closer to GNU C. This helps GUI X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=6c0833b00c839e19619a8e1eac627310502c94c3;hp=5d5bf9d73c8b91a033ca1b00c27a538d404fc0fb;p=fw%2Fsdcc Modified error message format to conform closer to GNU C. This helps GUI developement environments (in particular Mac OS X Project Builder) display & track error messages better. git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1606 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/support/Util/SDCCerr.c b/support/Util/SDCCerr.c index 12816428..0be9ab48 100644 --- a/support/Util/SDCCerr.c +++ b/support/Util/SDCCerr.c @@ -409,7 +409,7 @@ void vwerror (int errNum, va_list marker) if (ErrTab[errNum].errIndex != errNum) { fprintf(_SDCCERRG.out, - "*** Internal error: error table entry for %d inconsistent.", errNum); + "Internal error: error table entry for %d inconsistent.", errNum); } @@ -418,22 +418,24 @@ void vwerror (int errNum, va_list marker) fatalError++ ; if ( filename && lineno ) { - fprintf(_SDCCERRG.out, "%s(%d):",filename,lineno); + fprintf(_SDCCERRG.out, "%s:%d: ",filename,lineno); } else if (lineno) { - fprintf(_SDCCERRG.out, "at %d:", lineno); + fprintf(_SDCCERRG.out, "at %d: ", lineno); + } else { + fprintf(_SDCCERRG.out, "-:0: "); } switch(ErrTab[errNum].errType) { case ERROR_LEVEL_ERROR: - fprintf(_SDCCERRG.out, "error *** "); + fprintf(_SDCCERRG.out, "error: "); break; case ERROR_LEVEL_WARNING: case ERROR_LEVEL_PEDANTIC: - fprintf(_SDCCERRG.out, "warning *** "); + fprintf(_SDCCERRG.out, "warning: "); break; case ERROR_LEVEL_INFO: - fprintf(_SDCCERRG.out, "info *** "); + fprintf(_SDCCERRG.out, "info: "); break; default: break;