]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(PROGRAM_NAME, AUTHORS): Define and use.
authorJim Meyering <jim@meyering.net>
Wed, 31 Mar 1999 04:16:08 +0000 (04:16 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 31 Mar 1999 04:16:08 +0000 (04:16 +0000)
17 files changed:
src/date.c
src/env.c
src/id.c
src/logname.c
src/pathchk.c
src/pinky.c
src/printenv.c
src/seq.c
src/sleep.c
src/su.c
src/tee.c
src/tty.c
src/uname.c
src/uptime.c
src/users.c
src/who.c
src/whoami.c

index bbba8fa4941f405555e6b5bd05fe9469d38e2dba..a61fb45b6c7a1a670ad96bcac784dd5e50917195 100644 (file)
 #include "long-options.h"
 #include "posixtm.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "date"
+
+#define AUTHORS "David MacKenzie"
+
 #ifndef STDC_HEADERS
 size_t strftime ();
 time_t time ();
@@ -280,8 +285,8 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  parse_long_options (argc, argv, "date", GNU_PACKAGE, VERSION,
-                     "David MacKenzie", usage);
+  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     AUTHORS, usage);
 
   while ((optc = getopt_long (argc, argv, "d:f:r:Rs:u", long_options, NULL))
         != -1)
index a0d81191d656e2af91b30cc562a38c327c09dff7..dda5c119d9caecdc459431dfa56e82f77e7cd093 100644 (file)
--- a/src/env.c
+++ b/src/env.c
 #include "error.h"
 #include "long-options.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "env"
+
+#define AUTHORS "Richard Mlynarik and David MacKenzie"
+
 int putenv ();
 
 extern char **environ;
@@ -139,8 +144,8 @@ main (register int argc, register char **argv, char **envp)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  parse_long_options (argc, argv, "env", GNU_PACKAGE, VERSION,
-                     "Richard Mlynarik and David MacKenzie", usage);
+  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     AUTHORS, usage);
 
   while ((optc = getopt_long (argc, argv, "+iu:", longopts, NULL)) != -1)
     {
index e3a4ac446494761a21547d972c44a781c8b8577c..fb982f24a127c37937b7d14e24edfde9b60d7256 100644 (file)
--- a/src/id.c
+++ b/src/id.c
 #include "error.h"
 #include "long-options.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "id"
+
+#define AUTHORS "Arnold Robbins and David MacKenzie"
+
 #ifndef _POSIX_VERSION
 struct passwd *getpwuid ();
 struct group *getgrgid ();
@@ -119,8 +124,8 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  parse_long_options (argc, argv, "id", GNU_PACKAGE, VERSION,
-                     "Arnold Robbins and David MacKenzie", usage);
+  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     AUTHORS, usage);
 
   while ((optc = getopt_long (argc, argv, "agnruG", longopts, NULL)) != -1)
     {
index 913cf53d28d7a7fcbff6d4e17a5dca870d201417..fa991a7b1bbac11d02d3cb48cdb856d0224d8cb0 100644 (file)
 #include "system.h"
 #include "long-options.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "logname"
+
+#define AUTHORS "FIXME: unknown"
+
 /* The name this program was run with. */
 char *program_name;
 
@@ -62,8 +67,8 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  parse_long_options (argc, argv, "logname", GNU_PACKAGE, VERSION,
-                     "FIXME: unknown", usage);
+  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     AUTHORS, usage);
 
   while ((c = getopt_long (argc, argv, "", long_options, NULL)) != -1)
     {
index ad285706a5a46fa40b3ade8879f377732cb29f74..cb070a4f7fb77bfc92161a18637e340fbeee797f 100644 (file)
 #include "error.h"
 #include "long-options.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "pathchk"
+
+#define AUTHORS "David MacKenzie and Jim Meyering"
+
 #ifdef _POSIX_VERSION
 # ifndef PATH_MAX
 #  define PATH_MAX_FOR(p) pathconf ((p), _PC_PATH_MAX)
@@ -135,8 +140,8 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  parse_long_options (argc, argv, "pathchk", GNU_PACKAGE, VERSION,
-                     "David MacKenzie and Jim Meyering", usage);
+  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     AUTHORS, usage);
 
   while ((optc = getopt_long (argc, argv, "p", longopts, NULL)) != -1)
     {
index 31c75ea7b60eed7c6a2e2c4718e09d048a4f85a3..4bf6f7e236a2e755c181b2db57c48da0be628e34 100644 (file)
 #include "long-options.h"
 #include "readutmp.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "pinky"
+
+#define AUTHORS "Joseph Arceneaux, David MacKenzie, and Kaveh Ghazi"
+
 #ifndef MAXHOSTNAMELEN
 # define MAXHOSTNAMELEN 64
 #endif
@@ -435,9 +440,8 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  parse_long_options (argc, argv, "pinky", GNU_PACKAGE, VERSION,
-                     "Joseph Arceneaux, David MacKenzie, and Kaveh Ghazi",
-                     usage);
+  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     AUTHORS, usage);
 
   while ((optc = getopt_long (argc, argv, "sfwiqbhlp", longopts, &longind))
         != -1)
