* src/SDCCmain.c: fixed --help
authorbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 30 May 2006 19:59:34 +0000 (19:59 +0000)
committerbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 30 May 2006 19:59:34 +0000 (19:59 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4201 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/SDCCmain.c

index 91cfe17fb505e843cad5cf50a8eebf6d1cbac3a7..2d03c97bb268b37dfe45c2fe10657a9e940a95a2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,9 +9,10 @@
        * src/SDCCast.c (isLoopCountable): fixed bug #1478316
        (processParms): fixed bug #1247551
        * src/SDCCmain.c (printVersionInfo, printOptions, printUsage,
-       parseCmdLine, main): print version to stdout, help to stdout on
-       windows and to stderr on all the rest; exit with EXIT_FAILURE if
-       no arguments given
+       parseCmdLine, main): print '--version' to stdout,
+       print 'help' to stdout if --help is given,
+       print 'help' to stderr and exit with EXIT_FAILURE if no or bad
+       arguments are given; fixed --help
 
 2006-05-27 Bernhard Held <bernhard AT bernhardheld.de>
 
index 009fc39d79a5c1f5c0ff97c565ad8c92e2cc5f06..222acfc21abc5622656cf5dfe6ec7c091b7e04aa 100644 (file)
@@ -91,10 +91,9 @@ int ds390_jammed = 0;
 char scratchFileName[PATH_MAX];
 char buffer[PATH_MAX * 2];
 
-#define OPTION_HELP     "-help"
-
 #define LENGTH(_a)      (sizeof(_a)/sizeof(*(_a)))
 
+#define OPTION_HELP             "--help"
 #define OPTION_STACK_8BIT       "--stack-8bit"
 #define OPTION_OUT_FMT_IHX      "--out-fmt-ihx"
 #define OPTION_OUT_FMT_S19      "--out-fmt-s19"
@@ -146,7 +145,7 @@ char buffer[PATH_MAX * 2];
 static const OPTION
 optionsTable[] = {
     { 0,    NULL,                   NULL, "General options" },
-    { 0,    "--help",               NULL, "Display this help" },
+    { 0,    OPTION_HELP,            NULL, "Display this help" },
     { 'v',  OPTION_VERSION,         NULL, "Display sdcc's version" },
     { 0,    "--verbose",            &options.verbose, "Trace calls to the preprocessor, assembler, and linker" },
     { 'V',  NULL,                   &options.verboseExec, "Execute verbosely.  Show sub commands as they are run" },