aboutsummaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2013-09-19 07:29:17 +1000
committerSteve Bennett <steveb@workware.net.au>2013-09-19 12:29:17 +1000
commit14f066bc24c7c5f8ca5559db321ef722d673c076 (patch)
tree4c6dae396cb2cd69f4469a1bf0b2ddb0b8982a7c /utf8.c
parentdcb268ae2e41a2f87e418b8d5285623977b2fbb4 (diff)
downloadjimtcl-14f066bc24c7c5f8ca5559db321ef722d673c076.zip
jimtcl-14f066bc24c7c5f8ca5559db321ef722d673c076.tar.gz
jimtcl-14f066bc24c7c5f8ca5559db321ef722d673c076.tar.bz2
Build on platforms without isascii
Signed-off-by: Steve Bennett <steveb@workware.net.au> Reported-by: Paul Fertser <fercerpav@gmail.com>
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/utf8.c b/utf8.c
index 562dca9..c31a57f 100644
--- a/utf8.c
+++ b/utf8.c
@@ -178,6 +178,11 @@ static int utf8_map_case(const struct casemap *mapping, int num, int ch)
return ch;
}
+/* Some platforms don't have isascii */
+#ifndef isascii
+#define isascii(C) (!((C) & ~0x7f))
+#endif
+
int utf8_upper(int ch)
{
if (isascii(ch)) {