summaryrefslogtreecommitdiff
path: root/src/pathchk.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-01-25 14:29:22 +0000
committerJim Meyering <jim@meyering.net>1999-01-25 14:29:22 +0000
commit86fb9cb9ecc96bd4640604d3c5e7c39cc6e879c4 (patch)
tree5b418330cc65b1551ff63ebb86d947fe9d6e5944 /src/pathchk.c
parent7082d762aa6c7e6fd72f9a01c41786333f0ce000 (diff)
downloadcoreutils-86fb9cb9ecc96bd4640604d3c5e7c39cc6e879c4.tar.xz
(usage): Remove static attribute.
Move function be the first in the file.
Diffstat (limited to 'src/pathchk.c')
-rw-r--r--src/pathchk.c45
1 files changed, 22 insertions, 23 deletions
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 <bug-sh-utils@gnu.org>."));
+ }
+ 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 <bug-sh-utils@gnu.org>."));
- }
- exit (status);
-}