diff options
author | dsl <dsl@NetBSD.org> | 2004-11-05 21:30:31 +0000 |
---|---|---|
committer | dsl <dsl@NetBSD.org> | 2004-11-05 21:30:31 +0000 |
commit | 9649fe0209de88926626165951e2db3043b73ee6 (patch) | |
tree | f7d328358e6de9a877c8d0fc24f5ae49ad21f031 /sail | |
parent | ef4d58572f66f86a3db4aa555d139fee63cca10c (diff) | |
download | bsdgames-darwin-9649fe0209de88926626165951e2db3043b73ee6.tar.gz bsdgames-darwin-9649fe0209de88926626165951e2db3043b73ee6.tar.zst bsdgames-darwin-9649fe0209de88926626165951e2db3043b73ee6.zip |
Add (unsigned char) cast to ctype functions
Diffstat (limited to 'sail')
-rw-r--r-- | sail/dr_1.c | 7 | ||||
-rw-r--r-- | sail/misc.c | 6 | ||||
-rw-r--r-- | sail/pl_4.c | 6 | ||||
-rw-r--r-- | sail/pl_5.c | 6 |
4 files changed, 12 insertions, 13 deletions
diff --git a/sail/dr_1.c b/sail/dr_1.c index 1d8b5444..df2ade32 100644 --- a/sail/dr_1.c +++ b/sail/dr_1.c @@ -1,4 +1,4 @@ -/* $NetBSD: dr_1.c,v 1.20 2004/09/07 13:20:39 jrf Exp $ */ +/* $NetBSD: dr_1.c,v 1.21 2004/11/05 21:30:32 dsl Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)dr_1.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: dr_1.c,v 1.20 2004/09/07 13:20:39 jrf Exp $"); +__RCSID("$NetBSD: dr_1.c,v 1.21 2004/11/05 21:30:32 dsl Exp $"); #endif #endif /* not lint */ @@ -425,8 +425,7 @@ next(void) if (tp == 0) p = "Driver"; else { - if (islower(*tp)) - *tp = toupper(*tp); + *tp = toupper((unsigned char)*tp); p = tp; } strlcpy(bestship->file->captain, p, diff --git a/sail/misc.c b/sail/misc.c index d576b35e..ad3a647d 100644 --- a/sail/misc.c +++ b/sail/misc.c @@ -1,4 +1,4 @@ -/* $NetBSD: misc.c,v 1.14 2004/02/08 00:32:48 jsm Exp $ */ +/* $NetBSD: misc.c,v 1.15 2004/11/05 21:30:32 dsl Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)misc.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: misc.c,v 1.14 2004/02/08 00:32:48 jsm Exp $"); +__RCSID("$NetBSD: misc.c,v 1.15 2004/11/05 21:30:32 dsl Exp $"); #endif #endif /* not lint */ @@ -188,7 +188,7 @@ colours(struct ship *sp) if (sp->file->struck) return flag; flag = *countryname[capship(sp)->nationality]; - return sp->file->FS ? flag : tolower(flag); + return sp->file->FS ? flag : tolower((unsigned char)flag); } void diff --git a/sail/pl_4.c b/sail/pl_4.c index 5d2a16f1..7958b56e 100644 --- a/sail/pl_4.c +++ b/sail/pl_4.c @@ -1,4 +1,4 @@ -/* $NetBSD: pl_4.c,v 1.14 2003/08/07 09:37:44 agc Exp $ */ +/* $NetBSD: pl_4.c,v 1.15 2004/11/05 21:30:32 dsl Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)pl_4.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: pl_4.c,v 1.14 2003/08/07 09:37:44 agc Exp $"); +__RCSID("$NetBSD: pl_4.c,v 1.15 2004/11/05 21:30:32 dsl Exp $"); #endif #endif /* not lint */ @@ -95,7 +95,7 @@ lookout(void) sgetstr("What ship? ", buf, sizeof buf); foreachship(sp) { c = *countryname[sp->nationality]; - if ((c == *buf || tolower(c) == *buf || colours(sp) == *buf) + if ((tolower((unsigned char)c) == *buf || colours(sp) == *buf) && (sp->file->stern == buf[1] || sterncolour(sp) == buf[1] || buf[1] == '?')) { eyeball(sp); diff --git a/sail/pl_5.c b/sail/pl_5.c index c8d9229e..b3bdd77a 100644 --- a/sail/pl_5.c +++ b/sail/pl_5.c @@ -1,4 +1,4 @@ -/* $NetBSD: pl_5.c,v 1.16 2003/08/07 09:37:44 agc Exp $ */ +/* $NetBSD: pl_5.c,v 1.17 2004/11/05 21:30:32 dsl Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)pl_5.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: pl_5.c,v 1.16 2003/08/07 09:37:44 agc Exp $"); +__RCSID("$NetBSD: pl_5.c,v 1.17 2004/11/05 21:30:32 dsl Exp $"); #endif #endif /* not lint */ @@ -122,7 +122,7 @@ acceptmove(void) *p-- = '\0'; break; default: - if (!isspace(*p)) { + if (!isspace((unsigned char)*p)) { Msg("Input error."); *p-- = '\0'; } |