From 54f4eb2224b468aeb0f7aeb22877d697aff61913 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 25 Jan 1999 14:30:08 +0000 Subject: (usage): Remove static attribute. Move function be the first in the file. --- src/tty.c | 44 +++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 23 deletions(-) (limited to 'src/tty.c') 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 .")); + } + 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 .")); - } - exit (status); -} -- cgit v1.2.3-54-g00ecf