From: Jim Meyering Date: Mon, 25 Jan 1999 14:26:38 +0000 (+0000) Subject: (usage): Remove static attribute. X-Git-Tag: TEXTUTILS-1_22h~103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4c1c9627e5922c52c3119cda71c55312d3af455;p=thirdparty%2Fcoreutils.git (usage): Remove static attribute. Move function be the first in the file. --- diff --git a/src/env.c b/src/env.c index 668de61483..8f677359c6 100644 --- 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 .")); + } + 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 .")); - } - exit (status); -}