diff options
author | imp <imp@FreeBSD.org> | 1997-03-31 05:11:47 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 1997-03-31 05:11:47 +0000 |
commit | 691010efad5c05f7ee86a870abce217fe8e9b8d1 (patch) | |
tree | b28e04577780319990238a98e7549582e44d9d51 | |
parent | 3d7b78ed8c2fd06816b04ddcb57d58281409aa62 (diff) | |
download | FreeBSD-src-691010efad5c05f7ee86a870abce217fe8e9b8d1.zip FreeBSD-src-691010efad5c05f7ee86a870abce217fe8e9b8d1.tar.gz |
compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
75 files changed, 116 insertions, 116 deletions
diff --git a/sbin/sysctl/pathconf.c b/sbin/sysctl/pathconf.c index 4b60ccf..8dcaf42 100644 --- a/sbin/sysctl/pathconf.c +++ b/sbin/sysctl/pathconf.c @@ -85,7 +85,7 @@ main(argc, argv) char *path; int ch; - while ((ch = getopt(argc, argv, "Aan")) != EOF) { + while ((ch = getopt(argc, argv, "Aan")) != -1) { switch (ch) { case 'A': diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index 2279e30..b1629f0 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -40,7 +40,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "From: @(#)sysctl.c 8.1 (Berkeley) 6/6/93"; */ static const char rcsid[] = - "$Id$"; + "$Id: sysctl.c,v 1.12 1997/02/22 16:13:58 peter Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -85,7 +85,7 @@ main(int argc, char **argv) setbuf(stdout,0); setbuf(stderr,0); - while ((ch = getopt(argc, argv, "AabnwX")) != EOF) { + while ((ch = getopt(argc, argv, "AabnwX")) != -1) { switch (ch) { case 'A': Aflag = 1; break; case 'a': aflag = 1; break; diff --git a/usr.sbin/ac/ac.c b/usr.sbin/ac/ac.c index f4af92c..ab4da9a 100644 --- a/usr.sbin/ac/ac.c +++ b/usr.sbin/ac/ac.c @@ -14,7 +14,7 @@ */ #ifndef lint -static char rcsid[] = "$Id$"; +static char rcsid[] = "$Id: ac.c,v 1.6 1997/02/22 16:01:11 peter Exp $"; #endif #include <sys/types.h> @@ -229,7 +229,7 @@ main(argc, argv) (void) setlocale(LC_TIME, ""); fp = NULL; - while ((c = getopt(argc, argv, "Dc:dpt:w:")) != EOF) { + while ((c = getopt(argc, argv, "Dc:dpt:w:")) != -1) { switch (c) { #ifdef DEBUG case 'D': diff --git a/usr.sbin/accton/accton.c b/usr.sbin/accton/accton.c index 5784dbf..0d1704b 100644 --- a/usr.sbin/accton/accton.c +++ b/usr.sbin/accton/accton.c @@ -57,7 +57,7 @@ main(argc, argv) { int ch; - while ((ch = getopt(argc, argv, "")) != EOF) + while ((ch = getopt(argc, argv, "")) != -1) switch(ch) { case '?': default: diff --git a/usr.sbin/amd/amd/get_args.c b/usr.sbin/amd/amd/get_args.c index 874ecd8..b6d14c3 100644 --- a/usr.sbin/amd/amd/get_args.c +++ b/usr.sbin/amd/amd/get_args.c @@ -37,7 +37,7 @@ * * @(#)get_args.c 8.1 (Berkeley) 6/6/93 * - * $Id$ + * $Id: get_args.c,v 1.3 1997/02/22 16:01:28 peter Exp $ * */ @@ -113,7 +113,7 @@ char *v[]; char *logfile = 0; char *sub_domain = 0; - while ((opt_ch = getopt(c, v, "mnprva:c:d:h:k:l:t:w:x:y:C:D:")) != EOF) + while ((opt_ch = getopt(c, v, "mnprva:c:d:h:k:l:t:w:x:y:C:D:")) != -1) switch (opt_ch) { case 'a': if (*optarg != '/') { diff --git a/usr.sbin/amd/amq/amq.c b/usr.sbin/amd/amq/amq.c index a9ac71c..547e1ad 100644 --- a/usr.sbin/amd/amq/amq.c +++ b/usr.sbin/amd/amq/amq.c @@ -37,7 +37,7 @@ * * @(#)amq.c 8.1 (Berkeley) 6/7/93 * - * $Id: amq.c,v 1.4 1997/02/22 16:02:07 peter Exp $ + * $Id: amq.c,v 1.5 1997/03/22 23:12:08 joerg Exp $ * */ @@ -54,7 +54,7 @@ char copyright[] = "\ #endif /* not lint */ #ifndef lint -static char rcsid[] = "$Id: amq.c,v 1.4 1997/02/22 16:02:07 peter Exp $"; +static char rcsid[] = "$Id: amq.c,v 1.5 1997/03/22 23:12:08 joerg Exp $"; static char sccsid[] = "@(#)amq.c 8.1 (Berkeley) 6/7/93"; #endif /* not lint */ @@ -310,7 +310,7 @@ char *argv[]; /* * Parse arguments */ - while ((opt_ch = getopt(argc, argv, "fh:l:msuvx:D:M:")) != EOF) + while ((opt_ch = getopt(argc, argv, "fh:l:msuvx:D:M:")) != -1) switch (opt_ch) { case 'f': flush_flag = 1; diff --git a/usr.sbin/amd/fsinfo/fsinfo.c b/usr.sbin/amd/fsinfo/fsinfo.c index cde8bcb..dcc6982 100644 --- a/usr.sbin/amd/fsinfo/fsinfo.c +++ b/usr.sbin/amd/fsinfo/fsinfo.c @@ -37,7 +37,7 @@ * * @(#)fsinfo.c 8.1 (Berkeley) 6/6/93 * - * $Id$ + * $Id: fsinfo.c,v 1.3 1997/02/22 16:03:20 peter Exp $ * */ @@ -106,7 +106,7 @@ char *v[]; if (!progname) progname = "fsinfo"; - while ((ch = getopt(c, v, "a:b:d:e:f:h:m:D:U:I:qv")) != EOF) + while ((ch = getopt(c, v, "a:b:d:e:f:h:m:D:U:I:qv")) != -1) switch (ch) { case 'a': autodir = optarg; diff --git a/usr.sbin/amd/mk-amd-map/mk-amd-map.c b/usr.sbin/amd/mk-amd-map/mk-amd-map.c index f35ddd2..a2ba87e 100644 --- a/usr.sbin/amd/mk-amd-map/mk-amd-map.c +++ b/usr.sbin/amd/mk-amd-map/mk-amd-map.c @@ -37,7 +37,7 @@ * * @(#)mk-amd-map.c 8.1 (Berkeley) 6/28/93 * - * $Id$ + * $Id: mk-amd-map.c,v 1.3 1997/02/22 16:03:56 peter Exp $ */ /* @@ -53,7 +53,7 @@ char copyright[] = "\ #endif /* not lint */ #ifndef lint -static char rcsid[] = "$Id$"; +static char rcsid[] = "$Id: mk-amd-map.c,v 1.3 1997/02/22 16:03:56 peter Exp $"; static char sccsid[] = "@(#)mk-amd-map.c 8.1 (Berkeley) 6/28/93"; #endif /* not lint */ @@ -249,7 +249,7 @@ char *argv[]; int ch; extern int optind; - while ((ch = getopt(argc, argv, "p")) != EOF) + while ((ch = getopt(argc, argv, "p")) != -1) switch (ch) { case 'p': printit = 1; diff --git a/usr.sbin/apm/apm.c b/usr.sbin/apm/apm.c index 442bbee..0e3847d 100644 --- a/usr.sbin/apm/apm.c +++ b/usr.sbin/apm/apm.c @@ -120,7 +120,7 @@ main(int argc, char *argv[]) all_info = 0; goto finish_option; } - while ((c = getopt(argc, argv, "ablszd:")) != EOF) { + while ((c = getopt(argc, argv, "ablszd:")) != -1) { switch (c) { case 'a': ac_status = 1; diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c index 262df2e..b77122c 100644 --- a/usr.sbin/arp/arp.c +++ b/usr.sbin/arp/arp.c @@ -42,7 +42,7 @@ static char const copyright[] = #ifndef lint static char const sccsid[] = "@(#)from: arp.c 8.2 (Berkeley) 1/2/94"; -static char const freebsdid[] = "$Id$"; +static char const freebsdid[] = "$Id: arp.c,v 1.9 1997/02/22 16:04:19 peter Exp $"; #endif /* not lint */ /* @@ -103,7 +103,7 @@ main(argc, argv) int ch; pid = getpid(); - while ((ch = getopt(argc, argv, "andfsS")) != EOF) + while ((ch = getopt(argc, argv, "andfsS")) != -1) switch((char)ch) { case 'a': dump(0); diff --git a/usr.sbin/bootparamd/bootparamd/main.c b/usr.sbin/bootparamd/bootparamd/main.c index cef4923..77bb76d 100644 --- a/usr.sbin/bootparamd/bootparamd/main.c +++ b/usr.sbin/bootparamd/bootparamd/main.c @@ -6,7 +6,7 @@ use and modify. Please send modifications and/or suggestions + bug fixes to Klas Heggemann <klas@nada.kth.se> - $Id$ + $Id: main.c,v 1.5 1997/02/22 16:04:24 peter Exp $ */ @@ -49,7 +49,7 @@ char **argv; if ( progname ) progname++; else progname = argv[0]; - while ((c = getopt(argc, argv,"dsr:f:")) != EOF) + while ((c = getopt(argc, argv,"dsr:f:")) != -1) switch (c) { case 'd': debug = 1; diff --git a/usr.sbin/chown/chown.c b/usr.sbin/chown/chown.c index f034857..9e01164 100644 --- a/usr.sbin/chown/chown.c +++ b/usr.sbin/chown/chown.c @@ -81,7 +81,7 @@ main(argc, argv) ischown = myname[2] == 'o'; Hflag = Lflag = Pflag = hflag = 0; - while ((ch = getopt(argc, argv, "HLPRfh")) != EOF) + while ((ch = getopt(argc, argv, "HLPRfh")) != -1) switch (ch) { case 'H': Hflag = 1; diff --git a/usr.sbin/chroot/chroot.c b/usr.sbin/chroot/chroot.c index 81bf675..db60a34 100644 --- a/usr.sbin/chroot/chroot.c +++ b/usr.sbin/chroot/chroot.c @@ -61,7 +61,7 @@ main(argc, argv) int ch; char *shell; - while ((ch = getopt(argc, argv, "")) != EOF) + while ((ch = getopt(argc, argv, "")) != -1) switch(ch) { case '?': default: diff --git a/usr.sbin/config/main.c b/usr.sbin/config/main.c index 3e6778f..ae9cfce 100644 --- a/usr.sbin/config/main.c +++ b/usr.sbin/config/main.c @@ -79,7 +79,7 @@ main(argc, argv) int ch; char *p; - while ((ch = getopt(argc, argv, "gpn")) != EOF) + while ((ch = getopt(argc, argv, "gpn")) != -1) switch (ch) { case 'g': debugging++; diff --git a/usr.sbin/cron/cron/cron.c b/usr.sbin/cron/cron/cron.c index 301883a..928d709 100644 --- a/usr.sbin/cron/cron/cron.c +++ b/usr.sbin/cron/cron/cron.c @@ -16,7 +16,7 @@ */ #if !defined(lint) && !defined(LINT) -static char rcsid[] = "$Id$"; +static char rcsid[] = "$Id: cron.c,v 1.4 1997/02/22 16:04:40 peter Exp $"; #endif @@ -297,7 +297,7 @@ parse_args(argc, argv) { int argch; - while (EOF != (argch = getopt(argc, argv, "x:"))) { + while ((argch = getopt(argc, argv, "x:")) != -1) { switch (argch) { case 'x': if (!set_debug_flags(optarg)) diff --git a/usr.sbin/cron/crontab/crontab.c b/usr.sbin/cron/crontab/crontab.c index 39a7683..7fc79d8 100644 --- a/usr.sbin/cron/crontab/crontab.c +++ b/usr.sbin/cron/crontab/crontab.c @@ -17,7 +17,7 @@ */ #if !defined(lint) && !defined(LINT) -static char rcsid[] = "$Id$"; +static char rcsid[] = "$Id: crontab.c,v 1.9 1997/02/22 16:04:53 peter Exp $"; #endif /* crontab - install and manage per-user crontab files @@ -147,7 +147,7 @@ parse_args(argc, argv) strcpy(RealUser, User); Filename[0] = '\0'; Option = opt_unknown; - while (EOF != (argch = getopt(argc, argv, "u:lerx:"))) { + while ((argch = getopt(argc, argv, "u:lerx:")) != -1) { switch (argch) { case 'x': if (!set_debug_flags(optarg)) diff --git a/usr.sbin/crunch/crunchide/crunchide.c b/usr.sbin/crunch/crunchide/crunchide.c index e35560a..4d6fac6 100644 --- a/usr.sbin/crunch/crunchide/crunchide.c +++ b/usr.sbin/crunch/crunchide/crunchide.c @@ -84,7 +84,7 @@ char **argv; if(argc > 0) pname = argv[0]; - while ((ch = getopt(argc, argv, "k:f:")) != EOF) + while ((ch = getopt(argc, argv, "k:f:")) != -1) switch(ch) { case 'k': add_to_keep_list(optarg); diff --git a/usr.sbin/ctm/mkCTM/mkctm.c b/usr.sbin/ctm/mkCTM/mkctm.c index 698d114..7313108 100644 --- a/usr.sbin/ctm/mkCTM/mkctm.c +++ b/usr.sbin/ctm/mkCTM/mkctm.c @@ -510,7 +510,7 @@ main(int argc, char **argv) flag_ignore = 1; #endif - while ((i = getopt(argc, argv, "D:I:B:l:qv")) != EOF) + while ((i = getopt(argc, argv, "D:I:B:l:qv")) != -1) switch (i) { case 'D': damage_limit = strtol(optarg, 0, 0); diff --git a/usr.sbin/dev_mkdb/dev_mkdb.c b/usr.sbin/dev_mkdb/dev_mkdb.c index 682c041..276db7e 100644 --- a/usr.sbin/dev_mkdb/dev_mkdb.c +++ b/usr.sbin/dev_mkdb/dev_mkdb.c @@ -78,7 +78,7 @@ main(argc, argv) u_char buf[MAXNAMLEN + 1]; char dbtmp[MAXPATHLEN + 1], dbname[MAXPATHLEN + 1]; - while ((ch = getopt(argc, argv, "")) != EOF) + while ((ch = getopt(argc, argv, "")) != -1) switch((char)ch) { case '?': default: diff --git a/usr.sbin/edquota/edquota.c b/usr.sbin/edquota/edquota.c index 31fee41..8918d45 100644 --- a/usr.sbin/edquota/edquota.c +++ b/usr.sbin/edquota/edquota.c @@ -97,7 +97,7 @@ main(argc, argv) exit(1); } quotatype = USRQUOTA; - while ((ch = getopt(argc, argv, "ugtp:")) != EOF) { + while ((ch = getopt(argc, argv, "ugtp:")) != -1) { switch(ch) { case 'p': protoname = optarg; diff --git a/usr.sbin/fdcontrol/fdcontrol.c b/usr.sbin/fdcontrol/fdcontrol.c index d621a72..d93d4a0 100644 --- a/usr.sbin/fdcontrol/fdcontrol.c +++ b/usr.sbin/fdcontrol/fdcontrol.c @@ -63,7 +63,7 @@ main(int argc, char **argv) int fd, i; int debug = -1, settype = 1; - while((i = getopt(argc, argv, "d:s")) != EOF) + while((i = getopt(argc, argv, "d:s")) != -1) switch(i) { case 'd': diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c index feef796..a1ef058 100644 --- a/usr.sbin/inetd/inetd.c +++ b/usr.sbin/inetd/inetd.c @@ -40,7 +40,7 @@ static char copyright[] __attribute__ ((unused)) = #ifndef lint /* from: @(#)inetd.c 8.4 (Berkeley) 4/13/94"; */ static char inetd_c_rcsid[] __attribute__ ((unused)) = - "$Id$"; + "$Id: inetd.c,v 1.21 1997/02/22 16:05:52 peter Exp $"; #endif /* not lint */ /* @@ -289,7 +289,7 @@ main(argc, argv, envp) openlog("inetd", LOG_PID | LOG_NOWAIT, LOG_DAEMON); bind_address.s_addr = htonl(INADDR_ANY); - while ((ch = getopt(argc, argv, "dlR:a:p:")) != EOF) + while ((ch = getopt(argc, argv, "dlR:a:p:")) != -1) switch(ch) { case 'd': debug = 1; diff --git a/usr.sbin/iostat/iostat.c b/usr.sbin/iostat/iostat.c index c440211..ab9b8db 100644 --- a/usr.sbin/iostat/iostat.c +++ b/usr.sbin/iostat/iostat.c @@ -146,7 +146,7 @@ main(argc, argv) interval = reps = 0; nlistf = memf = NULL; - while ((ch = getopt(argc, argv, "c:M:N:w:")) != EOF) + while ((ch = getopt(argc, argv, "c:M:N:w:")) != -1) switch(ch) { case 'c': if ((reps = atoi(optarg)) <= 0) diff --git a/usr.sbin/kgmon/kgmon.c b/usr.sbin/kgmon/kgmon.c index c283f16..fd0c4be 100644 --- a/usr.sbin/kgmon/kgmon.c +++ b/usr.sbin/kgmon/kgmon.c @@ -87,7 +87,7 @@ main(int argc, char **argv) seteuid(getuid()); kmemf = NULL; system = NULL; - while ((ch = getopt(argc, argv, "M:N:Bbhpr")) != EOF) { + while ((ch = getopt(argc, argv, "M:N:Bbhpr")) != -1) { switch((char)ch) { case 'M': diff --git a/usr.sbin/kvm_mkdb/kvm_mkdb.c b/usr.sbin/kvm_mkdb/kvm_mkdb.c index 7a89484..b842d1e 100644 --- a/usr.sbin/kvm_mkdb/kvm_mkdb.c +++ b/usr.sbin/kvm_mkdb/kvm_mkdb.c @@ -76,7 +76,7 @@ main(argc, argv) int ch; char *p, *nlistpath, *nlistname, dbtemp[MAXPATHLEN], dbname[MAXPATHLEN]; - while ((ch = getopt(argc, argv, "")) != EOF) + while ((ch = getopt(argc, argv, "")) != -1) switch (ch) { case '?': default: diff --git a/usr.sbin/lpr/lpq/lpq.c b/usr.sbin/lpr/lpq/lpq.c index 7d1b520..0e3ec33 100644 --- a/usr.sbin/lpr/lpq/lpq.c +++ b/usr.sbin/lpr/lpq/lpq.c @@ -90,7 +90,7 @@ main(argc, argv) openlog("lpd", 0, LOG_LPR); aflag = lflag = 0; - while ((ch = getopt(argc, argv, "alP:")) != EOF) + while ((ch = getopt(argc, argv, "alP:")) != -1) switch((char)ch) { case 'a': ++aflag; diff --git a/usr.sbin/lpr/lpr/lpr.c b/usr.sbin/lpr/lpr/lpr.c index 0ba3725..a729c0d 100644 --- a/usr.sbin/lpr/lpr/lpr.c +++ b/usr.sbin/lpr/lpr/lpr.c @@ -45,7 +45,7 @@ static char copyright[] = #ifndef lint static char sccsid[] = "From: @(#)lpr.c 8.4 (Berkeley) 4/28/95" - "\n$Id: lpr.c,v 1.12 1997/02/22 16:06:20 peter Exp $\n"; + "\n$Id: lpr.c,v 1.13 1997/02/26 02:22:45 mpp Exp $\n"; #endif /* not lint */ /* @@ -140,7 +140,7 @@ main(argc, argv) errs = 0; while ((c = getopt(argc, argv, - ":#:1:2:3:4:C:J:P:T:U:cdfghi:lnmprstvw:")) != EOF) + ":#:1:2:3:4:C:J:P:T:U:cdfghi:lnmprstvw:")) != -1) switch (c) { case '#': /* n copies */ i = atoi(optarg); diff --git a/usr.sbin/mkdosfs/mkdosfs.c b/usr.sbin/mkdosfs/mkdosfs.c index c3d88da..6fc9276 100644 --- a/usr.sbin/mkdosfs/mkdosfs.c +++ b/usr.sbin/mkdosfs/mkdosfs.c @@ -29,7 +29,7 @@ /* * Create an MS-DOS (FAT) file system. * - * $Id$ + * $Id: mkdosfs.c,v 1.4 1997/02/22 16:06:38 peter Exp $ */ #include <sys/types.h> @@ -206,7 +206,7 @@ main(int argc, char **argv) int c, i, fd, format = 0, rootdirsize; const char *label = 0; - while((c = getopt(argc, argv, "f:L:")) != EOF) + while((c = getopt(argc, argv, "f:L:")) != -1) switch(c) { case 'f': diff --git a/usr.sbin/moused/moused.c b/usr.sbin/moused/moused.c index 4008587..f05c77a 100644 --- a/usr.sbin/moused/moused.c +++ b/usr.sbin/moused/moused.c @@ -30,7 +30,7 @@ ** EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** ** - ** $Id: moused.c,v 1.7 1997/02/22 16:06:42 peter Exp $ + ** $Id: moused.c,v 1.8 1997/03/29 12:10:26 peter Exp $ **/ /** @@ -157,7 +157,7 @@ main(int argc, char *argv[]) progname = argv[0]; - while((c = getopt(argc,argv,"cdfr:sp:t:h?RDS:")) != EOF) + while((c = getopt(argc,argv,"cdfr:sp:t:h?RDS:")) != -1) switch(c) { case 'c': diff --git a/usr.sbin/mtree/mtree.c b/usr.sbin/mtree/mtree.c index 349dbb9..eeef534 100644 --- a/usr.sbin/mtree/mtree.c +++ b/usr.sbin/mtree/mtree.c @@ -72,7 +72,7 @@ main(argc, argv) dir = NULL; keys = KEYDEFAULT; - while ((ch = getopt(argc, argv, "cdef:iK:k:np:rs:Uux")) != EOF) + while ((ch = getopt(argc, argv, "cdef:iK:k:np:rs:Uux")) != -1) switch((char)ch) { case 'c': cflag = 1; diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c index 0add1c4..d1c3232 100644 --- a/usr.sbin/newsyslog/newsyslog.c +++ b/usr.sbin/newsyslog/newsyslog.c @@ -25,11 +25,11 @@ provided "as is" without express or implied warranty. * keeping the a specified number of backup files around. * * $Source: /home/ncvs/src/usr.sbin/newsyslog/newsyslog.c,v $ - * $Author: jkh $ + * $Author: peter $ */ #ifndef lint -static char rcsid[] = "$Id$"; +static char rcsid[] = "$Id: newsyslog.c,v 1.9 1997/02/22 16:08:26 peter Exp $"; #endif /* not lint */ #ifndef CONF @@ -212,7 +212,7 @@ static void PRS(argc,argv) } optind = 1; /* Start options parsing */ - while ((c=getopt(argc,argv,"nrvf:t:")) != EOF) + while ((c=getopt(argc,argv,"nrvf:t:")) != -1) switch (c) { case 'n': noaction++; /* This implies needroot as off */ diff --git a/usr.sbin/pciconf/pciconf.c b/usr.sbin/pciconf/pciconf.c index 4050027..1663335 100644 --- a/usr.sbin/pciconf/pciconf.c +++ b/usr.sbin/pciconf/pciconf.c @@ -68,7 +68,7 @@ main(int argc, char **argv) listmode = readmode = writemode = attachedmode = byte = isshort = 0; - while ((c = getopt(argc, argv, "alrwbh")) != EOF) { + while ((c = getopt(argc, argv, "alrwbh")) != -1) { switch(c) { case 'a': attachedmode = 1; diff --git a/usr.sbin/pcvt/cursor/cursor.c b/usr.sbin/pcvt/cursor/cursor.c index 94ce1d7..1c7c140 100644 --- a/usr.sbin/pcvt/cursor/cursor.c +++ b/usr.sbin/pcvt/cursor/cursor.c @@ -68,7 +68,7 @@ char *argv[]; int dflag = -1; char *device; - while( (c = getopt(argc, argv, "d:n:s:e:")) != EOF) + while( (c = getopt(argc, argv, "d:n:s:e:")) != -1) { switch(c) { diff --git a/usr.sbin/pcvt/demo/playvt.c b/usr.sbin/pcvt/demo/playvt.c index a3ac9fb..b34d798 100644 --- a/usr.sbin/pcvt/demo/playvt.c +++ b/usr.sbin/pcvt/demo/playvt.c @@ -59,7 +59,7 @@ char *argv[]; int fflag = -1; char *filename; - while( (c = getopt(argc, argv, "d:f:")) != EOF) + while( (c = getopt(argc, argv, "d:f:")) != -1) { switch(c) { diff --git a/usr.sbin/pcvt/ispcvt/ispcvt.c b/usr.sbin/pcvt/ispcvt/ispcvt.c index 3e86b90..813e9dd 100644 --- a/usr.sbin/pcvt/ispcvt/ispcvt.c +++ b/usr.sbin/pcvt/ispcvt/ispcvt.c @@ -76,7 +76,7 @@ char *argv[]; int fd; char *device; - while( (c = getopt(argc, argv, "vcd:")) != EOF) + while( (c = getopt(argc, argv, "vcd:")) != -1) { switch(c) { diff --git a/usr.sbin/pcvt/kcon/kcon.c b/usr.sbin/pcvt/kcon/kcon.c index 259af90..1f9cded 100644 --- a/usr.sbin/pcvt/kcon/kcon.c +++ b/usr.sbin/pcvt/kcon/kcon.c @@ -95,7 +95,7 @@ char *argv[]; char *map; int kbfd; - while((c = getopt(argc, argv, "Rd:lm:opr:st:x")) != EOF) + while((c = getopt(argc, argv, "Rd:lm:opr:st:x")) != -1) { switch(c) { diff --git a/usr.sbin/pcvt/loadfont/loadfont.c b/usr.sbin/pcvt/loadfont/loadfont.c index bbf293f..ce4abc3 100644 --- a/usr.sbin/pcvt/loadfont/loadfont.c +++ b/usr.sbin/pcvt/loadfont/loadfont.c @@ -97,7 +97,7 @@ char *argv[]; int dflag = 0; char *device; - while( (c = getopt(argc, argv, "c:d:f:i")) != EOF) + while( (c = getopt(argc, argv, "c:d:f:i")) != -1) { switch(c) { diff --git a/usr.sbin/pcvt/mcon/mcon.c b/usr.sbin/pcvt/mcon/mcon.c index 1b88dbf..db39944 100644 --- a/usr.sbin/pcvt/mcon/mcon.c +++ b/usr.sbin/pcvt/mcon/mcon.c @@ -89,7 +89,7 @@ int main(int argc, char **argv) { int left = 0, mid = 0, right = 0, accel = 0, sticky = -1; struct mousedefs mdef; - while((c = getopt(argc, argv, "l:m:r:a:s:")) != EOF) + while((c = getopt(argc, argv, "l:m:r:a:s:")) != -1) switch(c) { case 'l': left = nametoscan(optarg); diff --git a/usr.sbin/pcvt/scon/scon.c b/usr.sbin/pcvt/scon/scon.c index 0cb053b..d42d5c4 100644 --- a/usr.sbin/pcvt/scon/scon.c +++ b/usr.sbin/pcvt/scon/scon.c @@ -196,7 +196,7 @@ char *argv[]; int c; int fd; - while( (c = getopt(argc, argv, "ac:d:f:HVlms:t:vp:18")) != EOF) + while( (c = getopt(argc, argv, "ac:d:f:HVlms:t:vp:18")) != -1) { switch(c) { diff --git a/usr.sbin/pcvt/set2061/main.c b/usr.sbin/pcvt/set2061/main.c index e16b1df..49862fa 100644 --- a/usr.sbin/pcvt/set2061/main.c +++ b/usr.sbin/pcvt/set2061/main.c @@ -63,7 +63,7 @@ char *argv[]; long freq = -1; int no = -1; - while( (c = getopt(argc, argv, "f:n:")) != EOF) + while( (c = getopt(argc, argv, "f:n:")) != -1) { switch(c) { diff --git a/usr.sbin/pcvt/userkeys/vt220keys.c b/usr.sbin/pcvt/userkeys/vt220keys.c index e5a54b5..55664c5 100644 --- a/usr.sbin/pcvt/userkeys/vt220keys.c +++ b/usr.sbin/pcvt/userkeys/vt220keys.c @@ -88,7 +88,7 @@ main(argc,argv) if(argc == 1) usage(); /* program requires options */ /* get options */ - while ((option = getopt(argc, argv, "cli")) != EOF) + while ((option = getopt(argc, argv, "cli")) != -1) switch(option) { case 'c' : diff --git a/usr.sbin/pkg_install/add/main.c b/usr.sbin/pkg_install/add/main.c index 9de0f28..9538d7f 100644 --- a/usr.sbin/pkg_install/add/main.c +++ b/usr.sbin/pkg_install/add/main.c @@ -1,5 +1,5 @@ #ifndef lint -static char *rcsid = "$Id$"; +static char *rcsid = "$Id: main.c,v 1.13 1997/02/22 16:09:18 peter Exp $"; #endif /* @@ -53,7 +53,7 @@ main(int argc, char **argv) char *prog_name = argv[0], *cp; start = argv; - while ((ch = getopt(argc, argv, Options)) != EOF) { + while ((ch = getopt(argc, argv, Options)) != -1) { switch(ch) { case 'v': Verbose = TRUE; diff --git a/usr.sbin/pkg_install/create/main.c b/usr.sbin/pkg_install/create/main.c index 0d3a685..0d8d3d1 100644 --- a/usr.sbin/pkg_install/create/main.c +++ b/usr.sbin/pkg_install/create/main.c @@ -1,5 +1,5 @@ #ifndef lint -static const char *rcsid = "$Id$"; +static const char *rcsid = "$Id: main.c,v 1.14 1997/02/22 16:09:25 peter Exp $"; #endif /* @@ -41,7 +41,7 @@ main(int argc, char **argv) char *prog_name = argv[0]; pkgs = start = argv; - while ((ch = getopt(argc, argv, Options)) != EOF) + while ((ch = getopt(argc, argv, Options)) != -1) switch(ch) { case 'v': Verbose = TRUE; diff --git a/usr.sbin/pkg_install/delete/main.c b/usr.sbin/pkg_install/delete/main.c index 08e0ac6..f9e9717 100644 --- a/usr.sbin/pkg_install/delete/main.c +++ b/usr.sbin/pkg_install/delete/main.c @@ -1,5 +1,5 @@ #ifndef lint -static char *rcsid = "$Id$"; +static char *rcsid = "$Id: main.c,v 1.8 1997/02/22 16:09:36 peter Exp $"; #endif /* @@ -41,7 +41,7 @@ main(int argc, char **argv) char *prog_name = argv[0]; pkgs = start = argv; - while ((ch = getopt(argc, argv, Options)) != EOF) + while ((ch = getopt(argc, argv, Options)) != -1) switch(ch) { case 'v': Verbose = TRUE; diff --git a/usr.sbin/pkg_install/info/main.c b/usr.sbin/pkg_install/info/main.c index 23a9370..b9801d6 100644 --- a/usr.sbin/pkg_install/info/main.c +++ b/usr.sbin/pkg_install/info/main.c @@ -1,5 +1,5 @@ #ifndef lint -static char *rcsid = "$Id$"; +static char *rcsid = "$Id: main.c,v 1.12 1997/02/22 16:09:41 peter Exp $"; #endif /* @@ -43,7 +43,7 @@ main(int argc, char **argv) char *prog_name = argv[0]; pkgs = start = argv; - while ((ch = getopt(argc, argv, Options)) != EOF) + while ((ch = getopt(argc, argv, Options)) != -1) switch(ch) { case 'a': AllInstalled = TRUE; diff --git a/usr.sbin/portmap/portmap.c b/usr.sbin/portmap/portmap.c index a05d59a..c569841 100644 --- a/usr.sbin/portmap/portmap.c +++ b/usr.sbin/portmap/portmap.c @@ -113,7 +113,7 @@ main(argc, argv) int len = sizeof(struct sockaddr_in); register struct pmaplist *pml; - while ((c = getopt(argc, argv, "dv")) != EOF) { + while ((c = getopt(argc, argv, "dv")) != -1) { switch (c) { case 'd': diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c index c98dbd1e..3c9db3b 100644 --- a/usr.sbin/pstat/pstat.c +++ b/usr.sbin/pstat/pstat.c @@ -263,7 +263,7 @@ main(argc, argv) usage = "usage: pstat [-Tfknstv] [-M core] [-N system]\n"; } - while ((ch = getopt(argc, argv, opts)) != EOF) + while ((ch = getopt(argc, argv, opts)) != -1) switch (ch) { case 'f': fileflag = 1; diff --git a/usr.sbin/pwd_mkdb/pwd_mkdb.c b/usr.sbin/pwd_mkdb/pwd_mkdb.c index 8804471..9a7fbc4 100644 --- a/usr.sbin/pwd_mkdb/pwd_mkdb.c +++ b/usr.sbin/pwd_mkdb/pwd_mkdb.c @@ -110,7 +110,7 @@ main(argc, argv) strcpy(prefix, _PATH_PWD); makeold = 0; username = NULL; - while ((ch = getopt(argc, argv, "cd:pu:v")) != EOF) + while ((ch = getopt(argc, argv, "cd:pu:v")) != -1) switch(ch) { case 'c': /* verify only */ cflag = 1; diff --git a/usr.sbin/qcamcontrol/qcamcontrol.c b/usr.sbin/qcamcontrol/qcamcontrol.c index 8df213e..e174d63 100644 --- a/usr.sbin/qcamcontrol/qcamcontrol.c +++ b/usr.sbin/qcamcontrol/qcamcontrol.c @@ -84,7 +84,7 @@ main(int argc, char **argv) x_size = y_size = zoom = depth = brightness = whitebalance = contrast = exposure = -1; - while ((opt = getopt(argc, argv, "p:x:y:z:d:b:w:c:e:")) != EOF) { + while ((opt = getopt(argc, argv, "p:x:y:z:d:b:w:c:e:")) != -1) { switch (opt) { case 'p': port = optarg; diff --git a/usr.sbin/quotaon/quotaon.c b/usr.sbin/quotaon/quotaon.c index 8eabd27..a390f65 100644 --- a/usr.sbin/quotaon/quotaon.c +++ b/usr.sbin/quotaon/quotaon.c @@ -83,7 +83,7 @@ main(argc, argv) whoami); exit(1); } - while ((ch = getopt(argc, argv, "avug")) != EOF) { + while ((ch = getopt(argc, argv, "avug")) != -1) { switch(ch) { case 'a': aflag++; diff --git a/usr.sbin/rarpd/rarpd.c b/usr.sbin/rarpd/rarpd.c index ca3a7a1..b3a494d 100644 --- a/usr.sbin/rarpd/rarpd.c +++ b/usr.sbin/rarpd/rarpd.c @@ -26,7 +26,7 @@ The Regents of the University of California. All rights reserved.\n"; #ifndef lint static const char rcsid[] = - "$Id$"; + "$Id: rarpd.c,v 1.15 1997/02/22 16:12:44 peter Exp $"; #endif /* @@ -184,7 +184,7 @@ main(argc, argv) openlog(name, LOG_PID | LOG_CONS, LOG_DAEMON); opterr = 0; - while ((op = getopt(argc, argv, "afsv")) != EOF) { + while ((op = getopt(argc, argv, "afsv")) != -1) { switch (op) { case 'a': ++aflag; diff --git a/usr.sbin/repquota/repquota.c b/usr.sbin/repquota/repquota.c index ca897a7..e8d590e 100644 --- a/usr.sbin/repquota/repquota.c +++ b/usr.sbin/repquota/repquota.c @@ -88,7 +88,7 @@ main(argc, argv) extern int optind; char ch, *qfnp; - while ((ch = getopt(argc, argv, "aguv")) != EOF) { + while ((ch = getopt(argc, argv, "aguv")) != -1) { switch(ch) { case 'a': aflag++; diff --git a/usr.sbin/rndcontrol/rndcontrol.c b/usr.sbin/rndcontrol/rndcontrol.c index 9582dd5..a03225c 100644 --- a/usr.sbin/rndcontrol/rndcontrol.c +++ b/usr.sbin/rndcontrol/rndcontrol.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: rndcontrol.c,v 1.6 1997/02/22 16:12:47 peter Exp $ + * $Id: rndcontrol.c,v 1.7 1997/03/11 15:56:09 peter Exp $ * */ @@ -61,7 +61,7 @@ main(int argc, char *argv[]) return (1); } else { - while ((ch = getopt(argc, argv, "qs:c:")) != EOF) + while ((ch = getopt(argc, argv, "qs:c:")) != -1) switch (ch) { case 'q': verbose = 0; diff --git a/usr.sbin/rpc.yppasswdd/yppasswdd_main.c b/usr.sbin/rpc.yppasswdd/yppasswdd_main.c index a5934de..8034e15 100644 --- a/usr.sbin/rpc.yppasswdd/yppasswdd_main.c +++ b/usr.sbin/rpc.yppasswdd/yppasswdd_main.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: yppasswdd_main.c,v 1.9 1997/02/22 16:12:56 peter Exp $ */ #include "yppasswd.h" @@ -72,7 +72,7 @@ struct dom_binding {}; #define _RPCSVC_CLOSEDOWN 120 #ifndef lint -static const char rcsid[] = "$Id$"; +static const char rcsid[] = "$Id: yppasswdd_main.c,v 1.9 1997/02/22 16:12:56 peter Exp $"; #endif /* not lint */ int _rpcpmstart = 0; /* Started by a port monitor ? */ static int _rpcfdtype; @@ -212,7 +212,7 @@ main(argc, argv) debug = 1; - while ((ch = getopt(argc, argv, "t:d:p:sfamuivh")) != EOF) { + while ((ch = getopt(argc, argv, "t:d:p:sfamuivh")) != -1) { switch(ch) { case 't': passfile_default = optarg; diff --git a/usr.sbin/rpc.ypxfrd/ypxfrd_main.c b/usr.sbin/rpc.ypxfrd/ypxfrd_main.c index 7781ee1..126f338 100644 --- a/usr.sbin/rpc.ypxfrd/ypxfrd_main.c +++ b/usr.sbin/rpc.ypxfrd/ypxfrd_main.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ypxfrd_main.c,v 1.3 1997/02/22 16:13:02 peter Exp $ + * $Id: ypxfrd_main.c,v 1.4 1997/03/11 15:56:48 peter Exp $ */ #include "ypxfrd.h" @@ -61,7 +61,7 @@ #define _RPCSVC_CLOSEDOWN 120 #ifndef lint -static const char rcsid[] = "$Id: ypxfrd_main.c,v 1.3 1997/02/22 16:13:02 peter Exp $"; +static const char rcsid[] = "$Id: ypxfrd_main.c,v 1.4 1997/03/11 15:56:48 peter Exp $"; #endif /* not lint */ int _rpcpmstart; /* Started by a port monitor ? */ static int _rpcfdtype; @@ -192,7 +192,7 @@ main(argc, argv) int asize = sizeof (saddr); int ch; - while ((ch = getopt(argc, argv, "p:h")) != EOF) { + while ((ch = getopt(argc, argv, "p:h")) != -1) { switch(ch) { case 'p': yp_dir = optarg; diff --git a/usr.sbin/sendmail/contrib/bitdomain.c b/usr.sbin/sendmail/contrib/bitdomain.c index 720b9a1..6f1bded 100644 --- a/usr.sbin/sendmail/contrib/bitdomain.c +++ b/usr.sbin/sendmail/contrib/bitdomain.c @@ -51,7 +51,7 @@ char **argv; { int opt; - while ((opt = getopt(argc, argv, "o:")) != EOF) { + while ((opt = getopt(argc, argv, "o:")) != -1) { switch (opt) { case 'o': if (!freopen(optarg, "w", stdout)) { diff --git a/usr.sbin/sendmail/mail.local/mail.local.c b/usr.sbin/sendmail/mail.local/mail.local.c index 9c5300a..a61cde5 100644 --- a/usr.sbin/sendmail/mail.local/mail.local.c +++ b/usr.sbin/sendmail/mail.local/mail.local.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: mail.local.c,v 1.7 1997/02/22 16:13:23 peter Exp $ */ #ifndef lint @@ -215,7 +215,7 @@ main(argc, argv) from = NULL; nobiff = 0; nofsync = 0; - while ((ch = getopt(argc, argv, "bdf:r:s")) != EOF) + while ((ch = getopt(argc, argv, "bdf:r:s")) != -1) switch(ch) { case 'b': nobiff++; diff --git a/usr.sbin/sendmail/mailstats/mailstats.c b/usr.sbin/sendmail/mailstats/mailstats.c index cf11218..3833da3 100644 --- a/usr.sbin/sendmail/mailstats/mailstats.c +++ b/usr.sbin/sendmail/mailstats/mailstats.c @@ -73,7 +73,7 @@ main(argc, argv) cfile = _PATH_SENDMAILCF; sfile = NULL; mnames = TRUE; - while ((ch = getopt(argc, argv, "C:f:o")) != EOF) + while ((ch = getopt(argc, argv, "C:f:o")) != -1) { switch (ch) { diff --git a/usr.sbin/sendmail/makemap/makemap.c b/usr.sbin/sendmail/makemap/makemap.c index 2955334..a1e73c4 100644 --- a/usr.sbin/sendmail/makemap/makemap.c +++ b/usr.sbin/sendmail/makemap/makemap.c @@ -129,7 +129,7 @@ main(argc, argv) #else #define OPTIONS "Ndforv" #endif - while ((opt = getopt(argc, argv, OPTIONS)) != EOF) + while ((opt = getopt(argc, argv, OPTIONS)) != -1) { switch (opt) { diff --git a/usr.sbin/sendmail/praliases/praliases.c b/usr.sbin/sendmail/praliases/praliases.c index 24f3185..1177164 100644 --- a/usr.sbin/sendmail/praliases/praliases.c +++ b/usr.sbin/sendmail/praliases/praliases.c @@ -69,7 +69,7 @@ main(argc, argv) #endif filename = "/etc/aliases"; - while ((ch = getopt(argc, argv, "f:")) != EOF) + while ((ch = getopt(argc, argv, "f:")) != -1) switch((char)ch) { case 'f': filename = optarg; diff --git a/usr.sbin/sendmail/rmail/rmail.c b/usr.sbin/sendmail/rmail/rmail.c index 7a33f54..f330622 100644 --- a/usr.sbin/sendmail/rmail/rmail.c +++ b/usr.sbin/sendmail/rmail/rmail.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: rmail.c,v 1.4 1997/02/22 16:13:27 peter Exp $ */ #ifndef lint @@ -105,7 +105,7 @@ main(argc, argv) debug = 0; domain = "UUCP"; /* Default "domain". */ - while ((ch = getopt(argc, argv, "D:T")) != EOF) + while ((ch = getopt(argc, argv, "D:T")) != -1) switch (ch) { case 'T': debug = 1; diff --git a/usr.sbin/sysctl/pathconf.c b/usr.sbin/sysctl/pathconf.c index 4b60ccf..8dcaf42 100644 --- a/usr.sbin/sysctl/pathconf.c +++ b/usr.sbin/sysctl/pathconf.c @@ -85,7 +85,7 @@ main(argc, argv) char *path; int ch; - while ((ch = getopt(argc, argv, "Aan")) != EOF) { + while ((ch = getopt(argc, argv, "Aan")) != -1) { switch (ch) { case 'A': diff --git a/usr.sbin/sysctl/sysctl.c b/usr.sbin/sysctl/sysctl.c index 2279e30..b1629f0 100644 --- a/usr.sbin/sysctl/sysctl.c +++ b/usr.sbin/sysctl/sysctl.c @@ -40,7 +40,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "From: @(#)sysctl.c 8.1 (Berkeley) 6/6/93"; */ static const char rcsid[] = - "$Id$"; + "$Id: sysctl.c,v 1.12 1997/02/22 16:13:58 peter Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -85,7 +85,7 @@ main(int argc, char **argv) setbuf(stdout,0); setbuf(stderr,0); - while ((ch = getopt(argc, argv, "AabnwX")) != EOF) { + while ((ch = getopt(argc, argv, "AabnwX")) != -1) { switch (ch) { case 'A': Aflag = 1; break; case 'a': aflag = 1; break; diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 2bc9c76..77147d5 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -39,7 +39,7 @@ static const char copyright[] = static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; */ static const char rcsid[] = - "$Id: syslogd.c,v 1.20 1997/02/22 16:14:00 peter Exp $"; + "$Id: syslogd.c,v 1.21 1997/03/14 01:27:02 joerg Exp $"; #endif /* not lint */ /* @@ -260,7 +260,7 @@ main(argc, argv) struct timeval tv, *tvp; pid_t ppid; - while ((ch = getopt(argc, argv, "dsf:Im:p:")) != EOF) + while ((ch = getopt(argc, argv, "dsf:Im:p:")) != -1) switch(ch) { case 'd': /* debug */ Debug++; diff --git a/usr.sbin/tcpdump/tcpslice/tcpslice.c b/usr.sbin/tcpdump/tcpslice/tcpslice.c index 2c807f6..d0abf26 100644 --- a/usr.sbin/tcpdump/tcpslice/tcpslice.c +++ b/usr.sbin/tcpdump/tcpslice/tcpslice.c @@ -22,7 +22,7 @@ char copyright[] = "@(#) Copyright (c) 1987-1990 The Regents of the University of California.\nAll rights reserved.\n"; static char rcsid[] = - "@(#)$Header: /home/ncvs/src/usr.sbin/tcpdump/tcpslice/tcpslice.c,v 1.2 1995/03/08 12:53:40 olah Exp $ (LBL)"; + "@(#)$Header: /home/ncvs/src/usr.sbin/tcpdump/tcpslice/tcpslice.c,v 1.3 1995/08/23 05:18:59 pst Exp $ (LBL)"; #endif /* @@ -81,7 +81,7 @@ main(int argc, char **argv) program_name = argv[0]; opterr = 0; - while ((op = getopt(argc, argv, "dRrtw:")) != EOF) + while ((op = getopt(argc, argv, "dRrtw:")) != -1) switch (op) { case 'd': diff --git a/usr.sbin/timed/timed/timed.c b/usr.sbin/timed/timed/timed.c index e134a27..997e492 100644 --- a/usr.sbin/timed/timed/timed.c +++ b/usr.sbin/timed/timed/timed.c @@ -42,7 +42,7 @@ static char sccsid[] = "@(#)timed.c 8.1 (Berkeley) 6/6/93"; #endif /* not lint */ #ifdef sgi -#ident "$Revision: 1.1.1.1 $" +#ident "$Revision: 1.2 $" #endif /* sgi */ #define TSPTYPES @@ -185,7 +185,7 @@ main(argc, argv) #endif /* sgi */ opterr = 0; - while ((c = getopt(argc, argv, "Mtdn:i:F:G:P:")) != EOF) { + while ((c = getopt(argc, argv, "Mtdn:i:F:G:P:")) != -1) { switch (c) { case 'M': Mflag = 1; diff --git a/usr.sbin/trpt/trpt.c b/usr.sbin/trpt/trpt.c index 5e351fa..55c0f6d 100644 --- a/usr.sbin/trpt/trpt.c +++ b/usr.sbin/trpt/trpt.c @@ -114,7 +114,7 @@ main(argc, argv) off_t lseek(); jflag = npcbs = 0; - while ((ch = getopt(argc, argv, "afjp:st")) != EOF) + while ((ch = getopt(argc, argv, "afjp:st")) != -1) switch (ch) { case 'a': ++aflag; diff --git a/usr.sbin/vipw/vipw.c b/usr.sbin/vipw/vipw.c index 08d7833..45ee55d 100644 --- a/usr.sbin/vipw/vipw.c +++ b/usr.sbin/vipw/vipw.c @@ -67,7 +67,7 @@ main(argc, argv) struct stat begin, end; int ch; - while ((ch = getopt(argc, argv, "")) != EOF) + while ((ch = getopt(argc, argv, "")) != -1) switch (ch) { case '?': default: diff --git a/usr.sbin/vnconfig/vnconfig.c b/usr.sbin/vnconfig/vnconfig.c index 7538a71..0f112cf 100644 --- a/usr.sbin/vnconfig/vnconfig.c +++ b/usr.sbin/vnconfig/vnconfig.c @@ -92,7 +92,7 @@ main(argc, argv) pname = argv[0]; configfile = _PATH_VNTAB; - while ((i = getopt(argc, argv, "acdef:gr:s:uv")) != EOF) + while ((i = getopt(argc, argv, "acdef:gr:s:uv")) != -1) switch (i) { /* all -- use config file */ diff --git a/usr.sbin/watch/watch.c b/usr.sbin/watch/watch.c index e215ac8..ce5be37 100644 --- a/usr.sbin/watch/watch.c +++ b/usr.sbin/watch/watch.c @@ -291,7 +291,7 @@ main(ac, av) opt_interactive = 0; - while ((ch = getopt(ac, av, "Wciotn")) != EOF) + while ((ch = getopt(ac, av, "Wciotn")) != -1) switch (ch) { case 'W': opt_write = 1; diff --git a/usr.sbin/wormcontrol/wormcontrol.c b/usr.sbin/wormcontrol/wormcontrol.c index a29a797..47673cb 100644 --- a/usr.sbin/wormcontrol/wormcontrol.c +++ b/usr.sbin/wormcontrol/wormcontrol.c @@ -32,7 +32,7 @@ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * - * $Id$ + * $Id: wormcontrol.c,v 1.4 1997/02/22 16:14:12 peter Exp $ * */ @@ -69,7 +69,7 @@ main(int argc, char **argv) int errs = 0; const char *devname = "/dev/rworm0"; - while ((c = getopt(argc, argv, "f:")) != EOF) + while ((c = getopt(argc, argv, "f:")) != -1) switch(c) { case 'f': devname = optarg; diff --git a/usr.sbin/yp_mkdb/yp_mkdb.c b/usr.sbin/yp_mkdb/yp_mkdb.c index 89b0377..0ce8b58 100644 --- a/usr.sbin/yp_mkdb/yp_mkdb.c +++ b/usr.sbin/yp_mkdb/yp_mkdb.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: yp_mkdb.c,v 1.6 1997/02/22 16:14:50 peter Exp $ */ #include <stdio.h> @@ -50,7 +50,7 @@ #include "ypxfr_extern.h" #ifndef lint -static const char rcsid[] = "$Id$"; +static const char rcsid[] = "$Id: yp_mkdb.c,v 1.6 1997/02/22 16:14:50 peter Exp $"; #endif char *yp_dir = ""; /* No particular default needed. */ @@ -121,7 +121,7 @@ main (argc, argv) FILE *ifp; char hname[MAXHOSTNAMELEN + 2]; - while ((ch = getopt(argc, argv, "uhcbsd:i:o:m:")) != EOF) { + while ((ch = getopt(argc, argv, "uhcbsd:i:o:m:")) != -1) { switch(ch) { case 'u': un++; diff --git a/usr.sbin/yppush/yppush_main.c b/usr.sbin/yppush/yppush_main.c index 12a9145..dedfaa7 100644 --- a/usr.sbin/yppush/yppush_main.c +++ b/usr.sbin/yppush/yppush_main.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: yppush_main.c,v 1.7 1997/02/22 16:15:02 peter Exp $ */ #include <stdio.h> @@ -53,7 +53,7 @@ struct dom_binding {}; #include "yppush_extern.h" #ifndef lint -static const char rcsid[] = "$Id$"; +static const char rcsid[] = "$Id: yppush_main.c,v 1.7 1997/02/22 16:15:02 peter Exp $"; #endif char *progname = "yppush"; @@ -544,7 +544,7 @@ main(argc,argv) struct hostlist *tmp; struct sigaction sa; - while ((ch = getopt(argc, argv, "d:j:p:h:t:v")) != EOF) { + while ((ch = getopt(argc, argv, "d:j:p:h:t:v")) != -1) { switch(ch) { case 'd': yppush_domain = optarg; diff --git a/usr.sbin/ypserv/yp_main.c b/usr.sbin/ypserv/yp_main.c index 2013396..1ec048f 100644 --- a/usr.sbin/ypserv/yp_main.c +++ b/usr.sbin/ypserv/yp_main.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: yp_main.c,v 1.14 1997/02/22 16:15:12 peter Exp $ */ /* @@ -66,7 +66,7 @@ #define _RPCSVC_CLOSEDOWN 120 #ifndef lint -static const char rcsid[] = "$Id$"; +static const char rcsid[] = "$Id: yp_main.c,v 1.14 1997/02/22 16:15:12 peter Exp $"; #endif /* not lint */ int _rpcpmstart; /* Started by a port monitor ? */ static int _rpcfdtype; @@ -224,7 +224,7 @@ main(argc, argv) int asize = sizeof (saddr); int ch; - while ((ch = getopt(argc, argv, "hdnp:")) != EOF) { + while ((ch = getopt(argc, argv, "hdnp:")) != -1) { switch(ch) { case 'd': debug = ypdb_debug = 1; diff --git a/usr.sbin/zic/zic.c b/usr.sbin/zic/zic.c index 6034b6b..85e4eb9 100644 --- a/usr.sbin/zic/zic.c +++ b/usr.sbin/zic/zic.c @@ -476,7 +476,7 @@ char * argv[]; (void) textdomain(TZ_DOMAIN); #endif /* HAVE_GETTEXT - 0 */ progname = argv[0]; - while ((c = getopt(argc, argv, "d:l:p:L:vsy:")) != EOF) + while ((c = getopt(argc, argv, "d:l:p:L:vsy:")) != -1) switch (c) { default: usage(); |