Simplify specification of per-option help text. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hugectl.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/hugectl.c b/hugectl.c index d9b7040..8ba794c 100644 --- a/hugectl.c +++ b/hugectl.c @@ -40,11 +40,15 @@ extern int errno; extern int optind; extern char *optarg; +#define OPTION(opts, text) fprintf(stderr, " %-25s %s\n", opts, text) +#define CONT(text) fprintf(stderr, " %-25s %s\n", "", text) + void print_usage() { fprintf(stderr, "hugectl [options] target\n"); fprintf(stderr, "options:\n"); - fprintf(stderr, " --help, -h Prints this message.\n"); + + OPTION("--help, -h", "Prints this message"); } int main(int argc, char** argv) -- 1.5.6.GIT ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Libhugetlbfs-devel mailing list Libhugetlbfs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel