Lines Matching refs:code

50 static int prop_lookup(unsigned long code, unsigned long n)  in ZEND_EXTERN_MODULE_GLOBALS()
78 if (code > _ucprop_ranges[m + 1]) in ZEND_EXTERN_MODULE_GLOBALS()
80 else if (code < _ucprop_ranges[m]) in ZEND_EXTERN_MODULE_GLOBALS()
82 else if (code >= _ucprop_ranges[m] && code <= _ucprop_ranges[m + 1]) in ZEND_EXTERN_MODULE_GLOBALS()
89 MBSTRING_API int php_unicode_is_prop1(unsigned long code, int prop) in php_unicode_is_prop1() argument
91 return prop_lookup(code, prop); in php_unicode_is_prop1()
94 MBSTRING_API int php_unicode_is_prop(unsigned long code, ...) in php_unicode_is_prop() argument
98 va_start(va, code); in php_unicode_is_prop()
106 if (prop_lookup(code, prop)) { in php_unicode_is_prop()
125 unsigned code, in mph_lookup() argument
129 short g = g_table[mph_hash(0, code) % g_table_size]; in mph_lookup()
135 idx = mph_hash(g, code) % table_size; in mph_lookup()
138 if (table[2*idx] == code) { in mph_lookup()
144 #define CASE_LOOKUP(code, type) \ argument
145 mph_lookup(code, _uccase_##type##_g, _uccase_##type##_g_size, \
148 static unsigned php_unicode_toupper_raw(unsigned code, enum mbfl_no_encoding enc) in php_unicode_toupper_raw() argument
150 if (code < 0x80) { in php_unicode_toupper_raw()
152 if (code >= 0x61 && code <= 0x7A) { in php_unicode_toupper_raw()
153 if (UNEXPECTED(enc == mbfl_no_encoding_8859_9 && code == 0x69)) { in php_unicode_toupper_raw()
156 return code - 0x20; in php_unicode_toupper_raw()
158 return code; in php_unicode_toupper_raw()
160 unsigned new_code = CASE_LOOKUP(code, upper); in php_unicode_toupper_raw()
164 return code; in php_unicode_toupper_raw()
168 static unsigned php_unicode_tolower_raw(unsigned code, enum mbfl_no_encoding enc) in php_unicode_tolower_raw() argument
170 if (code < 0x80) { in php_unicode_tolower_raw()
172 if (code >= 0x41 && code <= 0x5A) { in php_unicode_tolower_raw()
173 if (UNEXPECTED(enc == mbfl_no_encoding_8859_9 && code == 0x0049L)) { in php_unicode_tolower_raw()
176 return code + 0x20; in php_unicode_tolower_raw()
178 return code; in php_unicode_tolower_raw()
180 unsigned new_code = CASE_LOOKUP(code, lower); in php_unicode_tolower_raw()
182 if (UNEXPECTED(enc == mbfl_no_encoding_8859_9 && code == 0x130)) { in php_unicode_tolower_raw()
187 return code; in php_unicode_tolower_raw()
191 static unsigned php_unicode_totitle_raw(unsigned code, enum mbfl_no_encoding enc) in php_unicode_totitle_raw() argument
193 unsigned new_code = CASE_LOOKUP(code, title); in php_unicode_totitle_raw()
199 return php_unicode_toupper_raw(code, enc); in php_unicode_totitle_raw()
202 unsigned php_unicode_tofold_raw(unsigned code, enum mbfl_no_encoding enc) in php_unicode_tofold_raw() argument
204 if (code < 0x80) { in php_unicode_tofold_raw()
206 if (code >= 0x41 && code <= 0x5A) { in php_unicode_tofold_raw()
207 if (UNEXPECTED(enc == mbfl_no_encoding_8859_9 && code == 0x49)) { in php_unicode_tofold_raw()
210 return code + 0x20; in php_unicode_tofold_raw()
212 return code; in php_unicode_tofold_raw()
214 unsigned new_code = CASE_LOOKUP(code, fold); in php_unicode_tofold_raw()
216 if (UNEXPECTED(enc == mbfl_no_encoding_8859_9 && code == 0x130)) { in php_unicode_tofold_raw()
221 return code; in php_unicode_tofold_raw()
225 static inline unsigned php_unicode_tolower_simple(unsigned code, enum mbfl_no_encoding enc) { in php_unicode_tolower_simple() argument
226 code = php_unicode_tolower_raw(code, enc); in php_unicode_tolower_simple()
227 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_tolower_simple()
228 return _uccase_extra_table[code & 0xffffff]; in php_unicode_tolower_simple()
230 return code; in php_unicode_tolower_simple()
232 static inline unsigned php_unicode_toupper_simple(unsigned code, enum mbfl_no_encoding enc) { in php_unicode_toupper_simple() argument
233 code = php_unicode_toupper_raw(code, enc); in php_unicode_toupper_simple()
234 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_toupper_simple()
235 return _uccase_extra_table[code & 0xffffff]; in php_unicode_toupper_simple()
237 return code; in php_unicode_toupper_simple()
239 static inline unsigned php_unicode_totitle_simple(unsigned code, enum mbfl_no_encoding enc) { in php_unicode_totitle_simple() argument
240 code = php_unicode_totitle_raw(code, enc); in php_unicode_totitle_simple()
241 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_totitle_simple()
242 return _uccase_extra_table[code & 0xffffff]; in php_unicode_totitle_simple()
244 return code; in php_unicode_totitle_simple()
246 static inline unsigned php_unicode_tofold_simple(unsigned code, enum mbfl_no_encoding enc) { in php_unicode_tofold_simple() argument
247 code = php_unicode_tofold_raw(code, enc); in php_unicode_tofold_simple()
248 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_tofold_simple()
249 return _uccase_extra_table[code & 0xffffff]; in php_unicode_tofold_simple()
251 return code; in php_unicode_tofold_simple()
255 unsigned code, enum mbfl_no_encoding enc, unsigned *out) { in php_unicode_tolower_full() argument
256 code = php_unicode_tolower_raw(code, enc); in php_unicode_tolower_full()
257 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_tolower_full()
258 unsigned len = code >> 24; in php_unicode_tolower_full()
259 const unsigned *p = &_uccase_extra_table[code & 0xffffff]; in php_unicode_tolower_full()
263 *out = code; in php_unicode_tolower_full()
267 unsigned code, enum mbfl_no_encoding enc, unsigned *out) { in php_unicode_toupper_full() argument
268 code = php_unicode_toupper_raw(code, enc); in php_unicode_toupper_full()
269 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_toupper_full()
270 unsigned len = code >> 24; in php_unicode_toupper_full()
271 const unsigned *p = &_uccase_extra_table[code & 0xffffff]; in php_unicode_toupper_full()
275 *out = code; in php_unicode_toupper_full()
279 unsigned code, enum mbfl_no_encoding enc, unsigned *out) { in php_unicode_totitle_full() argument
280 code = php_unicode_totitle_raw(code, enc); in php_unicode_totitle_full()
281 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_totitle_full()
282 unsigned len = code >> 24; in php_unicode_totitle_full()
283 const unsigned *p = &_uccase_extra_table[code & 0xffffff]; in php_unicode_totitle_full()
287 *out = code; in php_unicode_totitle_full()
291 unsigned code, enum mbfl_no_encoding enc, unsigned *out) { in php_unicode_tofold_full() argument
292 code = php_unicode_tofold_raw(code, enc); in php_unicode_tofold_full()
293 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_tofold_full()
294 unsigned len = code >> 24; in php_unicode_tofold_full()
295 const unsigned *p = &_uccase_extra_table[code & 0xffffff]; in php_unicode_tofold_full()
299 *out = code; in php_unicode_tofold_full()