]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(PROGRAM_NAME, AUTHORS): Define and use.
authorJim Meyering <jim@meyering.net>
Wed, 31 Mar 1999 04:11:35 +0000 (04:11 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 31 Mar 1999 04:11:35 +0000 (04:11 +0000)
13 files changed:
src/basename.c
src/chroot.c
src/dirname.c
src/echo.c
src/expr.c
src/factor.c
src/hostid.c
src/hostname.c
src/nice.c
src/printf.c
src/pwd.c
src/stty.c
src/yes.c

index 1a922e1d9e1e779c688fc45423517a28a80ad380..802c5dcf47e5a499f851b9dff4b6676c97a73c8c 100644 (file)
 #include "long-options.h"
 #include "error.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "basename"
+
+#define AUTHORS "FIXME unknown"
+
 char *base_name ();
 void strip_trailing_slashes ();
 
@@ -93,8 +98,8 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  parse_long_options (argc, argv, "basename", GNU_PACKAGE, VERSION,
-                     "FIXME unknown", usage);
+  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     AUTHORS, usage);
 
   if (argc == 1 || argc > 3)
     {
index 128f905ea7358a1df85d203b134827bcf0427f77..5fc29e5899b86111162fa077e38c8e19a69038aa 100644 (file)
 #include "long-options.h"
 #include "error.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "chroot"
+
+#define AUTHORS "Roland McGrath"
+
 /* The name this program was run with, for error messages. */
 char *program_name;
 
@@ -61,8 +66,8 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  parse_long_options (argc, argv, "chroot", GNU_PACKAGE, VERSION,
-                     "Roland McGrath", usage);
+  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     AUTHORS, usage);
   if (argc == 1)
     {
       error (0, 0, _("too few arguments"));
index c659b24d96e23ca4b9032bb2059410382a886673..73231986d61a5ed4da9ee2a8d7abc1cd016e0bde 100644 (file)
 #include "long-options.h"
 #include "error.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "dirname"
+
+#define AUTHORS "David MacKenzie and Jim Meyering"
+
 void strip_trailing_slashes ();
 
 /* The name this program was run with. */
@@ -66,8 +71,8 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  parse_long_options (argc, argv, "dirname", GNU_PACKAGE, VERSION,
-                     "David MacKenzie and Jim Meyering", usage);
+  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     AUTHORS, usage);
 
   if (argc != 2)
     {
index a451cda025375b3234eb484dcf00ed32be2567c9..bbb37f4f12b2d20af8180dc9a56db39af3ff4ce7 100644 (file)
 #include "system.h"
 #include "long-options.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "echo"
+
+#define AUTHORS "FIXME unknown"
+
 /* echo [-neE] [arg ...]
 Output the ARGs.  If -n is specified, the trailing newline is
 suppressed.  If the -e option is given, interpretation of the
@@ -114,8 +119,8 @@ main (int argc, char **argv)
 
   /* Don't recognize --help or --version if POSIXLY_CORRECT is set.  */
   if (getenv ("POSIXLY_CORRECT") == NULL)
-    parse_long_options (argc, argv, "echo", GNU_PACKAGE, VERSION,
-                     "FIXME unknown", usage);
+    parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     AUTHORS, usage);
   else
     allow_options = 0;
 
index 18dc2d876d75592e763c368562885564b91118c3..a61bc34c97edc2dc0a80cb6065f988c2d3fb2571 100644 (file)
 #include "long-options.h"
 #include "error.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "expr"
+
+#define AUTHORS "Mike Parker"
+
 #define NEW(type) ((type *) xmalloc (sizeof (type)))
 #define OLD(x) free ((char *) x)
 
@@ -167,8 +172,8 @@ main (int argc, char **argv)
 
   /* Recognize --help or --version only if POSIXLY_CORRECT is not set.  */
   if (!posixly_correct)
-    parse_long_options (argc, argv, "expr", GNU_PACKAGE, VERSION,
-                       "Mike Parker", usage);
+    parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                       AUTHORS, usage);
 
   if (argc == 1)
     {
index 49fd5b15db7a9ebeea29c71cf3ca67c02a9f9d7d..5fa5f736aea152985ea229d555e751d74f3aedd4 100644 (file)
 #include "xstrtoul.h"
 #include "readtokens.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "factor"
+
+#define AUTHORS "Paul Rubin"
+
 /* Token delimiters when reading from a file.  */
 #define DELIM "\n\t "
 
@@ -174,8 +179,8 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  parse_long_options (argc, argv, "factor", GNU_PACKAGE, VERSION,
-                     "Paul Rubin", usage);
+  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     AUTHORS, usage);
 
   fail = 0;
   if (argc == 1)
index 017e470dfa700b5e4719d55d5371b3de98740be9..ca6dce391f927a5e37e67234db923662e36a6603 100644 (file)
 #include "long-options.h"
 #include "error.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "hostid"
