Lines Matching refs:code

42 static bool prop_lookup(unsigned long code, unsigned long n)  in ZEND_EXTERN_MODULE_GLOBALS()
53 if (code > _ucprop_ranges[m + 1]) in ZEND_EXTERN_MODULE_GLOBALS()
55 else if (code < _ucprop_ranges[m]) in ZEND_EXTERN_MODULE_GLOBALS()
64 MBSTRING_API bool php_unicode_is_prop1(unsigned long code, int prop) in php_unicode_is_prop1() argument
66 return prop_lookup(code, prop); in php_unicode_is_prop1()
69 MBSTRING_API bool php_unicode_is_prop(unsigned long code, ...) in php_unicode_is_prop() argument
73 va_start(va, code); in php_unicode_is_prop()
81 if (prop_lookup(code, prop)) { in php_unicode_is_prop()
100 unsigned code, in mph_lookup() argument
104 short g = g_table[mph_hash(0, code) % g_table_size]; in mph_lookup()
110 idx = mph_hash(g, code) % table_size; in mph_lookup()
113 if (table[2*idx] == code) { in mph_lookup()
119 #define CASE_LOOKUP(code, type) \ argument
120 mph_lookup(code, _uccase_##type##_g, _uccase_##type##_g_size, \
123 static unsigned php_unicode_toupper_raw(unsigned code, const mbfl_encoding *enc) in php_unicode_toupper_raw() argument
127 if (code < 0xB5) { in php_unicode_toupper_raw()
129 if (code >= 0x61 && code <= 0x7A) { in php_unicode_toupper_raw()
130 if (UNEXPECTED(enc == &mbfl_encoding_8859_9 && code == 0x69)) { in php_unicode_toupper_raw()
133 return code - 0x20; in php_unicode_toupper_raw()
135 return code; in php_unicode_toupper_raw()
137 unsigned new_code = CASE_LOOKUP(code, upper); in php_unicode_toupper_raw()
141 return code; in php_unicode_toupper_raw()
145 static unsigned php_unicode_tolower_raw(unsigned code, const mbfl_encoding *enc) in php_unicode_tolower_raw() argument
149 if (code < 0xC0) { in php_unicode_tolower_raw()
151 if (code >= 0x41 && code <= 0x5A) { in php_unicode_tolower_raw()
152 if (UNEXPECTED(enc == &mbfl_encoding_8859_9 && code == 0x0049L)) { in php_unicode_tolower_raw()
155 return code + 0x20; in php_unicode_tolower_raw()
157 return code; in php_unicode_tolower_raw()
159 unsigned new_code = CASE_LOOKUP(code, lower); in php_unicode_tolower_raw()
161 if (UNEXPECTED(enc == &mbfl_encoding_8859_9 && code == 0x130)) { in php_unicode_tolower_raw()
166 return code; in php_unicode_tolower_raw()
170 static unsigned php_unicode_totitle_raw(unsigned code, const mbfl_encoding *enc) in php_unicode_totitle_raw() argument
172 unsigned new_code = CASE_LOOKUP(code, title); in php_unicode_totitle_raw()
178 return php_unicode_toupper_raw(code, enc); in php_unicode_totitle_raw()
181 static unsigned php_unicode_tofold_raw(unsigned code, const mbfl_encoding *enc) in php_unicode_tofold_raw() argument
183 if (code < 0x80) { in php_unicode_tofold_raw()
185 if (code >= 0x41 && code <= 0x5A) { in php_unicode_tofold_raw()
186 if (UNEXPECTED(enc == &mbfl_encoding_8859_9 && code == 0x49)) { in php_unicode_tofold_raw()
189 return code + 0x20; in php_unicode_tofold_raw()
191 return code; in php_unicode_tofold_raw()
193 unsigned new_code = CASE_LOOKUP(code, fold); in php_unicode_tofold_raw()
195 if (UNEXPECTED(enc == &mbfl_encoding_8859_9 && code == 0x130)) { in php_unicode_tofold_raw()
200 return code; in php_unicode_tofold_raw()
204 static inline unsigned php_unicode_tolower_simple(unsigned code, const mbfl_encoding *enc) { in php_unicode_tolower_simple() argument
205 code = php_unicode_tolower_raw(code, enc); in php_unicode_tolower_simple()
206 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_tolower_simple()
207 return _uccase_extra_table[code & 0xffffff]; in php_unicode_tolower_simple()
209 return code; in php_unicode_tolower_simple()
211 static inline unsigned php_unicode_toupper_simple(unsigned code, const mbfl_encoding *enc) { in php_unicode_toupper_simple() argument
212 code = php_unicode_toupper_raw(code, enc); in php_unicode_toupper_simple()
213 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_toupper_simple()
214 return _uccase_extra_table[code & 0xffffff]; in php_unicode_toupper_simple()
216 return code; in php_unicode_toupper_simple()
218 static inline unsigned php_unicode_totitle_simple(unsigned code, const mbfl_encoding *enc) { in php_unicode_totitle_simple() argument
219 code = php_unicode_totitle_raw(code, enc); in php_unicode_totitle_simple()
220 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_totitle_simple()
221 return _uccase_extra_table[code & 0xffffff]; in php_unicode_totitle_simple()
223 return code; in php_unicode_totitle_simple()
225 static inline unsigned php_unicode_tofold_simple(unsigned code, const mbfl_encoding *enc) { in php_unicode_tofold_simple() argument
226 code = php_unicode_tofold_raw(code, enc); in php_unicode_tofold_simple()
227 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_tofold_simple()
228 return _uccase_extra_table[code & 0xffffff]; in php_unicode_tofold_simple()
230 return code; in php_unicode_tofold_simple()