diff options
author | Jim Meyering <jim@meyering.net> | 2001-12-15 20:46:30 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2001-12-15 20:46:30 +0000 |
commit | 2fae9e5d26536fc61ad06a3d295c9bb8e40d215e (patch) | |
tree | 95b997f03d6570981ce5d104a4500b6ffd446768 /src/printf.c | |
parent | 9be58099c4347a6bc27609b88b5f3ac8c1e054ac (diff) | |
download | coreutils-2fae9e5d26536fc61ad06a3d295c9bb8e40d215e.tar.xz |
Use new macros, HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTION
instead of hard-coding --help and --version descriptions.
Split --help output into smaller pieces.
Use fputs, not printf.
Diffstat (limited to 'src/printf.c')
-rw-r--r-- | src/printf.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/printf.c b/src/printf.c index 028dc385a..0487d19f4 100644 --- a/src/printf.c +++ b/src/printf.c @@ -99,35 +99,45 @@ Usage: %s FORMAT [ARGUMENT]...\n\ or: %s OPTION\n\ "), program_name, program_name); - printf (_("\ + fputs (_("\ Print ARGUMENT(s) according to FORMAT.\n\ \n\ - --help display this help and exit\n\ - --version output version information and exit\n\ +"), stdout); + fputs (HELP_OPTION_DESCRIPTION, stdout); + fputs (VERSION_OPTION_DESCRIPTION, stdout); + fputs (_("\ \n\ FORMAT controls the output as in C printf. Interpreted sequences are:\n\ \n\ \\\" double quote\n\ \\0NNN character with octal value NNN (0 to 3 digits)\n\ \\\\ backslash\n\ +"), stdout); + fputs (_("\ \\a alert (BEL)\n\ \\b backspace\n\ \\c produce no further output\n\ \\f form feed\n\ +"), stdout); + fputs (_("\ \\n new line\n\ \\r carriage return\n\ \\t horizontal tab\n\ \\v vertical tab\n\ +"), stdout); + fputs (_("\ \\xNNN byte with hexadecimal value NNN (1 to 3 digits)\n\ \n\ \\uNNNN character with hexadecimal value NNNN (4 digits)\n\ \\UNNNNNNNN character with hexadecimal value NNNNNNNN (8 digits)\n\ - %%%% a single %%\n\ - %%b ARGUMENT as a string with `\\' escapes interpreted\n\ +"), stdout); + fputs (_("\ + %% a single %\n\ + %b ARGUMENT as a string with `\\' escapes interpreted\n\ \n\ and all C format specifications ending with one of diouxXfeEgGcs, with\n\ ARGUMENTs converted to proper type first. Variable widths are handled.\n\ -")); +"), stdout); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); |