+
+#define AUTHORS "Jim Meyering"
+
 /* The name this program was run with, for error messages. */
 char *program_name;
 
@@ -63,8 +68,8 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  parse_long_options (argc, argv, "hostid", GNU_PACKAGE, VERSION,
-                     "Jim Meyering", usage);
+  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     AUTHORS, usage);
 
   if (argc > 1)
     {
index 15094372a5cb061ffee0e3e2eea1bb8e71b6cf00..ddb1cf78fe432a5501b49e1912f4febc26d496e3 100644 (file)
 #include "long-options.h"
 #include "error.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "hostname"
+
+#define AUTHORS "Jim Meyering"
+
 #if !defined(HAVE_SETHOSTNAME) && defined(HAVE_SYSINFO) && \
      defined (HAVE_SYS_SYSTEMINFO_H) && defined(HAVE_LIMITS_H)
 # include <sys/systeminfo.h>
@@ -82,8 +87,8 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  parse_long_options (argc, argv, "hostname", GNU_PACKAGE, VERSION,
-                     "Jim Meyering", usage);
+  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     AUTHORS, usage);
 
 #ifdef HAVE_SETHOSTNAME
   if (argc == 2)
index 2cad4639f61050d884b9aaa7dde259799a705476..ead8794161b99e0e27e215921330d31d6612e93f 100644 (file)
 #include "long-options.h"
 #include "error.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "nice"
+
+#define AUTHORS "David MacKenzie"
+
 #ifdef NICE_PRIORITY
 # define GET_PRIORITY() nice (0)
 #else
@@ -88,8 +93,8 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  parse_long_options (argc, argv, "nice", GNU_PACKAGE, VERSION,
-                     "David MacKenzie", usage);
+  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     AUTHORS, usage);
 
   for (i = 1; i < argc; /* empty */)
     {
index b1050557509651ed42e9f3a0ed79a97e3deb6a73..ab3ae2d6a3ff3ec8a567e5a0507eb1e8e6a439b0 100644 (file)
 #include "long-options.h"
 #include "error.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "printf"
+
+#define AUTHORS "David MacKenzie"
+
 #ifndef STDC_HEADERS
 double strtod ();
 long int strtol ();
@@ -491,8 +496,8 @@ main (int argc, char **argv)
   /* Don't recognize --help or --version if POSIXLY_CORRECT is set.  */
   posixly_correct = (getenv ("POSIXLY_CORRECT") != NULL);
   if (!posixly_correct)
-    parse_long_options (argc, argv, "printf", GNU_PACKAGE, VERSION,
-                       "David MacKenzie", usage);
+    parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                       AUTHORS, usage);
 
   if (argc == 1)
     {
index 166d58371ab38ecfb92da1f31d7244d229d4a289..b0a8e01082109ed2404b2f8809d18c3c2081e929 100644 (file)
--- a/src/pwd.c
+++ b/src/pwd.c
 #include "long-options.h"
 #include "error.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "pwd"
+
+#define AUTHORS "Jim Meyering"
+
 char *xgetcwd ();
 
 /* The name this program was run with. */
@@ -60,8 +65,8 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  parse_long_options (argc, argv, "pwd", GNU_PACKAGE, VERSION,
-                     "Jim Meyering", usage);
+  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     AUTHORS, usage);
 
   if (argc != 1)
     error (0, 0, _("ignoring non-option arguments"));
index 6ceb2e528989824022b84fe8e3975bb8bcf80cc7..1a03492389efadd65443c9935f8575a9be6c7ae2 100644 (file)
 #include "error.h"
 #include "xstrtol.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "stty"
+
+#define AUTHORS "David MacKenzie"
+
 #ifndef _POSIX_VDISABLE
 # define _POSIX_VDISABLE ((unsigned char) 0)
 #endif
@@ -704,8 +709,8 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  parse_long_options (argc, argv, "stty", GNU_PACKAGE, VERSION,
-                     "David MacKenzie", usage);
+  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     AUTHORS, usage);
 
   output_type = changed;
   verbose_output = 0;
index 2a6daa286b98c38f6b32f99f9a0baedfbf9c7e06..1e0155df0e0ebc0a6d48443aa78bc4b16c56019f 100644 (file)
--- a/src/yes.c
+++ b/src/yes.c
 #include "system.h"
 #include "long-options.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "yes"
+
+#define AUTHORS "David MacKenzie"
+
 /* The name this program was run with. */
 char *program_name;
 
@@ -57,8 +62,8 @@ main (int argc, char **argv)
 
   /* Don't recognize --help or --version if POSIXLY_CORRECT is set.  */
   if (getenv ("POSIXLY_CORRECT") == NULL)
-    parse_long_options (argc, argv, "yes", GNU_PACKAGE, VERSION,
-                       "David MacKenzie", usage);
+    parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                       AUTHORS, usage);
 
   if (argc == 1)
     while (1)