Lines Matching refs:entry
74 browscap_entry *entry = Z_PTR_P(zvalue); local
75 zend_string_release(entry->pattern);
76 if (entry->parent) {
77 zend_string_release(entry->parent);
79 efree(entry);
84 browscap_entry *entry = Z_PTR_P(zvalue); in browscap_entry_dtor_persistent() local
85 zend_string_release(entry->pattern); in browscap_entry_dtor_persistent()
86 if (entry->parent) { in browscap_entry_dtor_persistent()
87 zend_string_release(entry->parent); in browscap_entry_dtor_persistent()
89 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
283 ZVAL_STR(&tmp, browscap_convert_pattern(entry->pattern, 0)); in browscap_entry_to_array()
286 ZVAL_STR_COPY(&tmp, entry->pattern); in browscap_entry_to_array()
289 if (entry->parent) { in browscap_entry_to_array()
290 ZVAL_STR_COPY(&tmp, entry->parent); in browscap_entry_to_array()
294 for (i = entry->kv_start; i < entry->kv_end; i++) { in browscap_entry_to_array()
358 browscap_entry *entry; in php_browscap_parser_cb() local
369 entry = ctx->current_entry in php_browscap_parser_cb()
371 zend_hash_update_ptr(bdata->htab, pattern, entry); in php_browscap_parser_cb()
378 entry->pattern = zend_string_copy(pattern); in php_browscap_parser_cb()
379 entry->kv_end = entry->kv_start = bdata->kv_used; in php_browscap_parser_cb()
380 entry->parent = NULL; in php_browscap_parser_cb()
382 pos = entry->prefix_len = browscap_compute_prefix_len(pattern); in php_browscap_parser_cb()
385 &entry->contains_start[i], &entry->contains_len[i]); in php_browscap_parser_cb()
538 static inline size_t browscap_get_minimum_length(browscap_entry *entry) { in browscap_get_minimum_length() argument
539 size_t len = entry->prefix_len; in browscap_get_minimum_length()
542 len += entry->contains_len[i]; in browscap_get_minimum_length()
550 browscap_entry *entry = Z_PTR_P(entry_zv); in browser_reg_compare() local
564 if (ZSTR_LEN(agent_name) < browscap_get_minimum_length(entry)) { in browser_reg_compare()
570 ZSTR_VAL(agent_name), entry->prefix_len, in browser_reg_compare()
571 ZSTR_VAL(entry->pattern), entry->prefix_len) != 0) { in browser_reg_compare()
576 ZSTR_ALLOCA_ALLOC(pattern_lc, ZSTR_LEN(entry->pattern), use_heap); in browser_reg_compare()
577 zend_str_tolower_copy(ZSTR_VAL(pattern_lc), ZSTR_VAL(entry->pattern), ZSTR_LEN(entry->pattern)); in browser_reg_compare()
580 cur = ZSTR_VAL(agent_name) + entry->prefix_len; in browser_reg_compare()
582 if (entry->contains_len[i] != 0) { in browser_reg_compare()
584 ZSTR_VAL(pattern_lc) + entry->contains_start[i], in browser_reg_compare()
585 entry->contains_len[i], in browser_reg_compare()
591 cur += entry->contains_len[i]; in browser_reg_compare()
597 *found_entry_ptr = entry; in browser_reg_compare()
602 regex = browscap_convert_pattern(entry->pattern, 0); in browser_reg_compare()
617 zend_string *current_match = entry->pattern; in browser_reg_compare()
646 *found_entry_ptr = entry; in browser_reg_compare()
649 *found_entry_ptr = entry; in browser_reg_compare()