Lines Matching refs:code

41 static int prop_lookup(unsigned long code, unsigned long n)  in ZEND_EXTERN_MODULE_GLOBALS()
69 if (code > _ucprop_ranges[m + 1]) in ZEND_EXTERN_MODULE_GLOBALS()
71 else if (code < _ucprop_ranges[m]) in ZEND_EXTERN_MODULE_GLOBALS()
73 else if (code >= _ucprop_ranges[m] && code <= _ucprop_ranges[m + 1]) in ZEND_EXTERN_MODULE_GLOBALS()
80 MBSTRING_API int php_unicode_is_prop1(unsigned long code, int prop) in php_unicode_is_prop1() argument
82 return prop_lookup(code, prop); in php_unicode_is_prop1()
85 MBSTRING_API int php_unicode_is_prop(unsigned long code, ...) in php_unicode_is_prop() argument
89 va_start(va, code); in php_unicode_is_prop()
97 if (prop_lookup(code, prop)) { in php_unicode_is_prop()
116 unsigned code, in mph_lookup() argument
120 short g = g_table[mph_hash(0, code) % g_table_size]; in mph_lookup()
126 idx = mph_hash(g, code) % table_size; in mph_lookup()
129 if (table[2*idx] == code) { in mph_lookup()
135 #define CASE_LOOKUP(code, type) \ argument
136 mph_lookup(code, _uccase_##type##_g, _uccase_##type##_g_size, \
139 static unsigned php_unicode_toupper_raw(unsigned code, enum mbfl_no_encoding enc) in php_unicode_toupper_raw() argument
141 if (code < 0x80) { in php_unicode_toupper_raw()
143 if (code >= 0x61 && code <= 0x7A) { in php_unicode_toupper_raw()
144 if (UNEXPECTED(enc == mbfl_no_encoding_8859_9 && code == 0x69)) { in php_unicode_toupper_raw()
147 return code - 0x20; in php_unicode_toupper_raw()
149 return code; in php_unicode_toupper_raw()
151 unsigned new_code = CASE_LOOKUP(code, upper); in php_unicode_toupper_raw()
155 return code; in php_unicode_toupper_raw()
159 static unsigned php_unicode_tolower_raw(unsigned code, enum mbfl_no_encoding enc) in php_unicode_tolower_raw() argument
161 if (code < 0x80) { in php_unicode_tolower_raw()
163 if (code >= 0x41 && code <= 0x5A) { in php_unicode_tolower_raw()
164 if (UNEXPECTED(enc == mbfl_no_encoding_8859_9 && code == 0x0049L)) { in php_unicode_tolower_raw()
167 return code + 0x20; in php_unicode_tolower_raw()
169 return code; in php_unicode_tolower_raw()
171 unsigned new_code = CASE_LOOKUP(code, lower); in php_unicode_tolower_raw()
173 if (UNEXPECTED(enc == mbfl_no_encoding_8859_9 && code == 0x130)) { in php_unicode_tolower_raw()
178 return code; in php_unicode_tolower_raw()
182 static unsigned php_unicode_totitle_raw(unsigned code, enum mbfl_no_encoding enc) in php_unicode_totitle_raw() argument
184 unsigned new_code = CASE_LOOKUP(code, title); in php_unicode_totitle_raw()
190 return php_unicode_toupper_raw(code, enc); in php_unicode_totitle_raw()
193 unsigned php_unicode_tofold_raw(unsigned code, enum mbfl_no_encoding enc) in php_unicode_tofold_raw() argument
195 if (code < 0x80) { in php_unicode_tofold_raw()
197 if (code >= 0x41 && code <= 0x5A) { in php_unicode_tofold_raw()
198 if (UNEXPECTED(enc == mbfl_no_encoding_8859_9 && code == 0x49)) { in php_unicode_tofold_raw()
201 return code + 0x20; in php_unicode_tofold_raw()
203 return code; in php_unicode_tofold_raw()
205 unsigned new_code = CASE_LOOKUP(code, fold); in php_unicode_tofold_raw()
207 if (UNEXPECTED(enc == mbfl_no_encoding_8859_9 && code == 0x130)) { in php_unicode_tofold_raw()
212 return code; in php_unicode_tofold_raw()
216 static inline unsigned php_unicode_tolower_simple(unsigned code, enum mbfl_no_encoding enc) { in php_unicode_tolower_simple() argument
217 code = php_unicode_tolower_raw(code, enc); in php_unicode_tolower_simple()
218 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_tolower_simple()
219 return _uccase_extra_table[code & 0xffffff]; in php_unicode_tolower_simple()
221 return code; in php_unicode_tolower_simple()
223 static inline unsigned php_unicode_toupper_simple(unsigned code, enum mbfl_no_encoding enc) { in php_unicode_toupper_simple() argument
224 code = php_unicode_toupper_raw(code, enc); in php_unicode_toupper_simple()
225 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_toupper_simple()
226 return _uccase_extra_table[code & 0xffffff]; in php_unicode_toupper_simple()
228 return code; in php_unicode_toupper_simple()
230 static inline unsigned php_unicode_totitle_simple(unsigned code, enum mbfl_no_encoding enc) { in php_unicode_totitle_simple() argument
231 code = php_unicode_totitle_raw(code, enc); in php_unicode_totitle_simple()
232 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_totitle_simple()
233 return _uccase_extra_table[code & 0xffffff]; in php_unicode_totitle_simple()
235 return code; in php_unicode_totitle_simple()
237 static inline unsigned php_unicode_tofold_simple(unsigned code, enum mbfl_no_encoding enc) { in php_unicode_tofold_simple() argument
238 code = php_unicode_tofold_raw(code, enc); in php_unicode_tofold_simple()
239 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_tofold_simple()
240 return _uccase_extra_table[code & 0xffffff]; in php_unicode_tofold_simple()
242 return code; in php_unicode_tofold_simple()
245 static inline void php_unicode_tolower_full(unsigned code, enum mbfl_no_encoding enc, in php_unicode_tolower_full() argument
247 code = php_unicode_tolower_raw(code, enc); in php_unicode_tolower_full()
248 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_tolower_full()
249 unsigned len = code >> 24; in php_unicode_tolower_full()
250 const unsigned *p = &_uccase_extra_table[code & 0xffffff]; in php_unicode_tolower_full()
255 (next_filter->filter_function)(code, next_filter); in php_unicode_tolower_full()
259 static inline void php_unicode_toupper_full(unsigned code, enum mbfl_no_encoding enc, in php_unicode_toupper_full() argument
261 code = php_unicode_toupper_raw(code, enc); in php_unicode_toupper_full()
262 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_toupper_full()
263 unsigned len = code >> 24; in php_unicode_toupper_full()
264 const unsigned *p = &_uccase_extra_table[code & 0xffffff]; in php_unicode_toupper_full()
269 (next_filter->filter_function)(code, next_filter); in php_unicode_toupper_full()
273 static inline void php_unicode_totitle_full(unsigned code, enum mbfl_no_encoding enc, in php_unicode_totitle_full() argument
275 code = php_unicode_totitle_raw(code, enc); in php_unicode_totitle_full()
276 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_totitle_full()
277 unsigned len = code >> 24; in php_unicode_totitle_full()
278 const unsigned *p = &_uccase_extra_table[code & 0xffffff]; in php_unicode_totitle_full()
283 (next_filter->filter_function)(code, next_filter); in php_unicode_totitle_full()
287 static inline void php_unicode_tofold_full(unsigned code, enum mbfl_no_encoding enc, in php_unicode_tofold_full() argument
289 code = php_unicode_tofold_raw(code, enc); in php_unicode_tofold_full()
290 if (UNEXPECTED(code > 0xffffff)) { in php_unicode_tofold_full()
291 unsigned len = code >> 24; in php_unicode_tofold_full()
292 const unsigned *p = &_uccase_extra_table[code & 0xffffff]; in php_unicode_tofold_full()
297 (next_filter->filter_function)(code, next_filter); in php_unicode_tofold_full()
311 unsigned code; in convert_case_filter() local
322 code = php_unicode_toupper_simple(c, data->no_encoding); in convert_case_filter()
323 (data->next_filter->filter_function)(code, data->next_filter); in convert_case_filter()
331 code = php_unicode_tolower_simple(c, data->no_encoding); in convert_case_filter()
332 (data->next_filter->filter_function)(code, data->next_filter); in convert_case_filter()
344 code = php_unicode_tofold_simple(c, data->no_encoding); in convert_case_filter()
345 (data->next_filter->filter_function)(code, data->next_filter); in convert_case_filter()
353 code = php_unicode_tolower_simple(c, data->no_encoding); in convert_case_filter()
354 (data->next_filter->filter_function)(code, data->next_filter); in convert_case_filter()
360 code = php_unicode_totitle_simple(c, data->no_encoding); in convert_case_filter()
361 (data->next_filter->filter_function)(code, data->next_filter); in convert_case_filter()