comparison src/macros.h @ 325:ba378d4f9cf9

updated for version 7.0085
author vimboss
date Tue, 14 Jun 2005 22:05:40 +0000
parents 4707450c2b33
children 0fd7ac767ecd
comparison
equal deleted inserted replaced
324:548525d9da24 325:ba378d4f9cf9
82 /* 82 /*
83 * MB_ISLOWER() and MB_ISUPPER() are to be used on multi-byte characters. But 83 * MB_ISLOWER() and MB_ISUPPER() are to be used on multi-byte characters. But
84 * don't use them for negative values. 84 * don't use them for negative values.
85 */ 85 */
86 #ifdef FEAT_MBYTE 86 #ifdef FEAT_MBYTE
87 # define MB_ISLOWER(c) (enc_utf8 && (c) > 0x80 ? utf_islower(c) : (has_mbyte && c > 255 ? FALSE : islower(c))) 87 # define MB_ISLOWER(c) (enc_utf8 && (c) >= 0x80 ? utf_islower(c) : (has_mbyte && c > 255 ? FALSE : islower(c)))
88 # define MB_ISUPPER(c) (enc_utf8 && (c) > 0x80 ? utf_isupper(c) : (has_mbyte && c > 255 ? FALSE : isupper(c))) 88 # define MB_ISUPPER(c) (enc_utf8 && (c) >= 0x80 ? utf_isupper(c) : (has_mbyte && c > 255 ? FALSE : isupper(c)))
89 # define MB_TOLOWER(c) (enc_utf8 && (c) > 0x80 ? utf_tolower(c) : (has_mbyte && c > 255 ? c : TOLOWER_LOC(c))) 89 # define MB_TOLOWER(c) (enc_utf8 && (c) >= 0x80 ? utf_tolower(c) : (has_mbyte && c > 255 ? c : TOLOWER_LOC(c)))
90 # define MB_TOUPPER(c) (enc_utf8 && (c) > 0x80 ? utf_toupper(c) : (has_mbyte && c > 255 ? c : TOUPPER_LOC(c))) 90 # define MB_TOUPPER(c) (enc_utf8 && (c) >= 0x80 ? utf_toupper(c) : (has_mbyte && c > 255 ? c : TOUPPER_LOC(c)))
91 #else 91 #else
92 # define MB_ISLOWER(c) islower(c) 92 # define MB_ISLOWER(c) islower(c)
93 # define MB_ISUPPER(c) isupper(c) 93 # define MB_ISUPPER(c) isupper(c)
94 # define MB_TOLOWER(c) TOLOWER_LOC(c) 94 # define MB_TOLOWER(c) TOLOWER_LOC(c)
95 # define MB_TOUPPER(c) TOUPPER_LOC(c) 95 # define MB_TOUPPER(c) TOUPPER_LOC(c)