diff options
Diffstat (limited to 'usr.bin')
118 files changed, 145 insertions, 145 deletions
diff --git a/usr.bin/apply/apply.c b/usr.bin/apply/apply.c index 843488f..78e9062 100644 --- a/usr.bin/apply/apply.c +++ b/usr.bin/apply/apply.c @@ -63,7 +63,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/ar/ar.c b/usr.bin/ar/ar.c index e8bde62..8601401 100644 --- a/usr.bin/ar/ar.c +++ b/usr.bin/ar/ar.c @@ -97,7 +97,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 07bf7ff..2dea501 100644 --- a/usr.bin/at/at.c +++ b/usr.bin/at/at.c @@ -92,7 +92,7 @@ enum { ATQ, ATRM, AT, BATCH, CAT }; /* what program we want to run */ /* File scope variables */ -static char rcsid[] = "$Id: at.c,v 1.10 1997/02/22 19:54:04 peter Exp $"; +static char rcsid[] = "$Id: at.c,v 1.12 1997/03/03 07:58:00 ache Exp $"; char *no_export[] = { "TERM", "TERMCAP", "DISPLAY", "_" @@ -639,7 +639,7 @@ main(int argc, char **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/banner/banner.c b/usr.bin/banner/banner.c index d6d4392..566286f 100644 --- a/usr.bin/banner/banner.c +++ b/usr.bin/banner/banner.c @@ -1030,7 +1030,7 @@ main(argc, argv) { int ch; - while ((ch = getopt(argc, argv, "w:td")) != EOF) + while ((ch = getopt(argc, argv, "w:td")) != -1) switch(ch) { case 'w': width = atoi(optarg); diff --git a/usr.bin/basename/basename.c b/usr.bin/basename/basename.c index 4925b27..5964013 100644 --- a/usr.bin/basename/basename.c +++ b/usr.bin/basename/basename.c @@ -56,7 +56,7 @@ main(argc, argv) char *p; int ch; - while ((ch = getopt(argc, argv, "")) != EOF) + while ((ch = getopt(argc, argv, "")) != -1) switch(ch) { case '?': default: diff --git a/usr.bin/biff/biff.c b/usr.bin/biff/biff.c index 8d816bf..4d59650 100644 --- a/usr.bin/biff/biff.c +++ b/usr.bin/biff/biff.c @@ -61,7 +61,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/brandelf/brandelf.c b/usr.bin/brandelf/brandelf.c index 0a91a06..c7a7030 100644 --- a/usr.bin/brandelf/brandelf.c +++ b/usr.bin/brandelf/brandelf.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id$ + * $Id: brandelf.c,v 1.4 1997/02/22 19:54:15 peter Exp $ */ #include <stdlib.h> @@ -45,7 +45,7 @@ main(int argc, char **argv) int retval = 0; int ch, change = 0, verbose = 0; - while ((ch = getopt(argc, argv, "t:v")) != EOF) + while ((ch = getopt(argc, argv, "t:v")) != -1) switch (ch) { case 'v': verbose = 1; diff --git a/usr.bin/cal/cal.c b/usr.bin/cal/cal.c index 3f20760..fbd58ee 100644 --- a/usr.bin/cal/cal.c +++ b/usr.bin/cal/cal.c @@ -141,7 +141,7 @@ main(argc, argv) (void) setlocale(LC_TIME, ""); 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 3d7d326..64b5f6b 100644 --- a/usr.bin/calendar/calendar.c +++ b/usr.bin/calendar/calendar.c @@ -70,7 +70,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 f809c86..75ba9b7 100644 --- a/usr.bin/cap_mkdb/cap_mkdb.c +++ b/usr.bin/cap_mkdb/cap_mkdb.c @@ -77,7 +77,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/chflags/chflags.c b/usr.bin/chflags/chflags.c index 7cca3eb..f33f46e 100644 --- a/usr.bin/chflags/chflags.c +++ b/usr.bin/chflags/chflags.c @@ -68,7 +68,7 @@ main(argc, argv) char *flags, *ep; Hflag = Lflag = Pflag = Rflag = 0; - while ((ch = getopt(argc, argv, "HLPR")) != EOF) + while ((ch = getopt(argc, argv, "HLPR")) != -1) switch (ch) { case 'H': Hflag = 1; diff --git a/usr.bin/chpass/chpass.c b/usr.bin/chpass/chpass.c index 58a619a..982548f 100644 --- a/usr.bin/chpass/chpass.c +++ b/usr.bin/chpass/chpass.c @@ -40,7 +40,7 @@ static char copyright[] = #ifndef lint static char sccsid[] = "From: @(#)chpass.c 8.4 (Berkeley) 4/2/94"; static char rcsid[] = - "$Id$"; + "$Id: chpass.c,v 1.13 1997/02/22 19:54:25 peter Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -94,9 +94,9 @@ main(argc, argv) op = EDITENTRY; #ifdef YP - while ((ch = getopt(argc, argv, "a:p:s:e:d:h:oly")) != EOF) + while ((ch = getopt(argc, argv, "a:p:s:e:d:h:oly")) != -1) #else - while ((ch = getopt(argc, argv, "a:p:s:e:")) != EOF) + while ((ch = getopt(argc, argv, "a:p:s:e:")) != -1) #endif switch(ch) { case 'a': diff --git a/usr.bin/cksum/cksum.c b/usr.bin/cksum/cksum.c index 3e66ca5..7951d9f 100644 --- a/usr.bin/cksum/cksum.c +++ b/usr.bin/cksum/cksum.c @@ -70,7 +70,7 @@ main(argc, argv) cfncn = crc; pfncn = pcrc; - while ((ch = getopt(argc, argv, "o:")) != EOF) + while ((ch = getopt(argc, argv, "o:")) != -1) switch(ch) { case 'o': if (*optarg == '1') { diff --git a/usr.bin/cmp/cmp.c b/usr.bin/cmp/cmp.c index 29fcb49..86923df 100644 --- a/usr.bin/cmp/cmp.c +++ b/usr.bin/cmp/cmp.c @@ -67,7 +67,7 @@ main(argc, argv) int ch, fd1, fd2, special; char *file1, *file2; - 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 e911688..88d024e 100644 --- a/usr.bin/col/col.c +++ b/usr.bin/col/col.c @@ -134,7 +134,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 06f6232..541fd9c 100644 --- a/usr.bin/colrm/colrm.c +++ b/usr.bin/colrm/colrm.c @@ -64,7 +64,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 5dbab1c..06fc3f8 100644 --- a/usr.bin/column/column.c +++ b/usr.bin/column/column.c @@ -85,7 +85,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/comm/comm.c b/usr.bin/comm/comm.c index 82f995f..1037c29 100644 --- a/usr.bin/comm/comm.c +++ b/usr.bin/comm/comm.c @@ -72,7 +72,7 @@ main(argc, argv) char **p, line1[MAXLINELEN], line2[MAXLINELEN]; flag1 = flag2 = flag3 = 1; - while ((ch = getopt(argc, argv, "-123")) != EOF) + while ((ch = getopt(argc, argv, "-123")) != -1) switch(ch) { case '-': --optind; diff --git a/usr.bin/compress/compress.c b/usr.bin/compress/compress.c index d58e6f5..32d9496 100644 --- a/usr.bin/compress/compress.c +++ b/usr.bin/compress/compress.c @@ -92,7 +92,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 93aba0f..3c6464b 100644 --- a/usr.bin/ctags/ctags.c +++ b/usr.bin/ctags/ctags.c @@ -92,7 +92,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 15e1524..8d58b8f 100644 --- a/usr.bin/cut/cut.c +++ b/usr.bin/cut/cut.c @@ -75,7 +75,7 @@ main(argc, argv) dchar = '\t'; /* default delimiter is \t */ - while ((ch = getopt(argc, argv, "c:d:f:s")) != EOF) + while ((ch = getopt(argc, argv, "c:d:f:s")) != -1) switch(ch) { case 'c': fcn = c_cut; diff --git a/usr.bin/dirname/dirname.c b/usr.bin/dirname/dirname.c index 9698ba4..c6ca326 100644 --- a/usr.bin/dirname/dirname.c +++ b/usr.bin/dirname/dirname.c @@ -55,7 +55,7 @@ main(argc, argv) char *p; int ch; - while ((ch = getopt(argc, argv, "")) != EOF) + while ((ch = getopt(argc, argv, "")) != -1) switch(ch) { case '?': default: diff --git a/usr.bin/du/du.c b/usr.bin/du/du.c index c473e79..c4c564d 100644 --- a/usr.bin/du/du.c +++ b/usr.bin/du/du.c @@ -75,7 +75,7 @@ main(argc, argv) Hflag = Lflag = Pflag = aflag = sflag = dflag = 0; depth = INT_MAX; ftsoptions = FTS_PHYSICAL; - while ((ch = getopt(argc, argv, "HLPad:ksx")) != EOF) + while ((ch = getopt(argc, argv, "HLPad:ksx")) != -1) switch (ch) { case 'H': Hflag = 1; diff --git a/usr.bin/env/env.c b/usr.bin/env/env.c index 2c72ddb..0e01acf 100644 --- a/usr.bin/env/env.c +++ b/usr.bin/env/env.c @@ -58,7 +58,7 @@ main(argc, argv) char *cleanenv[1]; int ch; - while ((ch = getopt(argc, argv, "-")) != EOF) + while ((ch = getopt(argc, argv, "-")) != -1) switch(ch) { case '-': environ = cleanenv; diff --git a/usr.bin/file/file.c b/usr.bin/file/file.c index 371aa50..a5fe4b9 100644 --- a/usr.bin/file/file.c +++ b/usr.bin/file/file.c @@ -26,7 +26,7 @@ */ #ifndef lint static char *moduleid = - "@(#)$Id: file.c,v 1.1.1.3 1997/03/18 17:58:41 mpp Exp $"; + "@(#)$Id: file.c,v 1.7 1997/03/18 19:37:18 mpp Exp $"; #endif /* lint */ #include <stdio.h> @@ -103,7 +103,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 b62cdf3..84a4a09 100644 --- a/usr.bin/find/main.c +++ b/usr.bin/find/main.c @@ -84,7 +84,7 @@ main(argc, argv) p = start = argv; Hflag = Lflag = Pflag = 0; ftsoptions = FTS_NOSTAT | FTS_PHYSICAL; - while ((ch = getopt(argc, argv, "HLPXdf:x")) != EOF) + while ((ch = getopt(argc, argv, "HLPXdf:x")) != -1) switch (ch) { case 'H': Hflag = 1; diff --git a/usr.bin/finger/finger.c b/usr.bin/finger/finger.c index 9235d13..7e7443f 100644 --- a/usr.bin/finger/finger.c +++ b/usr.bin/finger/finger.c @@ -103,7 +103,7 @@ option(argc, argv) optind = 1; /* reset getopt */ - while ((ch = getopt(argc, argv, "lmpshoT")) != EOF) + while ((ch = getopt(argc, argv, "lmpshoT")) != -1) switch(ch) { case 'l': lflag = 1; /* long format */ diff --git a/usr.bin/fold/fold.c b/usr.bin/fold/fold.c index 983a492..dd5b541 100644 --- a/usr.bin/fold/fold.c +++ b/usr.bin/fold/fold.c @@ -60,7 +60,7 @@ main(argc, argv) char *p; width = -1; - while ((ch = getopt(argc, argv, "0123456789w:")) != EOF) + while ((ch = getopt(argc, argv, "0123456789w:")) != -1) switch (ch) { case 'w': if ((width = atoi(optarg)) <= 0) { diff --git a/usr.bin/from/from.c b/usr.bin/from/from.c index de62057..8d20ad5 100644 --- a/usr.bin/from/from.c +++ b/usr.bin/from/from.c @@ -66,7 +66,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 84fd799..c879a97 100644 --- a/usr.bin/fstat/fstat.c +++ b/usr.bin/fstat/fstat.c @@ -174,7 +174,7 @@ main(argc, argv) arg = 0; what = KERN_PROC_ALL; nlistf = memf = NULL; - while ((ch = getopt(argc, argv, "fnp:u:vNM")) != EOF) + while ((ch = getopt(argc, argv, "fnp:u:vNM")) != -1) switch((char)ch) { case 'f': fsflg = 1; diff --git a/usr.bin/ftp/main.c b/usr.bin/ftp/main.c index 33e6a1b..7237c06 100644 --- a/usr.bin/ftp/main.c +++ b/usr.bin/ftp/main.c @@ -89,7 +89,7 @@ main(argc, argv) if (getenv("FTP_PASSIVE_MODE") || strcmp(cp, "pftp") == 0) passivemode = 1; - while ((ch = getopt(argc, argv, "dginptvU")) != EOF) { + while ((ch = getopt(argc, argv, "dginptvU")) != -1) { switch (ch) { case 'd': options |= SO_DEBUG; diff --git a/usr.bin/gcore/aoutcore.c b/usr.bin/gcore/aoutcore.c index 4ec4ed6..7ecbe1c 100644 --- a/usr.bin/gcore/aoutcore.c +++ b/usr.bin/gcore/aoutcore.c @@ -98,7 +98,7 @@ main(argc, argv) sflag = 0; corefile = NULL; - while ((ch = getopt(argc, argv, "c:s")) != EOF) { + while ((ch = getopt(argc, argv, "c:s")) != -1) { switch (ch) { case 'c': corefile = optarg; diff --git a/usr.bin/gcore/gcore.c b/usr.bin/gcore/gcore.c index 4ec4ed6..7ecbe1c 100644 --- a/usr.bin/gcore/gcore.c +++ b/usr.bin/gcore/gcore.c @@ -98,7 +98,7 @@ main(argc, argv) sflag = 0; corefile = NULL; - while ((ch = getopt(argc, argv, "c:s")) != EOF) { + while ((ch = getopt(argc, argv, "c:s")) != -1) { switch (ch) { case 'c': corefile = optarg; diff --git a/usr.bin/getopt/getopt.c b/usr.bin/getopt/getopt.c index 03b0987..060e2c9 100644 --- a/usr.bin/getopt/getopt.c +++ b/usr.bin/getopt/getopt.c @@ -10,7 +10,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 d154d53..3e5bf04 100644 --- a/usr.bin/head/head.c +++ b/usr.bin/head/head.c @@ -75,7 +75,7 @@ main(argc, argv) obsolete(argv); linecnt = 10; - while ((ch = getopt(argc, argv, "n:")) != EOF) + while ((ch = getopt(argc, argv, "n:")) != -1) switch(ch) { case 'n': linecnt = strtol(optarg, &ep, 10); diff --git a/usr.bin/hexdump/hexsyntax.c b/usr.bin/hexdump/hexsyntax.c index 2c13db2..279a68c 100644 --- a/usr.bin/hexdump/hexsyntax.c +++ b/usr.bin/hexdump/hexsyntax.c @@ -65,7 +65,7 @@ newsyntax(argc, argvp) add("\"%08.8_ax \" 8/1 \"%02x \" \" \" 8/1 \"%02x \" "); add("\" |\" 16/1 \"%_p\" \"|\\n\""); } - while ((ch = getopt(argc, argv, "bcCde:f:n:os:vx")) != EOF) + while ((ch = getopt(argc, argv, "bcCde: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 b6143f0..e4c4e72 100644 --- a/usr.bin/hexdump/odsyntax.c +++ b/usr.bin/hexdump/odsyntax.c @@ -61,7 +61,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 61cae11..05face7 100644 --- a/usr.bin/id/id.c +++ b/usr.bin/id/id.c @@ -70,7 +70,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/ipcs/ipcs.c b/usr.bin/ipcs/ipcs.c index b8fd2b9..28db9b0 100644 --- a/usr.bin/ipcs/ipcs.c +++ b/usr.bin/ipcs/ipcs.c @@ -24,7 +24,7 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id$ + * $Id: ipcs.c,v 1.8 1997/02/22 19:55:18 peter Exp $ */ #include <stdio.h> @@ -135,7 +135,7 @@ main(argc, argv) char *core = NULL, *namelist = NULL; 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 bc1f074..7b1e779 100644 --- a/usr.bin/join/join.c +++ b/usr.bin/join/join.c @@ -122,7 +122,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/kdump/kdump.c b/usr.bin/kdump/kdump.c index 4aeddb9..abe2285 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -77,7 +77,7 @@ main(argc, argv) (void) setlocale(LC_CTYPE, ""); - while ((ch = getopt(argc,argv,"f:dlm:nRTt:")) != EOF) + while ((ch = getopt(argc,argv,"f:dlm:nRTt:")) != -1) switch((char)ch) { case 'f': tracefile = optarg; diff --git a/usr.bin/key/skey.c b/usr.bin/key/skey.c index 954b94e..0196ebe 100644 --- a/usr.bin/key/skey.c +++ b/usr.bin/key/skey.c @@ -40,7 +40,7 @@ char *argv[]; char *slash; cnt = 1; - while((i = getopt(argc,argv,"n:")) != EOF){ + while((i = getopt(argc,argv,"n:")) != -1){ switch(i){ case 'n': cnt = atoi(optarg); diff --git a/usr.bin/ktrace/ktrace.c b/usr.bin/ktrace/ktrace.c index 8ff4d69..534b09a 100644 --- a/usr.bin/ktrace/ktrace.c +++ b/usr.bin/ktrace/ktrace.c @@ -42,7 +42,7 @@ static char copyright[] = static char sccsid[] = "@(#)ktrace.c 8.1 (Berkeley) 6/6/93"; #endif static const char rcsid[] = - "$Id: ktrace.c,v 1.8 1997/02/22 19:55:27 peter Exp $"; + "$Id: ktrace.c,v 1.9 1997/03/15 10:39:12 joerg Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -78,7 +78,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/kzip/kzip.c b/usr.bin/kzip/kzip.c index 819efa2..8a8545d 100644 --- a/usr.bin/kzip/kzip.c +++ b/usr.bin/kzip/kzip.c @@ -9,7 +9,7 @@ * Copyright (C) 1993 Hannu Savolainen * Ported to 386bsd by Serge Vakulenko * based on tools/build.c by Linus Torvalds - * $Id$ + * $Id: kzip.c,v 1.7 1997/02/22 19:55:31 peter Exp $ * */ @@ -51,7 +51,7 @@ main(int argc, char **argv) char out[BUFSIZ]; char base[32]; - while ((c = getopt(argc, argv, "l:v")) != EOF) { + while ((c = getopt(argc, argv, "l:v")) != -1) { switch (c) { case 'l': forceaddr = strtoul(optarg, NULL, 0); diff --git a/usr.bin/last/last.c b/usr.bin/last/last.c index 4a378f6..9dea466 100644 --- a/usr.bin/last/last.c +++ b/usr.bin/last/last.c @@ -104,7 +104,7 @@ main(argc, argv) (void) setlocale(LC_TIME, ""); 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 246120b..0edb091 100644 --- a/usr.bin/lastcomm/lastcomm.c +++ b/usr.bin/lastcomm/lastcomm.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: lastcomm.c,v 1.6 1997/02/22 19:55:33 peter Exp $ */ #ifndef lint @@ -91,7 +91,7 @@ main(argc, argv) int time = 0; acctfile = _PATH_ACCT; - while ((ch = getopt(argc, argv, "f:usecSE")) != EOF) + while ((ch = getopt(argc, argv, "f:usecSE")) != -1) switch((char)ch) { case 'f': acctfile = optarg; diff --git a/usr.bin/limits/limits.c b/usr.bin/limits/limits.c index 4c3cbad..655e0da 100644 --- a/usr.bin/limits/limits.c +++ b/usr.bin/limits/limits.c @@ -20,7 +20,7 @@ * * Display/change(+runprogram)/eval resource limits. * - * $Id$ + * $Id: limits.c,v 1.2 1997/02/22 19:55:37 peter Exp $ */ #include <err.h> @@ -246,7 +246,7 @@ main(int argc, char *argv[]) } optarg = NULL; - while ((ch = getopt(argc, argv, ":EeC:U:BSHac:d:f:l:m:n:s:t:u:")) != EOF) { + while ((ch = getopt(argc, argv, ":EeC:U:BSHac:d:f:l:m:n:s:t:u:")) != -1) { switch(ch) { case 'a': doall = 1; diff --git a/usr.bin/locate/code/locate.code.c b/usr.bin/locate/code/locate.code.c index 2a87716..47d2059 100644 --- a/usr.bin/locate/code/locate.code.c +++ b/usr.bin/locate/code/locate.code.c @@ -34,7 +34,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: locate.code.c,v 1.9 1997/02/22 19:55:43 peter Exp $ */ #ifndef lint @@ -132,7 +132,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 ca4578b..a9bed92 100644 --- a/usr.bin/locate/locate/locate.c +++ b/usr.bin/locate/locate/locate.c @@ -34,7 +34,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: locate.c,v 1.9 1997/02/22 19:55:47 peter Exp $ */ #ifndef lint @@ -154,7 +154,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 c53cbd0..9f76971 100644 --- a/usr.bin/lock/lock.c +++ b/usr.bin/lock/lock.c @@ -92,7 +92,7 @@ main(argc, argv) mypw = NULL; usemine = 0; no_timeout = 0; - 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/lockf/lockf.c b/usr.bin/lockf/lockf.c index 5c6d5cf..8541ce3 100644 --- a/usr.bin/lockf/lockf.c +++ b/usr.bin/lockf/lockf.c @@ -22,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: lockf.c,v 1.4 1997/02/22 19:55:54 peter Exp $ */ #include <sys/types.h> @@ -62,7 +62,7 @@ main(int argc, char **argv) silent = 0; waitsec = -1; /* Infinite. */ - while ((ch = getopt(argc, argv, "st:")) != EOF) { + while ((ch = getopt(argc, argv, "st:")) != -1) { switch (ch) { case 's': diff --git a/usr.bin/logger/logger.c b/usr.bin/logger/logger.c index 5cb3409..553591f 100644 --- a/usr.bin/logger/logger.c +++ b/usr.bin/logger/logger.c @@ -73,7 +73,7 @@ main(argc, argv) pri = LOG_NOTICE; logflags = 0; unsetenv("TZ"); - 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 3a4f1da..39d84a9 100644 --- a/usr.bin/login/login.c +++ b/usr.bin/login/login.c @@ -193,7 +193,7 @@ main(argc, argv) fflag = hflag = pflag = 0; uid = getuid(); - while ((ch = getopt(argc, argv, "fh:p")) != EOF) + while ((ch = getopt(argc, argv, "fh:p")) != -1) switch (ch) { case 'f': fflag = 1; diff --git a/usr.bin/logname/logname.c b/usr.bin/logname/logname.c index 98b948a..c0f016e 100644 --- a/usr.bin/logname/logname.c +++ b/usr.bin/logname/logname.c @@ -58,7 +58,7 @@ main(argc, argv) 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/look/look.c b/usr.bin/look/look.c index da972bd..c3b7480 100644 --- a/usr.bin/look/look.c +++ b/usr.bin/look/look.c @@ -107,7 +107,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 395e04d..ca42301 100644 --- a/usr.bin/m4/main.c +++ b/usr.bin/m4/main.c @@ -160,7 +160,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 6a01754..d6499bb 100644 --- a/usr.bin/mail/main.c +++ b/usr.bin/mail/main.c @@ -90,7 +90,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 54df7c9..94851ad 100644 --- a/usr.bin/make/main.c +++ b/usr.bin/make/main.c @@ -35,7 +35,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: main.c,v 1.16 1997/02/22 19:27:14 peter Exp $ */ #ifndef lint @@ -167,7 +167,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/mesg/mesg.c b/usr.bin/mesg/mesg.c index ad666f7..96906c6 100644 --- a/usr.bin/mesg/mesg.c +++ b/usr.bin/mesg/mesg.c @@ -65,7 +65,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/mkfifo/mkfifo.c b/usr.bin/mkfifo/mkfifo.c index 53b7435..ddd9a8b 100644 --- a/usr.bin/mkfifo/mkfifo.c +++ b/usr.bin/mkfifo/mkfifo.c @@ -56,7 +56,7 @@ main(argc, argv) extern int optind; int ch, exitval; - 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 c081a16..a11f4d5 100644 --- a/usr.bin/modstat/modstat.c +++ b/usr.bin/modstat/modstat.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: modstat.c,v 1.6 1997/02/22 19:56:15 peter Exp $ + * $Id: modstat.c,v 1.7 1997/03/11 14:41:52 peter Exp $ */ #include <stdio.h> @@ -129,7 +129,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/more/option.c b/usr.bin/more/option.c index 29349d0..a95e700 100644 --- a/usr.bin/more/option.c +++ b/usr.bin/more/option.c @@ -69,7 +69,7 @@ option(argc, argv) (*a)[0] = '-'; optind = 1; /* called twice, re-init getopt. */ - while ((ch = getopt(argc, argv, "0123456789/:ceinst:ux:f")) != EOF) + while ((ch = getopt(argc, argv, "0123456789/:ceinst:ux:f")) != -1) switch((char)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/mt/mt.c b/usr.bin/mt/mt.c index c5adecb..ae94971 100644 --- a/usr.bin/mt/mt.c +++ b/usr.bin/mt/mt.c @@ -126,7 +126,7 @@ main(argc, argv) if ((tape = getenv("TAPE")) == NULL) tape = DEFTAPE; - while ((ch = getopt(argc, argv, "f:t:")) != EOF) + while ((ch = getopt(argc, argv, "f:t:")) != -1) switch(ch) { case 'f': case 't': diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index 4bf8719..56b9080 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -250,7 +250,7 @@ main(argc, argv) prog = argv[0]; af = AF_UNSPEC; - while ((ch = getopt(argc, argv, "Aabdf:ghI:iM:mN:np:rstuw:")) != EOF) + while ((ch = getopt(argc, argv, "Aabdf:ghI:iM:mN:np:rstuw:")) != -1) switch(ch) { case 'A': Aflag = 1; diff --git a/usr.bin/nfsstat/nfsstat.c b/usr.bin/nfsstat/nfsstat.c index db2fab4..a53991a 100644 --- a/usr.bin/nfsstat/nfsstat.c +++ b/usr.bin/nfsstat/nfsstat.c @@ -43,7 +43,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "From: @(#)nfsstat.c 8.1 (Berkeley) 6/6/93";*/ static const char rcsid[] = - "$Id$"; + "$Id: nfsstat.c,v 1.8 1997/02/22 19:56:25 peter Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -93,7 +93,7 @@ main(argc, argv) interval = 0; memf = nlistf = NULL; - 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/nm/nm.c b/usr.bin/nm/nm.c index 9110114..9ee4b6e 100644 --- a/usr.bin/nm/nm.c +++ b/usr.bin/nm/nm.c @@ -96,7 +96,7 @@ main(argc, argv) extern int optind; int ch, errors; - while ((ch = getopt(argc, argv, "agnoprtuwW")) != EOF) { + while ((ch = getopt(argc, argv, "agnoprtuwW")) != -1) { switch (ch) { case 'a': print_all_symbols = 1; diff --git a/usr.bin/passwd/passwd.c b/usr.bin/passwd/passwd.c index 64358dd..46562c6 100644 --- a/usr.bin/passwd/passwd.c +++ b/usr.bin/passwd/passwd.c @@ -43,7 +43,7 @@ static const char copyright[] = #ifndef lint static const char sccsid[] = "From: @(#)passwd.c 8.3 (Berkeley) 4/2/94"; static const char rcsid[] = - "$Id$"; + "$Id: passwd.c,v 1.11 1997/02/22 19:56:35 peter Exp $"; #endif /* not lint */ #include <err.h> @@ -103,7 +103,7 @@ main(argc, argv) if (strstr(argv[0], "yppasswd")) __use_yp = 1; #endif - while ((ch = getopt(argc, argv, OPTIONS)) != EOF) { + while ((ch = getopt(argc, argv, OPTIONS)) != -1) { switch (ch) { case 'l': /* change local password file */ use_local_passwd = 1; diff --git a/usr.bin/paste/paste.c b/usr.bin/paste/paste.c index 7f17e1d..4155855 100644 --- a/usr.bin/paste/paste.c +++ b/usr.bin/paste/paste.c @@ -62,7 +62,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 decaaed..ed729d8 100644 --- a/usr.bin/pr/pr.c +++ b/usr.bin/pr/pr.c @@ -1585,7 +1585,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/printenv/printenv.c b/usr.bin/printenv/printenv.c index fc40e3d..cf33837 100644 --- a/usr.bin/printenv/printenv.c +++ b/usr.bin/printenv/printenv.c @@ -66,7 +66,7 @@ main(argc, argv) register size_t len; int ch; - while ((ch = getopt(argc, argv, "")) != EOF) + while ((ch = getopt(argc, argv, "")) != -1) switch(ch) { case '?': default: diff --git a/usr.bin/printf/printf.c b/usr.bin/printf/printf.c index 05da634..3444c20 100644 --- a/usr.bin/printf/printf.c +++ b/usr.bin/printf/printf.c @@ -100,7 +100,7 @@ main(argc, argv) int ch, end, fieldwidth, precision; char convch, nextch, *format, *fmt, *start; - while ((ch = getopt(argc, argv, "")) != EOF) + while ((ch = getopt(argc, argv, "")) != -1) switch (ch) { case '?': default: diff --git a/usr.bin/quota/quota.c b/usr.bin/quota/quota.c index a54c957..77a165c 100644 --- a/usr.bin/quota/quota.c +++ b/usr.bin/quota/quota.c @@ -116,7 +116,7 @@ main(argc, argv) extern char *optarg; extern int optind, errno; - while ((ch = getopt(argc, argv, "ugvq")) != EOF) { + while ((ch = getopt(argc, argv, "ugvq")) != -1) { switch(ch) { case 'g': gflag++; diff --git a/usr.bin/ranlib/ranlib.c b/usr.bin/ranlib/ranlib.c index c109139..d58a4cf 100644 --- a/usr.bin/ranlib/ranlib.c +++ b/usr.bin/ranlib/ranlib.c @@ -67,7 +67,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 2fe272e..2f8241f 100644 --- a/usr.bin/rev/rev.c +++ b/usr.bin/rev/rev.c @@ -62,7 +62,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 c7288e2..2ddc2b8 100644 --- a/usr.bin/rlogin/rlogin.c +++ b/usr.bin/rlogin/rlogin.c @@ -178,7 +178,7 @@ main(argc, argv) #else #define OPTIONS "8DEKLde: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 1cf5bf1..4a50531 100644 --- a/usr.bin/rpcinfo/rpcinfo.c +++ b/usr.bin/rpcinfo/rpcinfo.c @@ -1,7 +1,7 @@ #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[] = "$Id$"; +static char rcsid[] = "$Id: rpcinfo.c,v 1.4 1997/02/22 19:56:45 peter Exp $"; #endif /* @@ -95,7 +95,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 2a28fa0..70f311d 100644 --- a/usr.bin/rsh/rsh.c +++ b/usr.bin/rsh/rsh.c @@ -40,7 +40,7 @@ static char copyright[] = #ifndef lint static char sccsid[] = "From: @(#)rsh.c 8.3 (Berkeley) 4/6/94"; static char rcsid[] = - "$Id$"; + "$Id: rsh.c,v 1.10 1997/02/22 19:56:46 peter Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -130,7 +130,7 @@ main(argc, argv) #else #define OPTIONS "8KLde:l:nt:w" #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 e4103d9..0acf722 100644 --- a/usr.bin/ruptime/ruptime.c +++ b/usr.bin/ruptime/ruptime.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. */ -/* $Id$ */ +/* $Id: ruptime.c,v 1.9 1997/02/22 19:56:50 peter Exp $ */ #ifndef lint static char copyright[] = @@ -96,7 +96,7 @@ main(argc, argv) aflg = 0; cmp = hscmp; - while ((ch = getopt(argc, argv, "alrut")) != EOF) + while ((ch = getopt(argc, argv, "alrut")) != -1) switch (ch) { case 'a': aflg = 1; diff --git a/usr.bin/rwho/rwho.c b/usr.bin/rwho/rwho.c index b617af5..557e8fa 100644 --- a/usr.bin/rwho/rwho.c +++ b/usr.bin/rwho/rwho.c @@ -88,7 +88,7 @@ main(argc, argv) (void) setlocale(LC_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 153fc51..6c9ed08 100644 --- a/usr.bin/script/script.c +++ b/usr.bin/script/script.c @@ -85,7 +85,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 5324002..02cbfac 100644 --- a/usr.bin/sed/main.c +++ b/usr.bin/sed/main.c @@ -112,7 +112,7 @@ main(argc, argv) (void) setlocale(LC_ALL, ""); 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/sgmls/instant/main.c b/usr.bin/sgmls/instant/main.c index 511fedf..2f10537 100644 --- a/usr.bin/sgmls/instant/main.c +++ b/usr.bin/sgmls/instant/main.c @@ -66,7 +66,7 @@ #ifndef lint static char *RCSid = - "$Header: /usr/src/docbook-to-man/Instant/RCS/main.c,v 1.8 1996/06/12 03:32:48 fld Exp $"; + "$Header: /home/ncvs/src/usr.bin/sgmls/instant/main.c,v 1.1.1.1 1996/09/08 01:55:10 jfieber Exp $"; #endif #include <stdio.h> @@ -266,7 +266,7 @@ HandleArgs( extern char *optarg; extern int optind; - while ((c=getopt(ac, av, "df:t:v:o:huSxIl:bHVWi:D:Z")) != EOF) { + while ((c=getopt(ac, av, "df:t:v:o:huSxIl:bHVWi:D:Z")) != -1) { switch (c) { case 't': tranfile = optarg; break; case 'v': do_validate = 1; break; diff --git a/usr.bin/sgmls/sgmls/catalog.c b/usr.bin/sgmls/sgmls/catalog.c index 164b97d..28077a8 100644 --- a/usr.bin/sgmls/sgmls/catalog.c +++ b/usr.bin/sgmls/sgmls/catalog.c @@ -828,7 +828,7 @@ int main(argc, argv) program_name = argv[0]; - while ((opt = getopt(argc, argv, "edl")) != EOF) + while ((opt = getopt(argc, argv, "edl")) != -1) switch (opt) { case 'e': entity_flag = 1; diff --git a/usr.bin/sgmls/sgmls/main.c b/usr.bin/sgmls/sgmls/main.c index fb2d303..25ead40 100644 --- a/usr.bin/sgmls/sgmls/main.c +++ b/usr.bin/sgmls/sgmls/main.c @@ -123,7 +123,7 @@ char **argv; catalog = catalog_create(do_catalog_error); swinit(&sw); - while ((opt = getopt(argc, argv, options)) != EOF) { + while ((opt = getopt(argc, argv, options)) != -1) { switch (opt) { case 'm': catalog_load_file(catalog, optarg); diff --git a/usr.bin/showmount/showmount.c b/usr.bin/showmount/showmount.c index 62898d2..cfb2b64 100644 --- a/usr.bin/showmount/showmount.c +++ b/usr.bin/showmount/showmount.c @@ -108,7 +108,7 @@ main(argc, argv) char *host; int estat; - while ((ch = getopt(argc, argv, "ade3")) != EOF) + while ((ch = getopt(argc, argv, "ade3")) != -1) switch((char)ch) { case 'a': if (type == 0) { diff --git a/usr.bin/size/size.c b/usr.bin/size/size.c index 674c3c8..b34e24c 100644 --- a/usr.bin/size/size.c +++ b/usr.bin/size/size.c @@ -61,7 +61,7 @@ main(argc, argv) { int ch, eval; - while ((ch = getopt(argc, argv, "")) != EOF) + while ((ch = getopt(argc, argv, "")) != -1) switch(ch) { case '?': default: diff --git a/usr.bin/split/split.c b/usr.bin/split/split.c index efd2a21..6b75c75 100644 --- a/usr.bin/split/split.c +++ b/usr.bin/split/split.c @@ -73,7 +73,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/strings/strings.c b/usr.bin/strings/strings.c index 8878420..2ddeced 100644 --- a/usr.bin/strings/strings.c +++ b/usr.bin/strings/strings.c @@ -90,7 +90,7 @@ main(argc, argv) */ asdata = exitcode = fflg = oflg = 0; minlen = -1; - while ((ch = getopt(argc, argv, "-0123456789an:of")) != EOF) + while ((ch = getopt(argc, argv, "-0123456789an:of")) != -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 22e1306..564a9a3 100644 --- a/usr.bin/strip/strip.c +++ b/usr.bin/strip/strip.c @@ -39,7 +39,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "@(#)strip.c 8.1 (Berkeley) 6/6/93";*/ -static char RCSid[] = "$Id$"; +static char RCSid[] = "$Id: strip.c,v 1.9 1997/02/22 19:57:14 peter Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -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 fa4f02a..1c17d5c 100644 --- a/usr.bin/su/su.c +++ b/usr.bin/su/su.c @@ -42,7 +42,7 @@ static const char copyright[] = static char sccsid[] = "@(#)su.c 8.3 (Berkeley) 4/2/94"; */ static const char rcsid[] = - "$Id: su.c,v 1.17 1997/01/14 09:24:09 davidn Exp $"; + "$Id: su.c,v 1.18 1997/02/24 20:32:24 guido Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -121,7 +121,7 @@ main(argc, argv) asme = asthem = fastlogin = 0; user = "root"; while(optind < argc) - if((ch = getopt(argc, argv, ARGSTR)) != EOF) + if((ch = getopt(argc, argv, ARGSTR)) != -1) switch((char)ch) { #ifdef KERBEROS case 'K': diff --git a/usr.bin/symorder/symorder.c b/usr.bin/symorder/symorder.c index 2cac53c..0686993 100644 --- a/usr.bin/symorder/symorder.c +++ b/usr.bin/symorder/symorder.c @@ -84,7 +84,7 @@ main(argc, argv) int ch, n, o; xfilename = NULL; - while ((ch = getopt(argc, argv, "cmtx:")) != EOF) + while ((ch = getopt(argc, argv, "cmtx:")) != -1) switch(ch) { case 'c': clean = 1; diff --git a/usr.bin/tail/tail.c b/usr.bin/tail/tail.c index 9e2223f..4c7ea6f 100644 --- a/usr.bin/tail/tail.c +++ b/usr.bin/tail/tail.c @@ -107,7 +107,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 dea204c..3508372 100644 --- a/usr.bin/tcopy/tcopy.c +++ b/usr.bin/tcopy/tcopy.c @@ -81,7 +81,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/tee/tee.c b/usr.bin/tee/tee.c index ad1110a..1008973 100644 --- a/usr.bin/tee/tee.c +++ b/usr.bin/tee/tee.c @@ -74,7 +74,7 @@ main(argc, argv) #define BSIZE (8 * 1024) append = 0; - while ((ch = getopt(argc, argv, "ai")) != EOF) + while ((ch = getopt(argc, argv, "ai")) != -1) switch((char)ch) { case 'a': append = 1; diff --git a/usr.bin/telnet/main.c b/usr.bin/telnet/main.c index 896405c..3c4d8df 100644 --- a/usr.bin/telnet/main.c +++ b/usr.bin/telnet/main.c @@ -135,7 +135,7 @@ main(argc, argv) rlogin = (strncmp(prompt, "rlog", 4) == 0) ? '~' : _POSIX_VDISABLE; autologin = -1; - while ((ch = getopt(argc, argv, "8EKLS:X:acde:fFk:l:n:rt:x")) != EOF) { + while ((ch = getopt(argc, argv, "8EKLS:X:acde: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 96b1607..52a5709 100644 --- a/usr.bin/time/time.c +++ b/usr.bin/time/time.c @@ -65,7 +65,7 @@ main(argc, argv) struct rusage ru; lflag = 0; - while ((ch = getopt(argc, argv, "l")) != EOF) + while ((ch = getopt(argc, argv, "l")) != -1) switch((char)ch) { case 'l': lflag = 1; diff --git a/usr.bin/touch/touch.c b/usr.bin/touch/touch.c index 02f7ccc..32a7319 100644 --- a/usr.bin/touch/touch.c +++ b/usr.bin/touch/touch.c @@ -74,7 +74,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 c45be50..c1afb31 100644 --- a/usr.bin/tput/tput.c +++ b/usr.bin/tput/tput.c @@ -67,7 +67,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 2dc5402..50b9d7c 100644 --- a/usr.bin/tr/tr.c +++ b/usr.bin/tr/tr.c @@ -103,7 +103,7 @@ main(argc, argv) (void) setlocale(LC_CTYPE, ""); 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 46c2544..b25398b 100644 --- a/usr.bin/tset/tset.c +++ b/usr.bin/tset/tset.c @@ -94,7 +94,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 bdcd9b2..591ad16 100644 --- a/usr.bin/tsort/tsort.c +++ b/usr.bin/tsort/tsort.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: tsort.c,v 1.6 1997/02/22 19:57:28 peter Exp $ + * $Id: tsort.c,v 1.7 1997/03/11 14:48:14 peter Exp $ */ #ifndef lint @@ -122,7 +122,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/tty/tty.c b/usr.bin/tty/tty.c index d07cab7..88cd60a 100644 --- a/usr.bin/tty/tty.c +++ b/usr.bin/tty/tty.c @@ -51,7 +51,7 @@ main(argc, argv) char *t, *ttyname(); sflag = 0; - while ((ch = getopt(argc, argv, "s")) != EOF) + while ((ch = getopt(argc, argv, "s")) != -1) switch((char)ch) { case 's': sflag = 1; diff --git a/usr.bin/ul/ul.c b/usr.bin/ul/ul.c index 100059c..cf9f9ef 100644 --- a/usr.bin/ul/ul.c +++ b/usr.bin/ul/ul.c @@ -93,7 +93,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/uname/uname.c b/usr.bin/uname/uname.c index 86b5dce..1245560 100644 --- a/usr.bin/uname/uname.c +++ b/usr.bin/uname/uname.c @@ -67,7 +67,7 @@ main(argc, argv) char *p, *prefix, buf[1024]; flags = 0; - while ((ch = getopt(argc, argv, "amnrsv")) != EOF) + while ((ch = getopt(argc, argv, "amnrsv")) != -1) switch(ch) { case 'a': flags |= (MFLAG | NFLAG | RFLAG | SFLAG | VFLAG); diff --git a/usr.bin/uniq/uniq.c b/usr.bin/uniq/uniq.c index b2b85e1..25350d7 100644 --- a/usr.bin/uniq/uniq.c +++ b/usr.bin/uniq/uniq.c @@ -74,7 +74,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 82cad81..5ea689b 100644 --- a/usr.bin/unvis/unvis.c +++ b/usr.bin/unvis/unvis.c @@ -57,7 +57,7 @@ main(argc, argv) int ch; Program = argv[0]; - 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 11571f2..48a584a 100644 --- a/usr.bin/users/users.c +++ b/usr.bin/users/users.c @@ -57,7 +57,7 @@ main(argc, argv) char names[MAXUSERS][UT_NAMESIZE]; int ch, scmp(); - while ((ch = getopt(argc, argv, "")) != EOF) + while ((ch = getopt(argc, argv, "")) != -1) switch(ch) { case '?': default: diff --git a/usr.bin/uudecode/uudecode.c b/usr.bin/uudecode/uudecode.c index ebe2832..1667e01 100644 --- a/usr.bin/uudecode/uudecode.c +++ b/usr.bin/uudecode/uudecode.c @@ -73,7 +73,7 @@ main(argc, argv) extern int errno; int rval, ch; - while ((ch = getopt(argc, argv, "cp")) != EOF) { + while ((ch = getopt(argc, argv, "cp")) != -1) { switch(ch) { case 'c': cflag = 1; /* multiple uudecode'd files */ diff --git a/usr.bin/uuencode/uuencode.c b/usr.bin/uuencode/uuencode.c index 774cee9..8580624 100644 --- a/usr.bin/uuencode/uuencode.c +++ b/usr.bin/uuencode/uuencode.c @@ -62,7 +62,7 @@ main(argc, argv) int mode; char *strerror(); - while (getopt(argc, argv, "") != EOF) + while (getopt(argc, argv, "") != -1) usage(); argv += optind; argc -= optind; diff --git a/usr.bin/vacation/vacation.c b/usr.bin/vacation/vacation.c index 5be04da..4de8870 100644 --- a/usr.bin/vacation/vacation.c +++ b/usr.bin/vacation/vacation.c @@ -40,7 +40,7 @@ static char copyright[] = #ifndef lint static char sccsid[] = "From: @(#)vacation.c 8.2 (Berkeley) 1/26/94"; static char rcsid[] = - "$Id$"; + "$Id: vacation.c,v 1.5 1997/02/22 19:57:39 peter Exp $"; #endif /* not lint */ /* @@ -112,7 +112,7 @@ main(argc, argv) opterr = iflag = lflag = 0; interval = -1; - while ((ch = getopt(argc, argv, "a:Iilr:")) != EOF) + while ((ch = getopt(argc, argv, "a:Iilr:")) != -1) switch((char)ch) { case 'a': /* alias */ if (!(cur = (ALIAS *)malloc((u_int)sizeof(ALIAS)))) diff --git a/usr.bin/vis/vis.c b/usr.bin/vis/vis.c index 494ae57..93bda20 100644 --- a/usr.bin/vis/vis.c +++ b/usr.bin/vis/vis.c @@ -58,7 +58,7 @@ main(argc, argv) (void) setlocale(LC_CTYPE, ""); - 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 6f65a30..fe363a2 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -184,7 +184,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 f027997..251cde0 100644 --- a/usr.bin/w/w.c +++ b/usr.bin/w/w.c @@ -146,7 +146,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 791dd36..8bef548 100644 --- a/usr.bin/wall/wall.c +++ b/usr.bin/wall/wall.c @@ -81,7 +81,7 @@ main(argc, argv) char *p, *ttymsg(); char line[sizeof(utmp.ut_line) + 1]; - while ((ch = getopt(argc, argv, "n")) != EOF) + while ((ch = getopt(argc, argv, "n")) != -1) switch (ch) { case 'n': /* undoc option for shutdown: suppress banner */ diff --git a/usr.bin/wc/wc.c b/usr.bin/wc/wc.c index 43bbe4b..1670f1b 100644 --- a/usr.bin/wc/wc.c +++ b/usr.bin/wc/wc.c @@ -42,7 +42,7 @@ static const char copyright[] = static const char sccsid[] = "@(#)wc.c 8.1 (Berkeley) 6/6/93"; #else static const char rcsid[] = - "$Id$"; + "$Id: wc.c,v 1.6 1997/02/22 19:57:44 peter Exp $"; #endif #endif /* not lint */ @@ -74,7 +74,7 @@ main(argc, argv) (void) setlocale(LC_CTYPE, ""); - while ((ch = getopt(argc, argv, "lwc")) != EOF) + while ((ch = getopt(argc, argv, "lwc")) != -1) switch((char)ch) { case 'l': doline = 1; diff --git a/usr.bin/whois/whois.c b/usr.bin/whois/whois.c index ca832ae..a70301a 100644 --- a/usr.bin/whois/whois.c +++ b/usr.bin/whois/whois.c @@ -68,7 +68,7 @@ main(argc, argv) #endif 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 91f403b..a0e8c0d 100644 --- a/usr.bin/xargs/xargs.c +++ b/usr.bin/xargs/xargs.c @@ -90,7 +90,7 @@ main(argc, argv, env) nline -= strlen(*ep++) + 1 + sizeof(*ep); } 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 6b63389..8c93e0b 100644 --- a/usr.bin/xinstall/xinstall.c +++ b/usr.bin/xinstall/xinstall.c @@ -40,7 +40,7 @@ static const char copyright[] = #ifndef lint /*static char sccsid[] = "From: @(#)xinstall.c 8.1 (Berkeley) 7/21/93";*/ static const char rcsid[] = - "$Id$"; + "$Id: xinstall.c,v 1.21 1997/02/22 19:57:55 peter Exp $"; #endif /* not lint */ /*- @@ -129,7 +129,7 @@ main(argc, argv) char *flags, *to_name; iflags = 0; - while ((ch = getopt(argc, argv, "CcdDf:g:m:o:psv")) != EOF) + while ((ch = getopt(argc, argv, "CcdDf:g:m:o:psv")) != -1) switch((char)ch) { case 'C': docompare = docopy = 1; |