index 6496392eebec60ebbba5b39515b618047c1001bf..1ecfaf18994da02480570aeb9ddf7fa2548dfb67 100644 (file)
 #include "error.h"
 #include "long-options.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "printenv"
+
+#define AUTHORS "David MacKenzie and Richard Mlynarik"
+
 /* The name this program was run with. */
 char *program_name;
 
@@ -81,8 +86,8 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  parse_long_options (argc, argv, "printenv", GNU_PACKAGE, VERSION,
-                     "David MacKenzie and Richard Mlynarik", usage);
+  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     AUTHORS, usage);
 
   while ((c = getopt_long (argc, argv, "", long_options, NULL)) != -1)
     {
index 5dd9a3b26b52cb070a974b6b82a99f05ae0ac95e..a0527891b64be640910d40725b124edca0b51c1e 100644 (file)
--- a/src/seq.c
+++ b/src/seq.c
 #include "long-options.h"
 #include "xstrtod.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "seq"
+
+#define AUTHORS "Ulrich Drepper"
+
 static double scan_double_arg PARAMS ((const char *arg));
 static int check_format PARAMS ((const char *format_string));
 static char *get_width_format PARAMS ((void));
@@ -112,8 +117,8 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  parse_long_options (argc, argv, "seq", GNU_PACKAGE, VERSION,
-                     "Ulrich Drepper", usage);
+  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     AUTHORS, usage);
 
   equal_width = 0;
   format_str = NULL;
index 3f1ca5f74d85d249d5c4100c47f3c0121f80698b..a55f301bd54a11a500f1af00b5680e74a5eb5647 100644 (file)
 #include "error.h"
 #include "long-options.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "sleep"
+
+#define AUTHORS "FIXME: unknown"
+
 static long argdecode PARAMS ((const char *s));
 
 /* The name by which this program was run. */
@@ -66,8 +71,8 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  parse_long_options (argc, argv, "sleep", GNU_PACKAGE, VERSION,
-                     "FIXME: unknown", usage);
+  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     AUTHORS, usage);
 
   while ((c = getopt_long (argc, argv, "", long_options, NULL)) != -1)
     {
index 3d32a57b7b3cac55744dceded16f89a4e0b1da3a..ec18c0f15e36977b09cbfe914f7c4369a68b1c87 100644 (file)
--- a/src/su.c
+++ b/src/su.c
@@ -115,6 +115,11 @@ uid_t getuid ();
 
 #include "error.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "su"
+
+#define AUTHORS "David MacKenzie"
+
 #if HAVE_PATHS_H
 # include <paths.h>
 #endif
@@ -460,8 +465,8 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  parse_long_options (argc, argv, "su", GNU_PACKAGE, VERSION,
-                     "David MacKenzie", usage);
+  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     AUTHORS, usage);
 
   fast_startup = 0;
   simulate_login = 0;
index f0d3aad0e5217fd8dd869dc750f8e2ceaa5f3c0a..e71fa6112ebb6f38ca8438a4580de7bdb93d7b6e 100644 (file)
--- a/src/tee.c
+++ b/src/tee.c
 #include "error.h"
 #include "long-options.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "tee"
+
+#define AUTHORS "Mike Parker, Richard M. Stallman, and David MacKenzie"
+
 int full_write ();
 
 static int tee PARAMS ((int nfiles, const char **files));
