declare program_name consistently
authorJim Meyering <meyering@redhat.com>
Mon, 2 Jun 2008 15:47:32 +0000 (17:47 +0200)
committerJim Meyering <meyering@redhat.com>
Mon, 2 Jun 2008 15:47:32 +0000 (17:47 +0200)
* src/base64.c: Likewise.
* src/basename.c: Likewise.
* src/cat.c: Likewise.
* src/chcon.c: Likewise.
* src/chgrp.c: Likewise.
* src/chmod.c: Likewise.
* src/chown.c: Likewise.
* src/chroot.c: Likewise.
* src/cksum.c: Likewise.
* src/comm.c: Likewise.
* src/cp.c: Likewise.
* src/csplit.c: Likewise.
* src/cut.c: Likewise.
* src/date.c: Likewise.
* src/dd.c: Likewise.
* src/df.c: Likewise.
* src/dircolors.c: Likewise.
* src/dirname.c: Likewise.
* src/du.c: Likewise.
* src/echo.c: Likewise.
* src/env.c: Likewise.
* src/expand.c: Likewise.
* src/expr.c: Likewise.
* src/factor.c: Likewise.
* src/fmt.c: Likewise.
* src/fold.c: Likewise.
* src/groups.c: Likewise.
* src/head.c: Likewise.
* src/hostid.c: Likewise.
* src/hostname.c: Likewise.
* src/id.c: Likewise.
* src/install.c: Likewise.
* src/join.c: Likewise.
* src/kill.c: Likewise.
* src/link.c: Likewise.
* src/ln.c: Likewise.
* src/logname.c: Likewise.
* src/ls.c: Likewise.
* src/md5sum.c: Likewise.
* src/mkdir.c: Likewise.
* src/mkfifo.c: Likewise.
* src/mknod.c: Likewise.
* src/mktemp.c: Likewise.
* src/mv.c: Likewise.
* src/nice.c: Likewise.
* src/nl.c: Likewise.
* src/nohup.c: Likewise.
* src/od.c: Likewise.
* src/paste.c: Likewise.
* src/pathchk.c: Likewise.
* src/pinky.c: Likewise.
* src/pr.c: Likewise.
* src/printenv.c: Likewise.
* src/printf.c: Likewise.
* src/ptx.c: Likewise.
* src/pwd.c: Likewise.
* src/readlink.c: Likewise.
* src/rm.c: Likewise.
* src/rmdir.c: Likewise.
* src/runcon.c: Likewise.
* src/seq.c: Likewise.
* src/setuidgid.c: Likewise.
* src/shuf.c: Likewise.
* src/sleep.c: Likewise.
* src/sort.c: Likewise.
* src/split.c: Likewise.
* src/stat.c: Likewise.
* src/stty.c: Likewise.
* src/su.c: Likewise.
* src/sum.c: Likewise.
* src/sync.c: Likewise.
* src/tac.c: Likewise.
* src/tail.c: Likewise.
* src/tee.c: Likewise.
* src/test.c: Likewise.
* src/timeout.c: Likewise.
* src/touch.c: Likewise.
* src/tr.c: Likewise.
* src/true.c: Likewise.
* src/tsort.c: Likewise.
* src/tty.c: Likewise.
* src/uname.c: Likewise.
* src/unexpand.c: Likewise.
* src/uniq.c: Likewise.
* src/unlink.c: Likewise.
* src/uptime.c: Likewise.
* src/users.c: Likewise.
* src/wc.c: Likewise.
* src/who.c: Likewise.
* src/whoami.c: Likewise.
* src/yes.c: Likewise.

