summaryrefslogtreecommitdiffhomepage
path: root/src/internal/argv
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-06-15 23:18:06 +0000
committermidipix <writeonce@midipix.org>2024-06-22 13:40:13 +0000
commitd17b4671d5ee7ca1fe734a85a078cd6fa3cca25f (patch)
treefa9e62a0fc20025171f8da437ae1adf259704437 /src/internal/argv
parentd8764d26fdd0ba14bdc0c6b1a27f1e2c4ffe79f3 (diff)
downloadntux-d17b4671d5ee7ca1fe734a85a078cd6fa3cca25f.tar.bz2
ntux-d17b4671d5ee7ca1fe734a85a078cd6fa3cca25f.tar.xz
argv.h: argv_show_status(): refactor for better readability.
Diffstat (limited to 'src/internal/argv')
-rw-r--r--src/internal/argv/argv.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/internal/argv/argv.h b/src/internal/argv/argv.h
index f130137..326fdb4 100644
--- a/src/internal/argv/argv.h
+++ b/src/internal/argv/argv.h
@@ -698,7 +698,7 @@ static void argv_show_status(
argv_dprintf(fd,"argv[%d]: %s\n",argc,*argv);
argv_dprintf(fd,"\n\nparsed entries:\n");
- for (entry=meta->entries; entry->arg || entry->fopt; entry++)
+ for (entry=meta->entries; entry->arg || entry->fopt; entry++) {
if (entry->fopt) {
option = option_from_tag(optv,entry->tag);
short_name[0] = option->short_name;
@@ -709,8 +709,10 @@ static void argv_show_status(
else
argv_dprintf(fd,"[-%s,--%s]\n",
short_name,option->long_name);
- } else
+ } else {
argv_dprintf(fd,"<program arg> := %s\n",entry->arg);
+ }
+ }
argv_dprintf(fd,"\n\n");
}