public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: kerolasa@iki.fi
Subject: [PATCH 14/14] column: make usage() translator friendly
Date: Tue, 22 Jan 2013 23:27:13 +0000	[thread overview]
Message-ID: <1358897233-6676-15-git-send-email-kerolasa@iki.fi> (raw)
In-Reply-To: <1358897233-6676-1-git-send-email-kerolasa@iki.fi>

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
 text-utils/column.c | 29 ++++++++++++++---------------
 1 file changed, 14 insertions(+), 15 deletions(-)

diff --git a/text-utils/column.c b/text-utils/column.c
index 33bc28d..1f1a0a2 100644
--- a/text-utils/column.c
+++ b/text-utils/column.c
@@ -88,21 +88,20 @@ static void __attribute__((__noreturn__)) usage(int rc)
 {
 	FILE *out = rc == EXIT_FAILURE ? stderr : stdout;
 
-	fprintf(out, _("\nUsage: %s [options] [file ...]\n"),
-				program_invocation_short_name);
-	fprintf(out, _("\nOptions:\n"));
-
-	fprintf(out, _(
-	" -h, --help               displays this help text\n"
-	" -V, --version            output version information and exit\n"
-	" -c, --columns <width>    width of output in number of characters\n"
-	" -t, --table              create a table\n"
-	" -s, --separator <string> possible table delimiters\n"
-	" -o, --output-separator <string>\n"
-	"                          table output column separator, default is two spaces\n"
-	" -x, --fillrows           fill rows before columns\n"));
-
-	fprintf(out, _("\nFor more information see column(1).\n"));
+	fputs(USAGE_HEADER, out);
+	fprintf(out, _(" %s [options] [file ...]\n"), program_invocation_short_name);
+	fputs(USAGE_OPTIONS, out);
+	fputs(_(" -c, --columns <width>    width of output in number of characters\n"), out);
+	fputs(_(" -t, --table              create a table\n"), out);
+	fputs(_(" -s, --separator <string> possible table delimiters\n"), out);
+	fputs(_(" -o, --output-separator <string>\n"), out);
+	fputs(_("                          table output column separator, default is two spaces\n"), out);
+	fputs(_(" -x, --fillrows           fill rows before columns\n"), out);
+	fputs(USAGE_SEPARATOR, out);
+	fputs(USAGE_HELP, out);
+	fputs(USAGE_VERSION, out);
+	fprintf(out, USAGE_MAN_TAIL("column(1)"));
+
 	exit(rc);
 }
 
-- 
1.8.1.1


  parent reply	other threads:[~2013-01-22 23:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-22 23:26 [PATCH 00/14]: usage() fixes for translators Sami Kerola
2013-01-22 23:27 ` [PATCH 01/14] docs: usage function and gettext Sami Kerola
2013-01-22 23:27 ` [PATCH 02/14] nsenter: make usage() translator friendly Sami Kerola
2013-01-22 23:27 ` [PATCH 03/14] partx: " Sami Kerola
2013-01-22 23:27 ` [PATCH 04/14] su-common: " Sami Kerola
2013-01-22 23:27 ` [PATCH 05/14] findmnt: " Sami Kerola
2013-01-22 23:27 ` [PATCH 06/14] lsblk: " Sami Kerola
2013-01-22 23:27 ` [PATCH 07/14] rename: " Sami Kerola
2013-01-22 23:27 ` [PATCH 08/14] dmesg: " Sami Kerola
2013-01-22 23:27 ` [PATCH 09/14] hwclock: make usage() change " Sami Kerola
2013-01-22 23:27 ` [PATCH 10/14] losetup: make usage() " Sami Kerola
2013-01-22 23:27 ` [PATCH 11/14] umount: " Sami Kerola
2013-01-22 23:27 ` [PATCH 12/14] unshare: " Sami Kerola
2013-01-22 23:27 ` [PATCH 13/14] agetty: " Sami Kerola
2013-01-22 23:27 ` Sami Kerola [this message]
2013-01-25 15:40 ` [PATCH 00/14]: usage() fixes for translators Karel Zak

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=1358897233-6676-15-git-send-email-kerolasa@iki.fi \
    --to=kerolasa@iki.fi \
    --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