From b78de3e724522e63bc82ef2f2214d329e69ea545 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 23 Nov 2001 20:10:25 +0000 Subject: Split usage strings so that --help and --version descriptions are alone in their own string. --- src/chgrp.c | 2 +- src/chmod.c | 4 +++- src/chown.c | 4 ++-- src/cp.c | 8 +++++--- src/dd.c | 2 ++ src/dircolors.c | 2 ++ src/install.c | 4 ++-- src/ln.c | 6 ++++-- src/ls.c | 2 ++ src/mkdir.c | 6 ++++-- src/mkfifo.c | 6 ++++-- src/mknod.c | 8 ++++++-- src/mv.c | 20 ++++++++++++-------- src/rm.c | 4 ++-- src/rmdir.c | 4 +++- src/shred.c | 4 +++- src/sync.c | 6 ++++-- 17 files changed, 61 insertions(+), 31 deletions(-) (limited to 'src') diff --git a/src/chgrp.c b/src/chgrp.c index a090b83a5..46fe03414 100644 --- a/src/chgrp.c +++ b/src/chgrp.c @@ -145,9 +145,9 @@ Change the group membership of each FILE to GROUP.\n\ --reference=RFILE use RFILE's group rather than the specified\n\ GROUP value\n\ -R, --recursive operate on files and directories recursively\n\ + -v, --verbose output a diagnostic for every file processed\n\ "), stdout); fputs (_("\ - -v, --verbose output a diagnostic for every file processed\n\ --help display this help and exit\n\ --version output version information and exit\n\ "), stdout); diff --git a/src/chmod.c b/src/chmod.c index 371f4cccc..953bb7959 100644 --- a/src/chmod.c +++ b/src/chmod.c @@ -253,11 +253,13 @@ Change the mode of each FILE to MODE.\n\ -f, --silent, --quiet suppress most error messages\n\ -v, --verbose output a diagnostic for every file processed\n\ --reference=RFILE use RFILE's mode instead of MODE values\n\ + -R, --recursive change files and directories recursively\n\ "), stdout); fputs (_("\ - -R, --recursive change files and directories recursively\n\ --help display this help and exit\n\ --version output version information and exit\n\ +"), stdout); + fputs (_("\ \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\ diff --git a/src/chown.c b/src/chown.c index 6d92888ba..ce81ace31 100644 --- a/src/chown.c +++ b/src/chown.c @@ -126,14 +126,14 @@ Change the owner and/or group of each FILE to OWNER and/or GROUP.\n\ --reference=RFILE use RFILE's owner and group rather than\n\ the specified OWNER:GROUP values\n\ -R, --recursive operate on files and directories recursively\n\ + -v, --verbose output a diagnostic for every file processed\n\ "), stdout); fputs (_("\ - -v, --verbose output a diagnostic for every file processed\n\ --help display this help and exit\n\ --version output version information and exit\n\ -\n\ "), stdout); fputs (_("\ +\n\ Owner is unchanged if missing. Group is unchanged if missing, but changed\n\ to login group if implied by a `:'. OWNER and GROUP may be numeric as well\n\ as symbolic.\n\ diff --git a/src/cp.c b/src/cp.c index 74834f276..139744743 100644 --- a/src/cp.c +++ b/src/cp.c @@ -212,18 +212,20 @@ Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n\ -s, --symbolic-link make symbolic links instead of copying\n\ -S, --suffix=SUFFIX override the usual backup suffix\n\ --target-directory=DIRECTORY move all SOURCE arguments into DIRECTORY\n\ +"), stdout); + fputs (_("\ -u, --update copy only when the SOURCE file is newer\n\ than the destination file or when the\n\ destination file is missing\n\ -"), stdout); - fputs (_("\ -v, --verbose explain what is being done\n\ -x, --one-file-system stay on this file system\n\ +"), stdout); + fputs (_("\ --help display this help and exit\n\ --version output version information and exit\n\ -\n\ "), stdout); fputs (_("\ +\n\ By default, sparse SOURCE files are detected by a crude heuristic and the\n\ corresponding DEST file is made sparse as well. That is the behavior\n\ selected by --sparse=auto. Specify --sparse=always to create a sparse DEST\n\ diff --git a/src/dd.c b/src/dd.c index 6ddcad1e6..47d5f0370 100644 --- a/src/dd.c +++ b/src/dd.c @@ -304,6 +304,8 @@ Copy a file, converting and formatting according to the options.\n\ of=FILE write to FILE instead of stdout\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\ +"), stdout); + fputs (_("\ --help display this help and exit\n\ --version output version information and exit\n\ "), stdout); diff --git a/src/dircolors.c b/src/dircolors.c index 796e667ea..9b0745f6a 100644 --- a/src/dircolors.c +++ b/src/dircolors.c @@ -113,6 +113,8 @@ Determine format of output:\n\ fputs (_("\ --help display this help and exit\n\ --version output version information and exit\n\ +"), stdout); + fputs (_("\ \n\ If FILE is specified, read it to determine which colors to use for which\n\ file types and extensions. Otherwise, a precompiled database is used.\n\ diff --git a/src/install.c b/src/install.c index 842ded2be..a7f588f04 100644 --- a/src/install.c +++ b/src/install.c @@ -629,14 +629,14 @@ In the third format, create all components of the given DIRECTORY(ies).\n\ to corresponding destination files\n\ -s, --strip strip symbol tables, only for 1st and 2nd formats\n\ -S, --suffix=SUFFIX override the usual backup suffix\n\ + -v, --verbose print the name of each directory as it is created\n\ "), stdout); fputs (_("\ - -v, --verbose print the name of each directory as it is created\n\ --help display this help and exit\n\ --version output version information and exit\n\ -\n\ "), stdout); fputs (_("\ +\n\ The backup suffix is `~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX.\n\ The version control method may be selected via the --backup option or through\n\ the VERSION_CONTROL environment variable. Here are the values:\n\ diff --git a/src/ln.c b/src/ln.c index fe037a19a..b8b628dc7 100644 --- a/src/ln.c +++ b/src/ln.c @@ -362,17 +362,19 @@ links with --symbolic. When creating hard links, each TARGET must exist.\n\ directory as if it were a normal file\n\ -i, --interactive prompt whether to remove destinations\n\ -s, --symbolic make symbolic links instead of hard links\n\ - -S, --suffix=SUFFIX override the usual backup suffix\n\ "), stdout); fputs (_("\ + -S, --suffix=SUFFIX override the usual backup suffix\n\ --target-directory=DIRECTORY specify the DIRECTORY in which to create\n\ the links\n\ -v, --verbose print name of each file before linking\n\ +"), stdout); + fputs (_("\ --help display this help and exit\n\ --version output version information and exit\n\ -\n\ "), stdout); fputs (_("\ +\n\ The backup suffix is `~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX.\n\ The version control method may be selected via the --backup option or through\n\ the VERSION_CONTROL environment variable. Here are the values:\n\ diff --git a/src/ls.c b/src/ls.c index 150f784ed..2a332c15c 100644 --- a/src/ls.c +++ b/src/ls.c @@ -3659,6 +3659,8 @@ Sort entries alphabetically if none of -cftuSUX nor --sort.\n\ -x list entries by lines instead of by columns\n\ -X sort alphabetically by entry extension\n\ -1 list one file per line\n\ +"), stdout); + fputs (_("\ --help display this help and exit\n\ --version output version information and exit\n\ "), stdout); diff --git a/src/mkdir.c b/src/mkdir.c index 549bdadde..57a11423e 100644 --- a/src/mkdir.c +++ b/src/mkdir.c @@ -59,15 +59,17 @@ usage (int status) else { printf (_("Usage: %s [OPTION] DIRECTORY...\n"), program_name); - printf (_("\ + fputs (_("\ Create the DIRECTORY(ies), if they do not already exist.\n\ \n\ -m, --mode=MODE set permission mode (as in chmod), not rwxrwxrwx - umask\n\ -p, --parents no error if existing, make parent directories as needed\n\ -v, --verbose print a message for each created directory\n\ +"), stdout); + fputs (_("\ --help display this help and exit\n\ --version output version information and exit\n\ -")); +"), stdout); puts (_("\nReport bugs to .")); } exit (status); diff --git a/src/mkfifo.c b/src/mkfifo.c index 341be8a51..ca70a11ca 100644 --- a/src/mkfifo.c +++ b/src/mkfifo.c @@ -53,13 +53,15 @@ usage (int status) else { printf (_("Usage: %s [OPTION] NAME...\n"), program_name); - printf (_("\ + fputs (_("\ Create named pipes (FIFOs) with the given NAMEs.\n\ \n\ -m, --mode=MODE set permission mode (as in chmod), not a=rw - umask\n\ +"), stdout); + fputs (_("\ --help display this help and exit\n\ --version output version information and exit\n\ -")); +"), stdout); puts (_("\nReport bugs to .")); } exit (status); diff --git a/src/mknod.c b/src/mknod.c index 47c1f8d44..fb005bb95 100644 --- a/src/mknod.c +++ b/src/mknod.c @@ -63,19 +63,23 @@ usage (int status) else { printf (_("Usage: %s [OPTION]... NAME TYPE [MAJOR MINOR]\n"), program_name); - printf (_("\ + fputs (_("\ Create the special file NAME of the given TYPE.\n\ \n\ -m, --mode=MODE set permission mode (as in chmod), not a=rw - umask\n\ +"), stdout); + fputs (_("\ --help display this help and exit\n\ --version output version information and exit\n\ +"), stdout); + fputs (_("\ \n\ MAJOR MINOR are forbidden for TYPE p, mandatory otherwise. TYPE may be:\n\ \n\ b create a block (buffered) special file\n\ c, u create a character (unbuffered) special file\n\ p create a FIFO\n\ -")); +"), stdout); puts (_("\nReport bugs to .")); } exit (status); diff --git a/src/mv.c b/src/mv.c index 5d1ebe176..be29d622b 100644 --- a/src/mv.c +++ b/src/mv.c @@ -333,7 +333,7 @@ Usage: %s [OPTION]... SOURCE DEST\n\ or: %s [OPTION]... --target-directory=DIRECTORY SOURCE...\n\ "), program_name, program_name, program_name); - printf (_("\ + fputs (_("\ Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.\n\ \n\ --backup[=CONTROL] make a backup of each existing destination file\n\ @@ -342,34 +342,38 @@ Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.\n\ equivalent to --reply=yes\n\ -i, --interactive prompt before overwrite\n\ equivalent to --reply=query\n\ -")); - printf (_("\ +"), stdout); + fputs (_("\ --reply={yes,no,query} specify how to handle the prompt about an\n\ existing destination file\n\ --strip-trailing-slashes remove any trailing slashes from each SOURCE\n\ argument\n\ -S, --suffix=SUFFIX override the usual backup suffix\n\ -")); - printf (_("\ +"), stdout); + fputs (_("\ --target-directory=DIRECTORY move all SOURCE arguments into DIRECTORY\n\ -u, --update move only when the SOURCE file is newer\n\ than the destination file or when the\n\ destination file is missing\n\ -v, --verbose explain what is being done\n\ +"), stdout); + fputs (_("\ --help display this help and exit\n\ --version output version information and exit\n\ \n\ -")); - printf (_("\ +"), stdout); + fputs (_("\ The backup suffix is `~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX.\n\ The version control method may be selected via the --backup option or through\n\ the VERSION_CONTROL environment variable. Here are the values:\n\ \n\ +"), stdout); + fputs (_("\ none, off never make backups (even if --backup is given)\n\ numbered, t make numbered backups\n\ existing, nil numbered if numbered backups exist, simple otherwise\n\ simple, never always make simple backups\n\ -")); +"), stdout); puts (_("\nReport bugs to .")); } exit (status); diff --git a/src/rm.c b/src/rm.c index dbe6fb26f..a3f214b66 100644 --- a/src/rm.c +++ b/src/rm.c @@ -92,14 +92,14 @@ Remove (unlink) the FILE(s).\n\ -f, --force ignore nonexistent files, never prompt\n\ -i, --interactive prompt before any removal\n\ -r, -R, --recursive remove the contents of directories recursively\n\ + -v, --verbose explain what is being done\n\ "), stdout); fputs (_("\ - -v, --verbose explain what is being done\n\ --help display this help and exit\n\ --version output version information and exit\n\ -\n\ "), stdout); printf (_("\ +\n\ To remove a file whose name starts with a `-', for example `-foo',\n\ use one of these commands:\n\ %s -- -foo\n\ diff --git a/src/rmdir.c b/src/rmdir.c index 085a11e68..8276816a6 100644 --- a/src/rmdir.c +++ b/src/rmdir.c @@ -148,12 +148,14 @@ Remove the DIRECTORY(ies), if they are empty.\n\ --ignore-fail-on-non-empty\n\ ignore each failure that is solely because a directory\n\ is non-empty\n\ +"), stdout); + fputs (_("\ -p, --parents remove DIRECTORY, then try to remove each directory\n\ component of that path name. E.g., `rmdir -p a/b/c' is\n\ similar to `rmdir a/b/c a/b a'.\n\ + -v, --verbose output a diagnostic for every directory processed\n\ "), stdout); fputs (_("\ - -v, --verbose output a diagnostic for every directory processed\n\ --help display this help and exit\n\ --version output version information and exit\n\ "), stdout); diff --git a/src/shred.c b/src/shred.c index 9bec7dd13..2e1fed476 100644 --- a/src/shred.c +++ b/src/shred.c @@ -478,11 +478,13 @@ for even very expensive hardware probing to recover the data.\n\ -x, --exact do not round file sizes up to the next full block\n\ -z, --zero add a final overwrite with zeros to hide shredding\n\ - shred standard output\n\ +"), stdout); + fputs (_("\ --help display this help and exit\n\ --version print version information and exit\n\ -\n\ "), stdout); fputs (_("\ +\n\ Delete FILE(s) if --remove (-u) is specified. The default is not to remove\n\ the files because it is common to operate on device files like /dev/hda,\n\ and those files usually should not be removed. When operating on regular\n\ diff --git a/src/sync.c b/src/sync.c index 1afc5d927..dcade1c8e 100644 --- a/src/sync.c +++ b/src/sync.c @@ -42,12 +42,14 @@ usage (int status) else { printf (_("Usage: %s [OPTION]\n"), program_name); - printf (_("\ + fputs (_("\ Force changed blocks to disk, update the super block.\n\ \n\ +"), stdout); + fputs (_("\ --help display this help and exit\n\ --version output version information and exit\n\ -")); +"), stdout); puts (_("\nReport bugs to .")); } exit (status); -- cgit v1.2.3-70-g09d2