]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(usage): Remove static attribute.
authorJim Meyering <jim@meyering.net>
Mon, 25 Jan 1999 14:26:38 +0000 (14:26 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 25 Jan 1999 14:26:38 +0000 (14:26 +0000)
Move function be the first in the file.

src/env.c

index 668de6148361c78381fcfc3c410fa0b65e895fe1..8f677359c6c5fd39c636c3b1f4ac957e5545b0e6 100644 (file)
--- a/src/env.c
+++ b/src/env.c
@@ -1,5 +1,5 @@
 /* env - run a program in a modified environment
-   Copyright (C) 86,91,92,93,94,95,96,1997 Free Software Foundation, Inc.
+   Copyright (C) 1986, 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
@@ -88,8 +88,6 @@
 
 int putenv ();
 
-static void usage PARAMS ((int status));
-
 extern char **environ;
 
 /* The name by which this program was run. */
@@ -110,6 +108,32 @@ 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=VALUE]... [COMMAND [ARG]...]\n"),
+             program_name);
+      printf (_("\
+Set each NAME to VALUE in the environment and run COMMAND.\n\
+\n\
+  -i, --ignore-environment   start with an empty environment\n\
+  -u, --unset=NAME           remove variable from the environment\n\
+      --help                 display this help and exit\n\
+      --version              output version information and exit\n\
+\n\
+A mere - implies -i.  If no COMMAND, print the resulting environment.\n\
+"));
+      puts (_("\nReport bugs to <bug-sh-utils@gnu.org>."));
+    }
+  exit (status);
+}
+
 int
 main (register int argc, register char **argv, char **envp)
 {
@@ -179,29 +203,3 @@ main (register int argc, register char **argv, char **envp)
   execvp (argv[optind], &argv[optind]);
   error (errno == ENOENT ? 127 : 126, errno, "%s", argv[optind]);
 }
-
-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=VALUE]... [COMMAND [ARG]...]\n"),
-             program_name);
-      printf (_("\
-Set each NAME to VALUE in the environment and run COMMAND.\n\
-\n\
-  -i, --ignore-environment   start with an empty environment\n\
-  -u, --unset=NAME           remove variable from the environment\n\
-      --help                 display this help and exit\n\
-      --version              output version information and exit\n\
-\n\
-A mere - implies -i.  If no COMMAND, print the resulting environment.\n\
-"));
-      puts (_("\nReport bugs to <bug-sh-utils@gnu.org>."));
-    }
-  exit (status);
-}