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
124 if (code < 0x80) { in php_unicode_toupper_raw()
126 if (code >= 0x61 && code <= 0x7A) { in php_unicode_toupper_raw()
127 if (UNEXPECTED(enc == mbfl_no_encoding_8859_9 && code == 0x69)) { in php_unicode_toupper_raw()
130 return code - 0x20; in php_unicode_toupper_raw()
132 return code; in php_unicode_toupper_raw()
134 unsigned new_code = CASE_LOOKUP(code, upper); in php_unicode_toupper_raw()
138 return code; in php_unicode_toupper_raw()
142 static unsigned php_unicode_tolower_raw(unsigned code, enum mbfl_no_encoding enc) in php_unicode_tolower_raw() argument
144 if (code < 0x80) { in php_unicode_tolower_raw()
146 if (code >= 0x41 && code <= 0x5A) { in php_unicode_tolower_raw()
147 if (UNEXPECTED(enc == mbfl_no_encoding_8859_9 && code == 0x0049L)) { in php_unicode_tolower_raw()
150 return code + 0x20; in php_unicode_tolower_raw()
152 return code; in php_unicode_tolower_raw()
154 unsigned new_code = CASE_LOOKUP(code, lower); in php_unicode_tolower_raw()
156 if (UNEXPECTED(enc == mbfl_no_encoding_8859_9 && code == 0x130)) { in php_unicode_tolower_raw()
161 return code; in php_unicode_tolower_raw()
165 static unsigned php_unicode_totitle_raw(unsigned code, enum mbfl_no_encoding enc) in php_unicode_totitle_raw() argument
167 unsigned new_code = CASE_LOOKUP(code, title); in php_unicode_totitle_raw()
173 return php_unicode_toupper_raw(code, enc); in php_unicode_totitle_raw()
176 unsigned php_unicode_tofold_raw(unsigned code, enum mbfl_no_encoding enc) in php_unicode_tofold_raw() argument
178 if (code < 0x80) { in php_unicode_tofold_raw()
180 if (code >= 0x41 && code <= 0x5A) { in php_unicode_tofold_raw()
181 if (UNEXPECTED(enc == mbfl_no_encoding_8859_9 && code == 0x49)) { in php_unicode_tofold_raw()
184 return code + 0x20; in php_unicode_tofold_raw()
186 return code; in php_unicode_tofold_raw()
188 unsigned new_code = CASE_LOOKUP(code, fold); in php_unicode_tofold_raw()
190 if (UNEXPECTED(enc == mbfl_no_encoding_8859_9 && code == 0x130)) { in php_unicode_tofold_raw()
195 return code; in php_unicode_tofold_raw()
199 static inline unsigned php_unicode_tolower_simple(unsigned code, enum mbfl_no_encoding enc) { in php_unicode_tolower_simple() argument
200 code = php_unicode_tolower_raw(code, enc); in php_unicode_tolower_simple()
201 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_tolower_simple()
202 return _uccase_extra_table[code & 0xffffff]; in php_unicode_tolower_simple()
204 return code; in php_unicode_tolower_simple()
206 static inline unsigned php_unicode_toupper_simple(unsigned code, enum mbfl_no_encoding enc) { in php_unicode_toupper_simple() argument
207 code = php_unicode_toupper_raw(code, enc); in php_unicode_toupper_simple()
208 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_toupper_simple()
209 return _uccase_extra_table[code & 0xffffff]; in php_unicode_toupper_simple()
211 return code; in php_unicode_toupper_simple()
213 static inline unsigned php_unicode_totitle_simple(unsigned code, enum mbfl_no_encoding enc) { in php_unicode_totitle_simple() argument
214 code = php_unicode_totitle_raw(code, enc); in php_unicode_totitle_simple()
215 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_totitle_simple()
216 return _uccase_extra_table[code & 0xffffff]; in php_unicode_totitle_simple()
218 return code; in php_unicode_totitle_simple()
220 static inline unsigned php_unicode_tofold_simple(unsigned code, enum mbfl_no_encoding enc) { in php_unicode_tofold_simple() argument
221 code = php_unicode_tofold_raw(code, enc); in php_unicode_tofold_simple()
222 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_tofold_simple()
223 return _uccase_extra_table[code & 0xffffff]; in php_unicode_tofold_simple()
225 return code; in php_unicode_tofold_simple()
228 static inline void php_unicode_tolower_full(unsigned code, enum mbfl_no_encoding enc, in php_unicode_tolower_full() argument
230 code = php_unicode_tolower_raw(code, enc); in php_unicode_tolower_full()
231 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_tolower_full()
232 unsigned len = code >> 24; in php_unicode_tolower_full()
233 const unsigned *p = &_uccase_extra_table[code & 0xffffff]; in php_unicode_tolower_full()
238 (next_filter->filter_function)(code, next_filter); in php_unicode_tolower_full()
242 static inline void php_unicode_toupper_full(unsigned code, enum mbfl_no_encoding enc, in php_unicode_toupper_full() argument
244 code = php_unicode_toupper_raw(code, enc); in php_unicode_toupper_full()
245 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_toupper_full()
246 unsigned len = code >> 24; in php_unicode_toupper_full()
247 const unsigned *p = &_uccase_extra_table[code & 0xffffff]; in php_unicode_toupper_full()
252 (next_filter->filter_function)(code, next_filter); in php_unicode_toupper_full()
256 static inline void php_unicode_totitle_full(unsigned code, enum mbfl_no_encoding enc, in php_unicode_totitle_full() argument
258 code = php_unicode_totitle_raw(code, enc); in php_unicode_totitle_full()
259 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_totitle_full()
260 unsigned len = code >> 24; in php_unicode_totitle_full()
261 const unsigned *p = &_uccase_extra_table[code & 0xffffff]; in php_unicode_totitle_full()
266 (next_filter->filter_function)(code, next_filter); in php_unicode_totitle_full()
270 static inline void php_unicode_tofold_full(unsigned code, enum mbfl_no_encoding enc, in php_unicode_tofold_full() argument
272 code = php_unicode_tofold_raw(code, enc); in php_unicode_tofold_full()
273 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_tofold_full()
274 unsigned len = code >> 24; in php_unicode_tofold_full()
275 const unsigned *p = &_uccase_extra_table[code & 0xffffff]; in php_unicode_tofold_full()
280 (next_filter->filter_function)(code, next_filter); in php_unicode_tofold_full()
294 unsigned code; in convert_case_filter() local
305 code = php_unicode_toupper_simple(c, data->no_encoding); in convert_case_filter()
306 (data->next_filter->filter_function)(code, data->next_filter); in convert_case_filter()
314 code = php_unicode_tolower_simple(c, data->no_encoding); in convert_case_filter()
315 (data->next_filter->filter_function)(code, data->next_filter); in convert_case_filter()
327 code = php_unicode_tofold_simple(c, data->no_encoding); in convert_case_filter()
328 (data->next_filter->filter_function)(code, data->next_filter); in convert_case_filter()
336 code = php_unicode_tolower_simple(c, data->no_encoding); in convert_case_filter()
337 (data->next_filter->filter_function)(code, data->next_filter); in convert_case_filter()
343 code = php_unicode_totitle_simple(c, data->no_encoding); in convert_case_filter()
344 (data->next_filter->filter_function)(code, data->next_filter); in convert_case_filter()