|
Lines 73-79
Link Here
|
| 73 |
place = EMSG; |
73 |
place = EMSG; |
| 74 |
return (-1); |
74 |
return (-1); |
| 75 |
} |
75 |
} |
| 76 |
if (place[1] && *++place == '-') { /* found "--" */ |
76 |
if (place[1] && *++place == '-' && !place[1]) { /* found "--" */ |
| 77 |
++optind; |
77 |
++optind; |
| 78 |
place = EMSG; |
78 |
place = EMSG; |
| 79 |
return (-1); |
79 |
return (-1); |
|
Lines 81-92
Link Here
|
| 81 |
} /* option letter okay? */ |
81 |
} /* option letter okay? */ |
| 82 |
if ((optopt = (int)*place++) == (int)':' || |
82 |
if ((optopt = (int)*place++) == (int)':' || |
| 83 |
!(oli = strchr(ostr, optopt))) { |
83 |
!(oli = strchr(ostr, optopt))) { |
| 84 |
/* |
|
|
| 85 |
* if the user didn't specify '-' as an option, |
| 86 |
* assume it means -1. |
| 87 |
*/ |
| 88 |
if (optopt == (int)'-') |
| 89 |
return (-1); |
| 90 |
if (!*place) |
84 |
if (!*place) |
| 91 |
++optind; |
85 |
++optind; |
| 92 |
if (opterr && *ostr != ':' && optopt != BADCH) |
86 |
if (opterr && *ostr != ':' && optopt != BADCH) |