From 6c0833b00c839e19619a8e1eac627310502c94c3 Mon Sep 17 00:00:00 2001 From: karahalios Date: Fri, 16 Nov 2001 16:55:12 +0000 Subject: [PATCH] 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 --- support/Util/SDCCerr.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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; -- 2.30.2