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 | |
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.
-rw-r--r-- | src/basename.c | 8 | ||||
-rw-r--r-- | src/chroot.c | 12 | ||||
-rw-r--r-- | src/date.c | 106 | ||||
-rw-r--r-- | src/dirname.c | 8 | ||||
-rw-r--r-- | src/echo.c | 14 | ||||
-rw-r--r-- | src/env.c | 12 | ||||
-rw-r--r-- | src/expr.c | 28 | ||||
-rw-r--r-- | src/factor.c | 10 | ||||
-rw-r--r-- | src/hostid.c | 7 | ||||
-rw-r--r-- | src/hostname.c | 10 | ||||
-rw-r--r-- | src/id.c | 12 | ||||
-rw-r--r-- | src/kill.c | 12 | ||||
-rw-r--r-- | src/logname.c | 10 | ||||
-rw-r--r-- | src/nice.c | 9 | ||||
-rw-r--r-- | src/pathchk.c | 8 | ||||
-rw-r--r-- | src/pinky.c | 10 | ||||
-rw-r--r-- | src/printenv.c | 6 | ||||
-rw-r--r-- | src/printf.c | 22 | ||||
-rw-r--r-- | src/pwd.c | 10 | ||||
-rw-r--r-- | src/seq.c | 16 | ||||
-rw-r--r-- | src/sleep.c | 6 | ||||
-rw-r--r-- | src/stty.c | 82 | ||||
-rw-r--r-- | src/su.c | 10 | ||||
-rw-r--r-- | src/tee.c | 8 | ||||
-rw-r--r-- | src/test.c | 34 | ||||
-rw-r--r-- | src/true.c | 8 | ||||
-rw-r--r-- | src/tty.c | 10 | ||||
-rw-r--r-- | src/uname.c | 9 | ||||
-rw-r--r-- | src/uptime.c | 7 | ||||
-rw-r--r-- | src/users.c | 7 | ||||
-rw-r--r-- | src/who.c | 16 | ||||
-rw-r--r-- | src/whoami.c | 9 | ||||
-rw-r--r-- | src/yes.c | 9 |
33 files changed, 337 insertions, 208 deletions
diff --git a/src/basename.c b/src/basename.c index f76da4278..8cd7400d9 100644 --- a/src/basename.c +++ b/src/basename.c @@ -56,13 +56,13 @@ Usage: %s NAME [SUFFIX]\n\ or: %s OPTION\n\ "), program_name, program_name); - printf (_("\ + fputs (_("\ Print NAME with any leading directory components removed.\n\ If specified, also remove a trailing SUFFIX.\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); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); diff --git a/src/chroot.c b/src/chroot.c index df050d04d..edc2da58e 100644 --- a/src/chroot.c +++ b/src/chroot.c @@ -1,5 +1,5 @@ /* chroot -- run command or shell with special root directory - Copyright (C) 95, 96, 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 95, 96, 1997, 1999, 2000, 2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -46,14 +46,16 @@ usage (int status) Usage: %s NEWROOT [COMMAND...]\n\ or: %s OPTION\n\ "), program_name, program_name); - printf (_("\ + fputs (_("\ Run COMMAND with root directory set to NEWROOT.\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\ If no command is given, run ``${SHELL} -i'' (default: /bin/sh).\n\ -")); +"), stdout); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); diff --git a/src/date.c b/src/date.c index ea02bb3f4..1c7506b5c 100644 --- a/src/date.c +++ b/src/date.c @@ -120,7 +120,7 @@ Usage: %s [OPTION]... [+FORMAT]\n\ or: %s [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]\n\ "), program_name, program_name); - printf (_("\ + fputs (_("\ Display the current time in the given FORMAT, or set the system date.\n\ \n\ -d, --date=STRING display time described by STRING, not `now'\n\ @@ -129,61 +129,81 @@ Display the current time in the given FORMAT, or set the system date.\n\ TIMESPEC=`date' (or missing) for date only,\n\ `hours', `minutes', or `seconds' for date and\n\ time to the indicated precision.\n\ +"), stdout); + fputs (_("\ -r, --reference=FILE display the last modification time of FILE\n\ -R, --rfc-822 output RFC-822 compliant date string\n\ -s, --set=STRING set time described by STRING\n\ -u, --utc, --universal print or set Coordinated Universal Time\n\ - --help display this help and exit\n\ - --version output version information and exit\n\ -")); - printf (_("\ +"), stdout); + fputs (HELP_OPTION_DESCRIPTION, stdout); + fputs (VERSION_OPTION_DESCRIPTION, stdout); + fputs (_("\ \n\ FORMAT controls the output. The only valid option for the second form\n\ specifies Coordinated Universal Time. Interpreted sequences are:\n\ \n\ - %%%% a literal %%\n\ - %%a locale's abbreviated weekday name (Sun..Sat)\n\ - %%A locale's full weekday name, variable length (Sunday..Saturday)\n\ - %%b locale's abbreviated month name (Jan..Dec)\n\ - %%B locale's full month name, variable length (January..December)\n\ - %%c locale's date and time (Sat Nov 04 12:02:33 EST 1989)\n\ - %%C century (year divided by 100 and truncated to an integer) [00-99]\n\ - %%d day of month (01..31)\n\ - %%D date (mm/dd/yy)\n\ - %%e day of month, blank padded ( 1..31)\n\ - %%h same as %%b\n\ - %%H hour (00..23)\n\ - %%I hour (01..12)\n\ - %%j day of year (001..366)\n\ - %%k hour ( 0..23)\n\ - %%l hour ( 1..12)\n\ - %%m month (01..12)\n\ - %%M minute (00..59)\n\ - %%n a newline\n\ - %%p locale's AM or PM\n\ - %%r time, 12-hour (hh:mm:ss [AP]M)\n\ - %%s seconds since `00:00:00 1970-01-01 UTC' (a GNU extension)\n\ - %%S second (00..60)\n\ - %%t a horizontal tab\n\ - %%T time, 24-hour (hh:mm:ss)\n\ - %%u day of week (1..7); 1 represents Monday\n\ - %%U week number of year with Sunday as first day of week (00..53)\n\ - %%V week number of year with Monday as first day of week (01..53)\n\ - %%w day of week (0..6); 0 represents Sunday\n\ - %%W week number of year with Monday as first day of week (00..53)\n\ - %%x locale's date representation (mm/dd/yy)\n\ - %%X locale's time representation (%%H:%%M:%%S)\n\ - %%y last two digits of year (00..99)\n\ - %%Y year (1970...)\n\ - %%z RFC-822 style numeric timezone (-0500) (a nonstandard extension)\n\ - %%Z time zone (e.g., EDT), or nothing if no time zone is determinable\n\ + %% a literal %\n\ + %a locale's abbreviated weekday name (Sun..Sat)\n\ +"), stdout); + fputs (_("\ + %A locale's full weekday name, variable length (Sunday..Saturday)\n\ + %b locale's abbreviated month name (Jan..Dec)\n\ + %B locale's full month name, variable length (January..December)\n\ + %c locale's date and time (Sat Nov 04 12:02:33 EST 1989)\n\ +"), stdout); + fputs (_("\ + %C century (year divided by 100 and truncated to an integer) [00-99]\n\ + %d day of month (01..31)\n\ + %D date (mm/dd/yy)\n\ + %e day of month, blank padded ( 1..31)\n\ +"), stdout); + fputs (_("\ + %h same as %b\n\ + %H hour (00..23)\n\ + %I hour (01..12)\n\ + %j day of year (001..366)\n\ +"), stdout); + fputs (_("\ + %k hour ( 0..23)\n\ + %l hour ( 1..12)\n\ + %m month (01..12)\n\ + %M minute (00..59)\n\ +"), stdout); + fputs (_("\ + %n a newline\n\ + %p locale's AM or PM\n\ + %r time, 12-hour (hh:mm:ss [AP]M)\n\ + %s seconds since `00:00:00 1970-01-01 UTC' (a GNU extension)\n\ +"), stdout); + fputs (_("\ + %S second (00..60)\n\ + %t a horizontal tab\n\ + %T time, 24-hour (hh:mm:ss)\n\ + %u day of week (1..7); 1 represents Monday\n\ +"), stdout); + fputs (_("\ + %U week number of year with Sunday as first day of week (00..53)\n\ + %V week number of year with Monday as first day of week (01..53)\n\ + %w day of week (0..6); 0 represents Sunday\n\ + %W week number of year with Monday as first day of week (00..53)\n\ +"), stdout); + fputs (_("\ + %x locale's date representation (mm/dd/yy)\n\ + %X locale's time representation (%H:%M:%S)\n\ + %y last two digits of year (00..99)\n\ + %Y year (1970...)\n\ +"), stdout); + fputs (_("\ + %z RFC-822 style numeric timezone (-0500) (a nonstandard extension)\n\ + %Z time zone (e.g., EDT), or nothing if no time zone is determinable\n\ \n\ By default, date pads numeric fields with zeroes. GNU date recognizes\n\ -the following modifiers between `%%' and a numeric directive.\n\ +the following modifiers between `%' and a numeric directive.\n\ \n\ `-' (hyphen) do not pad the field\n\ `_' (underscore) pad the field with spaces\n\ -")); +"), stdout); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); diff --git a/src/dirname.c b/src/dirname.c index 982a2cf7f..99948d519 100644 --- a/src/dirname.c +++ b/src/dirname.c @@ -49,13 +49,13 @@ Usage: %s NAME\n\ or: %s OPTION\n\ "), program_name, program_name); - printf (_("\ + fputs (_("\ Print NAME with its trailing /component removed; if NAME contains no /'s,\n\ output `.' (meaning the current directory).\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); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); diff --git a/src/echo.c b/src/echo.c index deb22bda1..8dbe53b75 100644 --- a/src/echo.c +++ b/src/echo.c @@ -1,5 +1,5 @@ /* echo.c, derived from code echo.c in Bash. - Copyright (C) 87,89, 1991-1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 87,89, 1991-1997, 1999, 2000, 2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -75,15 +75,17 @@ usage (int status) else { printf (_("Usage: %s [OPTION]... [STRING]...\n"), program_name); - printf (_("\ + fputs (_("\ Echo the STRING(s) to standard output.\n\ \n\ -n do not output the trailing newline\n\ -e enable interpretation of the backslash-escaped characters\n\ listed below\n\ -E disable interpretation of those sequences in STRINGs\n\ - --help display this help and exit (should be alone)\n\ - --version output version information and exit (should be alone)\n\ +"), stdout); + fputs (HELP_OPTION_DESCRIPTION, stdout); + fputs (VERSION_OPTION_DESCRIPTION, stdout); + fputs (_("\ \n\ Without -E, the following sequences are recognized and interpolated:\n\ \n\ @@ -91,13 +93,15 @@ Without -E, the following sequences are recognized and interpolated:\n\ \\\\ backslash\n\ \\a alert (BEL)\n\ \\b backspace\n\ +"), stdout); + fputs (_("\ \\c suppress trailing newline\n\ \\f form feed\n\ \\n new line\n\ \\r carriage return\n\ \\t horizontal tab\n\ \\v vertical tab\n\ -")); +"), stdout); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); @@ -1,5 +1,5 @@ /* env - run a program in a modified environment - Copyright (C) 1986, 1991-2000 Free Software Foundation, Inc. + Copyright (C) 1986, 1991-2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -119,16 +119,18 @@ usage (int status) printf (_("\ Usage: %s [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...]\n"), program_name); - printf (_("\ + fputs (_("\ Set each NAME to VALUE in the environment and run COMMAND.\n\ \n\ -i, --ignore-environment start with an empty environment\n\ -u, --unset=NAME remove variable from the environment\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\ A mere - implies -i. If no COMMAND, print the resulting environment.\n\ -")); +"), stdout); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); diff --git a/src/expr.c b/src/expr.c index 4003802a9..53a1849f7 100644 --- a/src/expr.c +++ b/src/expr.c @@ -92,19 +92,19 @@ Usage: %s EXPRESSION\n\ or: %s OPTION\n\ "), program_name, program_name); - printf (_("\ -\n\ - --help display this help and exit\n\ - --version output version information and exit\n\ + fputs ("\n", stdout); + fputs (HELP_OPTION_DESCRIPTION, stdout); + fputs (VERSION_OPTION_DESCRIPTION, stdout); + fputs (_("\ \n\ -")); - printf (_("\ Print the value of EXPRESSION to standard output. A blank line below\n\ separates increasing precedence groups. EXPRESSION may be:\n\ \n\ ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2\n\ \n\ ARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0\n\ +"), stdout); + fputs (_("\ \n\ ARG1 < ARG2 ARG1 is less than ARG2\n\ ARG1 <= ARG2 ARG1 is less than or equal to ARG2\n\ @@ -112,13 +112,19 @@ separates increasing precedence groups. EXPRESSION may be:\n\ ARG1 != ARG2 ARG1 is unequal to ARG2\n\ ARG1 >= ARG2 ARG1 is greater than or equal to ARG2\n\ ARG1 > ARG2 ARG1 is greater than ARG2\n\ +"), stdout); + fputs (_("\ \n\ ARG1 + ARG2 arithmetic sum of ARG1 and ARG2\n\ ARG1 - ARG2 arithmetic difference of ARG1 and ARG2\n\ +"), stdout); + fputs (_("\ \n\ ARG1 * ARG2 arithmetic product of ARG1 and ARG2\n\ ARG1 / ARG2 arithmetic quotient of ARG1 divided by ARG2\n\ - ARG1 %% ARG2 arithmetic remainder of ARG1 divided by ARG2\n\ + ARG1 % ARG2 arithmetic remainder of ARG1 divided by ARG2\n\ +"), stdout); + fputs (_("\ \n\ STRING : REGEXP anchored pattern match of REGEXP in STRING\n\ \n\ @@ -126,18 +132,20 @@ separates increasing precedence groups. EXPRESSION may be:\n\ substr STRING POS LENGTH substring of STRING, POS counted from 1\n\ index STRING CHARS index in STRING where any CHARS is found, or 0\n\ length STRING length of STRING\n\ +"), stdout); + fputs (_("\ + TOKEN interpret TOKEN as a string, even if it is a\n\ keyword like `match' or an operator like `/'\n\ \n\ ( EXPRESSION ) value of EXPRESSION\n\ -")); - printf (_("\ +"), stdout); + fputs (_("\ \n\ Beware that many operators need to be escaped or quoted for shells.\n\ Comparisons are arithmetic if both ARGs are numbers, else lexicographical.\n\ Pattern matches return the string matched between \\( and \\) or null; if\n\ \\( and \\) are not used, they return the number of characters matched or 0.\n\ -")); +"), stdout); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); diff --git a/src/factor.c b/src/factor.c index ef2b749db..52f0ee939 100644 --- a/src/factor.c +++ b/src/factor.c @@ -76,15 +76,17 @@ Usage: %s [NUMBER]...\n\ or: %s OPTION\n\ "), program_name, program_name); - printf (_("\ + fputs (_("\ Print the prime factors of each NUMBER.\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\ Print the prime factors of all specified integer NUMBERs. If no arguments\n\ are specified on the command line, they are read from standard input.\n\ -")); +"), stdout); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); diff --git a/src/hostid.c b/src/hostid.c index b1cfb0e1a..744d7edb5 100644 --- a/src/hostid.c +++ b/src/hostid.c @@ -1,5 +1,5 @@ /* print the hexadecimal identifier for the current host - Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2000, 2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -50,11 +50,10 @@ Usage: %s\n\ or: %s OPTION\n\ Print the numeric identifier (in hexadecimal) for the current host.\n\ \n\ - --help display this help and exit\n\ - --version output version information and exit\n\ -\n\ "), program_name, program_name); + fputs (HELP_OPTION_DESCRIPTION, stdout); + fputs (VERSION_OPTION_DESCRIPTION, stdout); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); diff --git a/src/hostname.c b/src/hostname.c index e55f407bb..2171ff053 100644 --- a/src/hostname.c +++ b/src/hostname.c @@ -1,5 +1,5 @@ /* hostname - set or print the name of current host system - Copyright (C) 1994-1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1994-1997, 1999, 2000, 2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -69,10 +69,10 @@ Usage: %s [NAME]\n\ or: %s OPTION\n\ Print or set the hostname of the current system.\n\ \n\ - --help display this help and exit\n\ - --version output version information and exit\n\ -") - , program_name, program_name); +"), + program_name, program_name); + fputs (HELP_OPTION_DESCRIPTION, stdout); + fputs (VERSION_OPTION_DESCRIPTION, stdout); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); @@ -1,5 +1,5 @@ /* id -- print real and effective UIDs and GIDs - Copyright (C) 1989-2000 Free Software Foundation, Inc. + Copyright (C) 1989-2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -85,7 +85,7 @@ usage (int status) else { printf (_("Usage: %s [OPTION]... [USERNAME]\n"), program_name); - printf (_("\ + fputs (_("\ Print information for USERNAME, or the current user.\n\ \n\ -a ignore, for compatibility with other versions\n\ @@ -94,11 +94,13 @@ Print information for USERNAME, or the current user.\n\ -n, --name print a name instead of a number, for -ugG\n\ -r, --real print the real ID instead of the effective ID, with -ugG\n\ -u, --user print only the effective user ID\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\ Without any OPTION, print some useful set of identified information.\n\ -")); +"), stdout); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); diff --git a/src/kill.c b/src/kill.c index 2be53d955..d0c8ea84f 100644 --- a/src/kill.c +++ b/src/kill.c @@ -327,7 +327,7 @@ Usage: %s [-s SIGSPEC | -n SIGNUM | -SIGSPEC] PID ...\n\ or: %s -l [SIGSPEC] ...\n\ "), program_name, program_name); - printf (_("\ + fputs (_("\ Send the signal named by SIGSPEC or SIGNUM to processes named by PID.\n\ \n\ -s, --" OPT_SIGSPEC_LONG " SIGSPEC name or number of signal to be sent\n\ @@ -336,14 +336,14 @@ Send the signal named by SIGSPEC or SIGNUM to processes named by PID.\n\ -l, --list list the signal names\n\ -L, --long-list list the signal names with their numbers\n\ \n\ - --help display this help and exit\n\ - --version output version information and exit\n\ -")); - printf (_("\ +"), stdout); + fputs (HELP_OPTION_DESCRIPTION, stdout); + fputs (VERSION_OPTION_DESCRIPTION, stdout); + fputs (_("\ \n\ kill returns true if at least one signal was successfully sent, or\n\ false if an error occurs or an invalid option is encountered.\n\ -")); +"), stdout); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); diff --git a/src/logname.c b/src/logname.c index aa4c43b90..805ef3190 100644 --- a/src/logname.c +++ b/src/logname.c @@ -1,5 +1,5 @@ /* logname -- print user's login name - Copyright (C) 1990-1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1990-1997, 1999, 2000, 2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -46,12 +46,12 @@ usage (int status) else { printf (_("Usage: %s [OPTION]\n"), program_name); - printf (_("\ + fputs (_("\ Print the name of the current user.\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); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); diff --git a/src/nice.c b/src/nice.c index 1fbcd9046..784b2cc86 100644 --- a/src/nice.c +++ b/src/nice.c @@ -1,5 +1,5 @@ /* nice -- run a program with modified scheduling priority - Copyright (C) 1990-2000 Free Software Foundation, Inc. + Copyright (C) 1990-2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -64,15 +64,16 @@ usage (int status) else { printf (_("Usage: %s [OPTION] [COMMAND [ARG]...]\n"), program_name); - printf (_("\ + fputs (_("\ Run COMMAND with an adjusted scheduling priority.\n\ With no COMMAND, print the current scheduling priority. ADJUST is 10\n\ by default. Range goes from -20 (highest priority) to 19 (lowest).\n\ \n\ -ADJUST increment priority by ADJUST first\n\ -n, --adjustment=ADJUST same as -ADJUST\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); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); diff --git a/src/pathchk.c b/src/pathchk.c index 132e59dac..9ba4da50a 100644 --- a/src/pathchk.c +++ b/src/pathchk.c @@ -138,13 +138,13 @@ usage (int status) else { printf (_("Usage: %s [OPTION]... NAME...\n"), program_name); - printf (_("\ + fputs (_("\ Diagnose unportable constructs in NAME.\n\ \n\ -p, --portability check for all POSIX systems, not only this one\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); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); diff --git a/src/pinky.c b/src/pinky.c index 74d0a8902..8df3cfb13 100644 --- a/src/pinky.c +++ b/src/pinky.c @@ -467,20 +467,24 @@ usage (int status) else { printf (_("Usage: %s [OPTION]... [USER]...\n"), program_name); - printf (_("\ + fputs (_("\ \n\ -l produce long format output for the specified USERs\n\ -b omit the user's home directory and shell in long format\n\ -h omit the user's project file in long format\n\ -p omit the user's plan file in long format\n\ -s do short format output, this is the default\n\ +"), stdout); + fputs (_("\ -f omit the line of column headings in short format\n\ -w omit the user's full name in short format\n\ -i omit the user's full name and remote host in short format\n\ -q omit the user's full name, remote host and idle time\n\ in short format\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); + printf (_("\ \n\ A lightweight `finger' program; print user information.\n\ The utmp file will be %s.\n\ diff --git a/src/printenv.c b/src/printenv.c index 417ac07b3..a8526c669 100644 --- a/src/printenv.c +++ b/src/printenv.c @@ -1,5 +1,5 @@ /* printenv -- print all or part of environment - Copyright (C) 1989-1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1989-1997, 1999, 2000, 2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -65,10 +65,10 @@ Usage: %s [VARIABLE]...\n\ or: %s OPTION\n\ If no environment VARIABLE specified, print them all.\n\ \n\ - --help display this help and exit\n\ - --version output version information and exit\n\ "), program_name, program_name); + fputs (HELP_OPTION_DESCRIPTION, stdout); + fputs (VERSION_OPTION_DESCRIPTION, stdout); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); 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); @@ -1,5 +1,5 @@ /* pwd - print current directory - Copyright (C) 1994-1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1994-1997, 1999, 2000, 2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -45,12 +45,12 @@ usage (int status) else { printf (_("Usage: %s [OPTION]\n"), program_name); - printf (_("\ + fputs (_("\ Print the full filename of the current working directory.\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); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); @@ -1,5 +1,5 @@ /* seq - print sequence of numbers to standard output. - Copyright (C) 1994-2000 Free Software Foundation, Inc. + Copyright (C) 1994-2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -84,21 +84,23 @@ Usage: %s [OPTION]... LAST\n\ or: %s [OPTION]... FIRST LAST\n\ or: %s [OPTION]... FIRST INCREMENT LAST\n\ "), program_name, program_name, program_name); - printf (_("\ + fputs (_("\ Print numbers from FIRST to LAST, in steps of INCREMENT.\n\ \n\ - -f, --format FORMAT use printf(3) style FORMAT (default: %%g)\n\ + -f, --format FORMAT use printf(3) style FORMAT (default: %g)\n\ -s, --separator STRING use STRING to separate numbers (default: \\n)\n\ -w, --equal-width equalize width by padding with leading zeroes\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\ If FIRST or INCREMENT is omitted, it defaults to 1.\n\ FIRST, INCREMENT, and LAST are interpreted as floating point values.\n\ INCREMENT should be positive if FIRST is smaller than LAST, and negative\n\ otherwise. When given, the FORMAT argument must contain exactly one of\n\ -the printf-style, floating point output formats %%e, %%f, %%g\n\ -")); +the printf-style, floating point output formats %e, %f, %g\n\ +"), stdout); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); diff --git a/src/sleep.c b/src/sleep.c index ad8e4514d..174833328 100644 --- a/src/sleep.c +++ b/src/sleep.c @@ -1,5 +1,5 @@ /* sleep - delay for a specified amount of time. - Copyright (C) 84, 1991-1997, 1999-2000 Free Software Foundation, Inc. + Copyright (C) 84, 1991-1997, 1999-2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -76,10 +76,10 @@ Pause for NUMBER seconds. SUFFIX may be `s' for seconds (the default),\n\ that require NUMBER be an integer, here NUMBER may be an arbitrary floating\n\ point number.\n\ \n\ - --help display this help and exit\n\ - --version output version information and exit\n\ "), program_name, program_name); + fputs (HELP_OPTION_DESCRIPTION, stdout); + fputs (VERSION_OPTION_DESCRIPTION, stdout); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); diff --git a/src/stty.c b/src/stty.c index 099fb0eaf..632c3c468 100644 --- a/src/stty.c +++ b/src/stty.c @@ -1,5 +1,5 @@ /* stty -- change and print terminal line settings - Copyright (C) 1990-2000 Free Software Foundation, Inc. + Copyright (C) 1990-2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -504,170 +504,210 @@ Usage: %s [-F DEVICE] [--file=DEVICE] [SETTING]...\n\ or: %s [-F DEVICE] [--file=DEVICE] [-g|--save]\n\ "), program_name, program_name, program_name); - printf (_("\ + fputs (_("\ Print or change terminal characteristics.\n\ \n\ -a, --all print all current settings in human-readable form\n\ -g, --save print all current settings in a stty-readable form\n\ -F, --file=DEVICE open and use the specified DEVICE instead of stdin\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\ Optional - before SETTING indicates negation. An * marks non-POSIX\n\ settings. The underlying system defines which settings are available.\n\ -")); - printf (_("\ +"), stdout); + fputs (_("\ \n\ Special characters:\n\ * dsusp CHAR CHAR will send a terminal stop signal once input flushed\n\ eof CHAR CHAR will send an end of file (terminate the input)\n\ eol CHAR CHAR will end the line\n\ +"), stdout); + fputs (_("\ * eol2 CHAR alternate CHAR for ending the line\n\ erase CHAR CHAR will erase the last character typed\n\ intr CHAR CHAR will send an interrupt signal\n\ kill CHAR CHAR will erase the current line\n\ +"), stdout); + fputs (_("\ * lnext CHAR CHAR will enter the next character quoted\n\ quit CHAR CHAR will send a quit signal\n\ * rprnt CHAR CHAR will redraw the current line\n\ start CHAR CHAR will restart the output after stopping it\n\ +"), stdout); + fputs (_("\ stop CHAR CHAR will stop the output\n\ susp CHAR CHAR will send a terminal stop signal\n\ * swtch CHAR CHAR will switch to a different shell layer\n\ * werase CHAR CHAR will erase the last word typed\n\ -")); - printf (_("\ +"), stdout); + fputs (_("\ \n\ Special settings:\n\ N set the input and output speeds to N bauds\n\ * cols N tell the kernel that the terminal has N columns\n\ * columns N same as cols N\n\ +"), stdout); + fputs (_("\ ispeed N set the input speed to N\n\ * line N use line discipline N\n\ min N with -icanon, set N characters minimum for a completed read\n\ ospeed N set the output speed to N\n\ +"), stdout); + fputs (_("\ * rows N tell the kernel that the terminal has N rows\n\ * size print the number of rows and columns according to the kernel\n\ speed print the terminal speed\n\ time N with -icanon, set read timeout of N tenths of a second\n\ -")); - printf (_("\ +"), stdout); + fputs (_("\ \n\ Control settings:\n\ [-]clocal disable modem control signals\n\ [-]cread allow input to be received\n\ * [-]crtscts enable RTS/CTS handshaking\n\ csN set character size to N bits, N in [5..8]\n\ +"), stdout); + fputs (_("\ [-]cstopb use two stop bits per character (one with `-')\n\ [-]hup send a hangup signal when the last process closes the tty\n\ [-]hupcl same as [-]hup\n\ [-]parenb generate parity bit in output and expect parity bit in input\n\ [-]parodd set odd parity (even with `-')\n\ -")); - printf (_("\ +"), stdout); + fputs (_("\ \n\ Input settings:\n\ [-]brkint breaks cause an interrupt signal\n\ [-]icrnl translate carriage return to newline\n\ [-]ignbrk ignore break characters\n\ [-]igncr ignore carriage return\n\ +"), stdout); + fputs (_("\ [-]ignpar ignore characters with parity errors\n\ * [-]imaxbel beep and do not flush a full input buffer on a character\n\ [-]inlcr translate newline to carriage return\n\ [-]inpck enable input parity checking\n\ [-]istrip clear high (8th) bit of input characters\n\ +"), stdout); + fputs (_("\ * [-]iuclc translate uppercase characters to lowercase\n\ * [-]ixany let any character restart output, not only start character\n\ [-]ixoff enable sending of start/stop characters\n\ [-]ixon enable XON/XOFF flow control\n\ [-]parmrk mark parity errors (with a 255-0-character sequence)\n\ [-]tandem same as [-]ixoff\n\ -")); - printf (_("\ +"), stdout); + fputs (_("\ \n\ Output settings:\n\ * bsN backspace delay style, N in [0..1]\n\ * crN carriage return delay style, N in [0..3]\n\ * ffN form feed delay style, N in [0..1]\n\ * nlN newline delay style, N in [0..1]\n\ +"), stdout); + fputs (_("\ * [-]ocrnl translate carriage return to newline\n\ * [-]ofdel use delete characters for fill instead of null characters\n\ * [-]ofill use fill (padding) characters instead of timing for delays\n\ * [-]olcuc translate lowercase characters to uppercase\n\ * [-]onlcr translate newline to carriage return-newline\n\ * [-]onlret newline performs a carriage return\n\ +"), stdout); + fputs (_("\ * [-]onocr do not print carriage returns in the first column\n\ [-]opost postprocess output\n\ * tabN horizontal tab delay style, N in [0..3]\n\ * tabs same as tab0\n\ * -tabs same as tab3\n\ * vtN vertical tab delay style, N in [0..1]\n\ -")); - printf (_("\ +"), stdout); + fputs (_("\ \n\ Local settings:\n\ [-]crterase echo erase characters as backspace-space-backspace\n\ * crtkill kill all line by obeying the echoprt and echoe settings\n\ * -crtkill kill all line by obeying the echoctl and echok settings\n\ +"), stdout); + fputs (_("\ * [-]ctlecho echo control characters in hat notation (`^c')\n\ [-]echo echo input characters\n\ * [-]echoctl same as [-]ctlecho\n\ [-]echoe same as [-]crterase\n\ [-]echok echo a newline after a kill character\n\ +"), stdout); + fputs (_("\ * [-]echoke same as [-]crtkill\n\ [-]echonl echo newline even if not echoing other characters\n\ * [-]echoprt echo erased characters backward, between `\\' and '/'\n\ [-]icanon enable erase, kill, werase, and rprnt special characters\n\ [-]iexten enable non-POSIX special characters\n\ +"), stdout); + fputs (_("\ [-]isig enable interrupt, quit, and suspend special characters\n\ [-]noflsh disable flushing after interrupt and quit special characters\n\ * [-]prterase same as [-]echoprt\n\ * [-]tostop stop background jobs that try to write to the terminal\n\ * [-]xcase with icanon, escape with `\\' for uppercase characters\n\ -")); - printf (_("\ +"), stdout); + fputs (_("\ \n\ Combination settings:\n\ * [-]LCASE same as [-]lcase\n\ cbreak same as -icanon\n\ -cbreak same as icanon\n\ +"), stdout); + fputs (_("\ cooked same as brkint ignpar istrip icrnl ixon opost isig\n\ icanon, eof and eol characters to their default values\n\ -cooked same as raw\n\ crt same as echoe echoctl echoke\n\ +"), stdout); + fputs (_("\ dec same as echoe echoctl echoke -ixany intr ^c erase 0177\n\ kill ^u\n\ * [-]decctlq same as [-]ixany\n\ ek erase and kill characters to their default values\n\ evenp same as parenb -parodd cs7\n\ +"), stdout); + fputs (_("\ -evenp same as -parenb cs8\n\ * [-]lcase same as xcase iuclc olcuc\n\ litout same as -parenb -istrip -opost cs8\n\ -litout same as parenb istrip opost cs7\n\ nl same as -icrnl -onlcr\n\ -nl same as icrnl -inlcr -igncr onlcr -ocrnl -onlret\n\ +"), stdout); + fputs (_("\ oddp same as parenb parodd cs7\n\ -oddp same as -parenb cs8\n\ [-]parity same as [-]evenp\n\ pass8 same as -parenb -istrip cs8\n\ -pass8 same as parenb istrip cs7\n\ +"), stdout); + fputs (_("\ raw same as -ignbrk -brkint -ignpar -parmrk -inpck -istrip\n\ -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany\n\ -imaxbel -opost -isig -icanon -xcase min 1 time 0\n\ -raw same as cooked\n\ +"), stdout); + fputs (_("\ sane same as cread -ignbrk brkint -inlcr -igncr icrnl\n\ -ixoff -iuclc -ixany imaxbel opost -olcuc -ocrnl onlcr\n\ -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0\n\ isig icanon iexten echo echoe echok -echonl -noflsh\n\ -xcase -tostop -echoprt echoctl echoke, all special\n\ characters to their default values.\n\ -")); - printf (_("\ +"), stdout); + fputs (_("\ \n\ Handle the tty line connected to standard input. Without arguments,\n\ prints baud rate, line discipline, and deviations from stty sane. In\n\ settings, CHAR is taken literally, or coded as in ^c, 0x37, 0177 or\n\ 127; special values ^- or undef used to disable special characters.\n\ -")); +"), stdout); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); @@ -431,7 +431,7 @@ usage (int status) else { printf (_("Usage: %s [OPTION]... [-] [USER [ARG]...]\n"), program_name); - printf (_("\ + fputs (_("\ Change the effective user id and group id to that of USER.\n\ \n\ -, -l, --login make the shell a login shell\n\ @@ -440,11 +440,13 @@ Change the effective user id and group id to that of USER.\n\ -m, --preserve-environment do not reset environment variables\n\ -p same as -m\n\ -s, --shell=SHELL run SHELL if /etc/shells allows it\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\ A mere - implies -l. If USER not given, assume root.\n\ -")); +"), stdout); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); close_stdout (); } @@ -61,14 +61,14 @@ usage (int status) else { printf (_("Usage: %s [OPTION]... [FILE]...\n"), program_name); - printf (_("\ + fputs (_("\ Copy standard input to each FILE, and also to standard output.\n\ \n\ -a, --append append to the given FILEs, do not overwrite\n\ -i, --ignore-interrupts ignore interrupt signals\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); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); diff --git a/src/test.c b/src/test.c index 9fcbda440..79f65d814 100644 --- a/src/test.c +++ b/src/test.c @@ -995,25 +995,31 @@ Usage: %s EXPRESSION\n\ or: %s OPTION\n\ "), program_name, program_name); - printf (_("\ + fputs (_("\ Exit with the status determined by EXPRESSION.\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\ EXPRESSION is true or false and sets exit status. It is one of:\n\ -")); - printf (_("\ +"), stdout); + fputs (_("\ \n\ ( EXPRESSION ) EXPRESSION is true\n\ ! EXPRESSION EXPRESSION is false\n\ EXPRESSION1 -a EXPRESSION2 both EXPRESSION1 and EXPRESSION2 are true\n\ EXPRESSION1 -o EXPRESSION2 either EXPRESSION1 or EXPRESSION2 is true\n\ +"), stdout); + fputs (_("\ \n\ [-n] STRING the length of STRING is nonzero\n\ -z STRING the length of STRING is zero\n\ STRING1 = STRING2 the strings are equal\n\ STRING1 != STRING2 the strings are not equal\n\ +"), stdout); + fputs (_("\ \n\ INTEGER1 -eq INTEGER2 INTEGER1 is equal to INTEGER2\n\ INTEGER1 -ge INTEGER2 INTEGER1 is greater than or equal to INTEGER2\n\ @@ -1021,38 +1027,46 @@ EXPRESSION is true or false and sets exit status. It is one of:\n\ INTEGER1 -le INTEGER2 INTEGER1 is less than or equal to INTEGER2\n\ INTEGER1 -lt INTEGER2 INTEGER1 is less than INTEGER2\n\ INTEGER1 -ne INTEGER2 INTEGER1 is not equal to INTEGER2\n\ -")); - printf (_("\ +"), stdout); + fputs (_("\ \n\ FILE1 -ef FILE2 FILE1 and FILE2 have the same device and inode numbers\n\ FILE1 -nt FILE2 FILE1 is newer (modification date) than FILE2\n\ FILE1 -ot FILE2 FILE1 is older than FILE2\n\ +"), stdout); + fputs (_("\ \n\ -b FILE FILE exists and is block special\n\ -c FILE FILE exists and is character special\n\ -d FILE FILE exists and is a directory\n\ -e FILE FILE exists\n\ +"), stdout); + fputs (_("\ -f FILE FILE exists and is a regular file\n\ -g FILE FILE exists and is set-group-ID\n\ -h FILE FILE exists and is a symbolic link (same as -L)\n\ -G FILE FILE exists and is owned by the effective group ID\n\ -k FILE FILE exists and has its sticky bit set\n\ +"), stdout); + fputs (_("\ -L FILE FILE exists and is a symbolic link (same as -h)\n\ -O FILE FILE exists and is owned by the effective user ID\n\ -p FILE FILE exists and is a named pipe\n\ -r FILE FILE exists and is readable\n\ -s FILE FILE exists and has a size greater than zero\n\ +"), stdout); + fputs (_("\ -S FILE FILE exists and is a socket\n\ -t [FD] file descriptor FD (stdout by default) is opened on a terminal\n\ -u FILE FILE exists and its set-user-ID bit is set\n\ -w FILE FILE exists and is writable\n\ -x FILE FILE exists and is executable\n\ -")); - printf (_("\ +"), stdout); + fputs (_("\ \n\ Beware that parentheses need to be escaped (e.g., by backslashes) for shells.\n\ INTEGER may also be -l STRING, which evaluates to the length of STRING.\n\ -")); +"), stdout); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); diff --git a/src/true.c b/src/true.c index 230cd79a8..c4a42dbcf 100644 --- a/src/true.c +++ b/src/true.c @@ -21,10 +21,10 @@ Exit with a status code indicating success.\n\ \n\ These option names may not be abbreviated.\n\ \n\ - --help display this help and exit\n\ - --version output version information and exit\n\ -") - , program_name, program_name); +"), + program_name, program_name); + fputs (HELP_OPTION_DESCRIPTION, stdout); + fputs (VERSION_OPTION_DESCRIPTION, stdout); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); exit (status); } @@ -1,5 +1,5 @@ /* tty -- print the path of the terminal connected to standard input - Copyright (C) 1990-2000 Free Software Foundation, Inc. + Copyright (C) 1990-2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -60,13 +60,13 @@ usage (int status) else { printf (_("Usage: %s [OPTION]...\n"), program_name); - printf (_("\ + fputs (_("\ Print the file name of the terminal connected to standard input.\n\ \n\ -s, --silent, --quiet print nothing, only return an exit status\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); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); diff --git a/src/uname.c b/src/uname.c index d69763158..834466921 100644 --- a/src/uname.c +++ b/src/uname.c @@ -93,20 +93,23 @@ usage (int status) else { printf (_("Usage: %s [OPTION]...\n"), program_name); - printf (_("\ + fputs (_("\ Print certain system information. With no OPTION, same as -s.\n\ \n\ -a, --all print all information, in the following order:\n\ -s, --kernel-name print the kernel name\n\ -n, --nodename print the network node hostname\n\ -r, --kernel-release print the kernel release\n\ +"), stdout); + fputs (_("\ -v, --kernel-version print the kernel version\n\ -m, --machine print the machine hardware name\n\ -p, --processor print the processor type\n\ -i, --hardware-platform print the hardware platform\n\ -o, --operating-system print the operating system\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); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); diff --git a/src/uptime.c b/src/uptime.c index bf59f1923..a5b3259cc 100644 --- a/src/uptime.c +++ b/src/uptime.c @@ -1,5 +1,5 @@ /* GNU's uptime. - Copyright (C) 1992-2000 Free Software Foundation, Inc. + Copyright (C) 1992-2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -178,9 +178,10 @@ the number of users on the system, and the average number of jobs\n\ in the run queue over the last 1, 5 and 15 minutes.\n\ If FILE is not specified, use %s. %s as FILE is common.\n\ \n\ - --help display this help and exit\n\ - --version output version information and exit\n"), +"), UTMP_FILE, WTMP_FILE); + fputs (HELP_OPTION_DESCRIPTION, stdout); + fputs (VERSION_OPTION_DESCRIPTION, stdout); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); diff --git a/src/users.c b/src/users.c index 9e33ebed2..5a1bf1f72 100644 --- a/src/users.c +++ b/src/users.c @@ -1,5 +1,5 @@ /* GNU's users. - Copyright (C) 1992-2000 Free Software Foundation, Inc. + Copyright (C) 1992-2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -120,9 +120,10 @@ usage (int status) Output who is currently logged in according to FILE.\n\ If FILE is not specified, use %s. %s as FILE is common.\n\ \n\ - --help display this help and exit\n\ - --version output version information and exit\n"), +"), UTMP_FILE, WTMP_FILE); + fputs (HELP_OPTION_DESCRIPTION, stdout); + fputs (VERSION_OPTION_DESCRIPTION, stdout); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); @@ -551,30 +551,40 @@ usage (int status) else { printf (_("Usage: %s [OPTION]... [ FILE | ARG1 ARG2 ]\n"), program_name); - printf (_("\ + fputs (_("\ \n\ -a, --all same as -b -d --login -p -r -t -T -u\n\ -b, --boot time of last system boot\n\ -d, --dead print dead processes\n\ -H, --heading print line of column headings\n\ +"), stdout); + fputs (_("\ -i, --idle add idle time as HOURS:MINUTES, . or old\n\ (deprecated, use -u)\n\ --login print system login processes\n\ (equivalent to SUS -l)\n\ +"), stdout); + fputs (_("\ -l, --lookup attempt to canonicalize hostnames via DNS\n\ (-l is deprecated, use --lookup)\n\ -m only hostname and user associated with stdin\n\ -p, --process print active processes spawned by init\n\ +"), stdout); + fputs (_("\ -q, --count all login names and number of users logged on\n\ -r, --runlevel print current runlevel\n\ -s, --short print only name, line, and time (default)\n\ -t, --time print last system clock change\n\ +"), stdout); + fputs (_("\ -T, -w, --mesg add user's message status as +, - or ?\n\ -u, --users lists users logged in\n\ --message same as -T\n\ --writable same as -T\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); + printf (_("\ \n\ If FILE is not specified, use %s. %s as FILE is common.\n\ If ARG1 ARG2 given, -m presumed: `am i' or `mom likes' are usual.\n\ diff --git a/src/whoami.c b/src/whoami.c index 3767074e6..ec20bb67a 100644 --- a/src/whoami.c +++ b/src/whoami.c @@ -1,5 +1,5 @@ /* whoami -- print effective userid - Copyright (C) 89,90, 1991-1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 89,90, 1991-1997, 1999, 2000, 2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -50,12 +50,13 @@ usage (int status) else { printf (_("Usage: %s [OPTION]...\n"), program_name); - printf (_("\ + fputs (_("\ Print the user name associated with the current effective user id.\n\ Same as id -un.\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); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); @@ -1,5 +1,5 @@ /* yes - output a string repeatedly until killed - Copyright (C) 1991-1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1991-1997, 1999, 2000, 2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -52,11 +52,12 @@ Usage: %s [STRING]...\n\ "), program_name, program_name); - printf (_("\ + fputs (_("\ Repeatedly output a line with all specified STRING(s), or `y'.\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); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } exit (status); |