summaryrefslogtreecommitdiff
path: root/usr.bin/pr
diff options
context:
space:
mode:
authorPhilippe Charnier <charnier@FreeBSD.org>2002-06-23 20:42:30 +0000
committerPhilippe Charnier <charnier@FreeBSD.org>2002-06-23 20:42:30 +0000
commita228302fcae9adc0c0daf987422f35e664f0796b (patch)
treee3ed83bbc0a378c1d6821facc5c61dcf04e2f299 /usr.bin/pr
parent4b571b192a221cd05dc140113373acf5aee7ca24 (diff)
downloadsrc-test2-a228302fcae9adc0c0daf987422f35e664f0796b.tar.gz
src-test2-a228302fcae9adc0c0daf987422f35e664f0796b.zip
Make egetopt() return -1 not EOF, as getopt(3) do.
Reviewed by:markm
Notes
Notes: svn path=/head/; revision=98698
Diffstat (limited to 'usr.bin/pr')
-rw-r--r--usr.bin/pr/egetopt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/pr/egetopt.c b/usr.bin/pr/egetopt.c
index 47dd8a1c47c6..277459ee47a7 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)))) {