summaryrefslogtreecommitdiff
path: root/sys/lib/libsa
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1996-12-12 08:16:31 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1996-12-12 08:16:31 +0000
commite22e1d92712ee0fc9ff77a990915cbe6f6aa3692 (patch)
treead1c7b4240eb6bf629292795bf0461757198b08c /sys/lib/libsa
parent400d4472f4cbff4f3481e7c0678da3716292f023 (diff)
safe to{lower,upper} macros.
Diffstat (limited to 'sys/lib/libsa')
-rw-r--r--sys/lib/libsa/stand.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/lib/libsa/stand.h b/sys/lib/libsa/stand.h
index f81be0701d8..310b6b2f9bb 100644
--- a/sys/lib/libsa/stand.h
+++ b/sys/lib/libsa/stand.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stand.h,v 1.15 1996/12/08 15:15:57 niklas Exp $ */
+/* $OpenBSD: stand.h,v 1.16 1996/12/12 08:16:30 mickey Exp $ */
/* $NetBSD: stand.h,v 1.18 1996/11/30 04:35:51 gwr Exp $ */
/*-
@@ -128,9 +128,9 @@ extern struct open_file files[];
#define isupper(c) ((c) >= 'A' && (c) <= 'Z')
#define islower(c) ((c) >= 'a' && (c) <= 'z')
-#define isalpha(c) (isupper(c)||islower(c))
-#define tolower(c) ((c) - 'A' + 'a')
-#define toupper(c) ((c) - 'a' + 'A')
+#define isalpha(c) (isupper(c)||islower(c))
+#define tolower(c) (isupper(c)?((c) - 'A' + 'a'):(c))
+#define toupper(c) (islower(c)?((c) - 'a' + 'A'):(c))
#define isspace(c) ((c) == ' ' || (c) == '\t')
#define isdigit(c) ((c) >= '0' && (c) <= '9')