91 files changed:
src/base64.c
src/basename.c
src/cat.c
src/chcon.c
src/chgrp.c
src/chmod.c
src/chown.c
src/chroot.c
src/cksum.c
src/comm.c
src/cp.c
src/csplit.c
src/cut.c
src/date.c
src/dd.c
src/df.c
src/dircolors.c
src/dirname.c
src/du.c
src/echo.c
src/env.c
src/expand.c
src/expr.c
src/factor.c
src/fmt.c
src/fold.c
src/groups.c
src/head.c
src/hostid.c
src/hostname.c
src/id.c
src/install.c
src/join.c
src/kill.c
src/link.c
src/ln.c
src/logname.c
src/ls.c
src/md5sum.c
src/mkdir.c
src/mkfifo.c
src/mknod.c
src/mktemp.c
src/mv.c
src/nice.c
src/nl.c
src/nohup.c
src/od.c
src/paste.c
src/pathchk.c
src/pinky.c
src/pr.c
src/printenv.c
src/printf.c
src/ptx.c
src/pwd.c
src/readlink.c
src/rm.c
src/rmdir.c
src/runcon.c
src/seq.c
src/setuidgid.c
src/shuf.c
src/sleep.c
src/sort.c
src/split.c
src/stat.c
src/stty.c
src/su.c
src/sum.c
src/sync.c
src/tac.c
src/tail.c
src/tee.c
src/test.c
src/timeout.c
src/touch.c
src/tr.c
src/true.c
src/tsort.c
src/tty.c
src/uname.c
src/unexpand.c
src/uniq.c
src/unlink.c
src/uptime.c
src/users.c
src/wc.c
src/who.c
src/whoami.c
src/yes.c

index a3a7345..fd9d114 100644 (file)
@@ -38,7 +38,7 @@
 #define AUTHORS proper_name ("Simon Josefsson")
 
 /* The invocation name of this program.  */
-char *program_name;
+char const *program_name;
 
 static const struct option long_options[] = {
   {"decode", no_argument, 0, 'd'},
index ca3d347..fe056fc 100644 (file)
@@ -40,7 +40,7 @@
 #define AUTHORS proper_name ("FIXME unknown")
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 void
 usage (int status)
index 87bcc36..fd6c9df 100644 (file)
--- a/src/cat.c
+++ b/src/cat.c
@@ -52,7 +52,7 @@
 #define max(h,i) ((h) > (i) ? (h) : (i))
 
 /* Name under which this program was invoked.  */
-char *program_name;
+char const *program_name;
 
 /* Name of input file.  May be "-".  */
 static char const *infile;
index 2642bf4..dacce2b 100644 (file)
@@ -56,7 +56,7 @@ enum Verbosity
 };
 
 /* The name the program was run with. */
-char *program_name;
+char const *program_name;
 
 /* If nonzero, and the systems has support for it, change the context
    of symbolic links rather than any files they point to.  */
index d09b841..c42fad8 100644 (file)
@@ -43,7 +43,7 @@
 #endif
 
 /* The name the program was run with. */
-char *program_name;
+char const *program_name;
 
 /* The argument to the --reference option.  Use the group ID of this file.
    This file must exist.  */
index e8a795f..8002ef5 100644 (file)
@@ -59,7 +59,7 @@ enum Verbosity
 };
 
 /* The name the program was run with. */
-char *program_name;
+char const *program_name;
 
 /* The desired change to the mode.  */
 static struct mode_change *change;
index 5152de5..02e0148 100644 (file)
@@ -48,7 +48,7 @@
   proper_name ("Jim Meyering")
 
 /* The name the program was run with. */
-char *program_name;
+char const *program_name;
 
 /* The argument to the --reference option.  Use the owner and group IDs
    of this file.  This file must exist.  */
index 85053c9..8081b16 100644 (file)
@@ -33,7 +33,7 @@
 #define AUTHORS proper_name ("Roland McGrath")
 
 /* The name this program was run with, for error messages. */
-char *program_name;
+char const *program_name;
 
 void
 usage (int status)
index 52c3435..6f11514 100644 (file)
@@ -114,7 +114,7 @@ main (void)
 # define BUFLEN (1 << 16)
 
 /* The name this program was run with.  */
-char *program_name;
+char const *program_name;
 
 static uint_fast32_t const crctab[256] =
 {
index 267ec78..4700ca0 100644 (file)
@@ -40,7 +40,7 @@
 #define min(x, y) ((x) < (y) ? (x) : (y))
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 /* True if the LC_COLLATE locale is hard.  */
 static bool hard_LC_COLLATE;
index 0a33ec3..6630449 100644 (file)
--- a/src/cp.c
+++ b/src/cp.c
@@ -89,7 +89,7 @@ enum
 #define INITIAL_ENTRY_TAB_SIZE 70
 
 /* The invocation name of this program.  */
-char *program_name;
+char const *program_name;
 
 /* True if the kernel is SELinux enabled.  */
 static bool selinux_enabled;
index f8c3c02..7d9904c 100644 (file)
@@ -129,7 +129,7 @@ static void save_line_to_file (const struct cstring *line);
 void usage (int status);
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 /* Start of buffer list. */
 static struct buffer_record *head = NULL;
index 554e790..a91cca7 100644 (file)
--- a/src/cut.c
+++ b/src/cut.c
@@ -121,7 +121,7 @@ enum operating_mode
   };
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 static enum operating_mode operating_mode;
 
