From 0898b54377def7ef9a0d50e48e58d239ed182b21 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 9 Nov 1995 23:49:02 +0000 Subject: (main): Move to the end. Remove fwd dcls. --- src/mkfifo.c | 44 +++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/src/mkfifo.c b/src/mkfifo.c index 57f2ffdfa..86e3377d5 100644 --- a/src/mkfifo.c +++ b/src/mkfifo.c @@ -32,8 +32,6 @@ #include "version.h" #include "error.h" -static void usage (int status); - /* The name this program was run with. */ char *program_name; @@ -51,6 +49,27 @@ static struct option const longopts[] = {NULL, 0, NULL, 0} }; +#ifdef S_ISFIFO +static void +usage (int status) +{ + if (status != 0) + fprintf (stderr, "Try `%s --help' for more information.\n", + program_name); + else + { + printf ("Usage: %s [OPTION] NAME...\n", program_name); + printf ("\ +Create named pipes (FIFOs) with the given NAMEs.\n\ +\n\ + -m, --mode=MODE set permission mode (as in chmod), not 0666 - umask\n\ + --help display this help and exit\n\ + --version output version information and exit\n"); + } + exit (status); +} +#endif + void main (int argc, char **argv) { @@ -118,24 +137,3 @@ main (int argc, char **argv) exit (errors); #endif } - -#ifdef S_ISFIFO -static void -usage (int status) -{ - if (status != 0) - fprintf (stderr, "Try `%s --help' for more information.\n", - program_name); - else - { - printf ("Usage: %s [OPTION] NAME...\n", program_name); - printf ("\ -Create named pipes (FIFOs) with the given NAMEs.\n\ -\n\ - -m, --mode=MODE set permission mode (as in chmod), not 0666 - umask\n\ - --help display this help and exit\n\ - --version output version information and exit\n"); - } - exit (status); -} -#endif -- cgit v1.2.3-70-g09d2