src: Use separator "--" to mark start of the footer without ambiguity

This commit is contained in:
Tatsuhiro Tsujikawa 2015-03-31 00:21:52 +09:00
parent 5df770b9c1
commit cc94632b29
4 changed files with 15 additions and 0 deletions

View File

@ -78,6 +78,7 @@ DESCRIPTION
synopsis=synopsis, description=format_text('\n'.join(description))) synopsis=synopsis, description=format_text('\n'.join(description)))
in_arg = False in_arg = False
in_footer = False
for line in infile: for line in infile:
line = line.rstrip() line = line.rstrip()
@ -95,6 +96,14 @@ DESCRIPTION
print '' print ''
in_arg = False in_arg = False
if line == '--':
in_footer = True
continue
if in_footer:
print line.strip()
continue
if line == 'Options:': if line == 'Options:':
print 'OPTIONS' print 'OPTIONS'
print '-------' print '-------'

View File

@ -2431,6 +2431,8 @@ Options:
--version Display version information and exit. --version Display version information and exit.
-h, --help Display this help and exit. -h, --help Display this help and exit.
--
The <SIZE> argument is an integer and an optional unit (e.g., 10K is The <SIZE> argument is an integer and an optional unit (e.g., 10K is
10 * 1024). Units are K, M and G (powers of 1024).)" << std::endl; 10 * 1024). Units are K, M and G (powers of 1024).)" << std::endl;
} }

View File

@ -151,6 +151,8 @@ Options:
--version Display version information and exit. --version Display version information and exit.
-h, --help Display this help and exit. -h, --help Display this help and exit.
--
The <SIZE> argument is an integer and an optional unit (e.g., 10K is The <SIZE> argument is an integer and an optional unit (e.g., 10K is
10 * 1024). Units are K, M and G (powers of 1024).)" << std::endl; 10 * 1024). Units are K, M and G (powers of 1024).)" << std::endl;
} }

View File

@ -1398,6 +1398,8 @@ Misc:
Print version and exit. Print version and exit.
-h, --help Print this help and exit. -h, --help Print this help and exit.
--
The <SIZE> argument is an integer and an optional unit (e.g., 10K is The <SIZE> argument is an integer and an optional unit (e.g., 10K is
10 * 1024). Units are K, M and G (powers of 1024). 10 * 1024). Units are K, M and G (powers of 1024).