From 742f16c4143dc494232d0138b78e0ca63aefc7d2 Mon Sep 17 00:00:00 2001 From: bernhardheld Date: Tue, 30 May 2006 19:59:34 +0000 Subject: [PATCH] * src/SDCCmain.c: fixed --help git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4201 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 7 ++++--- src/SDCCmain.c | 5 ++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 91cfe17f..2d03c97b 100644 --- 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 diff --git a/src/SDCCmain.c b/src/SDCCmain.c index 009fc39d..222acfc2 100644 --- a/src/SDCCmain.c +++ b/src/SDCCmain.c @@ -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" }, -- 2.30.2