Hopefully --vc works now
authorjesusc <jesusc@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 9 Jun 2003 05:25:49 +0000 (05:25 +0000)
committerjesusc <jesusc@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 9 Jun 2003 05:25:49 +0000 (05:25 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2683 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCmain.c
support/Util/SDCCerr.c
support/Util/SDCCerr.h

index 0ee4c6daffb1c2399637d34b1cd1d52d5f29b04a..3027588542166dd76d3821eb7950b399e1f45de5 100644 (file)
@@ -1296,6 +1296,7 @@ parseCmdLine (int argc, char **argv)
       else
        werror (E_FILE_OPEN_ERR, scratchFileName);
     }
+  MSVC_style(options.vc_err_style);
   return 0;
 }
 
index ba502b6b66a2677ccd38c118b04d0f41d493b97a..9fefee3990f354642ef14c591fa4acb82170e42b 100644 (file)
@@ -20,8 +20,6 @@
 #include <stdlib.h>
 
 #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;
+}
index 1c2384aca60e1b2c6c53ed54abde55c36fd353a5..c78100c24aa307d731e5a1e4f91bd0a11fe1b9c0 100644 (file)
@@ -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