]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Make file-scope variable static.
authorJim Meyering <jim@meyering.net>
Sun, 1 Nov 1992 06:50:15 +0000 (06:50 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 1 Nov 1992 06:50:15 +0000 (06:50 +0000)
src/env.c
src/expr.c
src/id.c
src/nice.c
src/pathchk.c
src/printf.c
src/stty.c
src/who.c

index b322dee60e3736a818c9de312eb3723b67dcf13d..a9bc501df0f815e73641e625e9529c66fec96c9e 100644 (file)
--- a/src/env.c
+++ b/src/env.c
@@ -91,7 +91,7 @@ extern char **environ;
 /* The name by which this program was run. */
 char *program_name;
 
-struct option longopts[] =
+static struct option longopts[] =
 {
   {"ignore-environment", 0, NULL, 'i'},
   {"unset", 1, NULL, 'u'},
index db95869225b169335c323492eaf1ea9b73aae309..61a6c091dd1b425bf3119140903c10eace2b33e5 100644 (file)
@@ -62,7 +62,7 @@ struct valinfo
 typedef struct valinfo VALUE;
 
 /* The arguments given to the program, minus the program name.  */
-char **args;
+static char **args;
 
 /* The name this program was run with. */
 char *program_name;
index beddc1356a8cca3ac617489b7e9e888d7a5ad107..1c9482fc6d070964f4b0e1bb0f1ad90b5744a20c 100644 (file)
--- a/src/id.c
+++ b/src/id.c
@@ -68,28 +68,28 @@ void usage ();
 char *program_name;
 
 /* If nonzero, output only the group ID(s). -g */
-int just_group = 0;
+static int just_group = 0;
 
 /* If nonzero, output user/group name instead of ID number. -n */
-int use_name = 0;
+static int use_name = 0;
 
 /* If nonzero, output real UID/GID instead of default effective UID/GID. -r */
-int use_real = 0;
+static int use_real = 0;
 
 /* If nonzero, output only the user ID(s). -u */
-int just_user = 0;
+static int just_user = 0;
 
 /* If nonzero, output only the supplementary groups. -G */
-int just_group_list = 0;
+static int just_group_list = 0;
 
 /* The real and effective IDs of the user to print. */
-uid_t ruid, euid;
-gid_t rgid, egid;
+static uid_t ruid, euid;
+static gid_t rgid, egid;
 
 /* The number of errors encountered so far. */
-int problems = 0;
+static int problems = 0;
 
-struct option longopts[] =
+static struct option longopts[] =
 {
   {"group", 0, NULL, 'g'},
   {"name", 0, NULL, 'n'},
index 4911fcc70155cf2d11dfcb8d82abe424947c4536..6878a342224b9504f3e09f61bf708d27cf173da8 100644 (file)
@@ -33,7 +33,7 @@ void usage ();
 /* The name this program was run with. */
 char *program_name;
 
-struct option longopts[] =
+static struct option longopts[] =
 {
   {"adjustment", 1, NULL, 'n'},
   {NULL, 0, NULL, 0}
index a8db2b28f38252dd9512d3c4c2a43197c0ff6f34..0753ada7019d6618b410b9ff15f0e3430aa3db48 100644 (file)
@@ -136,7 +136,7 @@ main (argc, argv)
 /* Each element is nonzero if the corresponding ASCII character is
    in the POSIX portable character set, and zero if it is not.
    In addition, the entry for `/' is nonzero to simplify checking. */
-char portable_chars[] =
+static char portable_chars[] =
 {
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0-15 */
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 16-31 */
index b546ef65bca65f69bdc475c95c45552817b99973..99f5f6b9a9d0ae4dea5758ff5877da3081bc0fe8 100644 (file)
@@ -74,7 +74,7 @@ void verify ();
 char *program_name;
 
 /* The value to return to the calling program.  */
-int exit_status;
+static int exit_status;
 
 void
 main (argc, argv)
index 5349af0f250234d7228873bfc01575744f74b250..8810762cdb4351e7186c902e3a422e1e2c95f946 100644 (file)
@@ -160,7 +160,7 @@ struct mode_info
   unsigned long mask;          /* Other bits to turn off for this mode.  */
 };
 
-struct mode_info mode_info[] =
+static struct mode_info mode_info[] =
 {
   {"parenb", control, REV, PARENB, 0},
   {"parodd", control, REV, PARODD, 0},
index d5f40dc556f8cd290eaceacfd1396e215138dfc0..0612b6d6b5d5da8a7bed983682d954e33244bdda 100644 (file)
--- a/src/who.c
+++ b/src/who.c
@@ -76,21 +76,21 @@ char *program_name;
 /* If nonzero, display only a list of usernames and count of
    the users logged on.
    Ignored for `who am i'. */
-int short_list;
+static int short_list;
 
 /* If nonzero, display the hours:minutes since each user has touched
    the keyboard, or "." if within the last minute, or "old" if
    not within the last day. */
-int include_idle;
+static int include_idle;
 
 /* If nonzero, display a line at the top describing each field. */
-int include_heading;
+static int include_heading;
 
 /* If nonzero, display a `+' for each user if mesg y, a `-' if mesg n,
    or a `?' if their tty cannot be statted. */
-int include_mesg;
+static int include_mesg;
 
-struct option longopts[] =
+static struct option longopts[] =
 {
   {"count", 0, NULL, 'q'},
   {"idle", 0, NULL, 'u'},