index 8191ff6..36b2826 100644 (file)
@@ -78,7 +78,7 @@ ARGMATCH_VERIFY (time_spec_string, time_spec);
 static char const rfc_2822_format[] = "%a, %d %b %Y %H:%M:%S %z";
 
 /* The name this program was run with, for error messages. */
-char *program_name;
+char const *program_name;
 
 /* For long options that have no equivalent short option, use a
    non-character as a pseudo short option, starting with CHAR_MAX + 1.  */
index b1635b8..947e687 100644 (file)
--- a/src/dd.c
+++ b/src/dd.c
@@ -129,7 +129,7 @@ enum
   };
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 /* The name of the input file, or NULL for the standard input. */
 static char const *input_file = NULL;
index 20b8f21..2b320cf 100644 (file)
--- a/src/df.c
+++ b/src/df.c
@@ -43,7 +43,7 @@
   proper_name ("Paul Eggert")
 
 /* Name this program was run with. */
-char *program_name;
+char const *program_name;
 
 /* If true, show inode information. */
 static bool inode_format;
index d51d409..55cbd26 100644 (file)
@@ -87,7 +87,7 @@ static struct option const long_options[] =
     {NULL, 0, NULL, 0}
   };
 
-char *program_name;
+char const *program_name;
 
 void
 usage (int status)
index 928a663..3c93d03 100644 (file)
@@ -36,7 +36,7 @@
   proper_name ("Jim Meyering")
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 void
 usage (int status)
index b67b89c..8b04b65 100644 (file)
--- a/src/du.c
+++ b/src/du.c
@@ -127,7 +127,7 @@ struct dulevel
 };
 
 /* Name under which this program was invoked.  */
-char *program_name;
+char const *program_name;
 
 /* If true, display counts for all files, not just directories.  */
 static bool opt_all = false;
index 1f3bc77..4b8f560 100644 (file)
@@ -51,7 +51,7 @@ enum { DEFAULT_ECHO_TO_XPG = false };
 #endif
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 void
 usage (int status)
index bf8ceb2..5103cc9 100644 (file)
--- a/src/env.c
+++ b/src/env.c
@@ -97,7 +97,7 @@ int putenv ();
 extern char **environ;
 
 /* The name by which this program was run. */
-char *program_name;
+char const *program_name;
 
 static struct option const longopts[] =
 {
index 17747a5..2cce8fb 100644 (file)
@@ -52,7 +52,7 @@
 #define OUTPUT_BLOCK 256
 
 /* The name this program was run with.  */
-char *program_name;
+char const *program_name;
 
 /* If true, convert blanks even after nonblank characters have been
    read on the line.  */
index a451ca7..e658402 100644 (file)
@@ -82,7 +82,7 @@ typedef struct valinfo VALUE;
 static char **args;
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 static VALUE *eval (bool);
 static bool nomoreargs (void);
index c116acd..681db36 100644 (file)
@@ -60,7 +60,7 @@ static const unsigned char wheel_tab[] =
 #define WHEEL_END (wheel_tab + (sizeof wheel_tab / sizeof wheel_tab[0]))
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 void
 usage (int status)
index 59f71ca..1f4e1da 100644 (file)
--- a/src/fmt.c
+++ b/src/fmt.c
@@ -168,7 +168,7 @@ static void put_word (WORD *w);
 static void put_space (int space);
 
 /* The name this program was run with.  */
-const char *program_name;
+char const *program_name;
 
 /* Option values.  */
 
index d0d1f82..8d63a8b 100644 (file)
@@ -35,7 +35,7 @@
 #define AUTHORS proper_name ("David MacKenzie")
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 /* If nonzero, try to break on whitespace. */
 static bool break_spaces;
index f61e07a..c67ac6e 100644 (file)
@@ -30,7 +30,7 @@
 #include "group-list.h"
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 /* The official name of this program (e.g., no `g' prefix).  */
 #define PROGRAM_NAME "groups"
index 4e9beea..a52f151 100644 (file)
@@ -65,7 +65,7 @@ enum header_mode
 };
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 /* Have we ever read standard input?  */
 static bool have_read_stdin;
