diff options
author | Jim Meyering <jim@meyering.net> | 1999-01-25 14:30:08 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-01-25 14:30:08 +0000 |
commit | 54f4eb2224b468aeb0f7aeb22877d697aff61913 (patch) | |
tree | 56a14c9f03da4a5a84f587a20d362e95f319501f /src | |
parent | 86fb9cb9ecc96bd4640604d3c5e7c39cc6e879c4 (diff) | |
download | coreutils-54f4eb2224b468aeb0f7aeb22877d697aff61913.tar.xz |
(usage): Remove static attribute.
Move function be the first in the file.
Diffstat (limited to 'src')
-rw-r--r-- | src/tty.c | 44 |
1 files changed, 21 insertions, 23 deletions
@@ -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); -} |