diff options
author | J William Piggott | 2017-07-02 02:44:46 +0200 |
---|---|---|
committer | J William Piggott | 2017-07-10 22:05:24 +0200 |
commit | dc05716f3aba99acdc127b4a0d7c0b227ec75983 (patch) | |
tree | 23ddf817d696da9027423b8116c4981914397720 /Documentation | |
parent | hwclock: final usage() strings slice (diff) | |
download | kernel-qcow2-util-linux-dc05716f3aba99acdc127b4a0d7c0b227ec75983.tar.gz kernel-qcow2-util-linux-dc05716f3aba99acdc127b4a0d7c0b227ec75983.tar.xz kernel-qcow2-util-linux-dc05716f3aba99acdc127b4a0d7c0b227ec75983.zip |
docs: update boilerplate.c usage()
Signed-off-by: J William Piggott <elseifthen@gmx.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/boilerplate.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/Documentation/boilerplate.c b/Documentation/boilerplate.c index ddac4e67a..68ffbf7ea 100644 --- a/Documentation/boilerplate.c +++ b/Documentation/boilerplate.c @@ -36,26 +36,25 @@ */ static void __attribute__((__noreturn__)) usage(void) { - FILE *out = stdout; - fputs(USAGE_HEADER, out); - fprintf(out, _(" %s [options] file...\n"), program_invocation_short_name); + fputs(USAGE_HEADER, stdout); + printf(_(" %s [options] file...\n"), program_invocation_short_name); - fputs(USAGE_SEPARATOR, out); - fputs(_("Short program description.\n"), out); + fputs(USAGE_SEPARATOR, stdout); + puts(_("Short program description.")); - fputs(USAGE_OPTIONS, out); - fputs(_(" -n, --no-argument option does not use argument\n"), out); - fputs(_(" --optional[=<arg>] option argument is optional\n"), out); - fputs(_(" -r, --required <arg> option requires an argument\n"), out); - fputs(_(" -z no long option\n"), out); - fputs(_(" --xyzzy a long option only\n"), out); - fputs(_(" -e, --extremely-long-long-option\n" - " use next line for description when needed\n"), out); - fputs(_(" -l, --long-explanation an example of very verbose, and chatty option\n" - " description on two, or multiple lines, where the\n" - " consecutive lines are intended by two spaces\n"), out); - fputs(_(" -f, --foobar next option description resets indent\n"), out); - fputs(USAGE_SEPARATOR, out); + fputs(USAGE_OPTIONS, stdout); + puts(_(" -n, --no-argument option does not use argument")); + puts(_(" --optional[=<arg>] option argument is optional")); + puts(_(" -r, --required <arg> option requires an argument")); + puts(_(" -z no long option")); + puts(_(" --xyzzy a long option only")); + puts(_(" -e, --extremely-long-long-option\n" + " use next line for description when needed")); + puts(_(" -l, --long-explanation an example of very verbose, and chatty option\n" + " description on two, or multiple lines, where the\n" + " consecutive lines are intended by two spaces")); + puts(_(" -f, --foobar next option description resets indent")); + fputs(USAGE_SEPARATOR, stdout); printf(USAGE_HELP_OPTIONS(25)); /* char offset to align option descriptions */ printf(USAGE_MAN_TAIL("fixme-command-name(1)")); exit(EXIT_SUCCESS); |