diff options
| author | Denys Vlasenko <dvlasenk@redhat.com> | 2010-10-08 16:18:24 +0200 |
|---|---|---|
| committer | Denys Vlasenko <dvlasenk@redhat.com> | 2010-10-08 16:18:24 +0200 |
| commit | de6c4a0903325d14fed89de6cef2572dc141c2fe (patch) | |
| tree | 555cdf7408df9d26a18f71635a7fdf2cd22e686f /lib/utils/parse_options.h | |
| parent | 81df7a41538faa1f4fbfb54ea33e1448d70cfc76 (diff) | |
Remove arrays in usage text, use a single string instead
Currently, usage is an array of pointers to string.
It is meant to support this:
usage: foo --bar
or: foo --baz
or: foo -z
The patch removes this and makes usage just a string:
usage: foo --bar
Why remove this?
(1) We can achieve old format by using the usage string with many lines:
usage = "foo --bar\n"
" or: foo --baz\n"
" or: foo -z";
(2) We don't use multi-line usage anyway.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'lib/utils/parse_options.h')
| -rw-r--r-- | lib/utils/parse_options.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/utils/parse_options.h b/lib/utils/parse_options.h index 9c4758af..0e768eb7 100644 --- a/lib/utils/parse_options.h +++ b/lib/utils/parse_options.h @@ -40,9 +40,9 @@ struct options { #define OPT__VERBOSE(v) OPT_BOOL('v', "verbose", (v), "be verbose") void parse_opts(int argc, char **argv, const struct options *opt, - const char * const usage[]); + const char *usage); -void parse_usage_and_die(const char * const * usage, const struct options *opt); +void parse_usage_and_die(const char *usage, const struct options *opt); #ifdef __cplusplus } |
