Added option --use-stdout
authorjesusc <jesusc@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 18 Jun 2003 16:45:27 +0000 (16:45 +0000)
committerjesusc <jesusc@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 18 Jun 2003 16:45:27 +0000 (16:45 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2703 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/SDCCglobl.h
src/SDCCmain.c

index 6877a7df92f6a15c4ff168488e045f1a231d506d..cc518b9ad15321cc15580f664f656cf6e4535e89 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-06-18  Jesus Calvino-Fraga <jesusc@ece.ubc.ca>
+
+       * src/SDCCglobl.h, src/SDCCmain.c:
+       option --use-stdout sends errors to stdout instead of stderr.
+       (changes to sdccman.lyx comming soon)
+
 2003-06-18  Bernhard Held <bernhard@bernhardheld.de>
 
        * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
index 6df7d99ccf860251da5ada0c05c8f70cc6afd1c0..42759a82cf9941ea99eb90fb9c6d785a4f181136 100644 (file)
@@ -243,6 +243,7 @@ struct options
     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 */
+    int use_stdout;             /* send errors to stdout instead of stderr */
     /* sets */
     set *calleeSavesSet;        /* list of functions using callee save */
     set *excludeRegsSet;        /* registers excluded from saving */
index cb5029eaa5b220a23028a014bdf504319f6a38ea..fdadaa08de4b4ef6ca4911643a4aa15577a12d56 100644 (file)
@@ -117,6 +117,7 @@ char buffer[PATH_MAX * 2];
 #define OPTION_ICODE_IN_ASM    "--i-code-in-asm"
 #define OPTION_PRINT_SEARCH_DIRS "--print-search-dirs"
 #define OPTION_MSVC_ERROR_STYLE "--vc"
+#define OPTION_USE_STDOUT "--use-stdout"
 
 static const OPTION
 optionsTable[] = {
@@ -217,6 +218,7 @@ optionsTable[] = {
     { 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"},
+    { 0,    OPTION_USE_STDOUT, &options.use_stdout, "send errors to stdout instead of stderr"},
     /* End of options */
 #if 0 /* 10jun03 !OPT_DISABLE_PIC16 */
     { 0,    "--no-movff",          &options.no_movff, "disable generating MOVFF opcode in PIC16 port"},
@@ -1269,6 +1271,7 @@ parseCmdLine (int argc, char **argv)
        werror (E_FILE_OPEN_ERR, scratchFileName);
     }
   MSVC_style(options.vc_err_style);
+  if(options.use_stdout) SetErrorOut(stdout);
   return 0;
 }