summaryrefslogtreecommitdiffstats
path: root/atc
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2006-03-22 05:03:10 +0000
committerchristos <christos@NetBSD.org>2006-03-22 05:03:10 +0000
commitf4bbbc82b97201e01b30fc2e56e1e2bf596f916f (patch)
tree50364c56adb3433a58d1a6ca81b901b4b75e0582 /atc
parent9a08ea3a64a2f17a6203ad610baab369e46c3c55 (diff)
downloadbsdgames-darwin-f4bbbc82b97201e01b30fc2e56e1e2bf596f916f.tar.gz
bsdgames-darwin-f4bbbc82b97201e01b30fc2e56e1e2bf596f916f.tar.zst
bsdgames-darwin-f4bbbc82b97201e01b30fc2e56e1e2bf596f916f.zip
Simplify (Masao Uebayashi)
Diffstat (limited to 'atc')
-rw-r--r--atc/update.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/atc/update.c b/atc/update.c
index 7b7a3eda..dafa74e7 100644
--- a/atc/update.c
+++ b/atc/update.c
@@ -1,4 +1,4 @@
-/* $NetBSD: update.c,v 1.15 2006/03/22 04:24:14 christos Exp $ */
+/* $NetBSD: update.c,v 1.16 2006/03/22 05:03:10 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -46,7 +46,7 @@
#if 0
static char sccsid[] = "@(#)update.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: update.c,v 1.15 2006/03/22 04:24:14 christos Exp $");
+__RCSID("$NetBSD: update.c,v 1.16 2006/03/22 05:03:10 christos Exp $");
#endif
#endif /* not lint */
@@ -260,12 +260,12 @@ name(const PLANE *p)
int
number(int l)
{
- if ((l < 'a' && l > 'z') || (l < 'A' && l > 'Z'))
- return (-1);
- else if (l >= 'a' && l <= 'z')
+ if (islower((unsigned char)l)
return (l - 'a');
- else
+ else if (isupper((unsigned char)l)
return (l - 'A');
+ else
+ return (-1);
}
int