summaryrefslogtreecommitdiff
path: root/src/internal
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-01-02 22:32:58 -0500
committermidipix <writeonce@midipix.org>2016-11-11 00:22:33 -0500
commitc094bda38b297b2fcc398c67b50a368a12803333 (patch)
treebf170191a27e9746b8b10d761acbad8456420e33 /src/internal
parentffd5c6da2e476586073811c5c66429faa428e3c1 (diff)
downloadmdso-c094bda38b297b2fcc398c67b50a368a12803333.tar.bz2
mdso-c094bda38b297b2fcc398c67b50a368a12803333.tar.xz
argv.h: skip unavailable short/long option records with --help={short|long}.
Diffstat (limited to 'src/internal')
-rw-r--r--src/internal/argv/argv.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/internal/argv/argv.h b/src/internal/argv/argv.h
index 2fe7dd0..5402d0d 100644
--- a/src/internal/argv/argv.h
+++ b/src/internal/argv/argv.h
@@ -791,6 +791,11 @@ static void argv_usage(
desclen = 32;
for (option=options,buflen=0,rdesclen=1; option->short_name || option->long_name; option++) {
+ if (fshort && !option->short_name)
+ continue;
+ else if (flong && !option->long_name)
+ continue;
+
if (option->paradigm) {
if (option->optarg == ARGV_OPTARG_OPTIONAL)
rparalen = strlen(option->paradigm) - 2*rbblen;