From: Nicholas Nethercote Date: Tue, 6 Jul 2010 04:25:12 +0000 (+0000) Subject: Make -h -h be equivalent to --help-debug. X-Git-Tag: svn/VALGRIND_3_6_0~234 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f801f7b5d70eed9fa54a2b74f3b2511d139eb7ef;p=thirdparty%2Fvalgrind.git Make -h -h be equivalent to --help-debug. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11211 --- diff --git a/coregrind/m_main.c b/coregrind/m_main.c index bae04633c9..386b72ec79 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -303,10 +303,10 @@ static void early_process_cmd_line_options ( /*OUT*/Int* need_help, VG_(printf)("valgrind-" VERSION "\n"); VG_(exit)(0); } - else if VG_XACT_CLO(str, "--help", *need_help, 1) {} - else if VG_XACT_CLO(str, "-h", *need_help, 1) {} + else if VG_XACT_CLO(str, "--help", *need_help, *need_help+1) {} + else if VG_XACT_CLO(str, "-h", *need_help, *need_help+1) {} - else if VG_XACT_CLO(str, "--help-debug", *need_help, 2) {} + else if VG_XACT_CLO(str, "--help-debug", *need_help, *need_help+2) {} // The tool has already been determined, but we need to know the name // here. @@ -1826,7 +1826,7 @@ Int valgrind_main ( Int argc, HChar **argv, HChar **envp ) //-------------------------------------------------------------- VG_(debugLog)(1, "main", "Print help and quit, if requested\n"); if (need_help) { - usage_NORETURN(/*--help-debug?*/2 == need_help); + usage_NORETURN(/*--help-debug?*/need_help >= 2); } //-------------------------------------------------------------- diff --git a/docs/xml/manual-core.xml b/docs/xml/manual-core.xml index 724dac99e5..8a75292d36 100644 --- a/docs/xml/manual-core.xml +++ b/docs/xml/manual-core.xml @@ -596,7 +596,8 @@ in most cases. We group the available options by rough categories. Show help for all options, both for the core and for the - selected tool. + selected tool. If the option is repeated it is equivalent to giving + .