diff options
author | Robert Lemmen <robertle@semistable.com> | 2013-07-04 21:03:22 +0200 |
---|---|---|
committer | Robert Lemmen <robertle@semistable.com> | 2013-07-04 21:03:22 +0200 |
commit | a6df768b695a42cf31c137e6522098d28db4df8c (patch) | |
tree | b17fb32ac011a35821f72e4cae2ee8ba427d3c9c /getopt.c | |
parent | a8dd96506fa176eb1c4dc92ac548614f96f1e1d9 (diff) |
trickle (1.07-10) unstable; urgency=low
* Enable hardning flags during build
* Update packaging
* Bump standards-version
[dgit import package trickle 1.07-10]
Diffstat (limited to 'getopt.c')
-rw-r--r-- | getopt.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -41,7 +41,7 @@ static char *rcsid = "$OpenBSD: getopt.c,v 1.2 1996/08/19 08:33:32 tholo Exp $"; int opterr = 1, /* if error message should be printed */ optind = 1, /* index into parent argv vector */ - optopt, /* character checked for validity */ + optcopt, /* character checked for validity */ optreset; /* reset getopt */ char *optarg; /* argument associated with option */ @@ -75,19 +75,19 @@ getopt(nargc, nargv, ostr) return (-1); } } /* option letter okay? */ - if ((optopt = (int)*place++) == (int)':' || - !(oli = strchr(ostr, optopt))) { + if ((optcopt = (int)*place++) == (int)':' || + !(oli = strchr(ostr, optcopt))) { /* * if the user didn't specify '-' as an option, * assume it means -1. */ - if (optopt == (int)'-') + if (optcopt == (int)'-') return (-1); if (!*place) ++optind; if (opterr && *ostr != ':') (void)fprintf(stderr, - "%s: illegal option -- %c\n", __progname, optopt); + "%s: illegal option -- %c\n", __progname, optcopt); return (BADCH); } if (*++oli != ':') { /* don't need argument */ @@ -105,7 +105,7 @@ getopt(nargc, nargv, ostr) if (opterr) (void)fprintf(stderr, "%s: option requires an argument -- %c\n", - __progname, optopt); + __progname, optcopt); return (BADCH); } else /* white space */ @@ -113,5 +113,5 @@ getopt(nargc, nargv, ostr) place = EMSG; ++optind; } - return (optopt); /* dump back option letter */ + return (optcopt); /* dump back option letter */ } |