]> git.gag.com Git - fw/sdcc/commitdiff
Added option --vc
authorjesusc <jesusc@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 9 Jun 2003 02:42:10 +0000 (02:42 +0000)
committerjesusc <jesusc@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 9 Jun 2003 02:42:10 +0000 (02:42 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2682 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
doc/sdccman.lyx
src/SDCCglobl.h
src/SDCCmain.c
support/Util/SDCCerr.c

index dbfde422afad7a9e15110e8adbfc841af7203862..5113d5eabd41485c743c537a688ba94b164a83ec 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-06-08  Jesus Calvino-Fraga <jesusc@ece.ubc.ca>
+
+       * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
+       added option --vc, so sdcc errors and warnings are compatible with 
+       Microsoft Visual Studio.
+
 2003-06-07  Jesus Calvino-Fraga <jesusc@ece.ubc.ca>
 
        * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
index 87f17f9c1638548303f32715676d7d2ccb32e9ff..553a0227ec3043217fbfcebb958a533f625443a7 100644 (file)
@@ -6288,6 +6288,30 @@ status Collapsed
 
 \series default 
  Display the directories in the compiler's search path
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold 
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-vc
+\begin_inset LatexCommand \index{-\/-print-search-dirs}
+
+\end_inset 
+
+
+\series default 
+ Display the errors and warnings using MSVC style, so you can use SDCC with
+ visual studio
 \layout Subsubsection
 
 Intermediate Dump Options
@@ -9907,6 +9931,67 @@ standard error
 \end_inset 
 
 .
+ I you happen to have visual studio installed in your windows machine, you
+ can use it to compile your sources using a custom build and the SDCC -
+\emph on 
+
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+
+\emph default 
+-vc option.
+ Something like this should work:
+\newline 
+
+\newline 
+
+\series bold 
+c:
+\backslash 
+sdcc
+\backslash 
+bin
+\backslash 
+sdcc.exe -
+\series default 
+\emph on 
+
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+
+\series bold 
+\emph default 
+-vc -
+\series default 
+\emph on 
+
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+
+\series bold 
+\emph default 
+-model-large -c $(InputPath)
 \layout Section
 \pagebreak_top 
 SDCC Technical Data
index 3fff1577fd01101f4efed16e1dc381c36b299843..72d758652d6638e739de2fc35c3c1a6f957dc33e 100644 (file)
@@ -237,6 +237,7 @@ struct options
     int noCcodeInAsm;           /* hide c-code from asm */
     int iCodeInAsm;             /* show i-code in asm */
     int printSearchDirs;        /* display the directories in the compiler's search path */
+       int vc_err_style;           /* errors and warnings are compatible with Micro$oft visual studio */
   };
 
 /* forward definition for variables accessed globally */
index 11f5c2613871802f815395d50419f37308ae01f2..0ee4c6daffb1c2399637d34b1cd1d52d5f29b04a 100644 (file)
@@ -120,6 +120,7 @@ char buffer[PATH_MAX * 2];
 #define OPTION_NO_CCODE_IN_ASM "--no-c-code-in-asm"
 #define OPTION_ICODE_IN_ASM    "--i-code-in-asm"
 #define OPTION_PRINT_SEARCH_DIRS "--print-search-dirs"
+#define OPTION_MSVC_ERROR_STYLE "--vc"
 
 static const OPTION
 optionsTable[] = {
@@ -219,6 +220,7 @@ optionsTable[] = {
     { 0,    OPTION_NO_CCODE_IN_ASM, &options.noCcodeInAsm, "don't include c-code as comments in the asm file"},
     { 0,    OPTION_ICODE_IN_ASM,    &options.iCodeInAsm, "include i-code as comments in the asm file"},
     { 0,    OPTION_PRINT_SEARCH_DIRS, &options.printSearchDirs, "display the directories in the compiler's search path"},
+    { 0,    OPTION_MSVC_ERROR_STYLE, &options.vc_err_style, "messages are compatible with Micro$oft visual studio"},
     /* End of options */
     { 0,    NULL }
 };
index b21cc39d672202c1f98d0d08292627f3c576468b..ba502b6b66a2677ccd38c118b04d0f41d493b97a 100644 (file)
@@ -20,6 +20,7 @@
 #include <stdlib.h>
 
 #include "SDCCerr.h"
+#include "../../src/SDCCglobl.h"
 
 
 #define USE_STDOUT_FOR_ERRORS          0
@@ -433,8 +434,11 @@ void vwerror (int errNum, va_list marker)
             fatalError++ ;
   
         if ( filename && lineno ) {
-            fprintf(_SDCCERRG.out, "%s:%d: ",filename,lineno);
-        } else if (lineno) {
+                       if(options.vc_err_style)
+                               fprintf(_SDCCERRG.out, "%s(%d) : ",filename,lineno);
+                       else
+                               fprintf(_SDCCERRG.out, "%s:%d: ",filename,lineno);
+         } else if (lineno) {
             fprintf(_SDCCERRG.out, "at %d: ", lineno);
         } else {
             fprintf(_SDCCERRG.out, "-:0: ");