@@ -81,9 +86,8 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  parse_long_options (argc, argv, "tee", GNU_PACKAGE, VERSION,
-                     "Mike Parker, Richard M. Stallman, and David MacKenzie",
-                     usage);
+  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     AUTHORS, usage);
 
   append = 0;
   ignore_interrupts = 0;
index 088a22565e7ac97d0477555bcda1ac246e13b32a..2e1e2ee04e03063608d8029e76c215918694a052 100644 (file)
--- a/src/tty.c
+++ b/src/tty.c
 #include "error.h"
 #include "long-options.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "tty"
+
+#define AUTHORS "David MacKenzie"
+
 /* The name under which this program was run. */
 char *program_name;
 
@@ -77,8 +82,8 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  parse_long_options (argc, argv, "tty", GNU_PACKAGE, VERSION,
-                     "David MacKenzie", usage);
+  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     AUTHORS, usage);
 
   silent = 0;
 
index f2499b8e2064fd2e77521af4bc643a839816393e..4017dbe900ab97f8c15ed02872abf5550f25e977 100644 (file)
 #include "error.h"
 #include "long-options.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "uname"
+
+#define AUTHORS "David MacKenzie"
+
 static void print_element PARAMS ((unsigned int mask, char *element));
 
 /* Values that are bitwise or'd into `toprint'. */
@@ -118,8 +123,8 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  parse_long_options (argc, argv, "uname", GNU_PACKAGE, VERSION,
-                     "David MacKenzie", usage);
+  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     AUTHORS, usage);
 
   toprint = 0;
 
index 88b1945e668a2249c6274e3385d3098193a9d2b7..0bf36e0ecc9cd11b7b8ef7abf94731e57aa69d82 100644 (file)
 #include "readutmp.h"
 #include "system.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "uptime"
+
+#define AUTHORS "Joseph Arceneaux and David MacKenzie"
+
 int getloadavg ();
 
 /* The name this program was run with. */
@@ -185,8 +190,8 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  parse_long_options (argc, argv, "uptime", GNU_PACKAGE, VERSION,
-                     "Joseph Arceneaux and David MacKenzie", usage);
+  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     AUTHORS, usage);
 
   while ((optc = getopt_long (argc, argv, "", longopts, &longind)) != -1)
     {
index 09fff715ca8972a60e69e70b1ecc338c28779485..b0df3aaa1415d36cf13c2360e6b0e399468442ed 100644 (file)
 #include "readutmp.h"
 #include "system.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "users"
+
+#define AUTHORS "Joseph Arceneaux and David MacKenzie"
+
 /* The name this program was run with. */
 char *program_name;
 
@@ -129,8 +134,8 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  parse_long_options (argc, argv, "users", GNU_PACKAGE, VERSION,
-                     "Joseph Arceneaux and David MacKenzie", usage);
+  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     AUTHORS, usage);
 
   while ((optc = getopt_long (argc, argv, "", longopts, &longind)) != -1)
     {
index 557fe21f9dd13494b81f2c287d8a13f66974e6c0..88088f313104361fe4ce3c860c446097763da2eb 100644 (file)
--- a/src/who.c
+++ b/src/who.c
 #include "readutmp.h"
 #include "system.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "who"
+
+#define AUTHORS "Joseph Arceneaux and David MacKenzie"
+
 #ifndef MAXHOSTNAMELEN
 # define MAXHOSTNAMELEN 64
 #endif
@@ -383,8 +388,8 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  parse_long_options (argc, argv, "who", GNU_PACKAGE, VERSION,
-                     "Joseph Arceneaux and David MacKenzie", usage);
+  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     AUTHORS, usage);
 
   while ((optc = getopt_long (argc, argv, "ilmqsuwHT", longopts, &longind))
         != -1)
index 3c021ab199cce846768253daff0512ac0bcd24af..e5fd7183f4b871a50832ff5253a5d592c89ae321 100644 (file)
 #include "system.h"
 #include "long-options.h"
 
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "whoami"
+
+#define AUTHORS "Richard Mlynarik"
+
 /* The name this program was run with. */
 char *program_name;
 
@@ -67,8 +72,8 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  parse_long_options (argc, argv, "whoami", GNU_PACKAGE, VERSION,
-                     "Richard Mlynarik", usage);
+  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     AUTHORS, usage);
 
   while ((c = getopt_long (argc, argv, "", long_options, NULL)) != -1)
     {