]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(usage): Use new macros, EMIT_HELP_DESCRIPTION and EMIT_VERSION_DESCRIPTION
authorJim Meyering <jim@meyering.net>
Sat, 1 Dec 2001 17:21:56 +0000 (17:21 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 1 Dec 2001 17:21:56 +0000 (17:21 +0000)
instead of hard-coding --help and --version descriptions.

26 files changed:
src/cat.c
src/cksum.c
src/comm.c
src/csplit.c
src/cut.c
src/expand.c
src/fmt.c
src/fold.c
src/head.c
src/join.c
src/md5sum.c
src/nl.c
src/od.c
src/paste.c
src/pr.c
src/ptx.c
src/sort.c
src/split.c
src/sum.c
src/tac.c
src/tail.c
src/tr.c
src/tsort.c
src/unexpand.c
src/uniq.c
src/wc.c

index 3b5d7ed5703a1e05b22a918b89102927eb3e27c4..494c59417da13fb0e16e390db94d0251792446a1 100644 (file)
--- a/src/cat.c
+++ b/src/cat.c
@@ -109,10 +109,8 @@ Concatenate FILE(s), or standard input, to standard output.\n\
   -u                       (ignored)\n\
   -v, --show-nonprinting   use ^ and M- notation, except for LFD and TAB\n\
 "), stdout);
-      fputs (_("\
-      --help               display this help and exit\n\
-      --version            output version information and exit\n\
-"), stdout);
+      EMIT_HELP_DESCRIPTION (stdout);
+      EMIT_VERSION_DESCRIPTION (stdout);
       fputs (_("\
 \n\
 With no FILE, or when FILE is -, read standard input.\n\
index 5c5b5164e4f9e2714868162e5f8bcf6fb9ed8659..9dfd96e6d078a023b6f9866416c96d4c973c6bdc 100644 (file)
@@ -286,10 +286,8 @@ Usage: %s [FILE]...\n\
 Print CRC checksum and byte counts of each FILE.\n\
 \n\
 "), stdout);
-      fputs (_("\
-      --help        display this help and exit\n\
-      --version     output version information and exit\n\
-"), stdout);
+      EMIT_HELP_DESCRIPTION (stdout);
+      EMIT_VERSION_DESCRIPTION (stdout);
       puts (_("\nReport bugs to <bug-textutils@gnu.org>."));
     }
   exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
index dc05124d56cdac3e98bdc973eb465da0423b2543..8882f81455c3f51fdd525e059ef7b05219ff46ff 100644 (file)
@@ -83,10 +83,8 @@ Compare sorted files LEFT_FILE and RIGHT_FILE line by line.\n\
   -2              suppress lines unique to right file\n\
   -3              suppress lines that appear in both files\n\
 "), stdout);
-      fputs (_("\
-      --help      display this help and exit\n\
-      --version   output version information and exit\n\
-"), stdout);
+      EMIT_HELP_DESCRIPTION (stdout);
+      EMIT_VERSION_DESCRIPTION (stdout);
       puts (_("\nReport bugs to <bug-textutils@gnu.org>."));
     }
   exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
index 3af18c928fe503c35d68f484fe0e544bf58eb4cb..7815adea5e78156e932f3603f4b84694fccd565a 100644 (file)
@@ -1514,10 +1514,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   -s, --quiet, --silent      do not print counts of output file sizes\n\
   -z, --elide-empty-files    remove empty output files\n\
 "), stdout);
-      fputs (_("\
-      --help                 display this help and exit\n\
-      --version              output version information and exit\n\
-"), stdout);
+      EMIT_HELP_DESCRIPTION (stdout);
+      EMIT_VERSION_DESCRIPTION (stdout);
       fputs (_("\
 \n\
 Read standard input if FILE is -.  Each PATTERN may be:\n\
index 206bbd293760cdbfcf3afc8fb41f71c766bfbb28..24e95d646b64919e2a014ef7ffd2cc07818fc6dc 100644 (file)
--- a/src/cut.c
+++ b/src/cut.c
@@ -191,10 +191,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
       --output-delimiter=STRING  use STRING as the output delimiter\n\
                             the default is to use the input delimiter\n\
 "), stdout);
-      fputs (_("\
-      --help              display this help and exit\n\
-      --version           output version information and exit\n\
-"), stdout);
+      EMIT_HELP_DESCRIPTION (stdout);
+      EMIT_VERSION_DESCRIPTION (stdout);
       fputs (_("\
 \n\
 Use one, and only one of -b, -c or -f.  Each LIST is made up of one\n\
index 38624c7e795461552f5735dc3c33714fd2d9746e..24cd936c3c9daf159767691cf386dc314a2d3835 100644 (file)
@@ -125,10 +125,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
       fputs (_("\
   -t, --tabs=LIST     use comma separated list of explicit tab positions\n\
 "), stdout);
-      fputs (_("\
-      --help          display this help and exit\n\
-      --version       output version information and exit\n\
-"), stdout);
+      EMIT_HELP_DESCRIPTION (stdout);
+      EMIT_VERSION_DESCRIPTION (stdout);
       fputs (_("\
 \n\
 Instead of -t NUMBER or -t LIST, -NUMBER or -LIST may be used.\n\
index d9aefac27b64eb5f71b0c8e19a9838382b9a8936..3fadc55bc7db65d2ddecfef3dfce0ed5b5590286 100644 (file)
--- a/src/fmt.c
+++ b/src/fmt.c
@@ -288,10 +288,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   -u, --uniform-spacing     one space between words, two after sentences\n\
   -w, --width=NUMBER        maximum line width (default of 75 columns)\n\
 "), stdout);
-      fputs (_("\
-      --help                display this help and exit\n\
-      --version             output version information and exit\n\
-"), stdout);
+      EMIT_HELP_DESCRIPTION (stdout);
+      EMIT_VERSION_DESCRIPTION (stdout);
       fputs (_("\
 \n\
 In -wNUMBER, the letter `w' may be omitted.\n"),
index d2503a95df11f62aff8b92257ef9f2b25de50e30..b78e9a40cbcf5dc7a907b2ca20a5747f220cb2e3 100644 (file)
@@ -80,10 +80,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   -s, --spaces        break at spaces\n\
   -w, --width=WIDTH   use WIDTH columns instead of 80\n\
 "), stdout);
-      fputs (_("\
-      --help          display this help and exit\n\
-      --version       output version information and exit\n\
-"), stdout);
+      EMIT_HELP_DESCRIPTION (stdout);
+      EMIT_VERSION_DESCRIPTION (stdout);
       puts (_("\nReport bugs to <bug-textutils@gnu.org>."));
     }
   exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
index 85e53b7b308aa78d19cf348278c3a733f88b260c..3848205640389fb3ecfc93381f1f1265d8f132e9 100644 (file)
@@ -102,10 +102,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   -q, --quiet, --silent    never print headers giving file names\n\
   -v, --verbose            always print headers giving file names\n\
 "), stdout);
-      fputs (_("\
-      --help               display this help and exit\n\
-      --version            output version information and exit\n\
-"), stdout);
+      EMIT_HELP_DESCRIPTION (stdout);
+      EMIT_VERSION_DESCRIPTION (stdout);
       fputs (_("\
 \n\
 SIZE may have a multiplier suffix: b for 512, k for 1K, m for 1 Meg.\n\
index aebecf66640c864ae0493d385c070d990a03b796..0a4ea68d66fcdbbb5ce4632e0f5448051111af39 100644 (file)
@@ -168,10 +168,8 @@ by whitespace.  When FILE1 or FILE2 (not both) is -, read standard input.\n\
   -1 FIELD          join on this FIELD of file 1\n\
   -2 FIELD          join on this FIELD of file 2\n\
 "), stdout);
-      fputs (_("\
-      --help        display this help and exit\n\
-      --version     output version information and exit\n\
-"), stdout);
+      EMIT_HELP_DESCRIPTION (stdout);
+      EMIT_VERSION_DESCRIPTION (stdout);
       fputs (_("\
 \n\
 "), stdout);
index 2014d89fde41214db29e2e4773686333a22f5d13..a746400f3ee279a40f3f5f15be3418391b1b8b6c 100644 (file)
@@ -145,10 +145,8 @@ The following two options are useful only when verifying checksums:\n\
   -w, --warn              warn about improperly formated checksum lines\n\
 \n\
 "), stdout);
-      fputs (_("\
-      --help              display this help and exit\n\
-      --version           output version information and exit\n\
-"), stdout);
+      EMIT_HELP_DESCRIPTION (stdout);
+      EMIT_VERSION_DESCRIPTION (stdout);
       fputs (_("\
 \n\
 "), stdout);
index a3706b969fa7e0d429b40d9062a8adc0b86cfca6..1754b9f6a32c8e46987fd668e80ff514a2bc15ac 100644 (file)
--- a/src/nl.c
+++ b/src/nl.c
@@ -202,10 +202,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   -v, --first-page=NUMBER         first line number on each logical page\n\
   -w, --number-width=NUMBER       use NUMBER columns for line numbers\n\
 "), stdout);
-      fputs (_("\
-      --help                      display this help and exit\n\
-      --version                   output version information and exit\n\
-"), stdout);
+      EMIT_HELP_DESCRIPTION (stdout);
+      EMIT_VERSION_DESCRIPTION (stdout);
       fputs (_("\
 \n\
 By default, selects -v1 -i1 -l1 -sTAB -w6 -nrn -hn -bt -fn.  CC are\n\
index a393eeba43f21c132bd1fe1cf896aaebee877697..72981e7637599caec82bec1288d998843533001f 100644 (file)
--- a/src/od.c
+++ b/src/od.c
@@ -298,10 +298,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   -w, --width[=BYTES]         output BYTES bytes per output line\n\
       --traditional           accept arguments in pre-POSIX form\n\
 "), stdout);
-      fputs (_("\
-      --help                  display this help and exit\n\
-      --version               output version information and exit\n\
-"), stdout);
+      EMIT_HELP_DESCRIPTION (stdout);
+      EMIT_VERSION_DESCRIPTION (stdout);
       fputs (_("\
 \n\
 Pre-POSIX format specifications may be intermixed, they accumulate:\n\
index f8ef2ddb2a5330dc8af8797af6a8a7c256972783..cc802d4d605d544fe2dd03805546598fff5768a0 100644 (file)
@@ -417,10 +417,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   -d, --delimiters=LIST   reuse characters from LIST instead of TABs\n\
   -s, --serial            paste one file at a time instead of in parallel\n\
 "), stdout);
-      fputs (_("\
-      --help              display this help and exit\n\
-      --version           output version information and exit\n\
-"), stdout);
+      EMIT_HELP_DESCRIPTION (stdout);
+      EMIT_VERSION_DESCRIPTION (stdout);
       /* FIXME: add a couple of examples.  */
       fputs (_("\
 \n\
index e6d66f2c1ed0da4d4b4fbc56f57992a491c7bc01..700d6c91217bf4ac3808bfa29dbebdeb3aafd2c4 100644 (file)
--- a/src/pr.c
+++ b/src/pr.c
@@ -2847,10 +2847,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
                     truncate lines, except -J option is set, no interference\n\
                     with -S or -s\n\
 "), stdout);
-      fputs (_("\
-      --help        display this help and exit\n\
-      --version     output version information and exit\n\
-"), stdout);
+      EMIT_HELP_DESCRIPTION (stdout);
+      EMIT_VERSION_DESCRIPTION (stdout);
       fputs (_("\
 \n\
 -T implied by -l nn when nn <= 10 or <= 3 with -F. With no FILE, or when\n\
index 27a3117364d868603d849435ccc27f747cb5e4c7..b72a3500b4a21723e44a64e9fb7216858a7b6560 100644 (file)
--- a/src/ptx.c
+++ b/src/ptx.c
@@ -1893,10 +1893,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   -t, --typeset-mode               - not implemented -\n\
   -w, --width=NUMBER             output width in columns, reference excluded\n\
 "), stdout);
-      fputs (_("\
-      --help                     display this help and exit\n\
-      --version                  output version information and exit\n\
-"), stdout);
+      EMIT_HELP_DESCRIPTION (stdout);
+      EMIT_VERSION_DESCRIPTION (stdout);
       fputs (_("\
 \n\
 With no FILE or if FILE is -, read Standard Input.  `-F /' by default.\n\
index f693cff2c09fb93a45c70f4f6e5a9b914f9027ca..346e2c38c1c52ee1828506e5544518fe5283f167 100644 (file)
@@ -330,10 +330,8 @@ Other options:\n\
   +POS1 [-POS2]             start a key at POS1, end it before POS2 (origin 0)\n\
                               Warning: this option is obsolescent\n\
 "), stdout);
-      fputs (_("\
-      --help       display this help and exit\n\
-      --version    output version information and exit\n\
-"), stdout);
+      EMIT_HELP_DESCRIPTION (stdout);
+      EMIT_VERSION_DESCRIPTION (stdout);
       fputs (_("\
 \n\
 POS is F[.C][OPTS], where F is the field number and C the character position\n\
index 7ffa8417e865cdda722f324eada4f78936e98798..3345e8f298e542840f5d4078edadc67c529d76ac 100644 (file)
@@ -104,10 +104,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
       --verbose           print a diagnostic to standard error just\n\
                             before each output file is opened\n\
 "), stdout);
-      fputs (_("\
-      --help              display this help and exit\n\
-      --version           output version information and exit\n\
-"), stdout);
+      EMIT_HELP_DESCRIPTION (stdout);
+      EMIT_VERSION_DESCRIPTION (stdout);
       fputs (_("\
 \n\
 SIZE may have a multiplier suffix: b for 512, k for 1K, m for 1 Meg.\n\
index 342be7002d0212d4b94d6471c022700f9a0e09aa..847b704f71f2f435df7b9d20ed65d7801cee3bf6 100644 (file)
--- a/src/sum.c
+++ b/src/sum.c
@@ -67,10 +67,8 @@ Print checksum and block counts for each FILE.\n\
   -r              defeat -s, use BSD sum algorithm, use 1K blocks\n\
   -s, --sysv      use System V sum algorithm, use 512 bytes blocks\n\
 "), stdout);
-      fputs (_("\
-      --help      display this help and exit\n\
-      --version   output version information and exit\n\
-"), stdout);
+      EMIT_HELP_DESCRIPTION (stdout);
+      EMIT_VERSION_DESCRIPTION (stdout);
       fputs (_("\
 \n\
 With no FILE, or when FILE is -, read standard input.\n\
index 1f5668e525cdfd6da375ca4baebb3b45563cab50..3a3ab3c95999ee8a1d0637ca4b69f319aea3418c 100644 (file)
--- a/src/tac.c
+++ b/src/tac.c
@@ -141,10 +141,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   -r, --regex              interpret the separator as a regular expression\n\
   -s, --separator=STRING   use STRING as the separator instead of newline\n\
 "), stdout);
-      fputs (_("\
-      --help               display this help and exit\n\
-      --version            output version information and exit\n\
-"), stdout);
+      EMIT_HELP_DESCRIPTION (stdout);
+      EMIT_VERSION_DESCRIPTION (stdout);
       puts (_("\nReport bugs to <bug-textutils@gnu.org>."));
     }
   exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
index 41e51121ab9603745d27dc177794b81dee83a4b3..49c03e49aa1055c055efd0bdeb877073bdd053e0 100644 (file)
@@ -278,10 +278,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
                            (default 1) seconds\n\
   -v, --verbose            always output headers giving file names\n\
 "), stdout);
-     fputs (_("\
-      --help               display this help and exit\n\
-      --version            output version information and exit\n\
-"), stdout);
+     EMIT_HELP_DESCRIPTION (stdout);
+     EMIT_VERSION_DESCRIPTION (stdout);
      fputs (_("\
 \n\
 If the first character of N (the number of bytes or lines) is a `+',\n\
index c166bcda87251cb426fb8d81823f3b178ad19e93..8d4b3e37b1109bfbdb6fc689b6f474b43c020994 100644 (file)
--- a/src/tr.c
+++ b/src/tr.c
@@ -337,10 +337,8 @@ writing to standard output.\n\
   -s, --squeeze-repeats   replace sequence of characters with one\n\
   -t, --truncate-set1     first truncate SET1 to length of SET2\n\
 "), stdout);
-      fputs (_("\
-      --help              display this help and exit\n\
-      --version           output version information and exit\n\
-"), stdout);
+      EMIT_HELP_DESCRIPTION (stdout);
+      EMIT_VERSION_DESCRIPTION (stdout);
       fputs (_("\
 \n\
 SETs are specified as strings of characters.  Most represent themselves.\n\
index 1d60c182f14fd85735027044f13846aeb6b7f71e..3501c8c138feaecd3d68b3904af9bc82995a0ca1 100644 (file)
@@ -100,10 +100,8 @@ Write totally ordered list consistent with the partial ordering in FILE.\n\
 With no FILE, or when FILE is -, read standard input.\n\
 \n\
 "), program_name);
-      fputs (_("\
-      --help       display this help and exit\n\
-      --version    output version information and exit\n\
-"), stdout);
+      EMIT_HELP_DESCRIPTION (stdout);
+      EMIT_VERSION_DESCRIPTION (stdout);
       puts (_("\nReport bugs to <bug-textutils@gnu.org>."));
     }
 
index 9bab4bc681fe4e79300f0bcc460506ffcbce3862..2938d2370a8ae4e755ae6e2c2685f23b6b0b40da 100644 (file)
@@ -389,10 +389,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   -t, --tabs=NUMBER   have tabs NUMBER characters apart instead of 8\n\
   -t, --tabs=LIST     use comma separated list of explicit tab positions\n\
 "), stdout);
-     fputs (_("\
-      --help          display this help and exit\n\
-      --version       output version information and exit\n\
-"), stdout);
+     EMIT_HELP_DESCRIPTION (stdout);
+     EMIT_VERSION_DESCRIPTION (stdout);
      fputs (_("\
 \n\
 Instead of -t NUMBER or -t LIST, -NUMBER or -LIST may be used.\n\
index f81e51aee94c449a014a0298a6750f0c7edf82db..e43c613094b5d6df6d78b9d9ee231163f9fcfcac 100644 (file)
@@ -160,10 +160,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   -N                    same as -f N\n\
   +N                    same as -s N (obsolescent; will be withdrawn)\n\
 "), stdout);
-     fputs (_("\
-      --help            display this help and exit\n\
-      --version         output version information and exit\n\
-"), stdout);
+     EMIT_HELP_DESCRIPTION (stdout);
+     EMIT_VERSION_DESCRIPTION (stdout);
      fputs (_("\
 \n\
 A field is a run of whitespace, then non-whitespace characters.\n\
index fe9c2487340cbdc26ad3a970ec7e9b39fefb44ee..14645fefd43e731f72b4b7c2c77ccf3a7811ed94 100644 (file)
--- a/src/wc.c
+++ b/src/wc.c
@@ -137,10 +137,8 @@ read standard input.\n\
   -L, --max-line-length  print the length of the longest line\n\
   -w, --words            print the word counts\n\
 "), stdout);
-      fputs (_("\
-      --help             display this help and exit\n\
-      --version          output version information and exit\n\
-"), stdout);
+      EMIT_HELP_DESCRIPTION (stdout);
+      EMIT_VERSION_DESCRIPTION (stdout);
       puts (_("\nReport bugs to <bug-textutils@gnu.org>."));
     }
   exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);