# HG changeset patch # User Timo Sirainen # Date 1031578320 -10800 # Node ID f0f49949009b2048bac7024c1b970a1620d6355b # Parent 24dda549b0cea6c153f8a7f069e4259a5aea189a cast i_toupper() and i_tolower() return as char, so comparing highascii works without casting (breaks if comparing to unsigned char though) diff -r 24dda549b0ce -r f0f49949009b src/lib/compat.h --- 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))