getopt returns -1 not EOF
This commit is contained in:
parent
80baf83f8c
commit
8ebe3a25b5
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: apply.c,v 1.4 1997/10/18 11:47:23 lukem Exp $ */
|
||||
/* $NetBSD: apply.c,v 1.5 1997/10/18 12:23:21 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994
|
||||
|
@ -41,7 +41,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)apply.c 8.4 (Berkeley) 4/4/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: apply.c,v 1.4 1997/10/18 11:47:23 lukem Exp $");
|
||||
__RCSID("$NetBSD: apply.c,v 1.5 1997/10/18 12:23:21 lukem Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -71,7 +71,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')
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ar.c,v 1.6 1997/10/18 11:52:50 lukem Exp $ */
|
||||
/* $NetBSD: ar.c,v 1.7 1997/10/18 12:23:28 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993, 1994
|
||||
|
@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 1993, 1994\n\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)ar.c 8.3 (Berkeley) 4/2/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: ar.c,v 1.6 1997/10/18 11:52:50 lukem Exp $");
|
||||
__RCSID("$NetBSD: ar.c,v 1.7 1997/10/18 12:23:28 lukem Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -102,7 +102,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;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: at.c,v 1.6 1997/10/18 12:04:07 lukem Exp $ */
|
||||
/* $NetBSD: at.c,v 1.7 1997/10/18 12:23:37 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* at.c : Put file into atrun queue
|
||||
|
@ -64,7 +64,7 @@
|
|||
|
||||
/* File scope variables */
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: at.c,v 1.6 1997/10/18 12:04:07 lukem Exp $");
|
||||
__RCSID("$NetBSD: at.c,v 1.7 1997/10/18 12:23:37 lukem Exp $");
|
||||
#endif
|
||||
|
||||
char *no_export[] =
|
||||
|
@ -502,7 +502,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;
|
||||
|
|
Loading…
Reference in New Issue