summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-03-31 04:11:35 +0000
committerJim Meyering <jim@meyering.net>1999-03-31 04:11:35 +0000
commit39090114f0812d93ce9c065a6f2fae02f6e06d50 (patch)
treeb093b7942c03b50a9da30be4850c9dc011467b99 /src
parentb2513fc340ff971964709e3b19694423ec83ece3 (diff)
downloadcoreutils-39090114f0812d93ce9c065a6f2fae02f6e06d50.tar.xz
(PROGRAM_NAME, AUTHORS): Define and use.
Diffstat (limited to 'src')
-rw-r--r--src/basename.c9
-rw-r--r--src/chroot.c9
-rw-r--r--src/dirname.c9
-rw-r--r--src/echo.c9
-rw-r--r--src/expr.c9
-rw-r--r--src/factor.c9
-rw-r--r--src/hostid.c9
-rw-r--r--src/hostname.c9
-rw-r--r--src/nice.c9
-rw-r--r--src/printf.c9
-rw-r--r--src/pwd.c9
-rw-r--r--src/stty.c9
-rw-r--r--src/yes.c9
13 files changed, 91 insertions, 26 deletions
diff --git a/src/basename.c b/src/basename.c
index 1a922e1d9..802c5dcf4 100644
--- a/src/basename.c
+++ b/src/basename.c
@@ -33,6 +33,11 @@
#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)
{
diff --git a/src/chroot.c b/src/chroot.c
index 128f905ea..5fc29e589 100644
--- a/src/chroot.c
+++ b/src/chroot.c
@@ -25,6 +25,11 @@
#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"));
diff --git a/src/dirname.c b/src/dirname.c
index c659b24d9..73231986d 100644
--- a/src/dirname.c
+++ b/src/dirname.c
@@ -25,6 +25,11 @@
#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)
{
diff --git a/src/echo.c b/src/echo.c
index a451cda02..bbb37f4f1 100644
--- a/src/echo.c
+++ b/src/echo.c
@@ -21,6 +21,11 @@
#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;
diff --git a/src/expr.c b/src/expr.c
index 18dc2d876..a61bc34c9 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -37,6 +37,11 @@
#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)
{
diff --git a/src/factor.c b/src/factor.c
index 49fd5b15d..5fa5f736a 100644
--- a/src/factor.c
+++ b/src/factor.c
@@ -31,6 +31,11 @@
#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)
diff --git a/src/hostid.c b/src/hostid.c
index 017e470df..ca6dce391 100644
--- a/src/hostid.c
+++ b/src/hostid.c
@@ -29,6 +29,11 @@
#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)
{
diff --git a/src/hostname.c b/src/hostname.c
index 15094372a..ddb1cf78f 100644
--- a/src/hostname.c
+++ b/src/hostname.c
@@ -25,6 +25,11 @@
#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)
diff --git a/src/nice.c b/src/nice.c
index 2cad4639f..ead879416 100644
--- a/src/nice.c
+++ b/src/nice.c
@@ -34,6 +34,11 @@
#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 */)
{
diff --git a/src/printf.c b/src/printf.c
index b10505575..ab3ae2d6a 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -52,6 +52,11 @@
#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)
{
diff --git a/src/pwd.c b/src/pwd.c
index 166d58371..b0a8e0108 100644
--- a/src/pwd.c
+++ b/src/pwd.c
@@ -25,6 +25,11 @@
#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"));
diff --git a/src/stty.c b/src/stty.c
index 6ceb2e528..1a0349238 100644
--- a/src/stty.c
+++ b/src/stty.c
@@ -65,6 +65,11 @@
#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;
diff --git a/src/yes.c b/src/yes.c
index 2a6daa286..1e0155df0 100644
--- a/src/yes.c
+++ b/src/yes.c
@@ -25,6 +25,11 @@
#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)