diff options
author | ache <ache@FreeBSD.org> | 2006-09-23 14:48:31 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2006-09-23 14:48:31 +0000 |
commit | b8fd741213327cb2814fcafff57841e373a3df81 (patch) | |
tree | 17378cc2b4c19802c1fabbd364203752df51d505 /lib/libc | |
parent | 35537661a5a12e34fee8a553cd22fc044352974b (diff) | |
download | FreeBSD-src-b8fd741213327cb2814fcafff57841e373a3df81.zip FreeBSD-src-b8fd741213327cb2814fcafff57841e373a3df81.tar.gz |
Keep compatible parts in sync with OpenBSD v1.21, add some comments.
No functional changes.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/stdlib/getopt_long.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/lib/libc/stdlib/getopt_long.c b/lib/libc/stdlib/getopt_long.c index d2087eb..bf7a04a 100644 --- a/lib/libc/stdlib/getopt_long.c +++ b/lib/libc/stdlib/getopt_long.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getopt_long.c,v 1.17 2004/06/03 18:46:52 millert Exp $ */ +/* $OpenBSD: getopt_long.c,v 1.21 2006/09/22 17:22:05 millert Exp $ */ /* $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ */ /* @@ -72,7 +72,7 @@ __FBSDID("$FreeBSD$"); #define GNU_COMPATIBLE /* Be more compatible, configure's use us! */ -#ifndef GNU_COMPATIBLE +#if 0 /* we prefer to keep our getopt(3) */ #define REPLACE_GETOPT /* use this getopt as the system getopt(3) */ #endif @@ -366,7 +366,7 @@ getopt_internal(int nargc, char * const *nargv, const char *options, { char *oli; /* option letter list index */ int optchar, short_too; - int posixly_correct; + int posixly_correct; /* no static, can be changed on the fly */ if (options == NULL) return (-1); @@ -603,12 +603,8 @@ getopt(int nargc, char * const *nargv, const char *options) * Parse argc/argv argument vector. */ int -getopt_long(nargc, nargv, options, long_options, idx) - int nargc; - char * const *nargv; - const char *options; - const struct option *long_options; - int *idx; +getopt_long(int nargc, char * const *nargv, const char *options, + const struct option *long_options, int *idx) { return (getopt_internal(nargc, nargv, options, long_options, idx, @@ -620,12 +616,8 @@ getopt_long(nargc, nargv, options, long_options, idx) * Parse argc/argv argument vector. */ int -getopt_long_only(nargc, nargv, options, long_options, idx) - int nargc; - char * const *nargv; - const char *options; - const struct option *long_options; - int *idx; +getopt_long_only(int nargc, char * const *nargv, const char *options, + const struct option *long_options, int *idx) { return (getopt_internal(nargc, nargv, options, long_options, idx, |