summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1993-10-09 20:44:16 +0000
committerJim Meyering <jim@meyering.net>1993-10-09 20:44:16 +0000
commit87372cd3aefb4154d9096a491700576d551abd1f (patch)
tree152f4b579d8b9b064d01fbd009795771098e5410 /src
parent4ab2d8f53aa7198e41d0e4e0e94055dc1f6e31ba (diff)
downloadcoreutils-87372cd3aefb4154d9096a491700576d551abd1f.tar.xz
merge with 3.8.3e
Diffstat (limited to 'src')
-rw-r--r--src/chgrp.c14
-rw-r--r--src/chmod.c18
-rw-r--r--src/chown.c12
-rw-r--r--src/dd.c8
-rw-r--r--src/df.c8
-rw-r--r--src/du.c11
-rw-r--r--src/install.c8
-rw-r--r--src/ln.c8
-rw-r--r--src/ls.c12
-rw-r--r--src/mkdir.c8
-rw-r--r--src/mkfifo.c8
-rw-r--r--src/mknod.c8
-rw-r--r--src/mv.c8
-rw-r--r--src/rm.c8
-rw-r--r--src/rmdir.c8
-rw-r--r--src/touch.c20
16 files changed, 85 insertions, 82 deletions
diff --git a/src/chgrp.c b/src/chgrp.c
index b148476e3..c5b768407 100644
--- a/src/chgrp.c
+++ b/src/chgrp.c
@@ -307,19 +307,19 @@ static void
usage (status)
int status;
{
- fprintf (stderr, "\
+ fprintf (status == 0 ? stdout : stderr, "\
Usage: %s [OPTION]... GROUP FILE...\n\
\n",
program_name);
if (status == 0)
- fprintf (stderr, "\
- -c, --changes be verbose whenever change occurs\n\
- -f, --silent, --quiet avoid most error messages\n\
- -v, --verbose explain what is being done\n\
+ fprintf (stdout, "\
+ -c, --changes like verbose but report only when a change is made\n\
+ -f, --silent, --quiet suppress most error messages\n\
+ -v, --verbose output a diagnostic for every file processed\n\
-R, --recursive change files and directories recursively\n\
- --help provide this help\n\
- --version show program version\n");
+ --help display this help and exit\n\
+ --version output version information and exit\n");
else
fprintf (stderr, "Try `%s --help' for more information.\n",
diff --git a/src/chmod.c b/src/chmod.c
index 9df0c33be..f1e4738ff 100644
--- a/src/chmod.c
+++ b/src/chmod.c
@@ -305,23 +305,23 @@ static void
usage (status)
int status;
{
- fprintf (stderr, "\
+ fprintf (status == 0 ? stdout : stderr, "\
Usage: %s [OPTION]... MODE[,MODE]... FILE...\n\
or: %s [OPTION]... OCTAL_MODE FILE...\n\
\n",
program_name, program_name);
if (status == 0)
- fprintf (stderr, "\
- -c, --changes be verbose whenever change occurs\n\
- -f, --silent, --quiet avoid most error messages\n\
- -v, --verbose explain what is being done\n\
+ fprintf (stdout, "\
+ -c, --changes like verbose but report only when a change is made\n\
+ -f, --silent, --quiet suppress most error messages\n\
+ -v, --verbose output a diagnostic for every file processed\n\
-R, --recursive change files and directories recursively\n\
- --help provide this help\n\
- --version show program version\n\
+ --help display this help and exit\n\
+ --version output version information and exit\n\
\n\
-Each MODE is one or more of letters ugoa, one of the signs +-= and one\n\
-or more of letters rwxXstugo.\n");
+Each MODE is one or more of the letters ugoa, one of the symbols +-= and\n\
+one or more of the letters rwxXstugo.\n");
else
fprintf (stderr, "Try `%s --help' for more information.\n",
diff --git a/src/chown.c b/src/chown.c
index 15848837b..caf16947f 100644
--- a/src/chown.c
+++ b/src/chown.c
@@ -295,22 +295,22 @@ static void
usage (status)
int status;
{
- fprintf (stderr, "\
+ fprintf (status == 0 ? stdout : stderr, "\
Usage: %s [OPTION]... OWNER[.[GROUP]] FILE...\n\
or: %s [OPTION]... .[GROUP] FILE...\n\
\n",
program_name, program_name);
if (status == 0)
- fprintf (stderr, "\
+ fprintf (stdout, "\
-c, --changes be verbose whenever change occurs\n\
- -f, --silent, --quiet avoid most error messages\n\
+ -f, --silent, --quiet suppress most error messages\n\
-v, --verbose explain what is being done\n\
-R, --recursive change files and directories recursively\n\
- --help provide this help\n\
- --version show program version\n\
+ --help display this help and exit\n\
+ --version output version information and exit\n\
\n\
-Owner is unchanged if missing. Group is unchanged is missing, but changed\n\
+Owner is unchanged if missing. Group is unchanged if missing, but changed\n\
to login group if implied by a period. A colon may replace the period.\n");
else
diff --git a/src/dd.c b/src/dd.c
index 88c2c285f..7031479f1 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -1073,13 +1073,13 @@ static void
usage (status)
int status;
{
- fprintf (stderr, "\
+ fprintf (status == 0 ? stdout : stderr, "\
Usage: %s [OPTION]...\n\
\n",
program_name);
if (status == 0)
- fprintf (stderr, "\
+ fprintf (stdout, "\
bs=BYTES force ibs=BYTES and obs=BYTES\n\
cbs=BYTES convert BYTES bytes at a time\n\
conv=KEYWORDS convert the file as per the comma separated keyword list\n\
@@ -1090,8 +1090,8 @@ Usage: %s [OPTION]...\n\
of=FILE write to FILE instead of stdout, don't truncate file\n\
seek=BLOCKS skip BLOCKS obs-sized blocks at start of output\n\
skip=BLOCKS skip BLOCKS ibs-sized blocks at start of input\n\
- --help provide this help\n\
- --version show program version\n\
+ --help display this help and exit\n\
+ --version output version information and exit\n\
\n\
BYTES may be suffixed: by xM for multiplication by M, by c for x1,\n\
by w for x2, by b for x512, by k for x1024. Each KEYWORD may be:\n\
diff --git a/src/df.c b/src/df.c
index a4ef19df5..4cf419638 100644
--- a/src/df.c
+++ b/src/df.c
@@ -478,13 +478,13 @@ static void
usage (status)
int status;
{
- fprintf (stderr, "\
+ fprintf (status == 0 ? stdout : stderr, "\
Usage: %s [OPTION] [PATH]...\n\
\n",
program_name);
if (status == 0)
- fprintf (stderr, "\
+ fprintf (stdout, "\
-a, --all include filesystems having 0 blocks\n\
-i, --inodes list inode information instead of block usage\n\
-k, --kilobytes use 1024 blocks, not 512 despite POSIXLY_CORRECT\n\
@@ -492,8 +492,8 @@ Usage: %s [OPTION] [PATH]...\n\
-x, --exclude-type TYPE limit the listing to not TYPE filesystems type\n\
-v (ignored)\n\
-P, --portability use the POSIX output format\n\
- --help provide this help\n\
- --version show program version\n\
+ --help display this help and exit\n\
+ --version output version information and exit\n\
\n\
If no PATHs are given, list all currently mounted filesystems.\n");
diff --git a/src/du.c b/src/du.c
index 89bc12760..864e46869 100644
--- a/src/du.c
+++ b/src/du.c
@@ -196,15 +196,16 @@ usage (reason, status)
int status;
{
if (reason != NULL)
- fprintf (stderr, "%s: %s\n", program_name, reason);
+ fprintf (status == 0 ? stdout : stderr, "%s: %s\n",
+ program_name, reason);
- fprintf (stderr, "\
+ fprintf (status == 0 ? stdout : stderr, "\
Usage: %s [OPTION]... [PATH]...\n\
\n",
program_name);
if (status == 0)
- fprintf (stderr, "\
+ fprintf (stdout, "\
-a, --all write counts for all files, not just directories\n\
-b, --bytes print size in bytes\n\
-c, --total produce a grand total\n\
@@ -215,8 +216,8 @@ Usage: %s [OPTION]... [PATH]...\n\
-D, --dereference-args dereference PATHs when symbolic link\n\
-L, --dereference dereference all symbolic links\n\
-S, --separate-dirs do not include size of subdirectories\n\
- --help provide this help\n\
- --version show program version\n");
+ --help display this help and exit\n\
+ --version output version information and exit\n");
else
fprintf (stderr, "Try `%s --help' for more information.\n",
diff --git a/src/install.c b/src/install.c
index 2c238689f..3c9f19602 100644
--- a/src/install.c
+++ b/src/install.c
@@ -540,7 +540,7 @@ static void
usage (status)
int status;
{
- fprintf (stderr, "\
+ fprintf (status == 0 ? stdout : stderr, "\
Usage: %s [OPTION]... SOURCE DEST (1st format)\n\
or: %s [OPTION]... SOURCE... DIRECTORY (2nd format)\n\
or: %s [OPTION]... DIRECTORY... (3nd format)\n\
@@ -548,15 +548,15 @@ Usage: %s [OPTION]... SOURCE DEST (1st format)\n\
program_name, program_name, program_name);
if (status == 0)
- fprintf (stderr, "\
+ fprintf (stdout, "\
-c (ignored)\n\
-d, --directory create [leading] directories, mandatory for 3rd format\n\
-g, --group GROUP set group ownership, instead of process' current group\n\
-m, --mode MODE set permission mode (as in chmod), instead of 0755\n\
-o, --owner OWNER set ownership (super-user only)\n\
-s, --strip strip symbol tables, only for 1st and 2nd formats\n\
- --help provide this help\n\
- --version show program version\n");
+ --help display this help and exit\n\
+ --version output version information and exit\n");
else
fprintf (stderr, "Try `%s --help' for more information.\n",
diff --git a/src/ln.c b/src/ln.c
index 05137f924..e86c600ee 100644
--- a/src/ln.c
+++ b/src/ln.c
@@ -353,14 +353,14 @@ static void
usage (status)
int status;
{
- fprintf (stderr, "\
+ fprintf (status == 0 ? stdout : stderr, "\
Usage: %s [OPTION]... SOURCE [DEST]\n\
or: %s [OPTION]... SOURCE... DIRECTORY\n\
\n",
program_name, program_name);
if (status == 0)
- fprintf (stderr, "\
+ fprintf (stdout, "\
-b, --backup make backups for removed files\n\
-d, -F, --directory hard link directories (super-user only)\n\
-f, --force remove existing destinations\n\
@@ -369,8 +369,8 @@ Usage: %s [OPTION]... SOURCE [DEST]\n\
-v, --verbose print name of each file before linking\n\
-S, --suffix SUFFIX override the usual backup suffix\n\
-V, --version-control WORD override the usual version control\n\
- --help provide this help\n\
- --version show program version\n\
+ --help display this help and exit\n\
+ --version output version information and exit\n\
\n\
The backup suffix is ~, unless set with SIMPLE_BACKUP_SUFFIX. The\n\
version control may be set with VERSION_CONTROL, values are:\n\
diff --git a/src/ls.c b/src/ls.c
index 6082408df..46824cf1b 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -1880,13 +1880,13 @@ static void
usage (status)
int status;
{
- fprintf (stderr, "\
+ fprintf (status == 0 ? stdout : stderr, "\
Usage: %s [OPTION]... [PATH]...\n\
\n",
program_name);
if (status == 0)
- fprintf (stderr, "\
+ fprintf (stdout, "\
-a, --all do not hide entries starting with .\n\
-b, --escape print octal escapes for nongraphic characters\n\
-c sort by change time, list change time if -l\n\
@@ -1906,7 +1906,9 @@ Usage: %s [OPTION]... [PATH]...\n\
-u sort by last access time, list access time if -l\n\
-w, --width COLS assume screen width, instead of current value\n\
-x list entries by lines, instead of by columns\n\
- -A, --almost-all hide only implied . and ..\n\
+ -A, --almost-all hide only implied . and ..\n");
+
+ fprintf (stdout, "\
-B, --ignore-backups hide implied entries ending with ~\n\
-C list entries by columns\n\
-F, --classify append a character for typing each entry\n\
@@ -1922,13 +1924,13 @@ Usage: %s [OPTION]... [PATH]...\n\
-X sort alphabetically by entry extension\n\
-1 list one file per line\n\
--full-time list both full date and full time\n\
- --help provide this help\n\
+ --help display this help and exit\n\
--format WORD across -x, commas -m, horizontal -x, long -l,\n\
single-column -1, verbose -l, vertical -C\n\
--sort WORD ctime -c, extension -X, none -U, size -S,\n\
status -c, time -t\n\
--time WORD atime -u, access -u, use -u\n\
- --version show program version\n\
+ --version output version information and exit\n\
\n\
Sort entries alphabetically if none of -cftuSUX nor --sort.\n");
diff --git a/src/mkdir.c b/src/mkdir.c
index 5ed40b84b..e22719985 100644
--- a/src/mkdir.c
+++ b/src/mkdir.c
@@ -145,17 +145,17 @@ static void
usage (status)
int status;
{
- fprintf (stderr, "\
+ fprintf (status == 0 ? stdout : stderr, "\
Usage: %s [OPTION] DIRECTORY...\n\
\n",
program_name);
if (status == 0)
- fprintf (stderr, "\
+ fprintf (stdout, "\
-p, --parents no error if existing, make parent directories as needed\n\
-m, --mode MODE set permission mode (as in chmod), not 0777 - umask\n\
- --help provide this help\n\
- --version show program version\n");
+ --help display this help and exit\n\
+ --version output version information and exit\n");
else
fprintf (stderr, "Try `%s --help' for more information.\n",
diff --git a/src/mkfifo.c b/src/mkfifo.c
index efdf883e1..16416e411 100644
--- a/src/mkfifo.c
+++ b/src/mkfifo.c
@@ -133,16 +133,16 @@ static void
usage (status)
int status;
{
- fprintf (stderr, "\
+ fprintf (status == 0 ? stdout : stderr, "\
Usage: %s [OPTION] PATH...\n\
\n",
program_name);
if (status == 0)
- fprintf (stderr, "\
+ fprintf (stdout, "\
-m, --mode MODE set permission mode (as in chmod), not 0666 - umask\n\
- --help provide this help\n\
- --version show program version\n");
+ --help display this help and exit\n\
+ --version output version information and exit\n");
else
fprintf (stderr, "Try `%s --help' for more information.\n",
diff --git a/src/mknod.c b/src/mknod.c
index f9a614a7a..3cbbcc654 100644
--- a/src/mknod.c
+++ b/src/mknod.c
@@ -168,16 +168,16 @@ static void
usage (status)
int status;
{
- fprintf (stderr, "\
+ fprintf (status == 0 ? stdout : stderr, "\
Usage: %s [OPTION]... PATH TYPE [MAJOR MINOR]\n\
\n",
program_name);
if (status == 0)
- fprintf (stderr, "\
+ fprintf (stdout, "\
-m, --mode MODE set permission mode (as in chmod), not 0666 - umask\n\
- --help provide this help\n\
- --version show program version\n\
+ --help display this help and exit\n\
+ --version output version information and exit\n\
\n\
MAJOR MINOR are forbidden for TYPE p, mandatory otherwise. TYPE may be:\n\
\n\
diff --git a/src/mv.c b/src/mv.c
index c785bf3d7..9b8cd37bc 100644
--- a/src/mv.c
+++ b/src/mv.c
@@ -471,14 +471,14 @@ static void
usage (status)
int status;
{
- fprintf (stderr, "\
+ fprintf (status == 0 ? stdout : stderr, "\
Usage: %s [OPTION]... SOURCE DEST\n\
or: %s [OPTION]... SOURCE... DIRECTORY\n\
\n",
program_name, program_name);
if (status == 0)
- fprintf (stderr, "\
+ fprintf (stdout, "\
-b, --backup make backup before removal\n\
-f, --force remove existing destinations, never prompt\n\
-i, --interactive prompt before overwrite\n\
@@ -486,8 +486,8 @@ Usage: %s [OPTION]... SOURCE DEST\n\
-v, --verbose explain what is being done\n\
-S, --suffix SUFFIX override the usual backup suffix\n\
-V, --version-control WORD override the usual version control\n\
- --help provide this help\n\
- --version show program version\n\
+ --help display this help and exit\n\
+ --version output version information and exit\n\
\n\
The backup suffix is ~, unless set with SIMPLE_BACKUP_SUFFIX. The\n\
version control may be set with VERSION_CONTROL, values are:\n\
diff --git a/src/rm.c b/src/rm.c
index 2b17e64c1..acb0e8259 100644
--- a/src/rm.c
+++ b/src/rm.c
@@ -529,20 +529,20 @@ static void
usage (status)
int status;
{
- fprintf (stderr, "\
+ fprintf (status == 0 ? stdout : stderr, "\
Usage: %s [OPTION]... PATH...\n\
\n",
program_name);
if (status == 0)
- fprintf (stderr, "\
+ fprintf (stdout, "\
-d, --directory unlink directory, even if non-empty (super-user only)\n\
-f, --force ignore nonexistent files, never prompt\n\
-i, --interactive prompt before any removal\n\
-v, --verbose explain what is being done\n\
-r, -R, --recursive remove the contents of directories recursively\n\
- --help provide this help\n\
- --version show program version\n");
+ --help display this help and exit\n\
+ --version output version information and exit\n");
else
fprintf (stderr, "Try `%s --help' for more information.\n",
diff --git a/src/rmdir.c b/src/rmdir.c
index 07ad705c2..87f6a2d55 100644
--- a/src/rmdir.c
+++ b/src/rmdir.c
@@ -147,16 +147,16 @@ static void
usage (status)
int status;
{
- fprintf (stderr, "\
+ fprintf (status == 0 ? stdout : stderr, "\
Usage: %s [OPTION]... DIRECTORY...\n\
\n",
program_name);
if (status == 0)
- fprintf (stderr, "\
+ fprintf (stdout, "\
-p, --parents remove explicit parent directories if being emptied\n\
- --help provide this help\n\
- --version show program version\n");
+ --help display this help and exit\n\
+ --version output version information and exit\n");
else
fprintf (stderr, "Try `%s --help' for more information.\n",
diff --git a/src/touch.c b/src/touch.c
index 35b3d8f16..7977ca158 100644
--- a/src/touch.c
+++ b/src/touch.c
@@ -379,23 +379,23 @@ static void
usage (status)
int status;
{
- fprintf (stderr, "\
+ fprintf (status == 0 ? stdout : stderr, "\
Usage: %s [OPTION]... FILE...\n\
\n",
program_name);
if (status == 0)
- fprintf (stderr, "\
- -a change the access time only\n\
- -c do not create files that do not exist\n\
- -d, --date STRING parse STRING and use it, instead of current time\n\
+ fprintf (stdout, "\
+ -a change only the access time\n\
+ -c do not create any files\n\
+ -d, --date STRING parse STRING and use it instead of current time\n\
-f (ignored)\n\
- -m change the modification time only\n\
- -r, --file REFERENCE use this file's times, instead of current time\n\
- -t STAMP use MMDDhhmm[[CC]YY][.ss], instead of current time\n\
- --help provide this help\n\
+ -m change only the modification time\n\
+ -r, --file REFERENCE use this file's times instead of current time\n\
+ -t STAMP use MMDDhhmm[[CC]YY][.ss] instead of current time\n\
+ --help display this help and exit\n\
--time WORD access -a, atime -a, mtime -m, modify -m, use -a\n\
- --version show program version\n\
+ --version output version information and exit\n\
\n\
STAMP may be used without -t if none of -drt, nor --, are used.\n");