diff options
author | Sami Kerola | 2014-09-28 21:51:41 +0200 |
---|---|---|
committer | Karel Zak | 2014-10-01 12:33:26 +0200 |
commit | db433bf737a5fd4e1c7cca5e3603934743eebd1c (patch) | |
tree | de811b6d372bf7cba52535d2d1de770541499b34 /term-utils | |
parent | textual: use manual tail usage() macro (diff) | |
download | kernel-qcow2-util-linux-db433bf737a5fd4e1c7cca5e3603934743eebd1c.tar.gz kernel-qcow2-util-linux-db433bf737a5fd4e1c7cca5e3603934743eebd1c.tar.xz kernel-qcow2-util-linux-db433bf737a5fd4e1c7cca5e3603934743eebd1c.zip |
textual: use usage() text element macros
Translating these text elements should happen only once, which is
more likely when the text macros are used properly.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'term-utils')
-rw-r--r-- | term-utils/script.c | 4 | ||||
-rw-r--r-- | term-utils/scriptreplay.c | 4 | ||||
-rw-r--r-- | term-utils/write.c | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/term-utils/script.c b/term-utils/script.c index d2b897416..7d3787e96 100644 --- a/term-utils/script.c +++ b/term-utils/script.c @@ -138,11 +138,11 @@ die_if_link(char *fn) { static void __attribute__((__noreturn__)) usage(FILE *out) { - fputs(_("\nUsage:\n"), out); + fputs(USAGE_HEADER, out); fprintf(out, _(" %s [options] [file]\n"), program_invocation_short_name); - fputs(_("\nOptions:\n"), out); + fputs(USAGE_OPTIONS, out); fputs(_(" -a, --append append the output\n" " -c, --command <command> run command rather than interactive shell\n" " -e, --return return exit code of the child process\n" diff --git a/term-utils/scriptreplay.c b/term-utils/scriptreplay.c index 7ac50d868..fb5ded31e 100644 --- a/term-utils/scriptreplay.c +++ b/term-utils/scriptreplay.c @@ -37,12 +37,12 @@ static void __attribute__((__noreturn__)) usage(FILE *out) { - fputs(_("\nUsage:\n"), out); + fputs(USAGE_HEADER, out); fprintf(out, _(" %s [-t] timingfile [typescript] [divisor]\n"), program_invocation_short_name); - fputs(_("\nOptions:\n"), out); + fputs(USAGE_OPTIONS, out); fputs(_(" -t, --timing <file> script timing output file\n" " -s, --typescript <file> script terminal session output file\n" " -d, --divisor <num> speed up or slow down execution with time divisor\n" diff --git a/term-utils/write.c b/term-utils/write.c index e64bb439c..ca40354f7 100644 --- a/term-utils/write.c +++ b/term-utils/write.c @@ -77,14 +77,14 @@ static gid_t root_access; static void __attribute__ ((__noreturn__)) usage(FILE * out) { - fputs(_("\nUsage:\n"), out); + fputs(USAGE_HEADER, out); fprintf(out, _(" %s [options] <user> [<ttyname>]\n"), program_invocation_short_name); - fputs(_("\nOptions:\n"), out); - fputs(_(" -V, --version output version information and exit\n" - " -h, --help display this help and exit\n\n"), out); + fputs(USAGE_OPTIONS, out); + fputs(USAGE_HELP, out); + fputs(USAGE_VERSION, out); fprintf(out, USAGE_MAN_TAIL("write(1)")); exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS); |