From: Jim Meyering Date: Sun, 2 Dec 2001 22:26:57 +0000 (+0000) Subject: Use new macros, HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTION X-Git-Tag: FILEUTILS-4_1_3~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f3ac2e783982387442dbd13cc30df0f41d52c779;p=thirdparty%2Fcoreutils.git Use new macros, HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTION instead of hard-coding --help and --version descriptions. --- diff --git a/src/chgrp.c b/src/chgrp.c index 46fe034143..a827f75486 100644 --- a/src/chgrp.c +++ b/src/chgrp.c @@ -147,10 +147,8 @@ Change the group membership of each FILE to GROUP.\n\ -R, --recursive operate on files and directories recursively\n\ -v, --verbose output a diagnostic for every file processed\n\ "), stdout); - fputs (_("\ - --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 .")); } exit (status); diff --git a/src/chmod.c b/src/chmod.c index 953bb79590..82cdacea9b 100644 --- a/src/chmod.c +++ b/src/chmod.c @@ -255,10 +255,8 @@ Change the mode of each FILE to MODE.\n\ --reference=RFILE use RFILE's mode instead of MODE values\n\ -R, --recursive change files and directories recursively\n\ "), stdout); - fputs (_("\ - --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\ Each MODE is one or more of the letters ugoa, one of the symbols +-= and\n\ diff --git a/src/chown.c b/src/chown.c index ce81ace312..d7f3c982c7 100644 --- a/src/chown.c +++ b/src/chown.c @@ -128,10 +128,8 @@ Change the owner and/or group of each FILE to OWNER and/or GROUP.\n\ -R, --recursive operate on files and directories recursively\n\ -v, --verbose output a diagnostic for every file processed\n\ "), stdout); - fputs (_("\ - --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\ Owner is unchanged if missing. Group is unchanged if missing, but changed\n\ diff --git a/src/cp.c b/src/cp.c index 0cab4f5d23..6a16ba1395 100644 --- a/src/cp.c +++ b/src/cp.c @@ -225,10 +225,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\ -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\ -"), stdout); + fputs (HELP_OPTION_DESCRIPTION, stdout); + fputs (VERSION_OPTION_DESCRIPTION, stdout); fputs (_("\ \n\ By default, sparse SOURCE files are detected by a crude heuristic and the\n\ diff --git a/src/dd.c b/src/dd.c index 56db4fc152..f138f0f75a 100644 --- a/src/dd.c +++ b/src/dd.c @@ -305,10 +305,8 @@ Copy a file, converting and formatting according to the options.\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); + fputs (HELP_OPTION_DESCRIPTION, stdout); + fputs (VERSION_OPTION_DESCRIPTION, stdout); fputs (_("\ \n\ BLOCKS and BYTES may be followed by the following multiplicative suffixes:\n\ diff --git a/src/df.c b/src/df.c index cc126347de..3d84fa54b8 100644 --- a/src/df.c +++ b/src/df.c @@ -781,10 +781,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\ -x, --exclude-type=TYPE limit listing to filesystems not of type TYPE\n\ -v (ignored)\n\ "), stdout); - fputs (_("\ - --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 .")); } exit (status); diff --git a/src/dircolors.c b/src/dircolors.c index 9b0745f6ab..46ccc010e0 100644 --- a/src/dircolors.c +++ b/src/dircolors.c @@ -110,10 +110,8 @@ Determine format of output:\n\ -c, --csh, --c-shell output C shell code to set LS_COLORS\n\ -p, --print-database output defaults\n\ "), stdout); - fputs (_("\ - --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 FILE is specified, read it to determine which colors to use for which\n\ diff --git a/src/du.c b/src/du.c index 09ace435d5..4aaf0540b6 100644 --- a/src/du.c +++ b/src/du.c @@ -222,10 +222,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\ line argument; --max-depth=0 is the same as\n\ --summarize\n\ "), stdout); - fputs (_("\ - --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 .")); } exit (status); diff --git a/src/install.c b/src/install.c index b0849fe9c6..8efb2acb23 100644 --- a/src/install.c +++ b/src/install.c @@ -634,10 +634,8 @@ Mandatory arguments to long options are mandatory for short options too.\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 (_("\ - --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\ The backup suffix is `~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX.\n\ diff --git a/src/ln.c b/src/ln.c index de088c6b30..c3d51e996d 100644 --- a/src/ln.c +++ b/src/ln.c @@ -372,10 +372,8 @@ Mandatory arguments to long options are mandatory for short options too.\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\ -"), stdout); + fputs (HELP_OPTION_DESCRIPTION, stdout); + fputs (VERSION_OPTION_DESCRIPTION, stdout); fputs (_("\ \n\ The backup suffix is `~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX.\n\ diff --git a/src/ls.c b/src/ls.c index faea02e340..2416e1e2f5 100644 --- a/src/ls.c +++ b/src/ls.c @@ -3667,10 +3667,8 @@ Mandatory arguments to long options are mandatory for short options too.\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); + fputs (HELP_OPTION_DESCRIPTION, stdout); + fputs (VERSION_OPTION_DESCRIPTION, stdout); fputs (_("\ \n\ By default, color is not used to distinguish types of files. That is\n\ diff --git a/src/mkdir.c b/src/mkdir.c index b3bfb5cda2..2b00c2f6d6 100644 --- a/src/mkdir.c +++ b/src/mkdir.c @@ -71,10 +71,8 @@ Mandatory arguments to long options are mandatory for short options too.\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); + fputs (HELP_OPTION_DESCRIPTION, stdout); + fputs (VERSION_OPTION_DESCRIPTION, stdout); puts (_("\nReport bugs to .")); } exit (status); diff --git a/src/mkfifo.c b/src/mkfifo.c index 0eae769439..9972030127 100644 --- a/src/mkfifo.c +++ b/src/mkfifo.c @@ -63,10 +63,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\ fputs (_("\ -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 (HELP_OPTION_DESCRIPTION, stdout); + fputs (VERSION_OPTION_DESCRIPTION, stdout); puts (_("\nReport bugs to .")); } exit (status); diff --git a/src/mknod.c b/src/mknod.c index 7e34bd4e6f..810d63ef38 100644 --- a/src/mknod.c +++ b/src/mknod.c @@ -73,10 +73,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\ fputs (_("\ -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 (HELP_OPTION_DESCRIPTION, stdout); + fputs (VERSION_OPTION_DESCRIPTION, stdout); fputs (_("\ \n\ MAJOR MINOR are forbidden for TYPE p, mandatory otherwise. TYPE may be:\n\ diff --git a/src/mv.c b/src/mv.c index 30ac2ccf33..a500d9f1c5 100644 --- a/src/mv.c +++ b/src/mv.c @@ -362,12 +362,10 @@ Mandatory arguments to long options are mandatory for short options too.\n\ destination file is missing\n\ -v, --verbose explain what is being done\n\ "), stdout); + fputs (HELP_OPTION_DESCRIPTION, stdout); + fputs (VERSION_OPTION_DESCRIPTION, stdout); fputs (_("\ - --help display this help and exit\n\ - --version output version information and exit\n\ \n\ -"), 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\ diff --git a/src/rm.c b/src/rm.c index a3f214b66b..9c105efe2a 100644 --- a/src/rm.c +++ b/src/rm.c @@ -94,10 +94,8 @@ Remove (unlink) the FILE(s).\n\ -r, -R, --recursive remove the contents of directories recursively\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\ -"), stdout); + fputs (HELP_OPTION_DESCRIPTION, stdout); + fputs (VERSION_OPTION_DESCRIPTION, stdout); printf (_("\ \n\ To remove a file whose name starts with a `-', for example `-foo',\n\ diff --git a/src/rmdir.c b/src/rmdir.c index 8276816a6a..cebeac3167 100644 --- a/src/rmdir.c +++ b/src/rmdir.c @@ -155,10 +155,8 @@ Remove the DIRECTORY(ies), if they are empty.\n\ similar to `rmdir a/b/c a/b a'.\n\ -v, --verbose output a diagnostic for every directory processed\n\ "), stdout); - fputs (_("\ - --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 .")); } exit (status); diff --git a/src/shred.c b/src/shred.c index 7bb3edf892..91ad58ea44 100644 --- a/src/shred.c +++ b/src/shred.c @@ -483,10 +483,8 @@ Mandatory arguments to long options are mandatory for short options too.\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 output version information and exit\n\ -"), stdout); + fputs (HELP_OPTION_DESCRIPTION, stdout); + fputs (VERSION_OPTION_DESCRIPTION, stdout); fputs (_("\ \n\ Delete FILE(s) if --remove (-u) is specified. The default is not to remove\n\ diff --git a/src/stat.c b/src/stat.c index e65242c14e..cd63fe2032 100644 --- a/src/stat.c +++ b/src/stat.c @@ -304,10 +304,8 @@ Display file or filesystem status.\n\ -f, --filesystem display filesystem status instead of file status\n\ -t, --terse print the information in terse form\n\ "), stdout); - fputs (_("\ - --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 .")); } exit (status); diff --git a/src/sync.c b/src/sync.c index 5c0ea52ecc..40bb5715b7 100644 --- a/src/sync.c +++ b/src/sync.c @@ -46,10 +46,8 @@ usage (int status) 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); + fputs (HELP_OPTION_DESCRIPTION, stdout); + fputs (VERSION_OPTION_DESCRIPTION, stdout); puts (_("\nReport bugs to .")); } exit (status); diff --git a/src/touch.c b/src/touch.c index 3590cb51bf..e3ec8ae475 100644 --- a/src/touch.c +++ b/src/touch.c @@ -248,10 +248,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\ --time=WORD set time given by WORD: access atime use (same as -a)\n\ modify mtime (same as -m)\n\ "), stdout); - fputs (_("\ - --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\ Note that the three time-date formats recognized for the -d and -t options\n\