From 411421fa80ec840399a8608e4819095dbf40374f Mon Sep 17 00:00:00 2001 From: jesusc Date: Mon, 9 Jun 2003 05:25:49 +0000 Subject: [PATCH] Hopefully --vc works now git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2683 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCCmain.c | 1 + support/Util/SDCCerr.c | 16 +++++++++++++--- support/Util/SDCCerr.h | 8 ++++++++ 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/SDCCmain.c b/src/SDCCmain.c index 0ee4c6da..30275885 100644 --- a/src/SDCCmain.c +++ b/src/SDCCmain.c @@ -1296,6 +1296,7 @@ parseCmdLine (int argc, char **argv) else werror (E_FILE_OPEN_ERR, scratchFileName); } + MSVC_style(options.vc_err_style); return 0; } diff --git a/support/Util/SDCCerr.c b/support/Util/SDCCerr.c index ba502b6b..9fefee39 100644 --- a/support/Util/SDCCerr.c +++ b/support/Util/SDCCerr.c @@ -20,8 +20,6 @@ #include #include "SDCCerr.h" -#include "../../src/SDCCglobl.h" - #define USE_STDOUT_FOR_ERRORS 0 @@ -34,6 +32,7 @@ static struct { ERROR_LOG_LEVEL logLevel; FILE *out; + int style; // 1=MSVC } _SDCCERRG; extern char *filename ; @@ -434,7 +433,7 @@ void vwerror (int errNum, va_list marker) fatalError++ ; if ( filename && lineno ) { - if(options.vc_err_style) + if(_SDCCERRG.style) fprintf(_SDCCERRG.out, "%s(%d) : ",filename,lineno); else fprintf(_SDCCERRG.out, "%s:%d: ",filename,lineno); @@ -498,3 +497,14 @@ void fatal (int exitCode, int errNum, ... ) exit(exitCode); } + +/* +------------------------------------------------------------------------------- +style - Change the output error style to MSVC +------------------------------------------------------------------------------- +*/ + +void MSVC_style (int style) +{ + _SDCCERRG.style=style; +} diff --git a/support/Util/SDCCerr.h b/support/Util/SDCCerr.h index 1c2384ac..c78100c2 100644 --- a/support/Util/SDCCerr.h +++ b/support/Util/SDCCerr.h @@ -244,4 +244,12 @@ fatal - Output a standard eror message with variable number of arguements and void fatal (int exitCode, int errNum, ... ) ; +/* +------------------------------------------------------------------------------- +style - Change the output error style to MSVC +------------------------------------------------------------------------------- +*/ + +void MSVC_style (int style) ; + #endif -- 2.30.2