]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
column: make usage() translator friendly
authorSami Kerola <kerolasa@iki.fi>
Tue, 22 Jan 2013 23:27:13 +0000 (23:27 +0000)
committerKarel Zak <kzak@redhat.com>
Fri, 25 Jan 2013 15:40:05 +0000 (16:40 +0100)
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
text-utils/column.c

index 33bc28dfcda1f960cc51f866fea60a9c61d9a354..1f1a0a2a536d8d1259a2e8cd54435978d49486cc 100644 (file)
@@ -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);
 }