Lines Matching refs:entry
70 browscap_entry *entry = Z_PTR_P(zvalue); local
71 zend_string_release_ex(entry->pattern, 0);
72 if (entry->parent) {
73 zend_string_release_ex(entry->parent, 0);
75 efree(entry);
80 browscap_entry *entry = Z_PTR_P(zvalue); in browscap_entry_dtor_persistent() local
81 zend_string_release_ex(entry->pattern, 1); in browscap_entry_dtor_persistent()
82 if (entry->parent) { in browscap_entry_dtor_persistent()
83 zend_string_release_ex(entry->parent, 1); in browscap_entry_dtor_persistent()
85 pefree(entry, 1); in browscap_entry_dtor_persistent()
275 static HashTable *browscap_entry_to_array(browser_data *bdata, browscap_entry *entry) { in browscap_entry_to_array() argument
281 ZVAL_STR(&tmp, browscap_convert_pattern(entry->pattern, 0)); in browscap_entry_to_array()
284 ZVAL_STR_COPY(&tmp, entry->pattern); in browscap_entry_to_array()
287 if (entry->parent) { in browscap_entry_to_array()
288 ZVAL_STR_COPY(&tmp, entry->parent); in browscap_entry_to_array()
292 for (i = entry->kv_start; i < entry->kv_end; i++) { in browscap_entry_to_array()
356 browscap_entry *entry; in php_browscap_parser_cb() local
376 entry = ctx->current_entry in php_browscap_parser_cb()
378 zend_hash_update_ptr(bdata->htab, pattern, entry); in php_browscap_parser_cb()
385 entry->pattern = zend_string_copy(pattern); in php_browscap_parser_cb()
386 entry->kv_end = entry->kv_start = bdata->kv_used; in php_browscap_parser_cb()
387 entry->parent = NULL; in php_browscap_parser_cb()
389 pos = entry->prefix_len = browscap_compute_prefix_len(pattern); in php_browscap_parser_cb()
392 &entry->contains_start[i], &entry->contains_len[i]); in php_browscap_parser_cb()
536 static inline size_t browscap_get_minimum_length(browscap_entry *entry) { in browscap_get_minimum_length() argument
537 size_t len = entry->prefix_len; in browscap_get_minimum_length()
540 len += entry->contains_len[i]; in browscap_get_minimum_length()
545 static int browser_reg_compare(browscap_entry *entry, zend_string *agent_name, browscap_entry **fou… in browser_reg_compare() argument
559 if (ZSTR_LEN(agent_name) < browscap_get_minimum_length(entry)) { in browser_reg_compare()
565 ZSTR_VAL(agent_name), entry->prefix_len, in browser_reg_compare()
566 ZSTR_VAL(entry->pattern), entry->prefix_len) != 0) { in browser_reg_compare()
571 ZSTR_ALLOCA_ALLOC(pattern_lc, ZSTR_LEN(entry->pattern), use_heap); in browser_reg_compare()
572 zend_str_tolower_copy(ZSTR_VAL(pattern_lc), ZSTR_VAL(entry->pattern), ZSTR_LEN(entry->pattern)); in browser_reg_compare()
575 cur = ZSTR_VAL(agent_name) + entry->prefix_len; in browser_reg_compare()
577 if (entry->contains_len[i] != 0) { in browser_reg_compare()
579 ZSTR_VAL(pattern_lc) + entry->contains_start[i], in browser_reg_compare()
580 entry->contains_len[i], in browser_reg_compare()
586 cur += entry->contains_len[i]; in browser_reg_compare()
592 *found_entry_ptr = entry; in browser_reg_compare()
597 regex = browscap_convert_pattern(entry->pattern, 0); in browser_reg_compare()
620 zend_string *current_match = entry->pattern; in browser_reg_compare()
649 *found_entry_ptr = entry; in browser_reg_compare()
652 *found_entry_ptr = entry; in browser_reg_compare()
726 browscap_entry *entry; in PHP_FUNCTION() local
728 ZEND_HASH_FOREACH_PTR(bdata->htab, entry) { in PHP_FUNCTION()
729 if (browser_reg_compare(entry, lookup_browser_name, &found_entry)) { in PHP_FUNCTION()