Lines Matching refs:MBREX

55 #define MBREX(g) (MBSTRG(mb_regex_globals)->g)  macro
136 MBREX(current_mbctype) = MBREX(default_mbctype); in PHP_RSHUTDOWN_FUNCTION()
138 if (!Z_ISUNDEF(MBREX(search_str))) { in PHP_RSHUTDOWN_FUNCTION()
139 zval_ptr_dtor(&MBREX(search_str)); in PHP_RSHUTDOWN_FUNCTION()
140 ZVAL_UNDEF(&MBREX(search_str)); in PHP_RSHUTDOWN_FUNCTION()
142 MBREX(search_pos) = 0; in PHP_RSHUTDOWN_FUNCTION()
144 if (MBREX(search_regs) != NULL) { in PHP_RSHUTDOWN_FUNCTION()
145 onig_region_free(MBREX(search_regs), 1); in PHP_RSHUTDOWN_FUNCTION()
146 MBREX(search_regs) = (OnigRegion *)NULL; in PHP_RSHUTDOWN_FUNCTION()
148 zend_hash_clean(&MBREX(ht_rc)); in PHP_RSHUTDOWN_FUNCTION()
409 MBREX(current_mbctype) = mbctype; in php_mb_regex_set_mbctype()
421 MBREX(default_mbctype) = mbctype; in php_mb_regex_set_default_mbctype()
429 return _php_mb_regex_mbctype2name(MBREX(current_mbctype)); in php_mb_regex_get_mbctype()
436 return _php_mb_regex_mbctype2name(MBREX(default_mbctype)); in php_mb_regex_get_default_mbctype()
457 rc = zend_hash_str_find_ptr(&MBREX(ht_rc), (char *)pattern, patlen); in php_mbregex_compile_pattern()
464 if (rc == MBREX(search_re)) { in php_mbregex_compile_pattern()
466 MBREX(search_re) = NULL; in php_mbregex_compile_pattern()
468 zend_hash_str_update_ptr(&MBREX(ht_rc), (char *)pattern, patlen, retval); in php_mbregex_compile_pattern()
670 const char *retval = _php_mb_regex_mbctype2name(MBREX(current_mbctype)); in PHP_FUNCTION()
685 MBREX(current_mbctype) = mbctype; in PHP_FUNCTION()
710 _php_mb_regex_mbctype2name(MBREX(current_mbctype)) in _php_mb_regex_ereg_exec()
724 options = MBREX(regex_default_options); in _php_mb_regex_ereg_exec()
745 …rn(Z_STRVAL_P(arg_pattern), Z_STRLEN_P(arg_pattern), options, MBREX(current_mbctype), MBREX(regex_… in _php_mb_regex_ereg_exec()
837 current_enc_name = _php_mb_regex_mbctype2name(MBREX(current_mbctype)); in _php_mb_regex_ereg_replace_exec()
870 _php_mb_regex_mbctype2name(MBREX(current_mbctype)) in _php_mb_regex_ereg_replace_exec()
878 options |= MBREX(regex_default_options); in _php_mb_regex_ereg_replace_exec()
879 syntax = MBREX(regex_default_syntax); in _php_mb_regex_ereg_replace_exec()
902 …re = php_mbregex_compile_pattern(arg_pattern, arg_pattern_len, options, MBREX(current_mbctype), sy… in _php_mb_regex_ereg_replace_exec()
1115 _php_mb_regex_mbctype2name(MBREX(current_mbctype)))) { in PHP_FUNCTION()
1120 …_compile_pattern(arg_pattern, arg_pattern_len, MBREX(regex_default_options), MBREX(current_mbctype… in PHP_FUNCTION()
1203 option |= MBREX(regex_default_options); in PHP_FUNCTION()
1204 syntax = MBREX(regex_default_syntax); in PHP_FUNCTION()
1209 _php_mb_regex_mbctype2name(MBREX(current_mbctype)))) { in PHP_FUNCTION()
1213 …if ((re = php_mbregex_compile_pattern(arg_pattern, arg_pattern_len, option, MBREX(current_mbctype)… in PHP_FUNCTION()
1243 option = MBREX(regex_default_options); in _php_mb_regex_ereg_search_exec()
1252 …if ((MBREX(search_re) = php_mbregex_compile_pattern(arg_pattern, arg_pattern_len, option, MBREX(cu… in _php_mb_regex_ereg_search_exec()
1257 pos = MBREX(search_pos); in _php_mb_regex_ereg_search_exec()
1260 if (!Z_ISUNDEF(MBREX(search_str)) && Z_TYPE(MBREX(search_str)) == IS_STRING){ in _php_mb_regex_ereg_search_exec()
1261 str = (OnigUChar *)Z_STRVAL(MBREX(search_str)); in _php_mb_regex_ereg_search_exec()
1262 len = Z_STRLEN(MBREX(search_str)); in _php_mb_regex_ereg_search_exec()
1265 if (MBREX(search_re) == NULL) { in _php_mb_regex_ereg_search_exec()
1275 if (MBREX(search_regs)) { in _php_mb_regex_ereg_search_exec()
1276 onig_region_free(MBREX(search_regs), 1); in _php_mb_regex_ereg_search_exec()
1278 MBREX(search_regs) = onig_region_new(); in _php_mb_regex_ereg_search_exec()
1280 err = onig_search(MBREX(search_re), str, str + len, str + pos, str + len, MBREX(search_regs), 0); in _php_mb_regex_ereg_search_exec()
1282 MBREX(search_pos) = len; in _php_mb_regex_ereg_search_exec()
1293 beg = MBREX(search_regs)->beg[0]; in _php_mb_regex_ereg_search_exec()
1294 end = MBREX(search_regs)->end[0]; in _php_mb_regex_ereg_search_exec()
1300 n = MBREX(search_regs)->num_regs; in _php_mb_regex_ereg_search_exec()
1302 beg = MBREX(search_regs)->beg[i]; in _php_mb_regex_ereg_search_exec()
1303 end = MBREX(search_regs)->end[i]; in _php_mb_regex_ereg_search_exec()
1315 end = MBREX(search_regs)->end[0]; in _php_mb_regex_ereg_search_exec()
1317 MBREX(search_pos) = end; in _php_mb_regex_ereg_search_exec()
1319 MBREX(search_pos) = pos + 1; in _php_mb_regex_ereg_search_exec()
1324 onig_region_free(MBREX(search_regs), 1); in _php_mb_regex_ereg_search_exec()
1325 MBREX(search_regs) = (OnigRegion *)NULL; in _php_mb_regex_ereg_search_exec()
1374 option = MBREX(regex_default_options); in PHP_FUNCTION()
1375 syntax = MBREX(regex_default_syntax); in PHP_FUNCTION()
1384 …if ((MBREX(search_re) = php_mbregex_compile_pattern(arg_pattern, arg_pattern_len, option, MBREX(cu… in PHP_FUNCTION()
1389 if (!Z_ISNULL(MBREX(search_str))) { in PHP_FUNCTION()
1390 zval_ptr_dtor(&MBREX(search_str)); in PHP_FUNCTION()
1393 ZVAL_STR_COPY(&MBREX(search_str), arg_str); in PHP_FUNCTION()
1398 _php_mb_regex_mbctype2name(MBREX(current_mbctype)) in PHP_FUNCTION()
1400 MBREX(search_pos) = 0; in PHP_FUNCTION()
1403 MBREX(search_pos) = ZSTR_LEN(arg_str); in PHP_FUNCTION()
1407 if (MBREX(search_regs) != NULL) { in PHP_FUNCTION()
1408 onig_region_free(MBREX(search_regs), 1); in PHP_FUNCTION()
1409 MBREX(search_regs) = NULL; in PHP_FUNCTION()
1421 if (MBREX(search_regs) != NULL && Z_TYPE(MBREX(search_str)) == IS_STRING) { in PHP_FUNCTION()
1424 str = (OnigUChar *)Z_STRVAL(MBREX(search_str)); in PHP_FUNCTION()
1425 len = Z_STRLEN(MBREX(search_str)); in PHP_FUNCTION()
1426 n = MBREX(search_regs)->num_regs; in PHP_FUNCTION()
1428 beg = MBREX(search_regs)->beg[i]; in PHP_FUNCTION()
1429 end = MBREX(search_regs)->end[i]; in PHP_FUNCTION()
1446 RETVAL_LONG(MBREX(search_pos)); in PHP_FUNCTION()
1461 …if ((position < 0) && (!Z_ISUNDEF(MBREX(search_str))) && (Z_TYPE(MBREX(search_str)) == IS_STRING))… in PHP_FUNCTION()
1462 position += Z_STRLEN(MBREX(search_str)); in PHP_FUNCTION()
1465 …position < 0 || (!Z_ISUNDEF(MBREX(search_str)) && Z_TYPE(MBREX(search_str)) == IS_STRING && (size_… in PHP_FUNCTION()
1467 MBREX(search_pos) = 0; in PHP_FUNCTION()
1471 MBREX(search_pos) = position; in PHP_FUNCTION()
1480 *prev_options = MBREX(regex_default_options); in _php_mb_regex_set_options()
1483 *prev_syntax = MBREX(regex_default_syntax); in _php_mb_regex_set_options()
1485 MBREX(regex_default_options) = options; in _php_mb_regex_set_options()
1486 MBREX(regex_default_syntax) = syntax; in _php_mb_regex_set_options()
1510 opt = MBREX(regex_default_options); in PHP_FUNCTION()
1511 syntax = MBREX(regex_default_syntax); in PHP_FUNCTION()