From 0d8e93ee0531d72b7f93668a76d20afc598bf901 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Thu, 25 Nov 1999 05:30:24 +0000 Subject: [PATCH] (getopt): return -1 instead of EOF. From git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7430 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/roken/getopt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/roken/getopt.c b/lib/roken/getopt.c index fea4635fb..45fc35023 100644 --- a/lib/roken/getopt.c +++ b/lib/roken/getopt.c @@ -69,22 +69,22 @@ getopt(nargc, nargv, ostr) optreset = 0; if (optind >= nargc || *(place = nargv[optind]) != '-') { place = EMSG; - return(EOF); + return(-1); } if (place[1] && *++place == '-') { /* found "--" */ ++optind; place = EMSG; - return(EOF); + return(-1); } } /* option letter okay? */ if ((optopt = (int)*place++) == (int)':' || !(oli = strchr(ostr, optopt))) { /* * if the user didn't specify '-' as an option, - * assume it means EOF. + * assume it means -1 (EOF). */ if (optopt == (int)'-') - return(EOF); + return(-1); if (!*place) ++optind; if (opterr && *ostr != ':') {