summaryrefslogtreecommitdiffhomepage
path: root/src/internal/argv/argv.h
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-05-01 15:32:08 -0400
committermidipix <writeonce@midipix.org>2016-05-01 15:32:08 -0400
commit7410b145b042b9fd6a9307496ec31141f0060d98 (patch)
tree2279d60676fbd1b51985a5a5d472be02effa52b1 /src/internal/argv/argv.h
parent242ef853b303e790d33f8d98b446a108eb5a2541 (diff)
downloadslibtool-7410b145b042b9fd6a9307496ec31141f0060d98.tar.bz2
slibtool-7410b145b042b9fd6a9307496ec31141f0060d98.tar.xz
argv.h: usage screen generator: added basic paradigm support.
Diffstat (limited to 'src/internal/argv/argv.h')
-rw-r--r--src/internal/argv/argv.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/internal/argv/argv.h b/src/internal/argv/argv.h
index 9bbb07f..8abf987 100644
--- a/src/internal/argv/argv.h
+++ b/src/internal/argv/argv.h
@@ -859,6 +859,7 @@ static void argv_usage(
while (*mark && (mark > desc)
&& (*mark != ' ')
+ && (*mark != '|')
&& (*mark != '\t')
&& (*mark != '\n'))
mark--;
@@ -868,6 +869,9 @@ static void argv_usage(
? cap : desc + desclen;
cache = *mark;
*mark = 0;
+ } else if (*mark == '|') {
+ cache = *mark;
+ *mark = 0;
} else {
cache = 0;
*mark = 0;
@@ -877,7 +881,11 @@ static void argv_usage(
if (desc == description)
fprintf(stdout,"%s%s\n",optstr,desc);
else
- fprintf(stdout,"%-*c %s\n",(int)optlen,' ',desc);
+ fprintf(stdout,"%-*c %s\n",
+ (*desc == '|')
+ ? (int)(optlen+1)
+ : (int)optlen,
+ ' ',desc);
if (cache)
*mark = cache;