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! --- sys/arch/atari/stand/tostools/chg_pid/chg_pid.c | 4 ++-- sys/arch/atari/stand/tostools/loadbsd/loadbsd.c | 4 ++-- sys/arch/atari/stand/tostools/rawwrite/rawwrite.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'sys/arch/atari/stand/tostools') diff --git a/sys/arch/atari/stand/tostools/chg_pid/chg_pid.c b/sys/arch/atari/stand/tostools/chg_pid/chg_pid.c index 1a226c93957..553f75ff398 100644 --- a/sys/arch/atari/stand/tostools/chg_pid/chg_pid.c +++ b/sys/arch/atari/stand/tostools/chg_pid/chg_pid.c @@ -95,7 +95,7 @@ int read_block PROTO((void *, int, int)); int write_block PROTO((void *, int, int)); void set_csum PROTO((char *)); -const char version[] = "$Revision: 1.2 $"; +const char version[] = "$Revision: 1.3 $"; char *Progname = NULL; /* What are we called */ int t_flag = 0; /* Test -- don't actually do it */ @@ -121,7 +121,7 @@ char *argv[]; init_toslib(argv[0]); Progname = argv[0]; - while ((c = getopt(argc, argv, "htVwo:")) != EOF) { + while ((c = getopt(argc, argv, "htVwo:")) != -1) { switch (c) { case 'h': h_flag = 1; diff --git a/sys/arch/atari/stand/tostools/loadbsd/loadbsd.c b/sys/arch/atari/stand/tostools/loadbsd/loadbsd.c index 784d0b25d05..649b4ff664b 100644 --- a/sys/arch/atari/stand/tostools/loadbsd/loadbsd.c +++ b/sys/arch/atari/stand/tostools/loadbsd/loadbsd.c @@ -52,7 +52,7 @@ int s_flag = 0; /* St-ram only */ int t_flag = 0; /* Just test, do not execute */ int v_flag = 0; /* show version */ -const char version[] = "$Revision: 1.2 $"; +const char version[] = "$Revision: 1.3 $"; /* * Default name of kernel to boot, large enough to patch @@ -86,7 +86,7 @@ char **argv; kparam.boothowto = RB_SINGLE; - while ((ch = getopt(argc, argv, "abdhstVwDo:S:T:")) != EOF) { + while ((ch = getopt(argc, argv, "abdhstVwDo:S:T:")) != -1) { switch (ch) { case 'a': kparam.boothowto &= ~(RB_SINGLE); diff --git a/sys/arch/atari/stand/tostools/rawwrite/rawwrite.c b/sys/arch/atari/stand/tostools/rawwrite/rawwrite.c index ad4f092496f..d9eed90059a 100644 --- a/sys/arch/atari/stand/tostools/rawwrite/rawwrite.c +++ b/sys/arch/atari/stand/tostools/rawwrite/rawwrite.c @@ -53,7 +53,7 @@ int v_flag = 0; /* Verbose (a dot for each track copied) */ int V_flag = 0; /* Show version */ char *progname; -const char version[] = "$Revision: 1.2 $"; +const char version[] = "$Revision: 1.3 $"; int main(argc, argv) @@ -71,7 +71,7 @@ char *argv[]; progname = argv[0]; init_toslib(argv[0]); - while ((ch = getopt(argc, argv, "hvVwo:")) != EOF) { + while ((ch = getopt(argc, argv, "hvVwo:")) != -1) { switch (ch) { case 'h': h_flag = 1; -- cgit v1.2.3