From 552d265b6ced1e56d31f20f16a7fe9ae818d568b Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 15 Jan 1997 23:44:39 +0000 Subject: getopt(3) returns -1 when out of args, not EOF, whee! --- usr.bin/apply/apply.c | 6 +++--- usr.bin/apropos/apropos.c | 6 +++--- usr.bin/ar/ar.c | 6 +++--- usr.bin/at/at.c | 6 +++--- usr.bin/bdes/bdes.c | 6 +++--- usr.bin/biff/biff.c | 6 +++--- usr.bin/cal/cal.c | 6 +++--- usr.bin/calendar/calendar.c | 6 +++--- usr.bin/cap_mkdb/cap_mkdb.c | 6 +++--- usr.bin/chpass/chpass.c | 6 +++--- usr.bin/cmp/cmp.c | 6 +++--- usr.bin/col/col.c | 6 +++--- usr.bin/colrm/colrm.c | 6 +++--- usr.bin/column/column.c | 6 +++--- usr.bin/compress/compress.c | 6 +++--- usr.bin/ctags/ctags.c | 6 +++--- usr.bin/cut/cut.c | 6 +++--- usr.bin/du/du.c | 6 +++--- usr.bin/elf2olf/elf2olf.c | 6 +++--- usr.bin/file/file.c | 6 +++--- usr.bin/find/main.c | 6 +++--- usr.bin/finger/finger.c | 6 +++--- usr.bin/from/from.c | 6 +++--- usr.bin/fstat/fstat.c | 6 +++--- usr.bin/ftp/main.c | 6 +++--- usr.bin/getopt/getopt.c | 6 +++--- usr.bin/head/head.c | 6 +++--- usr.bin/hexdump/hexsyntax.c | 6 +++--- usr.bin/hexdump/odsyntax.c | 6 +++--- usr.bin/id/id.c | 6 +++--- usr.bin/info_mkdb/info_mkdb.c | 6 +++--- usr.bin/ipcs/ipcs.c | 4 ++-- usr.bin/join/join.c | 6 +++--- usr.bin/ktrace/ktrace.c | 6 +++--- usr.bin/last/last.c | 6 +++--- usr.bin/lastcomm/lastcomm.c | 6 +++--- usr.bin/locate/code/locate.code.c | 8 ++++---- usr.bin/locate/locate/locate.c | 8 ++++---- usr.bin/lock/lock.c | 6 +++--- usr.bin/logger/logger.c | 6 +++--- usr.bin/login/login.c | 6 +++--- usr.bin/logname/logname.c | 6 +++--- usr.bin/look/look.c | 6 +++--- usr.bin/m4/main.c | 6 +++--- usr.bin/mail/main.c | 6 +++--- usr.bin/make/main.c | 6 +++--- usr.bin/man/man.c | 6 +++--- usr.bin/mesg/mesg.c | 6 +++--- usr.bin/modstat/modstat.c | 4 ++-- usr.bin/nc/netcat.c | 2 +- usr.bin/netstat/main.c | 6 +++--- usr.bin/newsyslog/newsyslog.c | 6 +++--- usr.bin/nfsstat/nfsstat.c | 6 +++--- usr.bin/nm/nm.c | 6 +++--- usr.bin/passwd/passwd.c | 6 +++--- usr.bin/paste/paste.c | 6 +++--- usr.bin/pr/pr.c | 6 +++--- usr.bin/ranlib/ranlib.c | 6 +++--- usr.bin/rev/rev.c | 6 +++--- usr.bin/rlogin/rlogin.c | 6 +++--- usr.bin/rpcinfo/rpcinfo.c | 6 +++--- usr.bin/rsh/rsh.c | 6 +++--- usr.bin/ruptime/ruptime.c | 6 +++--- usr.bin/rwho/rwho.c | 6 +++--- usr.bin/script/script.c | 6 +++--- usr.bin/sed/main.c | 6 +++--- usr.bin/size/size.c | 6 +++--- usr.bin/split/split.c | 6 +++--- usr.bin/strip/strip.c | 6 +++--- usr.bin/su/su.c | 6 +++--- usr.bin/systat/main.c | 6 +++--- usr.bin/tail/tail.c | 6 +++--- usr.bin/tcopy/tcopy.c | 6 +++--- usr.bin/telnet/main.c | 6 +++--- usr.bin/time/time.c | 6 +++--- usr.bin/touch/touch.c | 6 +++--- usr.bin/tput/tput.c | 6 +++--- usr.bin/tr/tr.c | 6 +++--- usr.bin/tset/tset.c | 6 +++--- usr.bin/tsort/tsort.c | 6 +++--- usr.bin/ul/ul.c | 6 +++--- usr.bin/uniq/uniq.c | 6 +++--- usr.bin/unvis/unvis.c | 6 +++--- usr.bin/users/users.c | 6 +++--- usr.bin/vacation/vacation.c | 6 +++--- usr.bin/vi/common/main.c | 4 ++-- usr.bin/vis/vis.c | 6 +++--- usr.bin/vmstat/vmstat.c | 4 ++-- usr.bin/w/w.c | 4 ++-- usr.bin/wall/wall.c | 6 +++--- usr.bin/whatis/whatis.c | 4 ++-- usr.bin/whereis/whereis.c | 6 +++--- usr.bin/whois/whois.c | 6 +++--- usr.bin/xargs/xargs.c | 6 +++--- usr.bin/xinstall/xinstall.c | 6 +++--- 95 files changed, 279 insertions(+), 279 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/apply/apply.c b/usr.bin/apply/apply.c index 329aa32797c..1226bfd5777 100644 --- a/usr.bin/apply/apply.c +++ b/usr.bin/apply/apply.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apply.c,v 1.2 1996/06/26 05:31:13 deraadt Exp $ */ +/* $OpenBSD: apply.c,v 1.3 1997/01/15 23:42:09 millert Exp $ */ /* $NetBSD: apply.c,v 1.3 1995/03/25 03:38:23 glass Exp $ */ /*- @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)apply.c 8.4 (Berkeley) 4/4/94"; #else -static char rcsid[] = "$OpenBSD: apply.c,v 1.2 1996/06/26 05:31:13 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: apply.c,v 1.3 1997/01/15 23:42:09 millert Exp $"; #endif #endif /* not lint */ @@ -70,7 +70,7 @@ main(argc, argv) debug = 0; magic = '%'; /* Default magic char is `%'. */ nargs = -1; - while ((ch = getopt(argc, argv, "a:d0123456789")) != EOF) + while ((ch = getopt(argc, argv, "a:d0123456789")) != -1) switch (ch) { case 'a': if (optarg[1] != '\0') diff --git a/usr.bin/apropos/apropos.c b/usr.bin/apropos/apropos.c index 2d233702c8c..0992e011c69 100644 --- a/usr.bin/apropos/apropos.c +++ b/usr.bin/apropos/apropos.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apropos.c,v 1.3 1996/10/25 06:27:42 downsj Exp $ */ +/* $OpenBSD: apropos.c,v 1.4 1997/01/15 23:42:10 millert Exp $ */ /* $NetBSD: apropos.c,v 1.5 1995/09/04 20:46:20 tls Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)apropos.c 8.8 (Berkeley) 5/4/95"; #else -static char rcsid[] = "$OpenBSD: apropos.c,v 1.3 1996/10/25 06:27:42 downsj Exp $"; +static char rcsid[] = "$OpenBSD: apropos.c,v 1.4 1997/01/15 23:42:10 millert Exp $"; #endif #endif /* not lint */ @@ -81,7 +81,7 @@ main(argc, argv) conffile = NULL; p_augment = p_path = NULL; - while ((ch = getopt(argc, argv, "C:M:m:P:")) != EOF) + while ((ch = getopt(argc, argv, "C:M:m:P:")) != -1) switch (ch) { case 'C': conffile = optarg; diff --git a/usr.bin/ar/ar.c b/usr.bin/ar/ar.c index 4de5e562911..a6da84ff8de 100644 --- a/usr.bin/ar/ar.c +++ b/usr.bin/ar/ar.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ar.c,v 1.2 1996/06/26 05:31:18 deraadt Exp $ */ +/* $OpenBSD: ar.c,v 1.3 1997/01/15 23:42:11 millert Exp $ */ /* $NetBSD: ar.c,v 1.5 1995/03/26 03:27:44 glass Exp $ */ /*- @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)ar.c 8.3 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: ar.c,v 1.2 1996/06/26 05:31:18 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ar.c,v 1.3 1997/01/15 23:42:11 millert Exp $"; #endif #endif /* not lint */ @@ -101,7 +101,7 @@ main(argc, argv) argv[1] = p; } - while ((c = getopt(argc, argv, "abcdilmopqrTtuvx")) != EOF) { + while ((c = getopt(argc, argv, "abcdilmopqrTtuvx")) != -1) { switch(c) { case 'a': options |= AR_A; diff --git a/usr.bin/at/at.c b/usr.bin/at/at.c index 79d12402730..75ad2116238 100644 --- a/usr.bin/at/at.c +++ b/usr.bin/at/at.c @@ -1,4 +1,4 @@ -/* $OpenBSD: at.c,v 1.5 1996/10/26 20:06:50 millert Exp $ */ +/* $OpenBSD: at.c,v 1.6 1997/01/15 23:42:12 millert Exp $ */ /* $NetBSD: at.c,v 1.4 1995/03/25 18:13:31 glass Exp $ */ /* @@ -65,7 +65,7 @@ /* File scope variables */ #ifndef lint -static char rcsid[] = "$OpenBSD: at.c,v 1.5 1996/10/26 20:06:50 millert Exp $"; +static char rcsid[] = "$OpenBSD: at.c,v 1.6 1997/01/15 23:42:12 millert Exp $"; #endif char *no_export[] = @@ -495,7 +495,7 @@ main(argc, argv) /* process whatever options we can process */ opterr = 1; - while ((c = getopt(argc, argv, options)) != EOF) + while ((c = getopt(argc, argv, options)) != -1) switch (c) { case 'v': /* verify time settings */ atverify = 1; diff --git a/usr.bin/bdes/bdes.c b/usr.bin/bdes/bdes.c index db7dccea77d..b2d3a5df3e7 100644 --- a/usr.bin/bdes/bdes.c +++ b/usr.bin/bdes/bdes.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bdes.c,v 1.2 1996/06/26 05:31:39 deraadt Exp $ */ +/* $OpenBSD: bdes.c,v 1.3 1997/01/15 23:42:13 millert Exp $ */ /* $NetBSD: bdes.c,v 1.2 1995/03/26 03:33:19 glass Exp $ */ /*- @@ -51,7 +51,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)bdes.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: bdes.c,v 1.2 1996/06/26 05:31:39 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: bdes.c,v 1.3 1997/01/15 23:42:13 millert Exp $"; #endif #endif /* not lint */ @@ -195,7 +195,7 @@ main(ac, av) /* process the argument list */ kflag = 0; - while ((i = getopt(argc, argv, "abdF:f:k:m:o:pv:")) != EOF) + while ((i = getopt(argc, argv, "abdF:f:k:m:o:pv:")) != -1) switch(i) { case 'a': /* key is ASCII */ keybase = KEY_ASCII; diff --git a/usr.bin/biff/biff.c b/usr.bin/biff/biff.c index 52ebc42187f..7c927f52367 100644 --- a/usr.bin/biff/biff.c +++ b/usr.bin/biff/biff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: biff.c,v 1.2 1996/06/26 05:31:41 deraadt Exp $ */ +/* $OpenBSD: biff.c,v 1.3 1997/01/15 23:42:14 millert Exp $ */ /* $NetBSD: biff.c,v 1.3 1995/03/26 02:34:22 glass Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)biff.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: biff.c,v 1.2 1996/06/26 05:31:41 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: biff.c,v 1.3 1997/01/15 23:42:14 millert Exp $"; #endif #endif /* not lint */ @@ -69,7 +69,7 @@ main(argc, argv) char *name; - while ((ch = getopt(argc, argv, "")) != EOF) + while ((ch = getopt(argc, argv, "")) != -1) switch(ch) { case '?': default: diff --git a/usr.bin/cal/cal.c b/usr.bin/cal/cal.c index e385b332e7d..27234bc8a7b 100644 --- a/usr.bin/cal/cal.c +++ b/usr.bin/cal/cal.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cal.c,v 1.3 1996/08/11 00:46:44 deraadt Exp $ */ +/* $OpenBSD: cal.c,v 1.4 1997/01/15 23:42:15 millert Exp $ */ /* $NetBSD: cal.c,v 1.6 1995/03/26 03:10:24 glass Exp $ */ /* @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)cal.c 8.4 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: cal.c,v 1.3 1996/08/11 00:46:44 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: cal.c,v 1.4 1997/01/15 23:42:15 millert Exp $"; #endif #endif /* not lint */ @@ -146,7 +146,7 @@ main(argc, argv) int ch, month, year, yflag; yflag = 0; - while ((ch = getopt(argc, argv, "jy")) != EOF) + while ((ch = getopt(argc, argv, "jy")) != -1) switch(ch) { case 'j': julian = 1; diff --git a/usr.bin/calendar/calendar.c b/usr.bin/calendar/calendar.c index 3259a568edc..b08638f4990 100644 --- a/usr.bin/calendar/calendar.c +++ b/usr.bin/calendar/calendar.c @@ -1,4 +1,4 @@ -/* $OpenBSD: calendar.c,v 1.5 1996/12/05 06:04:38 millert Exp $ */ +/* $OpenBSD: calendar.c,v 1.6 1997/01/15 23:42:16 millert Exp $ */ /* * Copyright (c) 1989, 1993, 1994 @@ -43,7 +43,7 @@ static const char copyright[] = #if 0 static const char sccsid[] = "@(#)calendar.c 8.3 (Berkeley) 3/25/94"; #else -static char rcsid[] = "$OpenBSD: calendar.c,v 1.5 1996/12/05 06:04:38 millert Exp $"; +static char rcsid[] = "$OpenBSD: calendar.c,v 1.6 1997/01/15 23:42:16 millert Exp $"; #endif #endif /* not lint */ @@ -77,7 +77,7 @@ main(argc, argv) (void) setlocale(LC_ALL, ""); - while ((ch = getopt(argc, argv, "?-af:t:A:B:")) != EOF) + while ((ch = getopt(argc, argv, "?-af:t:A:B:")) != -1) switch (ch) { case '-': /* backward contemptible */ case 'a': diff --git a/usr.bin/cap_mkdb/cap_mkdb.c b/usr.bin/cap_mkdb/cap_mkdb.c index a1789a5a822..ed340c9b3e2 100644 --- a/usr.bin/cap_mkdb/cap_mkdb.c +++ b/usr.bin/cap_mkdb/cap_mkdb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cap_mkdb.c,v 1.2 1996/06/26 05:31:48 deraadt Exp $ */ +/* $OpenBSD: cap_mkdb.c,v 1.3 1997/01/15 23:42:17 millert Exp $ */ /* $NetBSD: cap_mkdb.c,v 1.5 1995/09/02 05:47:12 jtc Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)cap_mkdb.c 8.2 (Berkeley) 4/27/95"; #endif -static char rcsid[] = "$OpenBSD: cap_mkdb.c,v 1.2 1996/06/26 05:31:48 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: cap_mkdb.c,v 1.3 1997/01/15 23:42:17 millert Exp $"; #endif /* not lint */ #include @@ -92,7 +92,7 @@ main(argc, argv) int c; capname = NULL; - while ((c = getopt(argc, argv, "f:v")) != EOF) { + while ((c = getopt(argc, argv, "f:v")) != -1) { switch(c) { case 'f': capname = optarg; diff --git a/usr.bin/chpass/chpass.c b/usr.bin/chpass/chpass.c index abab951236f..d2701075dee 100644 --- a/usr.bin/chpass/chpass.c +++ b/usr.bin/chpass/chpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: chpass.c,v 1.6 1996/10/20 23:45:50 millert Exp $ */ +/* $OpenBSD: chpass.c,v 1.7 1997/01/15 23:42:18 millert Exp $ */ /* $NetBSD: chpass.c,v 1.8 1996/05/15 21:50:43 jtc Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)chpass.c 8.4 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: chpass.c,v 1.6 1996/10/20 23:45:50 millert Exp $"; +static char rcsid[] = "$OpenBSD: chpass.c,v 1.7 1997/01/15 23:42:18 millert Exp $"; #endif #endif /* not lint */ @@ -95,7 +95,7 @@ main(argc, argv) #endif op = EDITENTRY; - while ((ch = getopt(argc, argv, "a:s:ly")) != EOF) + while ((ch = getopt(argc, argv, "a:s:ly")) != -1) switch(ch) { case 'a': op = LOADENTRY; diff --git a/usr.bin/cmp/cmp.c b/usr.bin/cmp/cmp.c index 9df77c0736c..80b7b8ed7c6 100644 --- a/usr.bin/cmp/cmp.c +++ b/usr.bin/cmp/cmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmp.c,v 1.4 1996/08/01 00:29:10 michaels Exp $ */ +/* $OpenBSD: cmp.c,v 1.5 1997/01/15 23:42:19 millert Exp $ */ /* $NetBSD: cmp.c,v 1.7 1995/09/08 03:22:56 tls Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)cmp.c 8.3 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: cmp.c,v 1.4 1996/08/01 00:29:10 michaels Exp $"; +static char rcsid[] = "$OpenBSD: cmp.c,v 1.5 1997/01/15 23:42:19 millert Exp $"; #endif #endif /* not lint */ @@ -77,7 +77,7 @@ main(argc, argv) setlocale(LC_ALL, ""); - while ((ch = getopt(argc, argv, "ls")) != EOF) + while ((ch = getopt(argc, argv, "ls")) != -1) switch (ch) { case 'l': /* print all differences */ lflag = 1; diff --git a/usr.bin/col/col.c b/usr.bin/col/col.c index fe4067d7687..835b6d8b512 100644 --- a/usr.bin/col/col.c +++ b/usr.bin/col/col.c @@ -1,4 +1,4 @@ -/* $OpenBSD: col.c,v 1.2 1996/06/26 05:32:10 deraadt Exp $ */ +/* $OpenBSD: col.c,v 1.3 1997/01/15 23:42:20 millert Exp $ */ /* $NetBSD: col.c,v 1.7 1995/09/02 05:48:50 jtc Exp $ */ /*- @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)col.c 8.5 (Berkeley) 5/4/95"; #endif -static char rcsid[] = "$OpenBSD: col.c,v 1.2 1996/06/26 05:32:10 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: col.c,v 1.3 1997/01/15 23:42:20 millert Exp $"; #endif /* not lint */ #include @@ -135,7 +135,7 @@ main(argc, argv) max_bufd_lines = 128; compress_spaces = 1; /* compress spaces into tabs */ - while ((opt = getopt(argc, argv, "bfhl:x")) != EOF) + while ((opt = getopt(argc, argv, "bfhl:x")) != -1) switch (opt) { case 'b': /* do not output backspaces */ no_backspaces = 1; diff --git a/usr.bin/colrm/colrm.c b/usr.bin/colrm/colrm.c index 540eda01408..0c164a7d57c 100644 --- a/usr.bin/colrm/colrm.c +++ b/usr.bin/colrm/colrm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: colrm.c,v 1.2 1996/06/26 05:32:14 deraadt Exp $ */ +/* $OpenBSD: colrm.c,v 1.3 1997/01/15 23:42:21 millert Exp $ */ /* $NetBSD: colrm.c,v 1.4 1995/09/02 05:51:37 jtc Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)colrm.c 8.2 (Berkeley) 5/4/95"; #endif -static char rcsid[] = "$OpenBSD: colrm.c,v 1.2 1996/06/26 05:32:14 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: colrm.c,v 1.3 1997/01/15 23:42:21 millert Exp $"; #endif /* not lint */ #include @@ -71,7 +71,7 @@ main(argc, argv) register int ch; char *p; - while ((ch = getopt(argc, argv, "")) != EOF) + while ((ch = getopt(argc, argv, "")) != -1) switch(ch) { case '?': default: diff --git a/usr.bin/column/column.c b/usr.bin/column/column.c index 6faa84b0c0c..15ea133659d 100644 --- a/usr.bin/column/column.c +++ b/usr.bin/column/column.c @@ -1,4 +1,4 @@ -/* $OpenBSD: column.c,v 1.2 1996/06/26 05:32:16 deraadt Exp $ */ +/* $OpenBSD: column.c,v 1.3 1997/01/15 23:42:21 millert Exp $ */ /* $NetBSD: column.c,v 1.4 1995/09/02 05:53:03 jtc Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)column.c 8.4 (Berkeley) 5/4/95"; #endif -static char rcsid[] = "$OpenBSD: column.c,v 1.2 1996/06/26 05:32:16 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: column.c,v 1.3 1997/01/15 23:42:21 millert Exp $"; #endif /* not lint */ #include @@ -91,7 +91,7 @@ main(argc, argv) termwidth = win.ws_col; tflag = xflag = 0; - while ((ch = getopt(argc, argv, "c:s:tx")) != EOF) + while ((ch = getopt(argc, argv, "c:s:tx")) != -1) switch(ch) { case 'c': termwidth = atoi(optarg); diff --git a/usr.bin/compress/compress.c b/usr.bin/compress/compress.c index cb1fb339ea9..565532d286c 100644 --- a/usr.bin/compress/compress.c +++ b/usr.bin/compress/compress.c @@ -1,4 +1,4 @@ -/* $OpenBSD: compress.c,v 1.2 1996/06/26 05:32:20 deraadt Exp $ */ +/* $OpenBSD: compress.c,v 1.3 1997/01/15 23:42:22 millert Exp $ */ /* $NetBSD: compress.c,v 1.9 1995/03/26 09:44:38 glass Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)compress.c 8.2 (Berkeley) 1/7/94"; #else -static char rcsid[] = "$OpenBSD: compress.c,v 1.2 1996/06/26 05:32:20 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: compress.c,v 1.3 1997/01/15 23:42:22 millert Exp $"; #endif #endif /* not lint */ @@ -99,7 +99,7 @@ main(argc, argv) errx(1, "unknown program name"); bits = cat = 0; - while ((ch = getopt(argc, argv, "b:cdfv")) != EOF) + while ((ch = getopt(argc, argv, "b:cdfv")) != -1) switch(ch) { case 'b': bits = strtol(optarg, &p, 10); diff --git a/usr.bin/ctags/ctags.c b/usr.bin/ctags/ctags.c index c352bdb8aaf..aa4aa1c6268 100644 --- a/usr.bin/ctags/ctags.c +++ b/usr.bin/ctags/ctags.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ctags.c,v 1.2 1996/06/26 05:32:28 deraadt Exp $ */ +/* $OpenBSD: ctags.c,v 1.3 1997/01/15 23:42:23 millert Exp $ */ /* $NetBSD: ctags.c,v 1.4 1995/09/02 05:57:23 jtc Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)ctags.c 8.4 (Berkeley) 2/7/95"; #endif -static char rcsid[] = "$OpenBSD: ctags.c,v 1.2 1996/06/26 05:32:28 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ctags.c,v 1.3 1997/01/15 23:42:23 millert Exp $"; #endif /* not lint */ #include @@ -98,7 +98,7 @@ main(argc, argv) char cmd[100]; /* too ugly to explain */ aflag = uflag = NO; - while ((ch = getopt(argc, argv, "BFadf:tuwvx")) != EOF) + while ((ch = getopt(argc, argv, "BFadf:tuwvx")) != -1) switch(ch) { case 'B': searchar = '?'; diff --git a/usr.bin/cut/cut.c b/usr.bin/cut/cut.c index 052e2efc477..86592253161 100644 --- a/usr.bin/cut/cut.c +++ b/usr.bin/cut/cut.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cut.c,v 1.2 1996/06/26 05:32:34 deraadt Exp $ */ +/* $OpenBSD: cut.c,v 1.3 1997/01/15 23:42:24 millert Exp $ */ /* $NetBSD: cut.c,v 1.9 1995/09/02 05:59:23 jtc Exp $ */ /* @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)cut.c 8.3 (Berkeley) 5/4/95"; #endif -static char rcsid[] = "$OpenBSD: cut.c,v 1.2 1996/06/26 05:32:34 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: cut.c,v 1.3 1997/01/15 23:42:24 millert Exp $"; #endif /* not lint */ #include @@ -86,7 +86,7 @@ main(argc, argv) /* Since we don't support multi-byte characters, the -c and -b options are equivalent, and the -n option is meaningless. */ - while ((ch = getopt(argc, argv, "b:c:d:f:sn")) != EOF) + while ((ch = getopt(argc, argv, "b:c:d:f:sn")) != -1) switch(ch) { case 'b': case 'c': diff --git a/usr.bin/du/du.c b/usr.bin/du/du.c index 31771abb7a9..1cdc80fcbcb 100644 --- a/usr.bin/du/du.c +++ b/usr.bin/du/du.c @@ -1,4 +1,4 @@ -/* $OpenBSD: du.c,v 1.3 1996/10/18 18:16:07 millert Exp $ */ +/* $OpenBSD: du.c,v 1.4 1997/01/15 23:42:25 millert Exp $ */ /* $NetBSD: du.c,v 1.11 1996/10/18 07:20:35 thorpej Exp $ */ /* @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)du.c 8.5 (Berkeley) 5/4/95"; #else -static char rcsid[] = "$OpenBSD: du.c,v 1.3 1996/10/18 18:16:07 millert Exp $"; +static char rcsid[] = "$OpenBSD: du.c,v 1.4 1997/01/15 23:42:25 millert Exp $"; #endif #endif /* not lint */ @@ -82,7 +82,7 @@ main(argc, argv) Hflag = Lflag = Pflag = aflag = cflag = kflag = sflag = 0; totalblocks = 0; ftsoptions = FTS_PHYSICAL; - while ((ch = getopt(argc, argv, "HLPacksx")) != EOF) + while ((ch = getopt(argc, argv, "HLPacksx")) != -1) switch (ch) { case 'H': Hflag = 1; diff --git a/usr.bin/elf2olf/elf2olf.c b/usr.bin/elf2olf/elf2olf.c index 37297cfc8f1..af8c1931c64 100644 --- a/usr.bin/elf2olf/elf2olf.c +++ b/usr.bin/elf2olf/elf2olf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: elf2olf.c,v 1.3 1996/12/09 07:10:14 deraadt Exp $ */ +/* $OpenBSD: elf2olf.c,v 1.4 1997/01/15 23:42:46 millert Exp $ */ /* * Copyright (c) 1996 Erik Theisen. All rights reserved. * @@ -30,7 +30,7 @@ static char copyright[] = #endif /* not lint */ #ifndef lint -static char rcsid[] = "@(#) $Id: elf2olf.c,v 1.3 1996/12/09 07:10:14 deraadt Exp $"; +static char rcsid[] = "@(#) $Id: elf2olf.c,v 1.4 1997/01/15 23:42:46 millert Exp $"; #endif #include @@ -85,7 +85,7 @@ main(int argc, char*argv[]) * Process cmdline */ opstring = olf2elf ? "v" : "vo:"; - while((ch = getopt(argc, argv, opstring)) != EOF) + while((ch = getopt(argc, argv, opstring)) != -1) switch(ch) { case 'v': verbose = 1; diff --git a/usr.bin/file/file.c b/usr.bin/file/file.c index a0497c409a6..fc114394317 100644 --- a/usr.bin/file/file.c +++ b/usr.bin/file/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.3 1996/06/26 05:32:56 deraadt Exp $ */ +/* $OpenBSD: file.c,v 1.4 1997/01/15 23:42:26 millert Exp $ */ /* * file - find type of a file or files - main program. * @@ -26,7 +26,7 @@ * 4. This notice may not be removed or altered. */ #ifndef lint -static char *moduleid = "$OpenBSD: file.c,v 1.3 1996/06/26 05:32:56 deraadt Exp $"; +static char *moduleid = "$OpenBSD: file.c,v 1.4 1997/01/15 23:42:26 millert Exp $"; #endif /* lint */ #include @@ -97,7 +97,7 @@ char *argv[]; if (!(magicfile = getenv("MAGIC"))) magicfile = MAGIC; - while ((c = getopt(argc, argv, "vcdf:Lm:z")) != EOF) + while ((c = getopt(argc, argv, "vcdf:Lm:z")) != -1) switch (c) { case 'v': (void) fprintf(stdout, "%s-%d.%d\n", progname, diff --git a/usr.bin/find/main.c b/usr.bin/find/main.c index c193f1ee9e2..cc045166b7a 100644 --- a/usr.bin/find/main.c +++ b/usr.bin/find/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.3 1996/10/24 03:46:04 tholo Exp $ */ +/* $OpenBSD: main.c,v 1.4 1997/01/15 23:42:27 millert Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -35,7 +35,7 @@ #ifndef lint /*static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93";*/ -static char rcsid[] = "$OpenBSD: main.c,v 1.3 1996/10/24 03:46:04 tholo Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.4 1997/01/15 23:42:27 millert Exp $"; #endif /* not lint */ #include @@ -77,7 +77,7 @@ main(argc, argv) p = start = argv; ftsoptions = FTS_NOSTAT|FTS_PHYSICAL; - while ((ch = getopt(argc, argv, "Hdf:hXx")) != EOF) + while ((ch = getopt(argc, argv, "Hdf:hXx")) != -1) switch(ch) { case 'H': ftsoptions |= FTS_COMFOLLOW; diff --git a/usr.bin/finger/finger.c b/usr.bin/finger/finger.c index 3bc15431568..6a4350536f7 100644 --- a/usr.bin/finger/finger.c +++ b/usr.bin/finger/finger.c @@ -1,4 +1,4 @@ -/* $OpenBSD: finger.c,v 1.4 1996/12/08 13:29:19 downsj Exp $ */ +/* $OpenBSD: finger.c,v 1.5 1997/01/15 23:42:28 millert Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. @@ -48,7 +48,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)finger.c 5.22 (Berkeley) 6/29/90";*/ -static char rcsid[] = "$OpenBSD: finger.c,v 1.4 1996/12/08 13:29:19 downsj Exp $"; +static char rcsid[] = "$OpenBSD: finger.c,v 1.5 1997/01/15 23:42:28 millert Exp $"; #endif /* not lint */ /* @@ -87,7 +87,7 @@ main(argc, argv) char domain[256]; time_t time(); - while ((ch = getopt(argc, argv, "lmMps")) != EOF) + while ((ch = getopt(argc, argv, "lmMps")) != -1) switch(ch) { case 'l': lflag = 1; /* long format */ diff --git a/usr.bin/from/from.c b/usr.bin/from/from.c index ba42ae9773f..e42d3623858 100644 --- a/usr.bin/from/from.c +++ b/usr.bin/from/from.c @@ -1,4 +1,4 @@ -/* $OpenBSD: from.c,v 1.2 1996/06/26 05:33:27 deraadt Exp $ */ +/* $OpenBSD: from.c,v 1.3 1997/01/15 23:42:29 millert Exp $ */ /* $NetBSD: from.c,v 1.6 1995/09/01 01:39:10 jtc Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)from.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: from.c,v 1.2 1996/06/26 05:33:27 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: from.c,v 1.3 1997/01/15 23:42:29 millert Exp $"; #endif /* not lint */ #include @@ -71,7 +71,7 @@ main(argc, argv) #endif file = sender = NULL; - while ((ch = getopt(argc, argv, "f:s:")) != EOF) + while ((ch = getopt(argc, argv, "f:s:")) != -1) switch((char)ch) { case 'f': file = optarg; diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c index 9f93fcb7bfd..b674c8e2efa 100644 --- a/usr.bin/fstat/fstat.c +++ b/usr.bin/fstat/fstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fstat.c,v 1.7 1996/12/22 03:25:52 tholo Exp $ */ +/* $OpenBSD: fstat.c,v 1.8 1997/01/15 23:42:30 millert Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -41,7 +41,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)fstat.c 8.1 (Berkeley) 6/6/93";*/ -static char *rcsid = "$OpenBSD: fstat.c,v 1.7 1996/12/22 03:25:52 tholo Exp $"; +static char *rcsid = "$OpenBSD: fstat.c,v 1.8 1997/01/15 23:42:30 millert Exp $"; #endif /* not lint */ #include @@ -166,7 +166,7 @@ main(argc, argv) arg = 0; what = KERN_PROC_ALL; nlistf = memf = NULL; - while ((ch = getopt(argc, argv, "fnp:u:vN:M:")) != EOF) + while ((ch = getopt(argc, argv, "fnp:u:vN:M:")) != -1) switch((char)ch) { case 'f': fsflg = 1; diff --git a/usr.bin/ftp/main.c b/usr.bin/ftp/main.c index 75764acf1d7..ef205df31f4 100644 --- a/usr.bin/ftp/main.c +++ b/usr.bin/ftp/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.13 1997/01/09 11:22:16 niklas Exp $ */ +/* $OpenBSD: main.c,v 1.14 1997/01/15 23:42:31 millert Exp $ */ /* * Copyright (c) 1985, 1989, 1993, 1994 @@ -43,7 +43,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 10/9/94"; #else -static char rcsid[] = "$OpenBSD: main.c,v 1.13 1997/01/09 11:22:16 niklas Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.14 1997/01/15 23:42:31 millert Exp $"; #endif #endif /* not lint */ @@ -90,7 +90,7 @@ main(argc, argv) autologin = 1; mark = HASHBYTES; - while ((ch = getopt(argc, argv, "p:r:dgintv")) != EOF) { + while ((ch = getopt(argc, argv, "p:r:dgintv")) != -1) { switch (ch) { case 'd': options |= SO_DEBUG; diff --git a/usr.bin/getopt/getopt.c b/usr.bin/getopt/getopt.c index 8576ff96122..30740547687 100644 --- a/usr.bin/getopt/getopt.c +++ b/usr.bin/getopt/getopt.c @@ -1,7 +1,7 @@ -/* $OpenBSD: getopt.c,v 1.2 1996/06/26 05:33:45 deraadt Exp $ */ +/* $OpenBSD: getopt.c,v 1.3 1997/01/15 23:42:32 millert Exp $ */ #ifndef lint -static char rcsid[] = "$OpenBSD: getopt.c,v 1.2 1996/06/26 05:33:45 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: getopt.c,v 1.3 1997/01/15 23:42:32 millert Exp $"; #endif /* not lint */ #include @@ -16,7 +16,7 @@ char *argv[]; int status = 0; optind = 2; /* Past the program name and the option letters. */ - while ((c = getopt(argc, argv, argv[1])) != EOF) + while ((c = getopt(argc, argv, argv[1])) != -1) switch (c) { case '?': status = 1; /* getopt routine gave message */ diff --git a/usr.bin/head/head.c b/usr.bin/head/head.c index 551d4e332f1..b94064511d5 100644 --- a/usr.bin/head/head.c +++ b/usr.bin/head/head.c @@ -1,4 +1,4 @@ -/* $OpenBSD: head.c,v 1.2 1996/06/26 05:34:15 deraadt Exp $ */ +/* $OpenBSD: head.c,v 1.3 1997/01/15 23:42:33 millert Exp $ */ /* * Copyright (c) 1980, 1987 Regents of the University of California. @@ -41,7 +41,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)head.c 5.5 (Berkeley) 6/1/90";*/ -static char rcsid[] = "$OpenBSD: head.c,v 1.2 1996/06/26 05:34:15 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: head.c,v 1.3 1997/01/15 23:42:33 millert Exp $"; #endif /* not lint */ #include @@ -73,7 +73,7 @@ main(argc, argv) argc--; argv++; } - while ((ch = getopt (argc, argv, "n:")) != EOF) + while ((ch = getopt (argc, argv, "n:")) != -1) switch (ch) { case 'n': if ((linecnt = atoi(optarg)) < 0) diff --git a/usr.bin/hexdump/hexsyntax.c b/usr.bin/hexdump/hexsyntax.c index bb13d56d463..a0d6feb224a 100644 --- a/usr.bin/hexdump/hexsyntax.c +++ b/usr.bin/hexdump/hexsyntax.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hexsyntax.c,v 1.2 1996/06/26 05:34:20 deraadt Exp $ */ +/* $OpenBSD: hexsyntax.c,v 1.3 1997/01/15 23:42:34 millert Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -35,7 +35,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)hexsyntax.c 5.2 (Berkeley) 5/8/90";*/ -static char rcsid[] = "$OpenBSD: hexsyntax.c,v 1.2 1996/06/26 05:34:20 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: hexsyntax.c,v 1.3 1997/01/15 23:42:34 millert Exp $"; #endif /* not lint */ #include @@ -56,7 +56,7 @@ newsyntax(argc, argvp) char *p, **argv; argv = *argvp; - while ((ch = getopt(argc, argv, "bcde:f:n:os:vx")) != EOF) + while ((ch = getopt(argc, argv, "bcde:f:n:os:vx")) != -1) switch (ch) { case 'b': add("\"%07.7_Ax\n\""); diff --git a/usr.bin/hexdump/odsyntax.c b/usr.bin/hexdump/odsyntax.c index 7946ded0f56..9a918c34da0 100644 --- a/usr.bin/hexdump/odsyntax.c +++ b/usr.bin/hexdump/odsyntax.c @@ -1,4 +1,4 @@ -/* $OpenBSD: odsyntax.c,v 1.2 1996/06/26 05:34:21 deraadt Exp $ */ +/* $OpenBSD: odsyntax.c,v 1.3 1997/01/15 23:42:34 millert Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -35,7 +35,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)odsyntax.c 5.4 (Berkeley) 3/8/91";*/ -static char rcsid[] = "$OpenBSD: odsyntax.c,v 1.2 1996/06/26 05:34:21 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: odsyntax.c,v 1.3 1997/01/15 23:42:34 millert Exp $"; #endif /* not lint */ #include @@ -59,7 +59,7 @@ oldsyntax(argc, argvp) deprecated = 1; argv = *argvp; - while ((ch = getopt(argc, argv, "aBbcDdeFfHhIiLlOoPpswvXx")) != EOF) + while ((ch = getopt(argc, argv, "aBbcDdeFfHhIiLlOoPpswvXx")) != -1) switch (ch) { case 'a': odprecede(); diff --git a/usr.bin/id/id.c b/usr.bin/id/id.c index 4696ef799c7..1586254719e 100644 --- a/usr.bin/id/id.c +++ b/usr.bin/id/id.c @@ -1,4 +1,4 @@ -/* $OpenBSD: id.c,v 1.2 1996/06/26 05:34:24 deraadt Exp $ */ +/* $OpenBSD: id.c,v 1.3 1997/01/15 23:42:35 millert Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -41,7 +41,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "@(#)id.c 8.3 (Berkeley) 4/28/95";*/ -static char rcsid[] = "$OpenBSD: id.c,v 1.2 1996/06/26 05:34:24 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: id.c,v 1.3 1997/01/15 23:42:35 millert Exp $"; #endif /* not lint */ #include @@ -73,7 +73,7 @@ main(argc, argv) int Gflag, ch, gflag, id, nflag, pflag, rflag, uflag; Gflag = gflag = nflag = pflag = rflag = uflag = 0; - while ((ch = getopt(argc, argv, "Ggnpru")) != EOF) + while ((ch = getopt(argc, argv, "Ggnpru")) != -1) switch(ch) { case 'G': Gflag = 1; diff --git a/usr.bin/info_mkdb/info_mkdb.c b/usr.bin/info_mkdb/info_mkdb.c index cad011e300e..023dad80415 100644 --- a/usr.bin/info_mkdb/info_mkdb.c +++ b/usr.bin/info_mkdb/info_mkdb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: info_mkdb.c,v 1.1 1996/07/22 03:16:31 tholo Exp $ */ +/* $OpenBSD: info_mkdb.c,v 1.2 1997/01/15 23:42:36 millert Exp $ */ /*- * Copyright (c) 1996 SigmaSoft, Th. Lockert @@ -31,7 +31,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: info_mkdb.c,v 1.1 1996/07/22 03:16:31 tholo Exp $"; +static char rcsid[] = "$OpenBSD: info_mkdb.c,v 1.2 1997/01/15 23:42:36 millert Exp $"; #endif /* not lint */ #include @@ -82,7 +82,7 @@ main(argc, argv) int c; infoname = NULL; - while ((c = getopt(argc, argv, "f:v")) != EOF) { + while ((c = getopt(argc, argv, "f:v")) != -1) { switch(c) { case 'f': infoname = optarg; diff --git a/usr.bin/ipcs/ipcs.c b/usr.bin/ipcs/ipcs.c index b2344daefec..8882cece4bd 100644 --- a/usr.bin/ipcs/ipcs.c +++ b/usr.bin/ipcs/ipcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipcs.c,v 1.6 1996/12/22 03:25:54 tholo Exp $ */ +/* $OpenBSD: ipcs.c,v 1.7 1997/01/15 23:42:37 millert Exp $ */ /* $NetBSD: ipcs.c,v 1.10.6.1 1996/06/07 01:53:47 thorpej Exp $ */ /* @@ -138,7 +138,7 @@ main(argc, argv) char errbuf[_POSIX2_LINE_MAX]; int i; - while ((i = getopt(argc, argv, "MmQqSsabC:cN:optT")) != EOF) + while ((i = getopt(argc, argv, "MmQqSsabC:cN:optT")) != -1) switch (i) { case 'M': display = SHMTOTAL; diff --git a/usr.bin/join/join.c b/usr.bin/join/join.c index c4d9e38d1b2..e1ed653eecc 100644 --- a/usr.bin/join/join.c +++ b/usr.bin/join/join.c @@ -1,4 +1,4 @@ -/* $Id: join.c,v 1.5 1996/08/12 16:37:00 michaels Exp $ +/* $Id: join.c,v 1.6 1997/01/15 23:42:38 millert Exp $ /*- * Copyright (c) 1991, 1993, 1994 @@ -45,7 +45,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "@(#)join.c 8.6 (Berkeley) 5/4/95"; */ -static char rcsid[] = "$Id: join.c,v 1.5 1996/08/12 16:37:00 michaels Exp $"; +static char rcsid[] = "$Id: join.c,v 1.6 1997/01/15 23:42:38 millert Exp $"; #endif /* not lint */ #include @@ -129,7 +129,7 @@ main(argc, argv) aflag = vflag = 0; obsolete(argv); - while ((ch = getopt(argc, argv, "\01a:e:j:1:2:o:t:v:")) != EOF) { + while ((ch = getopt(argc, argv, "\01a:e:j:1:2:o:t:v:")) != -1) { switch (ch) { case '\01': /* See comment in obsolete(). */ aflag = 1; diff --git a/usr.bin/ktrace/ktrace.c b/usr.bin/ktrace/ktrace.c index 6a4436341a3..e174f1a6d71 100644 --- a/usr.bin/ktrace/ktrace.c +++ b/usr.bin/ktrace/ktrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ktrace.c,v 1.3 1996/09/21 08:11:03 deraadt Exp $ */ +/* $OpenBSD: ktrace.c,v 1.4 1997/01/15 23:42:40 millert Exp $ */ /* $NetBSD: ktrace.c,v 1.4 1995/08/31 23:01:44 jtc Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)ktrace.c 8.2 (Berkeley) 4/28/95"; #endif -static char *rcsid = "$OpenBSD: ktrace.c,v 1.3 1996/09/21 08:11:03 deraadt Exp $"; +static char *rcsid = "$OpenBSD: ktrace.c,v 1.4 1997/01/15 23:42:40 millert Exp $"; #endif /* not lint */ #include @@ -77,7 +77,7 @@ main(argc, argv) append = ops = pidset = inherit = 0; trpoints = DEF_POINTS; tracefile = DEF_TRACEFILE; - while ((ch = getopt(argc,argv,"aCcdf:g:ip:t:")) != EOF) + while ((ch = getopt(argc,argv,"aCcdf:g:ip:t:")) != -1) switch((char)ch) { case 'a': append = 1; diff --git a/usr.bin/last/last.c b/usr.bin/last/last.c index db527951a49..5c425dd4d80 100644 --- a/usr.bin/last/last.c +++ b/usr.bin/last/last.c @@ -1,4 +1,4 @@ -/* $OpenBSD: last.c,v 1.2 1996/06/26 05:34:51 deraadt Exp $ */ +/* $OpenBSD: last.c,v 1.3 1997/01/15 23:42:41 millert Exp $ */ /* $NetBSD: last.c,v 1.6 1994/12/24 16:49:02 cgd Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)last.c 8.2 (Berkeley) 4/2/94"; #endif -static char rcsid[] = "$OpenBSD: last.c,v 1.2 1996/06/26 05:34:51 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: last.c,v 1.3 1997/01/15 23:42:41 millert Exp $"; #endif /* not lint */ #include @@ -107,7 +107,7 @@ main(argc, argv) char *p; maxrec = -1; - while ((ch = getopt(argc, argv, "0123456789f:h:t:")) != EOF) + while ((ch = getopt(argc, argv, "0123456789f:h:t:")) != -1) switch (ch) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': diff --git a/usr.bin/lastcomm/lastcomm.c b/usr.bin/lastcomm/lastcomm.c index f002369fdc9..f47688fab0a 100644 --- a/usr.bin/lastcomm/lastcomm.c +++ b/usr.bin/lastcomm/lastcomm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lastcomm.c,v 1.3 1996/06/26 05:34:54 deraadt Exp $ */ +/* $OpenBSD: lastcomm.c,v 1.4 1997/01/15 23:42:41 millert Exp $ */ /* $NetBSD: lastcomm.c,v 1.9 1995/10/22 01:43:42 ghudson Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)lastcomm.c 8.2 (Berkeley) 4/29/95"; #endif -static char rcsid[] = "$OpenBSD: lastcomm.c,v 1.3 1996/06/26 05:34:54 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: lastcomm.c,v 1.4 1997/01/15 23:42:41 millert Exp $"; #endif /* not lint */ #include @@ -87,7 +87,7 @@ main(argc, argv) char *acctfile; acctfile = _PATH_ACCT; - while ((ch = getopt(argc, argv, "f:")) != EOF) + while ((ch = getopt(argc, argv, "f:")) != -1) switch((char)ch) { case 'f': acctfile = optarg; diff --git a/usr.bin/locate/code/locate.code.c b/usr.bin/locate/code/locate.code.c index b95718ed4be..2df97a0ed20 100644 --- a/usr.bin/locate/code/locate.code.c +++ b/usr.bin/locate/code/locate.code.c @@ -1,5 +1,5 @@ /* - * $OpenBSD: locate.code.c,v 1.6 1996/10/20 00:52:53 michaels Exp $ + * $OpenBSD: locate.code.c,v 1.7 1997/01/15 23:42:42 millert Exp $ * * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. @@ -35,7 +35,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: locate.code.c,v 1.6 1996/10/20 00:52:53 michaels Exp $ + * $Id: locate.code.c,v 1.7 1997/01/15 23:42:42 millert Exp $ */ #ifndef lint @@ -48,7 +48,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)locate.code.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: locate.code.c,v 1.6 1996/10/20 00:52:53 michaels Exp $"; +static char rcsid[] = "$OpenBSD: locate.code.c,v 1.7 1997/01/15 23:42:42 millert Exp $"; #endif #endif /* not lint */ @@ -137,7 +137,7 @@ main(argc, argv) FILE *fp; register int i, j; - while ((ch = getopt(argc, argv, "")) != EOF) + while ((ch = getopt(argc, argv, "")) != -1) switch(ch) { default: usage(); diff --git a/usr.bin/locate/locate/locate.c b/usr.bin/locate/locate/locate.c index 7c1810ff455..890448008b6 100644 --- a/usr.bin/locate/locate/locate.c +++ b/usr.bin/locate/locate/locate.c @@ -1,5 +1,5 @@ /* - * $OpenBSD: locate.c,v 1.6 1996/10/20 00:52:56 michaels Exp $ + * $OpenBSD: locate.c,v 1.7 1997/01/15 23:42:44 millert Exp $ * * Copyright (c) 1995 Wolfram Schneider . Berlin. * Copyright (c) 1989, 1993 @@ -36,7 +36,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: locate.c,v 1.6 1996/10/20 00:52:56 michaels Exp $ + * $Id: locate.c,v 1.7 1997/01/15 23:42:44 millert Exp $ */ #ifndef lint @@ -50,7 +50,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)locate.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: locate.c,v 1.6 1996/10/20 00:52:56 michaels Exp $"; +static char rcsid[] = "$OpenBSD: locate.c,v 1.7 1997/01/15 23:42:44 millert Exp $"; #endif #endif /* not lint */ @@ -160,7 +160,7 @@ main(argc, argv) #endif (void) setlocale(LC_ALL, ""); - while ((ch = getopt(argc, argv, "Scd:il:ms")) != EOF) + while ((ch = getopt(argc, argv, "Scd:il:ms")) != -1) switch(ch) { case 'S': /* statistic lines */ f_statistic = 1; diff --git a/usr.bin/lock/lock.c b/usr.bin/lock/lock.c index 1e365e08f00..b13a1f44f74 100644 --- a/usr.bin/lock/lock.c +++ b/usr.bin/lock/lock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lock.c,v 1.7 1996/10/16 00:09:20 millert Exp $ */ +/* $OpenBSD: lock.c,v 1.8 1997/01/15 23:42:45 millert Exp $ */ /* $NetBSD: lock.c,v 1.8 1996/05/07 18:32:31 jtc Exp $ */ /* @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)lock.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: lock.c,v 1.7 1996/10/16 00:09:20 millert Exp $"; +static char rcsid[] = "$OpenBSD: lock.c,v 1.8 1997/01/15 23:42:45 millert Exp $"; #endif /* not lint */ /* @@ -108,7 +108,7 @@ main(argc, argv) if (!(pw = getpwuid(getuid()))) errx(1, "unknown uid %d.", getuid()); - while ((ch = getopt(argc, argv, "npt:")) != EOF) + while ((ch = getopt(argc, argv, "npt:")) != -1) switch((char)ch) { case 't': if ((sectimeout = atoi(optarg)) <= 0) diff --git a/usr.bin/logger/logger.c b/usr.bin/logger/logger.c index 53c9860af4d..6b2b30662f5 100644 --- a/usr.bin/logger/logger.c +++ b/usr.bin/logger/logger.c @@ -1,4 +1,4 @@ -/* $OpenBSD: logger.c,v 1.2 1996/06/26 05:35:58 deraadt Exp $ */ +/* $OpenBSD: logger.c,v 1.3 1997/01/15 23:42:45 millert Exp $ */ /* $NetBSD: logger.c,v 1.4 1994/12/22 06:27:00 jtc Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)logger.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: logger.c,v 1.2 1996/06/26 05:35:58 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: logger.c,v 1.3 1997/01/15 23:42:45 millert Exp $"; #endif /* not lint */ #include @@ -78,7 +78,7 @@ main(argc, argv) tag = NULL; pri = LOG_NOTICE; logflags = 0; - while ((ch = getopt(argc, argv, "f:ip:st:")) != EOF) + while ((ch = getopt(argc, argv, "f:ip:st:")) != -1) switch((char)ch) { case 'f': /* file to log */ if (freopen(optarg, "r", stdin) == NULL) { diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c index 392abb79f77..e64d6003472 100644 --- a/usr.bin/login/login.c +++ b/usr.bin/login/login.c @@ -1,4 +1,4 @@ -/* $OpenBSD: login.c,v 1.15 1996/12/22 03:25:55 tholo Exp $ */ +/* $OpenBSD: login.c,v 1.16 1997/01/15 23:43:03 millert Exp $ */ /* $NetBSD: login.c,v 1.13 1996/05/15 23:50:16 jtc Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)login.c 8.4 (Berkeley) 4/2/94"; #endif -static char rcsid[] = "$OpenBSD: login.c,v 1.15 1996/12/22 03:25:55 tholo Exp $"; +static char rcsid[] = "$OpenBSD: login.c,v 1.16 1997/01/15 23:43:03 millert Exp $"; #endif /* not lint */ /* @@ -159,7 +159,7 @@ main(argc, argv) fflag = hflag = pflag = 0; uid = getuid(); - while ((ch = getopt(argc, argv, "fh:u:p")) != EOF) + while ((ch = getopt(argc, argv, "fh:u:p")) != -1) switch (ch) { case 'f': fflag = 1; diff --git a/usr.bin/logname/logname.c b/usr.bin/logname/logname.c index d023fca063d..3978fa9d225 100644 --- a/usr.bin/logname/logname.c +++ b/usr.bin/logname/logname.c @@ -1,4 +1,4 @@ -/* $OpenBSD: logname.c,v 1.2 1996/06/26 05:36:04 deraadt Exp $ */ +/* $OpenBSD: logname.c,v 1.3 1997/01/15 23:42:47 millert Exp $ */ /* $NetBSD: logname.c,v 1.6 1994/12/22 06:39:32 jtc Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)logname.c 8.2 (Berkeley) 4/3/94"; #endif -static char rcsid[] = "$OpenBSD: logname.c,v 1.2 1996/06/26 05:36:04 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: logname.c,v 1.3 1997/01/15 23:42:47 millert Exp $"; #endif /* not lint */ #include @@ -65,7 +65,7 @@ main(argc, argv) setlocale(LC_ALL, ""); - while ((ch = getopt(argc, argv, "")) != EOF) + while ((ch = getopt(argc, argv, "")) != -1) switch (ch) { case '?': default: diff --git a/usr.bin/look/look.c b/usr.bin/look/look.c index 2f7fccff11e..7be948301df 100644 --- a/usr.bin/look/look.c +++ b/usr.bin/look/look.c @@ -1,4 +1,4 @@ -/* $OpenBSD: look.c,v 1.2 1996/06/26 05:36:06 deraadt Exp $ */ +/* $OpenBSD: look.c,v 1.3 1997/01/15 23:42:48 millert Exp $ */ /* $NetBSD: look.c,v 1.7 1995/08/31 22:41:02 jtc Exp $ */ /*- @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)look.c 8.2 (Berkeley) 5/4/95"; #endif -static char rcsid[] = "$OpenBSD: look.c,v 1.2 1996/06/26 05:36:06 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: look.c,v 1.3 1997/01/15 23:42:48 millert Exp $"; #endif /* not lint */ /* @@ -109,7 +109,7 @@ main(argc, argv) file = _PATH_WORDS; termchar = '\0'; - while ((ch = getopt(argc, argv, "dft:")) != EOF) + while ((ch = getopt(argc, argv, "dft:")) != -1) switch(ch) { case 'd': dflag = 1; diff --git a/usr.bin/m4/main.c b/usr.bin/m4/main.c index 234d83f4093..187dc3a9ae0 100644 --- a/usr.bin/m4/main.c +++ b/usr.bin/m4/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.4 1996/08/22 00:35:01 deraadt Exp $ */ +/* $OpenBSD: main.c,v 1.5 1997/01/15 23:42:49 millert Exp $ */ /* $NetBSD: main.c,v 1.11 1996/01/13 23:25:26 pk Exp $ */ /*- @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: main.c,v 1.4 1996/08/22 00:35:01 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.5 1997/01/15 23:42:49 millert Exp $"; #endif #endif /* not lint */ @@ -167,7 +167,7 @@ main(argc,argv) initkwds(); - while ((c = getopt(argc, argv, "tD:U:o:")) != EOF) + while ((c = getopt(argc, argv, "tD:U:o:")) != -1) switch(c) { case 'D': /* define something..*/ diff --git a/usr.bin/mail/main.c b/usr.bin/mail/main.c index 4ea11afbc50..063ecfa3873 100644 --- a/usr.bin/mail/main.c +++ b/usr.bin/mail/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.3 1996/09/16 02:26:09 deraadt Exp $ */ +/* $OpenBSD: main.c,v 1.4 1997/01/15 23:42:50 millert Exp $ */ /* $NetBSD: main.c,v 1.5 1996/06/08 19:48:31 christos Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: main.c,v 1.3 1996/09/16 02:26:09 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.4 1997/01/15 23:42:50 millert Exp $"; #endif #endif /* not lint */ @@ -95,7 +95,7 @@ main(argc, argv) bcc = NIL; smopts = NIL; subject = NOSTR; - while ((i = getopt(argc, argv, "INT:b:c:dfins:u:v")) != EOF) { + while ((i = getopt(argc, argv, "INT:b:c:dfins:u:v")) != -1) { switch (i) { case 'T': /* diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c index f588e7a82f5..c8447760ac2 100644 --- a/usr.bin/make/main.c +++ b/usr.bin/make/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.9 1996/11/30 21:08:59 millert Exp $ */ +/* $OpenBSD: main.c,v 1.10 1997/01/15 23:42:51 millert Exp $ */ /* $NetBSD: main.c,v 1.31 1996/11/06 17:59:12 christos Exp $ */ /* @@ -49,7 +49,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -static char rcsid[] = "$OpenBSD: main.c,v 1.9 1996/11/30 21:08:59 millert Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.10 1997/01/15 23:42:51 millert Exp $"; #endif #endif /* not lint */ @@ -172,7 +172,7 @@ MainParseArgs(argc, argv) #else # define OPTFLAGS "BD:I:PSV:d:ef:ij:km:nqrst" #endif -rearg: while((c = getopt(argc, argv, OPTFLAGS)) != EOF) { +rearg: while((c = getopt(argc, argv, OPTFLAGS)) != -1) { switch(c) { case 'D': Var_Set(optarg, "1", VAR_GLOBAL); diff --git a/usr.bin/man/man.c b/usr.bin/man/man.c index 35a2c9328cb..70e5d873080 100644 --- a/usr.bin/man/man.c +++ b/usr.bin/man/man.c @@ -1,4 +1,4 @@ -/* $OpenBSD: man.c,v 1.4 1996/09/16 02:26:10 deraadt Exp $ */ +/* $OpenBSD: man.c,v 1.5 1997/01/15 23:42:52 millert Exp $ */ /* $NetBSD: man.c,v 1.7 1995/09/28 06:05:34 tls Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)man.c 8.17 (Berkeley) 1/31/95"; #else -static char rcsid[] = "$OpenBSD: man.c,v 1.4 1996/09/16 02:26:10 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: man.c,v 1.5 1997/01/15 23:42:52 millert Exp $"; #endif #endif /* not lint */ @@ -95,7 +95,7 @@ main(argc, argv) f_cat = f_how = 0; conffile = p_add = p_path = NULL; - while ((ch = getopt(argc, argv, "-aC:cfhkM:m:P:w")) != EOF) + while ((ch = getopt(argc, argv, "-aC:cfhkM:m:P:w")) != -1) switch (ch) { case 'a': f_all = 1; diff --git a/usr.bin/mesg/mesg.c b/usr.bin/mesg/mesg.c index 8f7ac36553c..35f43c3e677 100644 --- a/usr.bin/mesg/mesg.c +++ b/usr.bin/mesg/mesg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mesg.c,v 1.2 1996/06/26 05:37:05 deraadt Exp $ */ +/* $OpenBSD: mesg.c,v 1.3 1997/01/15 23:42:53 millert Exp $ */ /* $NetBSD: mesg.c,v 1.4 1994/12/23 07:16:32 jtc Exp $ */ /* @@ -49,7 +49,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)mesg.c 8.2 (Berkeley) 1/21/94"; #endif -static char rcsid[] = "$OpenBSD: mesg.c,v 1.2 1996/06/26 05:37:05 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: mesg.c,v 1.3 1997/01/15 23:42:53 millert Exp $"; #endif /* not lint */ #include @@ -71,7 +71,7 @@ main(argc, argv) char *tty; int ch; - while ((ch = getopt(argc, argv, "")) != EOF) + while ((ch = getopt(argc, argv, "")) != -1) switch (ch) { case '?': default: diff --git a/usr.bin/modstat/modstat.c b/usr.bin/modstat/modstat.c index e9d65542433..360dc0a83ef 100644 --- a/usr.bin/modstat/modstat.c +++ b/usr.bin/modstat/modstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: modstat.c,v 1.6 1996/08/06 18:17:22 deraadt Exp $ */ +/* $OpenBSD: modstat.c,v 1.7 1997/01/15 23:42:54 millert Exp $ */ /* * Copyright (c) 1993 Terrence R. Lambert. @@ -133,7 +133,7 @@ main(argc, argv) int modnum = -1; char *modname = NULL; - while ((c = getopt(argc, argv, "i:n:")) != EOF) { + while ((c = getopt(argc, argv, "i:n:")) != -1) { switch (c) { case 'i': modnum = atoi(optarg); diff --git a/usr.bin/nc/netcat.c b/usr.bin/nc/netcat.c index 5ceb4f1d2fd..f6c10424a76 100644 --- a/usr.bin/nc/netcat.c +++ b/usr.bin/nc/netcat.c @@ -1389,7 +1389,7 @@ main (argc, argv) /* If your shitbox doesn't have getopt, step into the nineties already. */ /* optarg, optind = next-argv-component [i.e. flag arg]; optopt = last-char */ - while ((x = getopt (argc, argv, "ae:g:G:hi:lno:p:rs:tuvw:z")) != EOF) { + while ((x = getopt (argc, argv, "ae:g:G:hi:lno:p:rs:tuvw:z")) != -1) { /* Debug (("in go: x now %c, optarg %x optind %d", x, optarg, optind)) */ switch (x) { case 'a': diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index 10a31faaa2f..349be1474b2 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.5 1996/12/22 03:25:58 tholo Exp $ */ +/* $OpenBSD: main.c,v 1.6 1997/01/15 23:42:55 millert Exp $ */ /* $NetBSD: main.c,v 1.9 1996/05/07 02:55:02 thorpej Exp $ */ /* @@ -44,7 +44,7 @@ char copyright[] = #if 0 static char sccsid[] = "from: @(#)main.c 8.4 (Berkeley) 3/1/94"; #else -static char *rcsid = "$OpenBSD: main.c,v 1.5 1996/12/22 03:25:58 tholo Exp $"; +static char *rcsid = "$OpenBSD: main.c,v 1.6 1997/01/15 23:42:55 millert Exp $"; #endif #endif /* not lint */ @@ -226,7 +226,7 @@ main(argc, argv) af = AF_UNSPEC; - while ((ch = getopt(argc, argv, "Aadf:ghI:iM:mN:np:rstuw:")) != EOF) + while ((ch = getopt(argc, argv, "Aadf:ghI:iM:mN:np:rstuw:")) != -1) switch(ch) { case 'A': Aflag = 1; diff --git a/usr.bin/newsyslog/newsyslog.c b/usr.bin/newsyslog/newsyslog.c index 0894fded093..f6904029260 100644 --- a/usr.bin/newsyslog/newsyslog.c +++ b/usr.bin/newsyslog/newsyslog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: newsyslog.c,v 1.7 1996/12/07 08:00:45 deraadt Exp $ */ +/* $OpenBSD: newsyslog.c,v 1.8 1997/01/15 23:42:56 millert Exp $ */ /* * This file contains changes from the Open Software Foundation. @@ -29,7 +29,7 @@ provided "as is" without express or implied warranty. */ #ifndef lint -static char rcsid[] = "$OpenBSD: newsyslog.c,v 1.7 1996/12/07 08:00:45 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: newsyslog.c,v 1.8 1997/01/15 23:42:56 millert Exp $"; #endif /* not lint */ #ifndef CONF @@ -199,7 +199,7 @@ 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.bin/nfsstat/nfsstat.c b/usr.bin/nfsstat/nfsstat.c index d84b73da9bc..50e7829e428 100644 --- a/usr.bin/nfsstat/nfsstat.c +++ b/usr.bin/nfsstat/nfsstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfsstat.c,v 1.5 1996/12/22 03:25:59 tholo Exp $ */ +/* $OpenBSD: nfsstat.c,v 1.6 1997/01/15 23:42:57 millert Exp $ */ /* $NetBSD: nfsstat.c,v 1.7 1996/03/03 17:21:30 thorpej Exp $ */ /* @@ -48,7 +48,7 @@ static char copyright[] = static char sccsid[] = "from: @(#)nfsstat.c 8.1 (Berkeley) 6/6/93"; static char *rcsid = "$NetBSD: nfsstat.c,v 1.7 1996/03/03 17:21:30 thorpej Exp $"; #else -static char *rcsid = "$OpenBSD: nfsstat.c,v 1.5 1996/12/22 03:25:59 tholo Exp $"; +static char *rcsid = "$OpenBSD: nfsstat.c,v 1.6 1997/01/15 23:42:57 millert Exp $"; #endif #endif /* not lint */ @@ -99,7 +99,7 @@ main(argc, argv) interval = 0; memf = nlistf = NULL; - while ((ch = getopt(argc, argv, "M:N:w:sc")) != EOF) + while ((ch = getopt(argc, argv, "M:N:w:sc")) != -1) switch(ch) { case 'M': memf = optarg; diff --git a/usr.bin/nm/nm.c b/usr.bin/nm/nm.c index d97f1765e36..26b14601265 100644 --- a/usr.bin/nm/nm.c +++ b/usr.bin/nm/nm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nm.c,v 1.3 1996/06/26 05:37:33 deraadt Exp $ */ +/* $OpenBSD: nm.c,v 1.4 1997/01/15 23:42:59 millert Exp $ */ /* $NetBSD: nm.c,v 1.7 1996/01/14 23:04:03 pk Exp $ */ /* @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)nm.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: nm.c,v 1.3 1996/06/26 05:37:33 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: nm.c,v 1.4 1997/01/15 23:42:59 millert Exp $"; #endif /* not lint */ #include @@ -92,7 +92,7 @@ main(argc, argv) extern int optind; int ch, errors; - while ((ch = getopt(argc, argv, "agnopruw")) != EOF) { + while ((ch = getopt(argc, argv, "agnopruw")) != -1) { switch (ch) { case 'a': print_all_symbols = 1; diff --git a/usr.bin/passwd/passwd.c b/usr.bin/passwd/passwd.c index dfd0e4ae025..a0b984ce6c2 100644 --- a/usr.bin/passwd/passwd.c +++ b/usr.bin/passwd/passwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: passwd.c,v 1.4 1996/06/26 05:37:47 deraadt Exp $ */ +/* $OpenBSD: passwd.c,v 1.5 1997/01/15 23:43:01 millert Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. @@ -41,7 +41,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)passwd.c 5.5 (Berkeley) 7/6/91";*/ -static char rcsid[] = "$OpenBSD: passwd.c,v 1.4 1996/06/26 05:37:47 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: passwd.c,v 1.5 1997/01/15 23:43:01 millert Exp $"; #endif /* not lint */ #include @@ -88,7 +88,7 @@ main(argc, argv) if (basename == NULL) basename = argv[0]; - while ((ch = getopt(argc, argv, "lky")) != EOF) + while ((ch = getopt(argc, argv, "lky")) != -1) switch (ch) { case 'l': /* change local password file */ use_kerberos = 0; diff --git a/usr.bin/paste/paste.c b/usr.bin/paste/paste.c index cc5fce44c0f..514227f4d4a 100644 --- a/usr.bin/paste/paste.c +++ b/usr.bin/paste/paste.c @@ -1,4 +1,4 @@ -/* $OpenBSD: paste.c,v 1.2 1996/06/26 05:37:50 deraadt Exp $ */ +/* $OpenBSD: paste.c,v 1.3 1997/01/15 23:43:02 millert Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. @@ -44,7 +44,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)paste.c 5.7 (Berkeley) 10/30/90";*/ -static char rcsid[] = "$OpenBSD: paste.c,v 1.2 1996/06/26 05:37:50 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: paste.c,v 1.3 1997/01/15 23:43:02 millert Exp $"; #endif /* not lint */ #include @@ -65,7 +65,7 @@ main(argc, argv) int ch, seq; seq = 0; - while ((ch = getopt(argc, argv, "d:s")) != EOF) + while ((ch = getopt(argc, argv, "d:s")) != -1) switch(ch) { case 'd': delimcnt = tr(delim = optarg); diff --git a/usr.bin/pr/pr.c b/usr.bin/pr/pr.c index e50f46efabf..a9cfc75ce5a 100644 --- a/usr.bin/pr/pr.c +++ b/usr.bin/pr/pr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pr.c,v 1.3 1996/08/10 04:41:00 imp Exp $ */ +/* $OpenBSD: pr.c,v 1.4 1997/01/15 23:43:00 millert Exp $ */ /*- * Copyright (c) 1991 Keith Muller. @@ -45,7 +45,7 @@ static char copyright[] = #ifndef lint /* from: static char sccsid[] = "@(#)pr.c 8.1 (Berkeley) 6/6/93"; */ -static char *rcsid = "$OpenBSD: pr.c,v 1.3 1996/08/10 04:41:00 imp Exp $"; +static char *rcsid = "$OpenBSD: pr.c,v 1.4 1997/01/15 23:43:00 millert Exp $"; #endif /* not lint */ #include @@ -1593,7 +1593,7 @@ setup(argc, argv) } } else err = stderr; - while ((c = egetopt(argc, argv, "#adFmrte?h:i?l:n?o:s?w:")) != EOF) { + while ((c = egetopt(argc, argv, "#adFmrte?h:i?l:n?o:s?w:")) != -1) { switch (c) { case '+': if ((pgnm = atoi(eoptarg)) < 1) { diff --git a/usr.bin/ranlib/ranlib.c b/usr.bin/ranlib/ranlib.c index 138cf6ad02d..17e9817a557 100644 --- a/usr.bin/ranlib/ranlib.c +++ b/usr.bin/ranlib/ranlib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ranlib.c,v 1.2 1996/06/26 05:38:06 deraadt Exp $ */ +/* $OpenBSD: ranlib.c,v 1.3 1997/01/15 23:43:04 millert Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -44,7 +44,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)ranlib.c 5.6 (Berkeley) 2/26/91";*/ -static char rcsid[] = "$OpenBSD: ranlib.c,v 1.2 1996/06/26 05:38:06 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ranlib.c,v 1.3 1997/01/15 23:43:04 millert Exp $"; #endif /* not lint */ #include @@ -64,7 +64,7 @@ main(argc, argv) int ch, eval, tflag; tflag = 0; - while ((ch = getopt(argc, argv, "t")) != EOF) + while ((ch = getopt(argc, argv, "t")) != -1) switch(ch) { case 't': tflag = 1; diff --git a/usr.bin/rev/rev.c b/usr.bin/rev/rev.c index abf696301dc..9362944f9dc 100644 --- a/usr.bin/rev/rev.c +++ b/usr.bin/rev/rev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rev.c,v 1.2 1996/06/26 05:38:29 deraadt Exp $ */ +/* $OpenBSD: rev.c,v 1.3 1997/01/15 23:43:05 millert Exp $ */ /* $NetBSD: rev.c,v 1.5 1995/09/28 08:49:40 tls Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)rev.c 8.3 (Berkeley) 5/4/95"; #else -static char rcsid[] = "$OpenBSD: rev.c,v 1.2 1996/06/26 05:38:29 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: rev.c,v 1.3 1997/01/15 23:43:05 millert Exp $"; #endif #endif /* not lint */ @@ -69,7 +69,7 @@ main(argc, argv) size_t len; int ch, rval; - while ((ch = getopt(argc, argv, "")) != EOF) + while ((ch = getopt(argc, argv, "")) != -1) switch(ch) { case '?': default: diff --git a/usr.bin/rlogin/rlogin.c b/usr.bin/rlogin/rlogin.c index fa9bcac429d..51e72d9d2fb 100644 --- a/usr.bin/rlogin/rlogin.c +++ b/usr.bin/rlogin/rlogin.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rlogin.c,v 1.10 1996/12/22 03:26:01 tholo Exp $ */ +/* $OpenBSD: rlogin.c,v 1.11 1997/01/15 23:43:06 millert Exp $ */ /* $NetBSD: rlogin.c,v 1.8 1995/10/05 09:07:22 mycroft Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)rlogin.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: rlogin.c,v 1.10 1996/12/22 03:26:01 tholo Exp $"; +static char rcsid[] = "$OpenBSD: rlogin.c,v 1.11 1997/01/15 23:43:06 millert Exp $"; #endif #endif /* not lint */ @@ -183,7 +183,7 @@ main(argc, argv) #else #define OPTIONS "8EKLde:l:" #endif - while ((ch = getopt(argc - argoff, argv + argoff, OPTIONS)) != EOF) + while ((ch = getopt(argc - argoff, argv + argoff, OPTIONS)) != -1) switch(ch) { case '8': eight = 1; diff --git a/usr.bin/rpcinfo/rpcinfo.c b/usr.bin/rpcinfo/rpcinfo.c index 7ec8abf9da0..a7d97f3b8b6 100644 --- a/usr.bin/rpcinfo/rpcinfo.c +++ b/usr.bin/rpcinfo/rpcinfo.c @@ -1,9 +1,9 @@ -/* $OpenBSD: rpcinfo.c,v 1.3 1996/06/29 01:07:33 deraadt Exp $ */ +/* $OpenBSD: rpcinfo.c,v 1.4 1997/01/15 23:43:08 millert Exp $ */ #ifndef lint /*static char sccsid[] = "from: @(#)rpcinfo.c 1.22 87/08/12 SMI";*/ /*static char sccsid[] = "from: @(#)rpcinfo.c 2.2 88/08/11 4.0 RPCSRC";*/ -static char rcsid[] = "$OpenBSD: rpcinfo.c,v 1.3 1996/06/29 01:07:33 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: rpcinfo.c,v 1.4 1997/01/15 23:43:08 millert Exp $"; #endif /* @@ -96,7 +96,7 @@ main(argc, argv) function = NONE; portnum = 0; errflg = 0; - while ((c = getopt(argc, argv, "ptubdn:")) != EOF) { + while ((c = getopt(argc, argv, "ptubdn:")) != -1) { switch (c) { case 'p': diff --git a/usr.bin/rsh/rsh.c b/usr.bin/rsh/rsh.c index 517a400afa5..b708793dbe6 100644 --- a/usr.bin/rsh/rsh.c +++ b/usr.bin/rsh/rsh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsh.c,v 1.10 1996/12/22 03:26:02 tholo Exp $ */ +/* $OpenBSD: rsh.c,v 1.11 1997/01/15 23:43:09 millert Exp $ */ /*- * Copyright (c) 1983, 1990 The Regents of the University of California. @@ -41,7 +41,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)rsh.c 5.24 (Berkeley) 7/1/91";*/ -static char rcsid[] = "$OpenBSD: rsh.c,v 1.10 1996/12/22 03:26:02 tholo Exp $"; +static char rcsid[] = "$OpenBSD: rsh.c,v 1.11 1997/01/15 23:43:09 millert Exp $"; #endif /* not lint */ #include @@ -121,7 +121,7 @@ main(argc, argv) #else #define OPTIONS "8KLdel:nw" #endif - while ((ch = getopt(argc - argoff, argv + argoff, OPTIONS)) != EOF) + while ((ch = getopt(argc - argoff, argv + argoff, OPTIONS)) != -1) switch(ch) { case 'K': #ifdef KERBEROS diff --git a/usr.bin/ruptime/ruptime.c b/usr.bin/ruptime/ruptime.c index 992d8fb060f..9df8234404e 100644 --- a/usr.bin/ruptime/ruptime.c +++ b/usr.bin/ruptime/ruptime.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ruptime.c,v 1.2 1996/06/26 05:38:54 deraadt Exp $ */ +/* $OpenBSD: ruptime.c,v 1.3 1997/01/15 23:43:10 millert Exp $ */ /* * Copyright (c) 1983 The Regents of the University of California. @@ -41,7 +41,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)ruptime.c 5.8 (Berkeley) 7/21/90";*/ -static char rcsid[] = "$OpenBSD: ruptime.c,v 1.2 1996/06/26 05:38:54 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ruptime.c,v 1.3 1997/01/15 23:43:10 millert Exp $"; #endif /* not lint */ #include @@ -85,7 +85,7 @@ main(argc, argv) char *interval(); aflg = 0; - while ((ch = getopt(argc, argv, "alrut")) != EOF) + while ((ch = getopt(argc, argv, "alrut")) != -1) switch((char)ch) { case 'a': aflg = 1; diff --git a/usr.bin/rwho/rwho.c b/usr.bin/rwho/rwho.c index fe6c6122bd3..961d3380eb2 100644 --- a/usr.bin/rwho/rwho.c +++ b/usr.bin/rwho/rwho.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rwho.c,v 1.4 1996/08/30 15:15:26 deraadt Exp $ */ +/* $OpenBSD: rwho.c,v 1.5 1997/01/15 23:43:10 millert Exp $ */ /* * Copyright (c) 1983 The Regents of the University of California. @@ -41,7 +41,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)rwho.c 5.5 (Berkeley) 6/1/90";*/ -static char rcsid[] = "$OpenBSD: rwho.c,v 1.4 1996/08/30 15:15:26 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: rwho.c,v 1.5 1997/01/15 23:43:10 millert Exp $"; #endif /* not lint */ #include @@ -92,7 +92,7 @@ main(argc, argv) int f, n, i; time_t time(); - while ((ch = getopt(argc, argv, "a")) != EOF) + while ((ch = getopt(argc, argv, "a")) != -1) switch((char)ch) { case 'a': aflg = 1; diff --git a/usr.bin/script/script.c b/usr.bin/script/script.c index 1496907fe23..058bc326c44 100644 --- a/usr.bin/script/script.c +++ b/usr.bin/script/script.c @@ -1,4 +1,4 @@ -/* $OpenBSD: script.c,v 1.2 1996/06/26 05:39:02 deraadt Exp $ */ +/* $OpenBSD: script.c,v 1.3 1997/01/15 23:43:11 millert Exp $ */ /* $NetBSD: script.c,v 1.3 1994/12/21 08:55:43 jtc Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)script.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: script.c,v 1.2 1996/06/26 05:39:02 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: script.c,v 1.3 1997/01/15 23:43:11 millert Exp $"; #endif /* not lint */ #include @@ -92,7 +92,7 @@ main(argc, argv) char ibuf[BUFSIZ]; aflg = 0; - while ((ch = getopt(argc, argv, "a")) != EOF) + while ((ch = getopt(argc, argv, "a")) != -1) switch(ch) { case 'a': aflg = 1; diff --git a/usr.bin/sed/main.c b/usr.bin/sed/main.c index 3bb83daf76a..f365409959f 100644 --- a/usr.bin/sed/main.c +++ b/usr.bin/sed/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.3 1996/06/26 05:39:07 deraadt Exp $ */ +/* $OpenBSD: main.c,v 1.4 1997/01/15 23:43:12 millert Exp $ */ /*- * Copyright (c) 1992 Diomidis Spinellis. @@ -45,7 +45,7 @@ static char copyright[] = #ifndef lint /* from: static char sccsid[] = "@(#)main.c 8.2 (Berkeley) 1/3/94"; */ -static char *rcsid = "$OpenBSD: main.c,v 1.3 1996/06/26 05:39:07 deraadt Exp $"; +static char *rcsid = "$OpenBSD: main.c,v 1.4 1997/01/15 23:43:12 millert Exp $"; #endif /* not lint */ #include @@ -113,7 +113,7 @@ main(argc, argv) int c, fflag; fflag = 0; - while ((c = getopt(argc, argv, "ae:f:n")) != EOF) + while ((c = getopt(argc, argv, "ae:f:n")) != -1) switch (c) { case 'a': aflag = 1; diff --git a/usr.bin/size/size.c b/usr.bin/size/size.c index 8c12930c6d9..0704f6bcb8b 100644 --- a/usr.bin/size/size.c +++ b/usr.bin/size/size.c @@ -1,4 +1,4 @@ -/* $OpenBSD: size.c,v 1.4 1996/09/03 11:16:47 deraadt Exp $ */ +/* $OpenBSD: size.c,v 1.5 1997/01/15 23:43:13 millert Exp $ */ /* $NetBSD: size.c,v 1.7 1996/01/14 23:07:12 pk Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)size.c 8.2 (Berkeley) 12/9/93"; #endif -static char rcsid[] = "$OpenBSD: size.c,v 1.4 1996/09/03 11:16:47 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: size.c,v 1.5 1997/01/15 23:43:13 millert Exp $"; #endif /* not lint */ #include @@ -73,7 +73,7 @@ main(argc, argv) { int ch, eval; - while ((ch = getopt(argc, argv, "w")) != EOF) + while ((ch = getopt(argc, argv, "w")) != -1) switch(ch) { case 'w': ignore_bad_archive_entries = 0; diff --git a/usr.bin/split/split.c b/usr.bin/split/split.c index 50c42025282..46ccad9999b 100644 --- a/usr.bin/split/split.c +++ b/usr.bin/split/split.c @@ -1,4 +1,4 @@ -/* $OpenBSD: split.c,v 1.2 1996/06/26 05:39:28 deraadt Exp $ */ +/* $OpenBSD: split.c,v 1.3 1997/01/15 23:43:14 millert Exp $ */ /* $NetBSD: split.c,v 1.5 1995/08/31 22:22:05 jtc Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)split.c 8.3 (Berkeley) 4/25/94"; #endif -static char rcsid[] = "$OpenBSD: split.c,v 1.2 1996/06/26 05:39:28 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: split.c,v 1.3 1997/01/15 23:43:14 millert Exp $"; #endif /* not lint */ #include @@ -79,7 +79,7 @@ main(argc, argv) int ch; char *ep, *p; - while ((ch = getopt(argc, argv, "-0123456789b:l:")) != EOF) + while ((ch = getopt(argc, argv, "-0123456789b:l:")) != -1) switch (ch) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': diff --git a/usr.bin/strip/strip.c b/usr.bin/strip/strip.c index 770fe4b8ab9..fcc78488f98 100644 --- a/usr.bin/strip/strip.c +++ b/usr.bin/strip/strip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: strip.c,v 1.5 1997/01/14 10:33:00 downsj Exp $ */ +/* $OpenBSD: strip.c,v 1.6 1997/01/15 23:43:15 millert Exp $ */ /* * Copyright (c) 1988 Regents of the University of California. @@ -41,7 +41,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)strip.c 5.8 (Berkeley) 11/6/91";*/ -static char rcsid[] = "$OpenBSD: strip.c,v 1.5 1997/01/14 10:33:00 downsj Exp $"; +static char rcsid[] = "$OpenBSD: strip.c,v 1.6 1997/01/15 23:43:15 millert Exp $"; #endif /* not lint */ #include @@ -80,7 +80,7 @@ main(argc, argv) char *fn; sfcn = s_sym; - while ((ch = getopt(argc, argv, "dx")) != EOF) + while ((ch = getopt(argc, argv, "dx")) != -1) switch(ch) { case 'x': xflag = 1; diff --git a/usr.bin/su/su.c b/usr.bin/su/su.c index 11396e3d8bc..602d6bab39f 100644 --- a/usr.bin/su/su.c +++ b/usr.bin/su/su.c @@ -1,4 +1,4 @@ -/* $OpenBSD: su.c,v 1.17 1996/12/22 03:26:03 tholo Exp $ */ +/* $OpenBSD: su.c,v 1.18 1997/01/15 23:43:16 millert Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. @@ -41,7 +41,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)su.c 5.26 (Berkeley) 7/6/91";*/ -static char rcsid[] = "$OpenBSD: su.c,v 1.17 1996/12/22 03:26:03 tholo Exp $"; +static char rcsid[] = "$OpenBSD: su.c,v 1.18 1997/01/15 23:43:16 millert Exp $"; #endif /* not lint */ #include @@ -94,7 +94,7 @@ main(argc, argv) char shellbuf[MAXPATHLEN], avshellbuf[MAXPATHLEN]; asme = asthem = fastlogin = 0; - while ((ch = getopt(argc, argv, ARGSTR)) != EOF) + while ((ch = getopt(argc, argv, ARGSTR)) != -1) switch((char)ch) { #ifdef KERBEROS case 'K': diff --git a/usr.bin/systat/main.c b/usr.bin/systat/main.c index d35d48690b0..409a9a2900d 100644 --- a/usr.bin/systat/main.c +++ b/usr.bin/systat/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.8 1996/12/22 03:26:07 tholo Exp $ */ +/* $OpenBSD: main.c,v 1.9 1997/01/15 23:43:17 millert Exp $ */ /* $NetBSD: main.c,v 1.8 1996/05/10 23:16:36 thorpej Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: main.c,v 1.8 1996/12/22 03:26:07 tholo Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.9 1997/01/15 23:43:17 millert Exp $"; #endif /* not lint */ #include @@ -97,7 +97,7 @@ main(argc, argv) int ch; char errbuf[_POSIX2_LINE_MAX]; - while ((ch = getopt(argc, argv, "M:N:w:")) != EOF) + while ((ch = getopt(argc, argv, "M:N:w:")) != -1) switch(ch) { case 'M': memf = optarg; diff --git a/usr.bin/tail/tail.c b/usr.bin/tail/tail.c index aca36d6baab..70aa03547b7 100644 --- a/usr.bin/tail/tail.c +++ b/usr.bin/tail/tail.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tail.c,v 1.3 1997/01/12 23:43:07 millert Exp $ */ +/* $OpenBSD: tail.c,v 1.4 1997/01/15 23:43:18 millert Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -46,7 +46,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)tail.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: tail.c,v 1.3 1997/01/12 23:43:07 millert Exp $"; +static char rcsid[] = "$OpenBSD: tail.c,v 1.4 1997/01/15 23:43:18 millert Exp $"; #endif /* not lint */ #include @@ -114,7 +114,7 @@ main(argc, argv) obsolete(argv); style = NOTSET; - while ((ch = getopt(argc, argv, "b:c:fn:r")) != EOF) + while ((ch = getopt(argc, argv, "b:c:fn:r")) != -1) switch(ch) { case 'b': ARG(512, FBYTES, RBYTES); diff --git a/usr.bin/tcopy/tcopy.c b/usr.bin/tcopy/tcopy.c index 23c8a367f53..631da628f23 100644 --- a/usr.bin/tcopy/tcopy.c +++ b/usr.bin/tcopy/tcopy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcopy.c,v 1.2 1996/06/26 05:40:29 deraadt Exp $ */ +/* $OpenBSD: tcopy.c,v 1.3 1997/01/15 23:43:19 millert Exp $ */ /* $NetBSD: tcopy.c,v 1.4 1995/08/31 22:17:24 jtc Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)tcopy.c 8.3 (Berkeley) 1/23/95"; #endif -static char rcsid[] = "$OpenBSD: tcopy.c,v 1.2 1996/06/26 05:40:29 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: tcopy.c,v 1.3 1997/01/15 23:43:19 millert Exp $"; #endif /* not lint */ #include @@ -89,7 +89,7 @@ main(argc, argv) char *buff, *inf; guesslen = 1; - while ((ch = getopt(argc, argv, "cs:vx")) != EOF) + while ((ch = getopt(argc, argv, "cs:vx")) != -1) switch((char)ch) { case 'c': op = COPYVERIFY; diff --git a/usr.bin/telnet/main.c b/usr.bin/telnet/main.c index ae80438b019..5b148382922 100644 --- a/usr.bin/telnet/main.c +++ b/usr.bin/telnet/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.3 1996/07/03 14:01:56 niklas Exp $ */ +/* $OpenBSD: main.c,v 1.4 1997/01/15 23:43:20 millert Exp $ */ /* $NetBSD: main.c,v 1.5 1996/02/28 21:04:05 thorpej Exp $ */ /* @@ -45,7 +45,7 @@ static char copyright[] = static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 5/30/95"; static char rcsid[] = "$NetBSD: main.c,v 1.5 1996/02/28 21:04:05 thorpej Exp $"; #else -static char rcsid[] = "$OpenBSD: main.c,v 1.3 1996/07/03 14:01:56 niklas Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.4 1997/01/15 23:43:20 millert Exp $"; #endif #endif /* not lint */ @@ -143,7 +143,7 @@ main(argc, argv) rlogin = (strncmp(prompt, "rlog", 4) == 0) ? '~' : _POSIX_VDISABLE; autologin = -1; - while ((ch = getopt(argc, argv, "8EKLS:X:ab:cde:fFk:l:n:rt:x")) != EOF) { + while ((ch = getopt(argc, argv, "8EKLS:X:ab:cde:fFk:l:n:rt:x")) != -1) { switch(ch) { case '8': eight = 3; /* binary output and input */ diff --git a/usr.bin/time/time.c b/usr.bin/time/time.c index 5600cde64d6..a0dbc606182 100644 --- a/usr.bin/time/time.c +++ b/usr.bin/time/time.c @@ -1,4 +1,4 @@ -/* $OpenBSD: time.c,v 1.3 1996/10/12 20:36:06 deraadt Exp $ */ +/* $OpenBSD: time.c,v 1.4 1997/01/15 23:43:21 millert Exp $ */ /* $NetBSD: time.c,v 1.7 1995/06/27 00:34:00 jtc Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)time.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: time.c,v 1.3 1996/10/12 20:36:06 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: time.c,v 1.4 1997/01/15 23:43:21 millert Exp $"; #endif /* not lint */ #include @@ -72,7 +72,7 @@ main(argc, argv) struct rusage ru; lflag = 0; - while ((ch = getopt(argc, argv, "lp")) != EOF) + while ((ch = getopt(argc, argv, "lp")) != -1) switch((char)ch) { case 'p': portableflag = 1; diff --git a/usr.bin/touch/touch.c b/usr.bin/touch/touch.c index 87a7c14fd9f..925f36ed3c3 100644 --- a/usr.bin/touch/touch.c +++ b/usr.bin/touch/touch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: touch.c,v 1.2 1996/06/26 05:41:45 deraadt Exp $ */ +/* $OpenBSD: touch.c,v 1.3 1997/01/15 23:43:22 millert Exp $ */ /* $NetBSD: touch.c,v 1.11 1995/08/31 22:10:06 jtc Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)touch.c 8.2 (Berkeley) 4/28/95"; #endif -static char rcsid[] = "$OpenBSD: touch.c,v 1.2 1996/06/26 05:41:45 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: touch.c,v 1.3 1997/01/15 23:43:22 millert Exp $"; #endif /* not lint */ #include @@ -83,7 +83,7 @@ main(argc, argv) if (gettimeofday(&tv[0], NULL)) err(1, "gettimeofday"); - while ((ch = getopt(argc, argv, "acfmr:t:")) != EOF) + while ((ch = getopt(argc, argv, "acfmr:t:")) != -1) switch(ch) { case 'a': aflag = 1; diff --git a/usr.bin/tput/tput.c b/usr.bin/tput/tput.c index 63f13549337..2f168654f5d 100644 --- a/usr.bin/tput/tput.c +++ b/usr.bin/tput/tput.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tput.c,v 1.2 1996/06/26 05:41:47 deraadt Exp $ */ +/* $OpenBSD: tput.c,v 1.3 1997/01/15 23:43:23 millert Exp $ */ /* $NetBSD: tput.c,v 1.8 1995/08/31 22:11:37 jtc Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)tput.c 8.3 (Berkeley) 4/28/95"; #endif -static char rcsid[] = "$OpenBSD: tput.c,v 1.2 1996/06/26 05:41:47 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: tput.c,v 1.3 1997/01/15 23:43:23 millert Exp $"; #endif /* not lint */ #include @@ -72,7 +72,7 @@ main(argc, argv) char *cptr, *p, *term, buf[1024], tbuf[1024]; term = NULL; - while ((ch = getopt(argc, argv, "T:")) != EOF) + while ((ch = getopt(argc, argv, "T:")) != -1) switch(ch) { case 'T': term = optarg; diff --git a/usr.bin/tr/tr.c b/usr.bin/tr/tr.c index 74af9024d05..4c089fe7c32 100644 --- a/usr.bin/tr/tr.c +++ b/usr.bin/tr/tr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tr.c,v 1.2 1996/06/26 05:41:51 deraadt Exp $ */ +/* $OpenBSD: tr.c,v 1.3 1997/01/15 23:43:24 millert Exp $ */ /* $NetBSD: tr.c,v 1.5 1995/08/31 22:13:48 jtc Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)tr.c 8.2 (Berkeley) 5/4/95"; #endif -static char rcsid[] = "$OpenBSD: tr.c,v 1.2 1996/06/26 05:41:51 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: tr.c,v 1.3 1997/01/15 23:43:24 millert Exp $"; #endif /* not lint */ #include @@ -106,7 +106,7 @@ main(argc, argv) int cflag, dflag, sflag, isstring2; cflag = dflag = sflag = 0; - while ((ch = getopt(argc, argv, "cds")) != EOF) + while ((ch = getopt(argc, argv, "cds")) != -1) switch((char)ch) { case 'c': cflag = 1; diff --git a/usr.bin/tset/tset.c b/usr.bin/tset/tset.c index ebfa48a5319..5e51908b1a9 100644 --- a/usr.bin/tset/tset.c +++ b/usr.bin/tset/tset.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tset.c,v 1.2 1996/06/26 05:41:58 deraadt Exp $ */ +/* $OpenBSD: tset.c,v 1.3 1997/01/15 23:43:25 millert Exp $ */ /* $NetBSD: tset.c,v 1.4 1994/12/07 05:08:15 jtc Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)tset.c 8.1 (Berkeley) 6/9/93"; #endif -static char rcsid[] = "$OpenBSD: tset.c,v 1.2 1996/06/26 05:41:58 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: tset.c,v 1.3 1997/01/15 23:43:25 millert Exp $"; #endif /* not lint */ #include @@ -99,7 +99,7 @@ main(argc, argv) obsolete(argv); noinit = noset = quiet = Sflag = sflag = showterm = 0; - while ((ch = getopt(argc, argv, "-a:d:e:Ii:k:m:np:QSrs")) != EOF) { + while ((ch = getopt(argc, argv, "-a:d:e:Ii:k:m:np:QSrs")) != -1) { switch (ch) { case '-': /* display term only */ noset = 1; diff --git a/usr.bin/tsort/tsort.c b/usr.bin/tsort/tsort.c index 4312d34278b..8fc1acf0379 100644 --- a/usr.bin/tsort/tsort.c +++ b/usr.bin/tsort/tsort.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tsort.c,v 1.3 1996/06/26 05:42:00 deraadt Exp $ */ +/* $OpenBSD: tsort.c,v 1.4 1997/01/15 23:43:26 millert Exp $ */ /* $NetBSD: tsort.c,v 1.11 1996/01/17 20:37:53 mycroft Exp $ */ /* @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)tsort.c 8.3 (Berkeley) 5/4/95"; #endif -static char rcsid[] = "$OpenBSD: tsort.c,v 1.3 1996/06/26 05:42:00 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: tsort.c,v 1.4 1997/01/15 23:43:26 millert Exp $"; #endif /* not lint */ #include @@ -125,7 +125,7 @@ main(argc, argv) int bsize, ch, nused; BUF bufs[2]; - while ((ch = getopt(argc, argv, "dlq")) != EOF) + while ((ch = getopt(argc, argv, "dlq")) != -1) switch (ch) { case 'd': debug = 1; diff --git a/usr.bin/ul/ul.c b/usr.bin/ul/ul.c index 7c2dd8f7983..d3bced594d2 100644 --- a/usr.bin/ul/ul.c +++ b/usr.bin/ul/ul.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ul.c,v 1.3 1996/06/26 05:42:05 deraadt Exp $ */ +/* $OpenBSD: ul.c,v 1.4 1997/01/15 23:43:27 millert Exp $ */ /* $NetBSD: ul.c,v 1.3 1994/12/07 00:28:24 jtc Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)ul.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: ul.c,v 1.3 1996/06/26 05:42:05 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ul.c,v 1.4 1997/01/15 23:43:27 millert Exp $"; #endif /* not lint */ #include @@ -100,7 +100,7 @@ main(argc, argv) termtype = getenv("TERM"); if (termtype == NULL || (argv[0][0] == 'c' && !isatty(1))) termtype = "lpr"; - while ((c=getopt(argc, argv, "it:T:")) != EOF) + while ((c=getopt(argc, argv, "it:T:")) != -1) switch(c) { case 't': diff --git a/usr.bin/uniq/uniq.c b/usr.bin/uniq/uniq.c index d4f9b1296bf..895b0f06a7e 100644 --- a/usr.bin/uniq/uniq.c +++ b/usr.bin/uniq/uniq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uniq.c,v 1.2 1996/06/26 05:42:13 deraadt Exp $ */ +/* $OpenBSD: uniq.c,v 1.3 1997/01/15 23:43:28 millert Exp $ */ /* $NetBSD: uniq.c,v 1.7 1995/08/31 22:03:48 jtc Exp $ */ /* @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)uniq.c 8.3 (Berkeley) 5/4/95"; #endif -static char rcsid[] = "$OpenBSD: uniq.c,v 1.2 1996/06/26 05:42:13 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: uniq.c,v 1.3 1997/01/15 23:43:28 millert Exp $"; #endif /* not lint */ #include @@ -80,7 +80,7 @@ main (argc, argv) char *prevline, *thisline, *p; obsolete(argv); - while ((ch = getopt(argc, argv, "-cdf:s:u")) != EOF) + while ((ch = getopt(argc, argv, "-cdf:s:u")) != -1) switch (ch) { case '-': --optind; diff --git a/usr.bin/unvis/unvis.c b/usr.bin/unvis/unvis.c index d1962fe4603..222ebeea811 100644 --- a/usr.bin/unvis/unvis.c +++ b/usr.bin/unvis/unvis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: unvis.c,v 1.2 1996/06/26 05:42:18 deraadt Exp $ */ +/* $OpenBSD: unvis.c,v 1.3 1997/01/15 23:43:29 millert Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -43,7 +43,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)unvis.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: unvis.c,v 1.2 1996/06/26 05:42:18 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: unvis.c,v 1.3 1997/01/15 23:43:29 millert Exp $"; #endif /* not lint */ #include @@ -61,7 +61,7 @@ main(argc, argv) FILE *fp; int ch; - while ((ch = getopt(argc, argv, "")) != EOF) + while ((ch = getopt(argc, argv, "")) != -1) switch((char)ch) { case '?': default: diff --git a/usr.bin/users/users.c b/usr.bin/users/users.c index 748173355ff..6285c3face4 100644 --- a/usr.bin/users/users.c +++ b/usr.bin/users/users.c @@ -1,4 +1,4 @@ -/* $OpenBSD: users.c,v 1.2 1996/06/26 05:42:20 deraadt Exp $ */ +/* $OpenBSD: users.c,v 1.3 1997/01/15 23:43:30 millert Exp $ */ /* $NetBSD: users.c,v 1.5 1994/12/20 15:58:19 jtc Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)users.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: users.c,v 1.2 1996/06/26 05:42:20 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: users.c,v 1.3 1997/01/15 23:43:30 millert Exp $"; #endif /* not lint */ #include @@ -70,7 +70,7 @@ main(argc, argv) struct utmp utmp; int ch; - while ((ch = getopt(argc, argv, "")) != EOF) + while ((ch = getopt(argc, argv, "")) != -1) switch(ch) { case '?': default: diff --git a/usr.bin/vacation/vacation.c b/usr.bin/vacation/vacation.c index 80c68ed35d0..b04d24a4fe4 100644 --- a/usr.bin/vacation/vacation.c +++ b/usr.bin/vacation/vacation.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vacation.c,v 1.3 1996/12/06 02:09:22 deraadt Exp $ */ +/* $OpenBSD: vacation.c,v 1.4 1997/01/15 23:43:31 millert Exp $ */ /* $NetBSD: vacation.c,v 1.7 1995/04/29 05:58:27 cgd Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)vacation.c 8.2 (Berkeley) 1/26/94"; #endif -static char rcsid[] = "$OpenBSD: vacation.c,v 1.3 1996/12/06 02:09:22 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: vacation.c,v 1.4 1997/01/15 23:43:31 millert Exp $"; #endif /* not lint */ /* @@ -114,7 +114,7 @@ main(argc, argv) opterr = iflag = 0; interval = -1; - while ((ch = getopt(argc, argv, "a:Iir:")) != EOF) + while ((ch = getopt(argc, argv, "a:Iir:")) != -1) switch((char)ch) { case 'a': /* alias */ if (!(cur = (ALIAS *)malloc((u_int)sizeof(ALIAS)))) diff --git a/usr.bin/vi/common/main.c b/usr.bin/vi/common/main.c index 033fb8c96f3..7d2269e34b3 100644 --- a/usr.bin/vi/common/main.c +++ b/usr.bin/vi/common/main.c @@ -114,9 +114,9 @@ editor(gp, argc, argv) F_SET(gp, G_SNAPSHOT); #ifdef DEBUG - while ((ch = getopt(argc, argv, "c:D:eFlRrSsT:t:vw:")) != EOF) + while ((ch = getopt(argc, argv, "c:D:eFlRrSsT:t:vw:")) != -1) #else - while ((ch = getopt(argc, argv, "c:eFlRrSst:vw:")) != EOF) + while ((ch = getopt(argc, argv, "c:eFlRrSst:vw:")) != -1) #endif switch (ch) { case 'c': /* Run the command. */ diff --git a/usr.bin/vis/vis.c b/usr.bin/vis/vis.c index 345e821b2d0..b09ebaa07c5 100644 --- a/usr.bin/vis/vis.c +++ b/usr.bin/vis/vis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vis.c,v 1.2 1996/06/26 05:42:39 deraadt Exp $ */ +/* $OpenBSD: vis.c,v 1.3 1997/01/15 23:43:33 millert Exp $ */ /* $NetBSD: vis.c,v 1.4 1994/12/20 16:13:03 jtc Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)vis.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: vis.c,v 1.2 1996/06/26 05:42:39 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: vis.c,v 1.3 1997/01/15 23:43:33 millert Exp $"; #endif /* not lint */ #include @@ -67,7 +67,7 @@ main(argc, argv) FILE *fp; int ch; - while ((ch = getopt(argc, argv, "nwctsobfF:ld")) != EOF) + while ((ch = getopt(argc, argv, "nwctsobfF:ld")) != -1) switch((char)ch) { case 'n': none++; diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index fa310cd57e2..a8538bb2550 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -1,5 +1,5 @@ /* $NetBSD: vmstat.c,v 1.29.4.1 1996/06/05 00:21:05 cgd Exp $ */ -/* $OpenBSD: vmstat.c,v 1.15 1996/12/22 03:26:09 tholo Exp $ */ +/* $OpenBSD: vmstat.c,v 1.16 1997/01/15 23:43:34 millert Exp $ */ /* * Copyright (c) 1980, 1986, 1991, 1993 @@ -191,7 +191,7 @@ main(argc, argv) memf = nlistf = NULL; interval = reps = todo = 0; - while ((c = getopt(argc, argv, "c:fiM:mN:stw:")) != EOF) { + while ((c = getopt(argc, argv, "c:fiM:mN:stw:")) != -1) { switch (c) { case 'c': reps = atoi(optarg); diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c index 57cc2d69390..7592955a8df 100644 --- a/usr.bin/w/w.c +++ b/usr.bin/w/w.c @@ -1,4 +1,4 @@ -/* $OpenBSD: w.c,v 1.11 1996/12/22 03:26:10 tholo Exp $ */ +/* $OpenBSD: w.c,v 1.12 1997/01/15 23:43:35 millert Exp $ */ /*- * Copyright (c) 1980, 1991, 1993, 1994 @@ -141,7 +141,7 @@ main(argc, argv) } memf = nlistf = NULL; - while ((ch = getopt(argc, argv, p)) != EOF) + while ((ch = getopt(argc, argv, p)) != -1) switch (ch) { case 'h': header = 0; diff --git a/usr.bin/wall/wall.c b/usr.bin/wall/wall.c index 1878b2ac7b6..cda3c1f8f38 100644 --- a/usr.bin/wall/wall.c +++ b/usr.bin/wall/wall.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wall.c,v 1.7 1996/09/16 02:26:18 deraadt Exp $ */ +/* $OpenBSD: wall.c,v 1.8 1997/01/15 23:43:36 millert Exp $ */ /* $NetBSD: wall.c,v 1.6 1994/11/17 07:17:58 jtc Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)wall.c 8.2 (Berkeley) 11/16/93"; #endif -static char rcsid[] = "$OpenBSD: wall.c,v 1.7 1996/09/16 02:26:18 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: wall.c,v 1.8 1997/01/15 23:43:36 millert Exp $"; #endif /* not lint */ /* @@ -97,7 +97,7 @@ main(argc, argv) char line[sizeof(utmp.ut_line) + 1]; struct wallgroup *g; - while ((ch = getopt(argc, argv, "ng:")) != EOF) + while ((ch = getopt(argc, argv, "ng:")) != -1) switch (ch) { case 'n': /* undoc option for shutdown: suppress banner */ diff --git a/usr.bin/whatis/whatis.c b/usr.bin/whatis/whatis.c index 0daf5b617d8..dc062206525 100644 --- a/usr.bin/whatis/whatis.c +++ b/usr.bin/whatis/whatis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: whatis.c,v 1.2 1996/06/26 05:42:54 deraadt Exp $ */ +/* $OpenBSD: whatis.c,v 1.3 1997/01/15 23:43:37 millert Exp $ */ /* * Copyright (c) 1987, 1993 @@ -76,7 +76,7 @@ main(argc, argv) conffile = NULL; p_augment = p_path = NULL; - while ((ch = getopt(argc, argv, "C:M:m:P:")) != EOF) + while ((ch = getopt(argc, argv, "C:M:m:P:")) != -1) switch (ch) { case 'C': conffile = optarg; diff --git a/usr.bin/whereis/whereis.c b/usr.bin/whereis/whereis.c index cc1d0f64e57..32f63a3dc34 100644 --- a/usr.bin/whereis/whereis.c +++ b/usr.bin/whereis/whereis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: whereis.c,v 1.2 1996/06/26 05:42:56 deraadt Exp $ */ +/* $OpenBSD: whereis.c,v 1.3 1997/01/15 23:43:38 millert Exp $ */ /* $NetBSD: whereis.c,v 1.6 1995/08/31 21:54:52 jtc Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)whereis.c 8.3 (Berkeley) 5/4/95"; #endif -static char *rcsid = "$OpenBSD: whereis.c,v 1.2 1996/06/26 05:42:56 deraadt Exp $"; +static char *rcsid = "$OpenBSD: whereis.c,v 1.3 1997/01/15 23:43:38 millert Exp $"; #endif /* not lint */ #include @@ -70,7 +70,7 @@ main(argc, argv) int ch, sverrno, mib[2]; char *p, *t, *std, path[MAXPATHLEN]; - while ((ch = getopt(argc, argv, "")) != EOF) + while ((ch = getopt(argc, argv, "")) != -1) switch (ch) { case '?': default: diff --git a/usr.bin/whois/whois.c b/usr.bin/whois/whois.c index 9ed130763e9..329351660fa 100644 --- a/usr.bin/whois/whois.c +++ b/usr.bin/whois/whois.c @@ -1,4 +1,4 @@ -/* $OpenBSD: whois.c,v 1.2 1996/06/26 05:43:02 deraadt Exp $ */ +/* $OpenBSD: whois.c,v 1.3 1997/01/15 23:43:39 millert Exp $ */ /* $NetBSD: whois.c,v 1.5 1994/11/14 05:13:25 jtc Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)whois.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: whois.c,v 1.2 1996/06/26 05:43:02 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: whois.c,v 1.3 1997/01/15 23:43:39 millert Exp $"; #endif /* not lint */ #include @@ -76,7 +76,7 @@ main(argc, argv) char *host; host = NICHOST; - while ((ch = getopt(argc, argv, "h:")) != EOF) + while ((ch = getopt(argc, argv, "h:")) != -1) switch((char)ch) { case 'h': host = optarg; diff --git a/usr.bin/xargs/xargs.c b/usr.bin/xargs/xargs.c index 2180c9ea106..8bc611cb09d 100644 --- a/usr.bin/xargs/xargs.c +++ b/usr.bin/xargs/xargs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xargs.c,v 1.3 1996/06/26 05:44:03 deraadt Exp $ */ +/* $OpenBSD: xargs.c,v 1.4 1997/01/15 23:43:40 millert Exp $ */ /* $NetBSD: xargs.c,v 1.7 1994/11/14 06:51:41 jtc Exp $ */ /*- @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)xargs.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: xargs.c,v 1.3 1996/06/26 05:44:03 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: xargs.c,v 1.4 1997/01/15 23:43:40 millert Exp $"; #endif /* not lint */ #include @@ -96,7 +96,7 @@ main(argc, argv) nargs = 5000; nline = ARG_MAX - 4 * 1024; nflag = xflag = 0; - while ((ch = getopt(argc, argv, "0n:s:tx")) != EOF) + while ((ch = getopt(argc, argv, "0n:s:tx")) != -1) switch(ch) { case 'n': nflag = 1; diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c index 2fe0119b22c..05fb9f3ba61 100644 --- a/usr.bin/xinstall/xinstall.c +++ b/usr.bin/xinstall/xinstall.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xinstall.c,v 1.9 1996/12/06 02:14:56 deraadt Exp $ */ +/* $OpenBSD: xinstall.c,v 1.10 1997/01/15 23:43:41 millert Exp $ */ /* $NetBSD: xinstall.c,v 1.9 1995/12/20 10:25:17 jonathan Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)xinstall.c 8.1 (Berkeley) 7/21/93"; #endif -static char rcsid[] = "$OpenBSD: xinstall.c,v 1.9 1996/12/06 02:14:56 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: xinstall.c,v 1.10 1997/01/15 23:43:41 millert Exp $"; #endif /* not lint */ #include @@ -103,7 +103,7 @@ main(argc, argv) char *flags, *to_name, *group = NULL, *owner = NULL; iflags = 0; - while ((ch = getopt(argc, argv, "Ccdf:g:m:o:pSs")) != EOF) + while ((ch = getopt(argc, argv, "Ccdf:g:m:o:pSs")) != -1) switch((char)ch) { case 'C': docompare = 1; -- cgit v1.2.3