index c6bc70f..e481c1c 100644 (file)
@@ -34,7 +34,7 @@
 #define AUTHORS proper_name ("Jim Meyering")
 
 /* The name this program was run with, for error messages. */
-char *program_name;
+char const *program_name;
 
 void
 usage (int status)
index e57de81..23aab17 100644 (file)
@@ -51,7 +51,7 @@ sethostname (char *name, size_t namelen)
 #endif
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 void
 usage (int status)
index 533f428..53cb0f4 100644 (file)
--- a/src/id.c
+++ b/src/id.c
@@ -45,7 +45,7 @@ static void print_user (uid_t uid);
 static void print_full_info (const char *username);
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 /* If true, output user/group name instead of ID number. -n */
 static bool use_name = false;
index 10fcae7..1d902d6 100644 (file)
@@ -93,7 +93,7 @@ static int make_ancestor (char const *dir, char const *component,
 void usage (int status);
 
 /* The name this program was run with, for error messages. */
-char *program_name;
+char const *program_name;
 
 /* The user name that will own the files, or NULL to make the owner
    the current user ID. */
index c14cc1e..111f971 100644 (file)
@@ -80,7 +80,7 @@ struct seq
   };
 
 /* The name this program was run with.  */
-char *program_name;
+char const *program_name;
 
 /* The previous line read from each file. */
 static struct line *prevline[2];
index bd5d9b2..2179907 100644 (file)
@@ -61,7 +61,7 @@
 #endif
 \f
 /* The name this program was run with, for error messages.  */
-char *program_name;
+char const *program_name;
 
 static char const short_options[] =
   "0::1::2::3::4::5::6::7::8::9::"
index e4b901d..eeb79e7 100644 (file)
@@ -36,7 +36,7 @@
 #define AUTHORS proper_name ("Michael Stone")
 
 /* Name this program was run with.  */
-char *program_name;
+char const *program_name;
 
 void
 usage (int status)
index 9523560..4b9c994 100644 (file)
--- a/src/ln.c
+++ b/src/ln.c
@@ -58,7 +58,7 @@
 #endif
 
 /* The name by which the program was run, for error messages.  */
-char *program_name;
+char const *program_name;
 
 /* FIXME: document */
 static enum backup_type backup_type;
index 11c6a35..ec894e2 100644 (file)
@@ -30,7 +30,7 @@
 #define AUTHORS proper_name ("FIXME: unknown")
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 void
 usage (int status)
index 653a905..9a8ad2d 100644 (file)
--- a/src/ls.c
+++ b/src/ls.c
@@ -245,7 +245,7 @@ static void parse_ls_color (void);
 void usage (int status);
 
 /* The name this program was run with.  */
-char *program_name;
+char const *program_name;
 
 /* Initial size of hash table.
    Most hierarchies are likely to be shallower than this.  */
index c0b5ed5..3584972 100644 (file)
@@ -121,7 +121,7 @@ static bool warn = false;
 static bool quiet = false;
 
 /* The name this program was run with.  */
-char *program_name;
+char const *program_name;
 
 /* For long options that have no equivalent short option, use a
    non-character as a pseudo short option, starting with CHAR_MAX + 1.  */
index d865407..c2d52de 100644 (file)
@@ -37,7 +37,7 @@
 #define AUTHORS proper_name ("David MacKenzie")
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 static struct option const longopts[] =
 {
index cfe9b51..5befd45 100644 (file)
@@ -33,7 +33,7 @@
 #define AUTHORS proper_name ("David MacKenzie")
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 static struct option const longopts[] =
 {
index b67d88c..0cd2d27 100644 (file)
@@ -34,7 +34,7 @@
 #define AUTHORS proper_name ("David MacKenzie")
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 static struct option const longopts[] =
 {
index c25f4b3..114fdc2 100644 (file)
@@ -36,7 +36,7 @@
 static const char *default_template = "tmp.XXXXXXXXXX";
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 /* For long options that have no equivalent short option, use a
    non-character as a pseudo short option, starting with CHAR_MAX + 1.  */
index ffd7914..090541a 100644 (file)
--- a/src/mv.c
+++ b/src/mv.c
@@ -57,7 +57,7 @@ enum
 };
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 /* Remove any trailing slashes from each SOURCE argument.  */
 static bool remove_trailing_slashes;
index 03e9e6a..3981a71 100644 (file)
@@ -56,7 +56,7 @@
 #endif
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 static struct option const longopts[] =
 {
index 6154ab6..24e9f98 100644 (file)
--- a/src/nl.c
+++ b/src/nl.c
@@ -62,7 +62,7 @@ enum section
 };
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 /* Format of body lines (-b).  */
 static char const *body_type = "t";
index 832659c..da639f2 100644 (file)
@@ -43,7 +43,7 @@ enum
     NOHUP_FAILURE = 127
   };
 
-char *program_name;
+char const *program_name;
 
 void
 usage (int status)
index 1007f8c..9b2f722 100644 (file)
--- a/src/od.c
+++ b/src/od.c
@@ -114,7 +114,7 @@ struct tspec
   };
 
 /* The name this program was run with.  */
