summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-01-25 14:27:48 +0000
committerJim Meyering <jim@meyering.net>1999-01-25 14:27:48 +0000
commit22099863b4c8b94808e2f69e11a9e9465a5c9716 (patch)
tree3139397c4841a97b49f8211c8290357e338a72eb /src
parenta4c1c9627e5922c52c3119cda71c55312d3af455 (diff)
downloadcoreutils-22099863b4c8b94808e2f69e11a9e9465a5c9716.tar.xz
(usage): Remove static attribute.
Move function be the first in the file.
Diffstat (limited to 'src')
-rw-r--r--src/id.c59
1 files changed, 29 insertions, 30 deletions
diff --git a/src/id.c b/src/id.c
index bd9297f0f..b9a404cd3 100644
--- a/src/id.c
+++ b/src/id.c
@@ -1,5 +1,5 @@
/* id -- print real and effective UIDs and GIDs
- Copyright (C) 1989-1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1989-1999 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -44,7 +44,6 @@ static void print_user PARAMS ((int uid));
static void print_group PARAMS ((int gid));
static void print_group_list PARAMS ((const char *username));
static void print_full_info PARAMS ((const char *username));
-static void usage PARAMS ((int status));
/* The name this program was run with. */
char *program_name;
@@ -89,6 +88,34 @@ static struct option const longopts[] =
{NULL, 0, NULL, 0}
};
+void
+usage (int status)
+{
+ if (status != 0)
+ fprintf (stderr, _("Try `%s --help' for more information.\n"),
+ program_name);
+ else
+ {
+ printf (_("Usage: %s [OPTION]... [USERNAME]\n"), program_name);
+ printf (_("\
+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\
+ -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\
+ --help display this help and exit\n\
+ --version output version information and exit\n\
+\n\
+Without any OPTION, print some useful set of identified information.\n\
+"));
+ puts (_("\nReport bugs to <bug-sh-utils@gnu.org>."));
+ }
+ exit (status);
+}
+
int
main (int argc, char **argv)
{
@@ -359,31 +386,3 @@ print_full_info (const char *username)
}
#endif /* HAVE_GETGROUPS */
}
-
-static void
-usage (int status)
-{
- if (status != 0)
- fprintf (stderr, _("Try `%s --help' for more information.\n"),
- program_name);
- else
- {
- printf (_("Usage: %s [OPTION]... [USERNAME]\n"), program_name);
- printf (_("\
-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\
- -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\
- --help display this help and exit\n\
- --version output version information and exit\n\
-\n\
-Without any OPTION, print some useful set of identified information.\n\
-"));
- puts (_("\nReport bugs to <bug-sh-utils@gnu.org>."));
- }
- exit (status);
-}