Use new macros, HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTION
authorJim Meyering <jim@meyering.net>
Sun, 2 Dec 2001 22:26:57 +0000 (22:26 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 2 Dec 2001 22:26:57 +0000 (22:26 +0000)
instead of hard-coding --help and --version descriptions.

21 files changed:
src/chgrp.c
src/chmod.c
src/chown.c
src/cp.c
src/dd.c
src/df.c
src/dircolors.c
src/du.c
src/install.c
src/ln.c
src/ls.c
src/mkdir.c
src/mkfifo.c
src/mknod.c
src/mv.c
src/rm.c
src/rmdir.c
src/shred.c
src/stat.c
src/sync.c
src/touch.c

index 46fe034..a827f75 100644 (file)
@@ -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 <bug-fileutils@gnu.org>."));
     }
   exit (status);
index 953bb79..82cdace 100644 (file)
@@ -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\
index ce81ace..d7f3c98 100644 (file)
@@ -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\
index 0cab4f5..6a16ba1 100644 (file)
--- 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\
index 56db4fc..f138f0f 100644 (file)
--- 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\
index cc12634..3d84fa5 100644 (file)
--- 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 <bug-fileutils@gnu.org>."));
     }
   exit (status);
index 9b0745f..46ccc01 100644 (file)
@@ -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\
index 09ace43..4aaf054 100644 (file)
--- 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 <bug-fileutils@gnu.org>."));
     }
   exit (status);
index b0849fe..8efb2ac 100644 (file)
@@ -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\
index de088c6..c3d51e9 100644 (file)
--- 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\
index faea02e..2416e1e 100644 (file)
--- 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\
index b3bfb5c..2b00c2f 100644 (file)
@@ -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 <bug-fileutils@gnu.org>."));
     }
   exit (status);
index 0eae769..9972030 100644 (file)
@@ -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 <bug-fileutils@gnu.org>."));
     }
   exit (status);
index 7e34bd4..810d63e 100644 (file)
@@ -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\
index 30ac2cc..a500d9f 100644 (file)
--- 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\
index a3f214b..9c105ef 100644 (file)
--- 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\
index 8276816..cebeac3 100644 (file)
@@ -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 <bug-fileutils@gnu.org>."));
     }
   exit (status);
index 7bb3edf..91ad58e 100644 (file)
@@ -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\
index e65242c..cd63fe2 100644 (file)
@@ -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 <bug-fileutils@gnu.org>."));
     }
   exit (status);
index 5c0ea52..40bb571 100644 (file)
@@ -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 <bug-fileutils@gnu.org>."));
     }
   exit (status);
index 3590cb5..e3ec8ae 100644 (file)
@@ -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\