-char *program_name;
+char const *program_name;
 
 /* Convert the number of 8-bit bytes of a binary representation to
    the number of characters (digits + sign if the type is signed)
index cdecd55..cc61a09 100644 (file)
@@ -55,7 +55,7 @@
 #define EMPTY_DELIM '\0'
 
 /* Name this program was run with. */
-char *program_name;
+char const *program_name;
 
 /* If nonzero, we have read standard input at some point. */
 static bool have_read_stdin;
index 21e7acd..821fe33 100644 (file)
@@ -72,7 +72,7 @@
 static bool validate_file_name (char *, bool, bool);
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 /* For long options that have no equivalent short option, use a
    non-character as a pseudo short option, starting with CHAR_MAX + 1.  */
index d5413ca..b8d453b 100644 (file)
@@ -45,7 +45,7 @@
 char *ttyname ();
 
 /* The name this program was run with. */
-const char *program_name;
+char const *program_name;
 
 /* If true, display the hours:minutes since each user has touched
    the keyboard, or blank if within the last minute, or days followed
index ed2876a..28ce713 100644 (file)
--- a/src/pr.c
+++ b/src/pr.c
@@ -446,7 +446,7 @@ static void print_sep_string (void);
 static void separator_string (const char *optarg_S);
 
 /* The name under which this program was invoked. */
-char *program_name;
+char const *program_name;
 
 /* All of the columns to print.  */
 static COLUMN *column_vector;
index 24b4d97..b90551c 100644 (file)
@@ -46,7 +46,7 @@ enum { PRINTENV_FAILURE = 2 };
   proper_name ("Richard Mlynarik")
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 extern char **environ;
 
index cd3e94a..7081dcc 100644 (file)
@@ -79,7 +79,7 @@ static char const *const cfcc_msg =
  N_("warning: %s: character(s) following character constant have been ignored");
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 void
 usage (int status)
index 174b347..cdc6513 100644 (file)
--- a/src/ptx.c
+++ b/src/ptx.c
@@ -69,7 +69,7 @@
 #define Sword 1
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 /* Program options.  */
 
index bf20f3f..adbc5b3 100644 (file)
--- a/src/pwd.c
+++ b/src/pwd.c
@@ -40,7 +40,7 @@ struct file_name
 };
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 void
 usage (int status)
index 6f29fec..455b56e 100644 (file)
@@ -33,7 +33,7 @@
 #define AUTHORS proper_name ("Dmitry V. Levin")
 
 /* Name this program was run with.  */
-char *program_name;
+char const *program_name;
 
 /* If true, do not output the trailing newline.  */
 static bool no_newline;
index 0bcd3c6..eb90bf2 100644 (file)
--- a/src/rm.c
+++ b/src/rm.c
@@ -67,7 +67,7 @@
   proper_name ("Jim Meyering")
 
 /* Name this program was run with.  */
-char *program_name;
+char const *program_name;
 
 /* For long options that have no equivalent short option, use a
    non-character as a pseudo short option, starting with CHAR_MAX + 1.  */
index b090d7a..4ed2f77 100644 (file)
@@ -39,7 +39,7 @@
 #define AUTHORS proper_name ("David MacKenzie")
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 /* If true, remove empty parent directories.  */
 static bool remove_empty_parents;
index ca81b41..5f9746c 100644 (file)
@@ -73,7 +73,7 @@ static struct option long_options[] = {
 };
 
 /* The name the program was run with. */
-char *program_name;
+char const *program_name;
 
 void
 usage (int status)
