diff options
author | Jim Meyering <jim@meyering.net> | 2000-12-02 22:16:41 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2000-12-02 22:16:41 +0000 |
commit | 69e30c7f2a275cd29d1c997a13b85efe48fedc64 (patch) | |
tree | 41209c1de62687c8cebeeee0fc7d76ca83dee9c0 | |
parent | 8973e2b38c75aed10a96ab7185c6f5610f3007f9 (diff) | |
download | coreutils-69e30c7f2a275cd29d1c997a13b85efe48fedc64.tar.xz |
Move dcls of globals used only in main...
(main): ...to here.
(usage): Clarify option descriptions.
-rw-r--r-- | src/id.c | 29 |
1 files changed, 13 insertions, 16 deletions
@@ -54,21 +54,9 @@ static void print_full_info PARAMS ((const char *username)); /* The name this program was run with. */ char *program_name; -/* If nonzero, output only the group ID(s). -g */ -static int just_group = 0; - /* If nonzero, output user/group name instead of ID number. -n */ static int use_name = 0; -/* If nonzero, output real UID/GID instead of default effective UID/GID. -r */ -static int use_real = 0; - -/* If nonzero, output only the user ID(s). -u */ -static int just_user = 0; - -/* If nonzero, output only the supplementary groups. -G */ -static int just_group_list = 0; - /* The real and effective IDs of the user to print. */ static uid_t ruid, euid; static gid_t rgid, egid; @@ -101,11 +89,11 @@ usage (int status) Print information for USERNAME, or the current user.\n\ \n\ -a ignore, for compatibility with other versions\n\ - -g, --group print only the group ID\n\ - -G, --groups print only the supplementary groups\n\ + -g, --group print only the effective group ID\n\ + -G, --groups print all group IDs\n\ -n, --name print a name instead of a number, for -ugG\n\ - -r, --real print the real ID instead of effective ID, for -ugG\n\ - -u, --user print only the user ID\n\ + -r, --real print the real ID instead of the effective ID, with -ugG\n\ + -u, --user print only the effective user ID\n\ --help display this help and exit\n\ --version output version information and exit\n\ \n\ @@ -121,6 +109,15 @@ main (int argc, char **argv) { int optc; + /* If nonzero, output the list of all group IDs. -G */ + int just_group_list = 0; + /* If nonzero, output only the group ID(s). -g */ + int just_group = 0; + /* If nonzero, output real UID/GID instead of default effective UID/GID. -r */ + int use_real = 0; + /* If nonzero, output only the user ID(s). -u */ + int just_user = 0; + program_name = argv[0]; setlocale (LC_ALL, ""); bindtextdomain (PACKAGE, LOCALEDIR); |