Util-Linux package development
 help / color / mirror / Atom feed
From: J William Piggott <elseifthen@gmx.com>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux@vger.kernel.org
Subject: [PATCH 4/5] docs: update boilerplate.c usage()
Date: Sun, 2 Jul 2017 15:54:24 -0400	[thread overview]
Message-ID: <9ba07b4f-74a7-084a-e10c-e512d2198441@gmx.com> (raw)
In-Reply-To: <9cf88d57-3a45-cd47-ac96-3495e09d81c5@gmx.com>


Signed-off-by: J William Piggott <elseifthen@gmx.com>
---
 Documentation/boilerplate.c | 37 ++++++++++++++++++-------------------
 1 file changed, 18 insertions(+), 19 deletions(-)

diff --git a/Documentation/boilerplate.c b/Documentation/boilerplate.c
index c97ad46..ae3fb5c 100644
--- a/Documentation/boilerplate.c
+++ b/Documentation/boilerplate.c
@@ -36,28 +36,27 @@
  */
 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);
 	print_usage_help_options(25); /* char offset to align option descriptions */
-	fprintf(out, USAGE_MAN_TAIL("fixme-command-name(1)"));
+	printf(USAGE_MAN_TAIL("fixme-command-name(1)"));
 	exit(EXIT_SUCCESS);
 }
 

  parent reply	other threads:[~2017-07-02 19:54 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-02 19:45 [PATCH 0/5] pull request J William Piggott
2017-07-02 19:50 ` [PATCH 1/5] hwclock: remove from usage() FILE *out = stdout J William Piggott
2017-07-02 19:51 ` [PATCH 2/5] hwclock: usage() use program_invocation_short_name J William Piggott
2017-07-03  8:46   ` Ruediger Meier
2017-07-03 15:14     ` J William Piggott
2017-07-03 19:31       ` J William Piggott
2017-07-02 19:53 ` [PATCH 3/5] hwclock: final usage() strings slice J William Piggott
2017-07-03  8:51   ` Ruediger Meier
2017-07-03 15:35     ` J William Piggott
2017-07-04  7:58       ` Karel Zak
2017-07-04  8:34         ` Bernhard Voelker
2017-07-04  8:55           ` Ruediger Meier
2017-07-04  9:00             ` Bernhard Voelker
2017-07-04 16:53             ` Karel Zak
2017-07-04 17:06               ` Karel Zak
2017-07-05 17:45         ` J William Piggott
2017-07-02 19:54 ` J William Piggott [this message]
2017-07-02 19:55 ` [PATCH 5/5] hwclock: sync one-liner descriptions J William Piggott
2017-07-10 23:34 ` [PING - REBASED][PATCH 0/5] pull request J William Piggott
2017-07-11  8:06   ` Karel Zak
2017-07-11 17:54     ` J William Piggott

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9ba07b4f-74a7-084a-e10c-e512d2198441@gmx.com \
    --to=elseifthen@gmx.com \
    --cc=kzak@redhat.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox