diff options
author | Mike Frysinger <vapier@gentoo.org> | 2013-05-24 18:04:43 +1000 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2013-05-24 18:20:53 +1000 |
commit | b9e80656f2de441826ed2ff1cd9c5d43b3ae43d3 (patch) | |
tree | d0f093d618038577d98fcd463e4b4e7b639ebc60 /util.h | |
parent | 03449b84c8f9aee2bf2f438bec2c2ec4606bea48 (diff) | |
download | dtc-b9e80656f2de441826ed2ff1cd9c5d43b3ae43d3.zip dtc-b9e80656f2de441826ed2ff1cd9c5d43b3ae43d3.tar.gz dtc-b9e80656f2de441826ed2ff1cd9c5d43b3ae43d3.tar.bz2 |
util: drop "long" from usage helpers
Now that all utils have converted to the new usage framework, we can
rename to just plain "usage()" and avoid naming conflicts.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'util.h')
-rw-r--r-- | util.h | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -189,7 +189,7 @@ void util_version(void) __attribute__((noreturn)); * Show usage and exit * * This helps standardize the output of various utils. You most likely want - * to use the long_usage() helper below rather than call this. + * to use the usage() helper below rather than call this. * * @param errmsg If non-NULL, an error message to display * @param synopsis The initial example usage text (and possible examples) @@ -197,9 +197,9 @@ void util_version(void) __attribute__((noreturn)); * @param long_opts The structure of long options * @param opts_help An array of help strings (should align with long_opts) */ -void util_long_usage(const char *errmsg, const char *synopsis, - const char *short_opts, struct option const long_opts[], - const char * const opts_help[]) __attribute__((noreturn)); +void util_usage(const char *errmsg, const char *synopsis, + const char *short_opts, struct option const long_opts[], + const char * const opts_help[]) __attribute__((noreturn)); /** * Show usage and exit @@ -209,9 +209,9 @@ void util_long_usage(const char *errmsg, const char *synopsis, * * @param errmsg If non-NULL, an error message to display */ -#define long_usage(errmsg) \ - util_long_usage(errmsg, usage_synopsis, usage_short_opts, \ - usage_long_opts, usage_opts_help) +#define usage(errmsg) \ + util_usage(errmsg, usage_synopsis, usage_short_opts, \ + usage_long_opts, usage_opts_help) /** * Call getopt_long() with standard options @@ -241,8 +241,8 @@ void util_long_usage(const char *errmsg, const char *synopsis, /* Helper for getopt case statements */ #define case_USAGE_COMMON_FLAGS \ - case 'h': long_usage(NULL); \ + case 'h': usage(NULL); \ case 'V': util_version(); \ - case '?': long_usage("unknown option"); + case '?': usage("unknown option"); #endif /* _UTIL_H */ |