changeset 204:f0f49949009b HEAD

cast i_toupper() and i_tolower() return as char, so comparing highascii works without casting (breaks if comparing to unsigned char though)
author Timo Sirainen <tss@iki.fi>
date Mon, 09 Sep 2002 16:32:00 +0300
parents 24dda549b0ce
children ad2ceb287fce
files src/lib/compat.h
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib/compat.h	Mon Sep 09 16:30:48 2002 +0300
+++ b/src/lib/compat.h	Mon Sep 09 16:32:00 2002 +0300
@@ -64,8 +64,8 @@
 
 /* ctype.h isn't safe with signed chars,
    use our own instead if really needed */
-#define i_toupper(x) toupper((int) (unsigned char) (x))
-#define i_tolower(x) tolower((int) (unsigned char) (x))
+#define i_toupper(x) ((char) toupper((int) (unsigned char) (x)))
+#define i_tolower(x) ((char) tolower((int) (unsigned char) (x)))
 #define i_isalnum(x) isalnum((int) (unsigned char) (x))
 #define i_isalpha(x) isalpha((int) (unsigned char) (x))
 #define i_isascii(x) isascii((int) (unsigned char) (x))