summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-03-31 04:16:08 +0000
committerJim Meyering <jim@meyering.net>1999-03-31 04:16:08 +0000
commit03c1b8518c2295aebc9e723686d650162059ee96 (patch)
tree1cc62eb21d03f319983491bda793aae61306bc92 /src
parent39090114f0812d93ce9c065a6f2fae02f6e06d50 (diff)
downloadcoreutils-03c1b8518c2295aebc9e723686d650162059ee96.tar.xz
(PROGRAM_NAME, AUTHORS): Define and use.
Diffstat (limited to 'src')
-rw-r--r--src/date.c9
-rw-r--r--src/env.c9
-rw-r--r--src/id.c9
-rw-r--r--src/logname.c9
-rw-r--r--src/pathchk.c9
-rw-r--r--src/pinky.c10
-rw-r--r--src/printenv.c9
-rw-r--r--src/seq.c9
-rw-r--r--src/sleep.c9
-rw-r--r--src/su.c9
-rw-r--r--src/tee.c10
-rw-r--r--src/tty.c9
-rw-r--r--src/uname.c9
-rw-r--r--src/uptime.c9
-rw-r--r--src/users.c9
-rw-r--r--src/who.c9
-rw-r--r--src/whoami.c9
17 files changed, 119 insertions, 36 deletions
diff --git a/src/date.c b/src/date.c
index bbba8fa49..a61fb45b6 100644
--- a/src/date.c
+++ b/src/date.c
@@ -30,6 +30,11 @@
#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)
diff --git a/src/env.c b/src/env.c
index a0d81191d..dda5c119d 100644
--- a/src/env.c
+++ b/src/env.c
@@ -87,6 +87,11 @@
#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)
{
diff --git a/src/id.c b/src/id.c
index e3a4ac446..fb982f24a 100644
--- a/src/id.c
+++ b/src/id.c
@@ -30,6 +30,11 @@
#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)
{
diff --git a/src/logname.c b/src/logname.c
index 913cf53d2..fa991a7b1 100644
--- a/src/logname.c
+++ b/src/logname.c
@@ -23,6 +23,11 @@
#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)
{
diff --git a/src/pathchk.c b/src/pathchk.c
index ad285706a..cb070a4f7 100644
--- a/src/pathchk.c
+++ b/src/pathchk.c
@@ -47,6 +47,11 @@
#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)
{
diff --git a/src/pinky.c b/src/pinky.c
index 31c75ea7b..4bf6f7e23 100644
--- a/src/pinky.c
+++ b/src/pinky.c
@@ -27,6 +27,11 @@
#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)
diff --git a/src/printenv.c b/src/printenv.c
index 6496392ee..1ecfaf189 100644
--- a/src/printenv.c
+++ b/src/printenv.c
@@ -37,6 +37,11 @@
#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)
{
diff --git a/src/seq.c b/src/seq.c
index 5dd9a3b26..a0527891b 100644
--- a/src/seq.c
+++ b/src/seq.c
@@ -28,6 +28,11 @@
#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;
diff --git a/src/sleep.c b/src/sleep.c
index 3f1ca5f74..a55f301bd 100644
--- a/src/sleep.c
+++ b/src/sleep.c
@@ -24,6 +24,11 @@
#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)
{
diff --git a/src/su.c b/src/su.c
index 3d32a57b7..ec18c0f15 100644
--- 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;
diff --git a/src/tee.c b/src/tee.c
index f0d3aad0e..e71fa6112 100644
--- a/src/tee.c
+++ b/src/tee.c
@@ -28,6 +28,11 @@
#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;
diff --git a/src/tty.c b/src/tty.c
index 088a22565..2e1e2ee04 100644
--- a/src/tty.c
+++ b/src/tty.c
@@ -32,6 +32,11 @@
#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;
diff --git a/src/uname.c b/src/uname.c
index f2499b8e2..4017dbe90 100644
--- a/src/uname.c
+++ b/src/uname.c
@@ -42,6 +42,11 @@
#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;
diff --git a/src/uptime.c b/src/uptime.c
index 88b1945e6..0bf36e0ec 100644
--- a/src/uptime.c
+++ b/src/uptime.c
@@ -26,6 +26,11 @@
#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)
{
diff --git a/src/users.c b/src/users.c
index 09fff715c..b0df3aaa1 100644
--- a/src/users.c
+++ b/src/users.c
@@ -26,6 +26,11 @@
#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)
{
diff --git a/src/who.c b/src/who.c
index 557fe21f9..88088f313 100644
--- a/src/who.c
+++ b/src/who.c
@@ -33,6 +33,11 @@
#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)
diff --git a/src/whoami.c b/src/whoami.c
index 3c021ab19..e5fd7183f 100644
--- a/src/whoami.c
+++ b/src/whoami.c
@@ -27,6 +27,11 @@
#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)
{