From 86fb9cb9ecc96bd4640604d3c5e7c39cc6e879c4 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 25 Jan 1999 14:29:22 +0000 Subject: (usage): Remove static attribute. Move function be the first in the file. --- src/pathchk.c | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/pathchk.c b/src/pathchk.c index 90f0ce105..2fc24dd69 100644 --- a/src/pathchk.c +++ b/src/pathchk.c @@ -1,5 +1,5 @@ /* pathchk -- check whether pathnames are valid or portable - Copyright (C) 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. + Copyright (C) 1991-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 @@ -92,7 +92,6 @@ char *xstrdup (); static int validate_path PARAMS ((char *path, int portability)); -static void usage PARAMS ((int status)); /* The name this program was run with. */ char *program_name; @@ -111,6 +110,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]... NAME...\n"), program_name); + printf (_("\ +Diagnose unportable constructs in NAME.\n\ +\n\ + -p, --portability check for all POSIX systems, not only this one\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) { @@ -349,24 +369,3 @@ validate_path (char *path, int portability) return 0; } - -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 (_("\ -Diagnose unportable constructs in NAME.\n\ -\n\ - -p, --portability check for all POSIX systems, not only this one\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-70-g09d2