diff options
-rw-r--r-- | usr.bin/pr/egetopt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/pr/egetopt.c b/usr.bin/pr/egetopt.c index 47dd8a1..277459e 100644 --- a/usr.bin/pr/egetopt.c +++ b/usr.bin/pr/egetopt.c @@ -93,7 +93,7 @@ egetopt(int nargc, char * const *nargv, const char *ostr) if ((eoptind >= nargc) || ((*(place = nargv[eoptind]) != '-') && (*place != '+'))) { place = emsg; - return (EOF); + return (-1); } delim = (int)*place; @@ -103,7 +103,7 @@ egetopt(int nargc, char * const *nargv, const char *ostr) */ ++eoptind; place = emsg; - return (EOF); + return (-1); } } @@ -114,10 +114,10 @@ egetopt(int nargc, char * const *nargv, const char *ostr) !(oli = strchr(ostr, eoptopt))) { /* * if the user didn't specify '-' as an option, - * assume it means EOF when by itself. + * assume it means -1 when by itself. */ if ((eoptopt == (int)'-') && !*place) - return (EOF); + return (-1); if (strchr(ostr, '#') && (isdigit(eoptopt) || (((eoptopt == (int)'-') || (eoptopt == (int)'+')) && isdigit(*place)))) { |