diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2022-12-31 19:55:38 +0000 |
---|---|---|
committer | Michael Drake <mdrake.unique@gmail.com> | 2023-01-01 18:02:44 +0000 |
commit | ffec523aa0a938beab7def1893d41685e28d2b34 (patch) | |
tree | d58877250bb5cc6d0bbcbb7400f30a34a552803d | |
parent | fde3d979ace97bd109fce443b49cbbfa5a9307a2 (diff) | |
download | libnsgif-ffec523aa0a938beab7def1893d41685e28d2b34.tar.gz libnsgif-ffec523aa0a938beab7def1893d41685e28d2b34.tar.bz2 |
cli: Allow optional application description
-rw-r--r-- | test/cli.c | 6 | ||||
-rw-r--r-- | test/cli.h | 1 |
2 files changed, 7 insertions, 0 deletions
@@ -742,6 +742,12 @@ void cli_help(const struct cli_table *cli, const char *prog_name) cli__count(cli, &count, &pcount, &max_len, &pmax_len, &phas_desc); + if (cli->d != NULL) { + fprintf(stderr, "\n"); + cli__print_wrapping_string(cli->d, 0); + fprintf(stderr, "\n"); + } + fprintf(stderr, "\nUsage: %s", prog_name); if (pcount > 0) { @@ -73,6 +73,7 @@ struct cli_table { const struct cli_table_entry *entries; size_t count; size_t min_positional; + const char *d; /**< Description of this application for help output. */ }; /** |