From 906b60f5e0d2f935746d2a4e0fcd05d5a00f1e35 Mon Sep 17 00:00:00 2001 From: lukem Date: Sat, 18 Oct 1997 14:49:41 +0000 Subject: [PATCH] getopt returns -1 not EOF --- 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 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/usr.bin/file/file.c b/usr.bin/file/file.c index f6113043722f..6fe134523001 100644 --- a/usr.bin/file/file.c +++ b/usr.bin/file/file.c @@ -1,4 +1,4 @@ -/* $NetBSD: file.c,v 1.11 1997/01/28 00:49:40 christos Exp $ */ +/* $NetBSD: file.c,v 1.12 1997/10/18 14:49:41 lukem Exp $ */ /* * file - find type of a file or files - main program. @@ -28,7 +28,7 @@ */ #ifndef lint static char *moduleid = - "@(#)$NetBSD: file.c,v 1.11 1997/01/28 00:49:40 christos Exp $"; + "@(#)$NetBSD: file.c,v 1.12 1997/10/18 14:49:41 lukem Exp $"; #endif /* lint */ #include @@ -105,7 +105,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 ce3ae3dfb4e3..237178ce3906 100644 --- a/usr.bin/find/main.c +++ b/usr.bin/find/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.6 1997/01/09 20:19:14 tls Exp $ */ +/* $NetBSD: main.c,v 1.7 1997/10/18 14:49:45 lukem 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[] = "$NetBSD: main.c,v 1.6 1997/01/09 20:19:14 tls Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.7 1997/10/18 14:49:45 lukem Exp $"; #endif /* not lint */ #include @@ -73,7 +73,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 7e6522e98f79..e891559d871a 100644 --- a/usr.bin/finger/finger.c +++ b/usr.bin/finger/finger.c @@ -1,4 +1,4 @@ -/* $NetBSD: finger.c,v 1.8 1997/09/09 02:41:08 mrg Exp $ */ +/* $NetBSD: finger.c,v 1.9 1997/10/18 14:49:48 lukem Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. @@ -54,7 +54,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)finger.c 5.22 (Berkeley) 6/29/90";*/ -static char rcsid[] = "$NetBSD: finger.c,v 1.8 1997/09/09 02:41:08 mrg Exp $"; +static char rcsid[] = "$NetBSD: finger.c,v 1.9 1997/10/18 14:49:48 lukem Exp $"; #endif /* not lint */ /* @@ -94,7 +94,7 @@ main(argc, argv) oflag = 1; /* default to old "office" behavior */ - while ((ch = getopt(argc, argv, "lmpshog")) != EOF) + while ((ch = getopt(argc, argv, "lmpshog")) != -1) switch(ch) { case 'l': lflag = 1; /* long format */ diff --git a/usr.bin/from/from.c b/usr.bin/from/from.c index e4e6c10f9a5a..135afeef8264 100644 --- a/usr.bin/from/from.c +++ b/usr.bin/from/from.c @@ -1,4 +1,4 @@ -/* $NetBSD: from.c,v 1.6 1995/09/01 01:39:10 jtc Exp $ */ +/* $NetBSD: from.c,v 1.7 1997/10/18 14:49:50 lukem Exp $ */ /* * Copyright (c) 1980, 1988, 1993 @@ -43,7 +43,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)from.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$NetBSD: from.c,v 1.6 1995/09/01 01:39:10 jtc Exp $"; +static char rcsid[] = "$NetBSD: from.c,v 1.7 1997/10/18 14:49:50 lukem Exp $"; #endif /* not lint */ #include @@ -70,7 +70,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 35b52b649ddc..0feed8bfa48f 100644 --- a/usr.bin/fstat/fstat.c +++ b/usr.bin/fstat/fstat.c @@ -1,4 +1,4 @@ -/* $NetBSD: fstat.c,v 1.21 1997/10/18 11:38:27 mrg Exp $ */ +/* $NetBSD: fstat.c,v 1.22 1997/10/18 14:49:52 lukem Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -43,7 +43,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)fstat.c 8.3 (Berkeley) 5/2/95"; #else -static char *rcsid = "$NetBSD: fstat.c,v 1.21 1997/10/18 11:38:27 mrg Exp $"; +static char *rcsid = "$NetBSD: fstat.c,v 1.22 1997/10/18 14:49:52 lukem Exp $"; #endif #endif /* not lint */ @@ -167,7 +167,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;