[vlc-commits] commit: getopt: posixly_correct need not be static ( Rémi Denis-Courmont )
git at videolan.org
git at videolan.org
Mon Mar 29 21:40:21 CEST 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Mar 29 22:33:16 2010 +0300| [88c2bad6fe6b149ad79941cccf54ab7d0c2f3e22] | committer: Rémi Denis-Courmont
getopt: posixly_correct need not be static
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=88c2bad6fe6b149ad79941cccf54ab7d0c2f3e22
---
src/config/getopt.c | 17 +++--------------
1 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/src/config/getopt.c b/src/config/getopt.c
index 8c5b890..a8a6b1d 100644
--- a/src/config/getopt.c
+++ b/src/config/getopt.c
@@ -116,9 +116,6 @@ static enum
}
ordering;
-/* Value of POSIXLY_CORRECT environment variable. */
-static char *posixly_correct;
-
/* Handle permutation of arguments. */
/* Describe the part of ARGV that contains non-options that have
@@ -197,16 +194,8 @@ static void
/* Initialize the internal data when the first call is made. */
-static const char *vlc_getopt_initialize(int, char *const *, const char *);
-
-static const char *
- vlc_getopt_initialize(argc, argv, optstring)
- int argc;
- char *const *argv;
- const char *optstring;
+static const char *vlc_getopt_initialize(const char *optstring)
{
- (void)argc;
- (void)argv;
/* Start processing options with ARGV-element 1 (since ARGV-element 0
is the program name); the sequence of previously skipped
non-option ARGV-elements is empty. */
@@ -215,7 +204,7 @@ static const char *
nextchar = NULL;
- posixly_correct = getenv("POSIXLY_CORRECT");
+ const char *posixly_correct = getenv("POSIXLY_CORRECT");
/* Determine how to handle the ordering of options and nonoptions. */
@@ -299,7 +288,7 @@ int
if (vlc_optind == 0)
{
- optstring = vlc_getopt_initialize(argc, argv, optstring);
+ optstring = vlc_getopt_initialize(optstring);
vlc_optind = 1; /* Don't scan ARGV[0], the program name. */
}
More information about the vlc-commits
mailing list