From 8bb05ac73a5b448b339ce0bc8d396c82c459b47f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 21:33:32 +0200 Subject: Merging upstream version 2.40. Signed-off-by: Daniel Baumann --- Documentation/boilerplate.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'Documentation/boilerplate.c') diff --git a/Documentation/boilerplate.c b/Documentation/boilerplate.c index 9cad6be..4fc4383 100644 --- a/Documentation/boilerplate.c +++ b/Documentation/boilerplate.c @@ -9,11 +9,10 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * - * fixme-command-name - purpose of it - * * Copyright (c) 20nn Example Commercial, Inc * Written by Your Name * + * fixme-command-name - purpose of it */ #include #include @@ -31,26 +30,26 @@ static void __attribute__((__noreturn__)) usage(void) { fputs(USAGE_HEADER, stdout); - printf(_(" %s [options] file...\n"), program_invocation_short_name); + fprintf(stdout, _(" %s [options] file...\n"), program_invocation_short_name); fputs(USAGE_SEPARATOR, stdout); - puts(_("Short program description.")); + fputsln(_("Short program description."), stdout); fputs(USAGE_OPTIONS, stdout); - puts(_(" -n, --no-argument option does not use argument")); - puts(_(" --optional[=] option argument is optional")); - puts(_(" -r, --required 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" + fputsln(_(" -n, --no-argument option does not use argument"), stdout); + fputsln(_(" --optional[=] option argument is optional"), stdout); + fputsln(_(" -r, --required option requires an argument"), stdout); + fputsln(_(" -z no long option"), stdout); + fputsln(_(" --xyzzy a long option only"), stdout); + fputsln(_(" -e, --extremely-long-long-option\n" + " use next line for description when needed"), stdout); + fputsln(_(" -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")); + " consecutive lines are intended by two spaces"), stdout); + fputsln(_(" -f, --foobar next option description resets indent"), stdout); fputs(USAGE_SEPARATOR, stdout); - printf(USAGE_HELP_OPTIONS(25)); /* char offset to align option descriptions */ - printf(USAGE_MAN_TAIL("fixme-command-name(1)")); + fprintf(stdout, USAGE_HELP_OPTIONS(25)); /* char offset to align option descriptions */ + fprintf(stdout, USAGE_MAN_TAIL("fixme-command-name(1)")); exit(EXIT_SUCCESS); } -- cgit v1.2.3