summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-01-25 14:30:08 +0000
committerJim Meyering <jim@meyering.net>1999-01-25 14:30:08 +0000
commit54f4eb2224b468aeb0f7aeb22877d697aff61913 (patch)
tree56a14c9f03da4a5a84f587a20d362e95f319501f /src
parent86fb9cb9ecc96bd4640604d3c5e7c39cc6e879c4 (diff)
downloadcoreutils-54f4eb2224b468aeb0f7aeb22877d697aff61913.tar.xz
(usage): Remove static attribute.
Move function be the first in the file.
Diffstat (limited to 'src')
-rw-r--r--src/tty.c44
1 files changed, 21 insertions, 23 deletions
diff --git a/src/tty.c b/src/tty.c
index 6e7f180ac..056cb935d 100644
--- a/src/tty.c
+++ b/src/tty.c
@@ -31,8 +31,6 @@
#include "closeout.h"
#include "error.h"
-static void usage PARAMS ((int status));
-
/* The name under which this program was run. */
char *program_name;
@@ -54,6 +52,27 @@ 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]...\n"), program_name);
+ printf (_("\
+Print the file name of the terminal connected to standard input.\n\
+\n\
+ -s, --silent, --quiet print nothing, only return an exit status\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)
{
@@ -108,24 +127,3 @@ main (int argc, char **argv)
exit (isatty (0) ? 0 : 1);
}
-
-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 the file name of the terminal connected to standard input.\n\
-\n\
- -s, --silent, --quiet print nothing, only return an exit status\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);
-}