index 2277e7e..2fe6ec2 100644 (file)
--- a/src/seq.c
+++ b/src/seq.c
@@ -44,7 +44,7 @@
 static bool equal_width;
 
 /* The name that this program was run with.  */
-char *program_name;
+char const *program_name;
 
 /* The string used to separate two numbers.  */
 static char const *separator;
index dde5e04..a6262fe 100644 (file)
@@ -39,7 +39,7 @@
 
 #define SETUIDGID_FAILURE 111
 
-char *program_name;
+char const *program_name;
 
 void
 usage (int status)
index cdba97b..359aeb0 100644 (file)
@@ -37,7 +37,7 @@
 #define AUTHORS proper_name ("Paul Eggert")
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 void
 usage (int status)
index 5ecdb4f..5ae7045 100644 (file)
@@ -36,7 +36,7 @@
   proper_name ("Paul Eggert")
 
 /* The name by which this program was run. */
-char *program_name;
+char const *program_name;
 
 void
 usage (int status)
index e0480ee..5b272e7 100644 (file)
@@ -184,7 +184,7 @@ struct month
 };
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 /* FIXME: None of these tables work with multibyte character sets.
    Also, there are many other bugs when handling multibyte characters.
index a490c87..4937e55 100644 (file)
@@ -47,7 +47,7 @@
 #define DEFAULT_SUFFIX_LENGTH 2
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 /* Base name of output files.  */
 static char const *outbase;
index 2129dce..7b750a0 100644 (file)
@@ -173,7 +173,7 @@ static struct option const long_options[] = {
   {NULL, 0, NULL, 0}
 };
 
-char *program_name;
+char const *program_name;
 
 /* Whether to follow symbolic links;  True for --dereference (-L).  */
 static bool follow_links;
index 5a66098..3441365 100644 (file)
@@ -456,7 +456,7 @@ static struct option longopts[] =
 };
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 static void wrapf (const char *message, ...)
      __attribute__ ((__format__ (__printf__, 1, 2)));
index 746eedc..d6aaaaa 100644 (file)
--- a/src/su.c
+++ b/src/su.c
@@ -129,7 +129,7 @@ static void run_shell (char const *, char const *, char **, size_t)
      ATTRIBUTE_NORETURN;
 
 /* The name this program was run with.  */
-char *program_name;
+char const *program_name;
 
 /* If true, pass the `-f' option to the subshell.  */
 static bool fast_startup;
index 28bd052..a2aa945 100644 (file)
--- a/src/sum.c
+++ b/src/sum.c
@@ -37,7 +37,7 @@
   proper_name ("David MacKenzie")
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 /* True if any of the files read were the standard input. */
 static bool have_read_stdin;
index de41e0c..fe09c01 100644 (file)
@@ -31,7 +31,7 @@
 #define AUTHORS proper_name ("Jim Meyering")
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 void
 usage (int status)
index ec40641..baaf5ed 100644 (file)
--- a/src/tac.c
+++ b/src/tac.c
@@ -76,7 +76,7 @@ tac -r -s '.\|
 #define WRITESIZE 8192
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 /* The string that separates the records of the file. */
 static char const *separator;
index a2ea79a..f6ade24 100644 (file)
@@ -163,7 +163,7 @@ static uintmax_t max_n_unchanged_stats_between_opens =
   DEFAULT_MAX_N_UNCHANGED_STATS_BETWEEN_OPENS;
 
 /* The name this program was run with.  */
-char *program_name;
+char const *program_name;
 
 /* The process ID of the process (presumably on the current host)
    that is writing to all followed files.  */
index 5a5ea08..2f1c7bb 100644 (file)
--- a/src/tee.c
+++ b/src/tee.c
@@ -42,7 +42,7 @@ static bool append;
 static bool ignore_interrupts;
 
 /* The name that this program was run with. */
