From f3ac2e783982387442dbd13cc30df0f41d52c779 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 2 Dec 2001 22:26:57 +0000 Subject: [PATCH] Use new macros, HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTION instead of hard-coding --help and --version descriptions. --- src/chgrp.c | 6 ++---- src/chmod.c | 6 ++---- src/chown.c | 6 ++---- src/cp.c | 6 ++---- src/dd.c | 6 ++---- src/df.c | 6 ++---- src/dircolors.c | 6 ++---- src/du.c | 6 ++---- src/install.c | 6 ++---- src/ln.c | 6 ++---- src/ls.c | 6 ++---- src/mkdir.c | 6 ++---- src/mkfifo.c | 6 ++---- src/mknod.c | 6 ++---- src/mv.c | 6 ++---- src/rm.c | 6 ++---- src/rmdir.c | 6 ++---- src/shred.c | 6 ++---- src/stat.c | 6 ++---- src/sync.c | 6 ++---- src/touch.c | 6 ++---- 21 files changed, 42 insertions(+), 84 deletions(-) diff --git a/src/chgrp.c b/src/chgrp.c index 46fe034..a827f75 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 953bb79..82cdace 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 ce81ace..d7f3c98 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 0cab4f5..6a16ba1 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 56db4fc..f138f0f 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 cc12634..3d84fa5 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 9b0745f..46ccc01 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 09ace43..4aaf054 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 b0849fe..8efb2ac 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 de088c6..c3d51e9 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 faea02e..2416e1e 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 b3bfb5c..2b00c2f 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 0eae769..9972030 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 7e34bd4..810d63e 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 30ac2cc..a500d9f 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 a3f214b..9c105ef 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 8276816..cebeac3 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 7bb3edf..91ad58e 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 e65242c..cd63fe2 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 5c0ea52..40bb571 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 3590cb5..e3ec8ae 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\ -- 2.7.4