Lines Matching refs:code
41 static bool prop_lookup(unsigned long code, unsigned long n) in ZEND_EXTERN_MODULE_GLOBALS()
52 if (code > _ucprop_ranges[m + 1]) in ZEND_EXTERN_MODULE_GLOBALS()
54 else if (code < _ucprop_ranges[m]) in ZEND_EXTERN_MODULE_GLOBALS()
63 MBSTRING_API bool php_unicode_is_prop1(unsigned long code, int prop) in php_unicode_is_prop1() argument
65 return prop_lookup(code, prop); in php_unicode_is_prop1()
68 MBSTRING_API bool php_unicode_is_prop(unsigned long code, ...) in php_unicode_is_prop() argument
72 va_start(va, code); in php_unicode_is_prop()
80 if (prop_lookup(code, prop)) { in php_unicode_is_prop()
99 unsigned code, in mph_lookup() argument
103 short g = g_table[mph_hash(0, code) % g_table_size]; in mph_lookup()
109 idx = mph_hash(g, code) % table_size; in mph_lookup()
112 if (table[2*idx] == code) { in mph_lookup()
118 #define CASE_LOOKUP(code, type) \ argument
119 mph_lookup(code, _uccase_##type##_g, _uccase_##type##_g_size, \
122 static unsigned php_unicode_toupper_raw(unsigned code, enum mbfl_no_encoding enc) in php_unicode_toupper_raw() argument
126 if (code < 0xB5) { in php_unicode_toupper_raw()
128 if (code >= 0x61 && code <= 0x7A) { in php_unicode_toupper_raw()
129 if (UNEXPECTED(enc == mbfl_no_encoding_8859_9 && code == 0x69)) { in php_unicode_toupper_raw()
132 return code - 0x20; in php_unicode_toupper_raw()
134 return code; in php_unicode_toupper_raw()
136 unsigned new_code = CASE_LOOKUP(code, upper); in php_unicode_toupper_raw()
140 return code; in php_unicode_toupper_raw()
144 static unsigned php_unicode_tolower_raw(unsigned code, enum mbfl_no_encoding enc) in php_unicode_tolower_raw() argument
148 if (code < 0xC0) { in php_unicode_tolower_raw()
150 if (code >= 0x41 && code <= 0x5A) { in php_unicode_tolower_raw()
151 if (UNEXPECTED(enc == mbfl_no_encoding_8859_9 && code == 0x0049L)) { in php_unicode_tolower_raw()
154 return code + 0x20; in php_unicode_tolower_raw()
156 return code; in php_unicode_tolower_raw()
158 unsigned new_code = CASE_LOOKUP(code, lower); in php_unicode_tolower_raw()
160 if (UNEXPECTED(enc == mbfl_no_encoding_8859_9 && code == 0x130)) { in php_unicode_tolower_raw()
165 return code; in php_unicode_tolower_raw()
169 static unsigned php_unicode_totitle_raw(unsigned code, enum mbfl_no_encoding enc) in php_unicode_totitle_raw() argument
171 unsigned new_code = CASE_LOOKUP(code, title); in php_unicode_totitle_raw()
177 return php_unicode_toupper_raw(code, enc); in php_unicode_totitle_raw()
180 unsigned php_unicode_tofold_raw(unsigned code, enum mbfl_no_encoding enc) in php_unicode_tofold_raw() argument
182 if (code < 0x80) { in php_unicode_tofold_raw()
184 if (code >= 0x41 && code <= 0x5A) { in php_unicode_tofold_raw()
185 if (UNEXPECTED(enc == mbfl_no_encoding_8859_9 && code == 0x49)) { in php_unicode_tofold_raw()
188 return code + 0x20; in php_unicode_tofold_raw()
190 return code; in php_unicode_tofold_raw()
192 unsigned new_code = CASE_LOOKUP(code, fold); in php_unicode_tofold_raw()
194 if (UNEXPECTED(enc == mbfl_no_encoding_8859_9 && code == 0x130)) { in php_unicode_tofold_raw()
199 return code; in php_unicode_tofold_raw()
203 static inline unsigned php_unicode_tolower_simple(unsigned code, enum mbfl_no_encoding enc) { in php_unicode_tolower_simple() argument
204 code = php_unicode_tolower_raw(code, enc); in php_unicode_tolower_simple()
205 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_tolower_simple()
206 return _uccase_extra_table[code & 0xffffff]; in php_unicode_tolower_simple()
208 return code; in php_unicode_tolower_simple()
210 static inline unsigned php_unicode_toupper_simple(unsigned code, enum mbfl_no_encoding enc) { in php_unicode_toupper_simple() argument
211 code = php_unicode_toupper_raw(code, enc); in php_unicode_toupper_simple()
212 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_toupper_simple()
213 return _uccase_extra_table[code & 0xffffff]; in php_unicode_toupper_simple()
215 return code; in php_unicode_toupper_simple()
217 static inline unsigned php_unicode_totitle_simple(unsigned code, enum mbfl_no_encoding enc) { in php_unicode_totitle_simple() argument
218 code = php_unicode_totitle_raw(code, enc); in php_unicode_totitle_simple()
219 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_totitle_simple()
220 return _uccase_extra_table[code & 0xffffff]; in php_unicode_totitle_simple()
222 return code; in php_unicode_totitle_simple()
224 static inline unsigned php_unicode_tofold_simple(unsigned code, enum mbfl_no_encoding enc) { in php_unicode_tofold_simple() argument
225 code = php_unicode_tofold_raw(code, enc); in php_unicode_tofold_simple()
226 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_tofold_simple()
227 return _uccase_extra_table[code & 0xffffff]; in php_unicode_tofold_simple()
229 return code; in php_unicode_tofold_simple()
232 static inline void php_unicode_tolower_full(unsigned code, enum mbfl_no_encoding enc, in php_unicode_tolower_full() argument
234 code = php_unicode_tolower_raw(code, enc); in php_unicode_tolower_full()
235 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_tolower_full()
236 unsigned len = code >> 24; in php_unicode_tolower_full()
237 const unsigned *p = &_uccase_extra_table[code & 0xffffff]; in php_unicode_tolower_full()
242 (next_filter->filter_function)(code, next_filter); in php_unicode_tolower_full()
246 static inline void php_unicode_toupper_full(unsigned code, enum mbfl_no_encoding enc, in php_unicode_toupper_full() argument
248 code = php_unicode_toupper_raw(code, enc); in php_unicode_toupper_full()
249 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_toupper_full()
250 unsigned len = code >> 24; in php_unicode_toupper_full()
251 const unsigned *p = &_uccase_extra_table[code & 0xffffff]; in php_unicode_toupper_full()
256 (next_filter->filter_function)(code, next_filter); in php_unicode_toupper_full()
260 static inline void php_unicode_totitle_full(unsigned code, enum mbfl_no_encoding enc, in php_unicode_totitle_full() argument
262 code = php_unicode_totitle_raw(code, enc); in php_unicode_totitle_full()
263 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_totitle_full()
264 unsigned len = code >> 24; in php_unicode_totitle_full()
265 const unsigned *p = &_uccase_extra_table[code & 0xffffff]; in php_unicode_totitle_full()
270 (next_filter->filter_function)(code, next_filter); in php_unicode_totitle_full()
274 static inline void php_unicode_tofold_full(unsigned code, enum mbfl_no_encoding enc, in php_unicode_tofold_full() argument
276 code = php_unicode_tofold_raw(code, enc); in php_unicode_tofold_full()
277 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_tofold_full()
278 unsigned len = code >> 24; in php_unicode_tofold_full()
279 const unsigned *p = &_uccase_extra_table[code & 0xffffff]; in php_unicode_tofold_full()
284 (next_filter->filter_function)(code, next_filter); in php_unicode_tofold_full()
298 unsigned code; in convert_case_filter() local
309 code = php_unicode_toupper_simple(c, data->no_encoding); in convert_case_filter()
310 (data->next_filter->filter_function)(code, data->next_filter); in convert_case_filter()
318 code = php_unicode_tolower_simple(c, data->no_encoding); in convert_case_filter()
319 (data->next_filter->filter_function)(code, data->next_filter); in convert_case_filter()
331 code = php_unicode_tofold_simple(c, data->no_encoding); in convert_case_filter()
332 (data->next_filter->filter_function)(code, data->next_filter); in convert_case_filter()
340 code = php_unicode_tolower_simple(c, data->no_encoding); in convert_case_filter()
341 (data->next_filter->filter_function)(code, data->next_filter); in convert_case_filter()
347 code = php_unicode_totitle_simple(c, data->no_encoding); in convert_case_filter()
348 (data->next_filter->filter_function)(code, data->next_filter); in convert_case_filter()