-char *program_name;
+char const *program_name;
 
 static struct option const long_options[] =
 {
index b546efd..88579d2 100644 (file)
@@ -48,7 +48,7 @@
 # include <sys/param.h>
 #endif
 
-char *program_name;
+char const *program_name;
 
 /* Exit status for syntax errors, etc.  */
 enum { TEST_TRUE, TEST_FALSE, TEST_FAILURE };
index d7e3441..b393a63 100644 (file)
@@ -83,7 +83,7 @@ static int term_signal = SIGTERM;  /* same default as kill command.  */
 static int monitored_pid;
 static int sigs_to_ignore[NSIG];   /* so monitor can ignore sigs it resends.  */
 
-char *program_name;
+char const *program_name;
 
 static struct option const long_options[] = {
   {"signal", required_argument, NULL, 's'},
index 37b5987..b8e4f2e 100644 (file)
@@ -49,7 +49,7 @@
 #define CH_MTIME 2
 
 /* The name by which this program was run. */
-char *program_name;
+char const *program_name;
 
 /* Which timestamps to change. */
 static int change_times;
index d75dee3..532e4f0 100644 (file)
--- a/src/tr.c
+++ b/src/tr.c
@@ -194,7 +194,7 @@ es_match (struct E_string const *es, size_t i, char c)
 }
 
 /* The name by which this program was run.  */
-char *program_name;
+char const *program_name;
 
 /* When true, each sequence in the input of a repeated character
    (call it c) is replaced (in the output) by a single occurrence of c
index 54a3c5a..ae6990a 100644 (file)
@@ -33,7 +33,7 @@
 #define AUTHORS proper_name ("Jim Meyering")
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 void
 usage (int status)
index 468c00c..a68ba04 100644 (file)
@@ -60,7 +60,7 @@ struct item
 };
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 /* The head of the sorted list.  */
 static struct item *head = NULL;
index e5cfcb4..fe19b01 100644 (file)
--- a/src/tty.c
+++ b/src/tty.c
@@ -43,7 +43,7 @@ enum
 #define AUTHORS proper_name ("David MacKenzie")
 
 /* The name under which this program was run. */
-char *program_name;
+char const *program_name;
 
 /* If true, return an exit status but produce no output. */
 static bool silent;
index 82261e6..4691afc 100644 (file)
@@ -87,7 +87,7 @@
 #define PRINT_OPERATING_SYSTEM 128
 
 /* The name this program was run with, for error messages. */
-char *program_name;
+char const *program_name;
 
 static struct option const uname_long_options[] =
 {
index 6a60b20..1fc65d3 100644 (file)
@@ -53,7 +53,7 @@
 #define OUTPUT_BLOCK 256
 
 /* The name this program was run with.  */
-char *program_name;
+char const *program_name;
 
 /* If true, convert blanks even after nonblank characters have been
    read on the line.  */
index e375ab4..f8948e2 100644 (file)
@@ -51,7 +51,7 @@
   while (0)
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 /* True if the LC_COLLATE locale is hard.  */
 static bool hard_LC_COLLATE;
index 26efb66..0ef2448 100644 (file)
@@ -36,7 +36,7 @@
 #define AUTHORS proper_name ("Michael Stone")
 
 /* Name this program was run with.  */
-char *program_name;
+char const *program_name;
 
 void
 usage (int status)
index 1165f94..1179ce5 100644 (file)
@@ -48,7 +48,7 @@
 int getloadavg ();
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 static void
 print_uptime (size_t n, const STRUCT_UTMP *this)
index 745b2bc..b1e8b3d 100644 (file)
@@ -36,7 +36,7 @@
   proper_name ("David MacKenzie")
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 static int
 userid_compare (const void *v_a, const void *v_b)
index 0fd138d..731eb4a 100644 (file)
--- a/src/wc.c
+++ b/src/wc.c
@@ -50,7 +50,7 @@
 #define BUFFER_SIZE (16 * 1024)
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 /* Cumulative number of lines, words, chars and bytes in all files so far.
    max_line_length is the maximum over all files processed so far.  */
index 73c7fea..bec924f 100644 (file)
--- a/src/who.c
+++ b/src/who.c
@@ -99,7 +99,7 @@
 char *ttyname ();
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 /* If true, attempt to canonicalize hostnames via a DNS lookup. */
 static bool do_lookup;
index eca03f3..7686fd0 100644 (file)
@@ -36,7 +36,7 @@
 #define AUTHORS proper_name ("Richard Mlynarik")
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 void
 usage (int status)
index 6cb62f9..7dec1ec 100644 (file)
--- a/src/yes.c
+++ b/src/yes.c
@@ -32,7 +32,7 @@
 #define AUTHORS proper_name ("David MacKenzie")
 
 /* The name this program was run with. */
-char *program_name;
+char const *program_name;
 
 void
 usage (int status)