Make file-scope variable static.

This commit is contained in:
Jim Meyering 1992-11-01 06:50:15 +00:00
parent ccbd1d7dc5
commit cf5cedb71a
8 changed files with 20 additions and 20 deletions

View File

@ -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'},

View 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;

View File

@ -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'},

View 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}

View 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 */

View 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)

View 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},

View File

@ -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'},