summaryrefslogtreecommitdiff
path: root/src/uname.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-01-25 14:31:12 +0000
committerJim Meyering <jim@meyering.net>1999-01-25 14:31:12 +0000
commitfe9d964a786b00ae60e1c17c5322595193e5a7c4 (patch)
tree28c5c9aa853f06b1b72796cb2e16a93288abe533 /src/uname.c
parent54f4eb2224b468aeb0f7aeb22877d697aff61913 (diff)
downloadcoreutils-fe9d964a786b00ae60e1c17c5322595193e5a7c4.tar.xz
(usage): Remove static attribute.
Move function be the first in the file.
Diffstat (limited to 'src/uname.c')
-rw-r--r--src/uname.c55
1 files changed, 27 insertions, 28 deletions
diff --git a/src/uname.c b/src/uname.c
index 2dd9634d7..62b9e5f27 100644
--- a/src/uname.c
+++ b/src/uname.c
@@ -1,5 +1,5 @@
/* uname -- print system information
- Copyright (C) 89,90,91,92,93,94,95,96,1997 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
@@ -42,7 +42,6 @@
#include "error.h"
static void print_element PARAMS ((unsigned int mask, char *element));
-static void usage PARAMS ((int status));
/* Values that are bitwise or'd into `toprint'. */
/* Operating system name. */
@@ -88,6 +87,32 @@ static struct option const long_options[] =
{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]...\n"), program_name);
+ printf (_("\
+Print certain system information. With no OPTION, same as -s.\n\
+\n\
+ -a, --all print all information\n\
+ -m, --machine print the machine (hardware) type\n\
+ -n, --nodename print the machine's network node hostname\n\
+ -r, --release print the operating system release\n\
+ -s, --sysname print the operating system name\n\
+ -p, --processor print the host processor type\n\
+ -v print the operating system version\n\
+ --help display this help and exit\n\
+ --version output version information and exit\n"));
+ puts (_("\nReport bugs to <bug-sh-utils@gnu.org>."));
+ }
+ exit (status);
+}
+
int
main (int argc, char **argv)
{
@@ -191,29 +216,3 @@ print_element (unsigned int mask, char *element)
printf ("%s%c", element, toprint ? ' ' : '\n');
}
}
-
-static void
-usage (int status)
-{
- if (status != 0)
- fprintf (stderr, _("Try `%s --help' for more information.\n"),
- program_name);
- else
- {
- printf (_("Usage: %s [OPTION]...\n"), program_name);
- printf (_("\
-Print certain system information. With no OPTION, same as -s.\n\
-\n\
- -a, --all print all information\n\
- -m, --machine print the machine (hardware) type\n\
- -n, --nodename print the machine's network node hostname\n\
- -r, --release print the operating system release\n\
- -s, --sysname print the operating system name\n\
- -p, --processor print the host processor type\n\
- -v print the operating system version\n\
- --help display this help and exit\n\
- --version output version information and exit\n"));
- puts (_("\nReport bugs to <bug-sh-utils@gnu.org>."));
- }
- exit (status);
-}