--- trickle-1.07.orig/getopt.c
+++ trickle-1.07/getopt.c
@@ -41,7 +41,7 @@
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 @@
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 @@
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 @@
place = EMSG;
++optind;
}
- return (optopt); /* dump back option letter */
+ return (optcopt); /* dump back option letter */
}