(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 bbba8fa..a61fb45 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 a0d8119..dda5c11 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 e3a4ac4..fb982f2 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 913cf53..fa991a7 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 ad28570..cb070a4 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 31c75ea..4bf6f7e 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 6496392..1ecfaf1 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 5dd9a3b..a052789 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 3f1ca5f..a55f301 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 3d32a57..ec18c0f 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 f0d3aad..e71fa61 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 088a225..2e1e2ee 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 f2499b8..4017dbe 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 88b1945..0bf36e0 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 09fff71..b0df3aa 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 557fe21..88088f3 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 3c021ab..e5fd718 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)
     {