|
From: <sv...@va...> - 2010-07-06 04:25:19
|
Author: njn
Date: 2010-07-06 05:25:12 +0100 (Tue, 06 Jul 2010)
New Revision: 11211
Log:
Make -h -h be equivalent to --help-debug.
Modified:
trunk/coregrind/m_main.c
trunk/docs/xml/manual-core.xml
Modified: trunk/coregrind/m_main.c
===================================================================
--- trunk/coregrind/m_main.c 2010-07-06 04:21:47 UTC (rev 11210)
+++ trunk/coregrind/m_main.c 2010-07-06 04:25:12 UTC (rev 11211)
@@ -303,10 +303,10 @@
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 @@
//--------------------------------------------------------------
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);
}
//--------------------------------------------------------------
Modified: trunk/docs/xml/manual-core.xml
===================================================================
--- trunk/docs/xml/manual-core.xml 2010-07-06 04:21:47 UTC (rev 11210)
+++ trunk/docs/xml/manual-core.xml 2010-07-06 04:25:12 UTC (rev 11211)
@@ -596,7 +596,8 @@
<term><option>-h --help</option></term>
<listitem>
<para>Show help for all options, both for the core and for the
- selected tool.</para>
+ selected tool. If the option is repeated it is equivalent to giving
+ <option>--help-debug</option>.</para>
</listitem>
</varlistentry>
|