mctx 22 maint/gnulib/lib/regexec.c static void match_ctx_clean (re_match_context_t *mctx); mctx 26 maint/gnulib/lib/regexec.c static Idx search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx); mctx 27 maint/gnulib/lib/regexec.c static reg_errcode_t match_ctx_add_subtop (re_match_context_t *mctx, Idx node, mctx 52 maint/gnulib/lib/regexec.c static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx); mctx 53 maint/gnulib/lib/regexec.c static Idx check_matching (re_match_context_t *mctx, bool fl_longest_match, mctx 55 maint/gnulib/lib/regexec.c static Idx check_halt_state_context (const re_match_context_t *mctx, mctx 65 maint/gnulib/lib/regexec.c const re_match_context_t *mctx, mctx 70 maint/gnulib/lib/regexec.c static int sift_states_iter_mb (const re_match_context_t *mctx, mctx 73 maint/gnulib/lib/regexec.c static reg_errcode_t sift_states_backward (const re_match_context_t *mctx, mctx 75 maint/gnulib/lib/regexec.c static reg_errcode_t build_sifted_states (const re_match_context_t *mctx, mctx 78 maint/gnulib/lib/regexec.c static reg_errcode_t update_cur_sifted_state (const re_match_context_t *mctx, mctx 85 maint/gnulib/lib/regexec.c static bool check_dst_limits (const re_match_context_t *mctx, mctx 89 maint/gnulib/lib/regexec.c static int check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, mctx 92 maint/gnulib/lib/regexec.c static int check_dst_limits_calc_pos (const re_match_context_t *mctx, mctx 102 maint/gnulib/lib/regexec.c static reg_errcode_t sift_states_bkref (const re_match_context_t *mctx, mctx 109 maint/gnulib/lib/regexec.c re_match_context_t *mctx); mctx 111 maint/gnulib/lib/regexec.c re_match_context_t *mctx, mctx 114 maint/gnulib/lib/regexec.c re_match_context_t *mctx, mctx 116 maint/gnulib/lib/regexec.c static reg_errcode_t check_subexp_matching_top (re_match_context_t *mctx, mctx 121 maint/gnulib/lib/regexec.c re_match_context_t *mctx, mctx 124 maint/gnulib/lib/regexec.c static reg_errcode_t transit_state_mb (re_match_context_t *mctx, mctx 126 maint/gnulib/lib/regexec.c static reg_errcode_t transit_state_bkref (re_match_context_t *mctx, mctx 128 maint/gnulib/lib/regexec.c static reg_errcode_t get_subexp (re_match_context_t *mctx, mctx 130 maint/gnulib/lib/regexec.c static reg_errcode_t get_subexp_sub (re_match_context_t *mctx, mctx 136 maint/gnulib/lib/regexec.c static reg_errcode_t check_arrival (re_match_context_t *mctx, mctx 140 maint/gnulib/lib/regexec.c static reg_errcode_t check_arrival_add_next_nodes (re_match_context_t *mctx, mctx 151 maint/gnulib/lib/regexec.c static reg_errcode_t expand_bkref_cache (re_match_context_t *mctx, mctx 165 maint/gnulib/lib/regexec.c static bool check_node_accept (const re_match_context_t *mctx, mctx 167 maint/gnulib/lib/regexec.c static reg_errcode_t extend_buffers (re_match_context_t *mctx, int min_len); mctx 595 maint/gnulib/lib/regexec.c re_match_context_t mctx = { .dfa = dfa }; mctx 630 maint/gnulib/lib/regexec.c err = re_string_allocate (&mctx.input, string, length, dfa->nodes_len + 1, mctx 635 maint/gnulib/lib/regexec.c mctx.input.stop = stop; mctx 636 maint/gnulib/lib/regexec.c mctx.input.raw_stop = stop; mctx 637 maint/gnulib/lib/regexec.c mctx.input.newline_anchor = preg->newline_anchor; mctx 639 maint/gnulib/lib/regexec.c err = match_ctx_init (&mctx, eflags, dfa->nbackref * 2); mctx 651 maint/gnulib/lib/regexec.c <= mctx.input.bufs_len))) mctx 657 maint/gnulib/lib/regexec.c mctx.state_log = re_malloc (re_dfastate_t *, mctx.input.bufs_len + 1); mctx 658 maint/gnulib/lib/regexec.c if (__glibc_unlikely (mctx.state_log == NULL)) mctx 666 maint/gnulib/lib/regexec.c mctx.input.tip_context = (eflags & REG_NOTBOL) ? CONTEXT_BEGBUF mctx 744 maint/gnulib/lib/regexec.c __re_size_t offset = match_first - mctx.input.raw_mbs_idx; mctx 746 maint/gnulib/lib/regexec.c >= (__re_size_t) mctx.input.valid_raw_len)) mctx 748 maint/gnulib/lib/regexec.c err = re_string_reconstruct (&mctx.input, match_first, mctx 753 maint/gnulib/lib/regexec.c offset = match_first - mctx.input.raw_mbs_idx; mctx 756 maint/gnulib/lib/regexec.c ch = (offset < mctx.input.valid_len mctx 757 maint/gnulib/lib/regexec.c ? re_string_byte_at (&mctx.input, offset) : 0); mctx 772 maint/gnulib/lib/regexec.c err = re_string_reconstruct (&mctx.input, match_first, eflags); mctx 778 maint/gnulib/lib/regexec.c if (!sb && !re_string_first_byte (&mctx.input, 0)) mctx 783 maint/gnulib/lib/regexec.c mctx.state_log_top = mctx.nbkref_ents = mctx.max_mb_elem_len = 0; mctx 784 maint/gnulib/lib/regexec.c match_last = check_matching (&mctx, fl_longest_match, mctx 795 maint/gnulib/lib/regexec.c mctx.match_last = match_last; mctx 798 maint/gnulib/lib/regexec.c re_dfastate_t *pstate = mctx.state_log[match_last]; mctx 799 maint/gnulib/lib/regexec.c mctx.last_node = check_halt_state_context (&mctx, pstate, mctx 805 maint/gnulib/lib/regexec.c err = prune_impossible_nodes (&mctx); mctx 817 maint/gnulib/lib/regexec.c match_ctx_clean (&mctx); mctx 834 maint/gnulib/lib/regexec.c pmatch[0].rm_eo = mctx.match_last; mctx 841 maint/gnulib/lib/regexec.c err = set_regs (preg, &mctx, nmatch, pmatch, mctx 853 maint/gnulib/lib/regexec.c if (__glibc_unlikely (mctx.input.offsets_needed != 0)) mctx 856 maint/gnulib/lib/regexec.c (pmatch[reg_idx].rm_so == mctx.input.valid_len mctx 857 maint/gnulib/lib/regexec.c ? mctx.input.valid_raw_len mctx 858 maint/gnulib/lib/regexec.c : mctx.input.offsets[pmatch[reg_idx].rm_so]); mctx 860 maint/gnulib/lib/regexec.c (pmatch[reg_idx].rm_eo == mctx.input.valid_len mctx 861 maint/gnulib/lib/regexec.c ? mctx.input.valid_raw_len mctx 862 maint/gnulib/lib/regexec.c : mctx.input.offsets[pmatch[reg_idx].rm_eo]); mctx 885 maint/gnulib/lib/regexec.c re_free (mctx.state_log); mctx 887 maint/gnulib/lib/regexec.c match_ctx_free (&mctx); mctx 888 maint/gnulib/lib/regexec.c re_string_destruct (&mctx.input); mctx 894 maint/gnulib/lib/regexec.c prune_impossible_nodes (re_match_context_t *mctx) mctx 896 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 902 maint/gnulib/lib/regexec.c DEBUG_ASSERT (mctx->state_log != NULL); mctx 903 maint/gnulib/lib/regexec.c match_last = mctx->match_last; mctx 904 maint/gnulib/lib/regexec.c halt_node = mctx->last_node; mctx 931 maint/gnulib/lib/regexec.c ret = sift_states_backward (mctx, &sctx); mctx 945 maint/gnulib/lib/regexec.c } while (mctx->state_log[match_last] == NULL mctx 946 maint/gnulib/lib/regexec.c || !mctx->state_log[match_last]->halt); mctx 947 maint/gnulib/lib/regexec.c halt_node = check_halt_state_context (mctx, mctx 948 maint/gnulib/lib/regexec.c mctx->state_log[match_last], mctx 961 maint/gnulib/lib/regexec.c ret = sift_states_backward (mctx, &sctx); mctx 971 maint/gnulib/lib/regexec.c re_free (mctx->state_log); mctx 972 maint/gnulib/lib/regexec.c mctx->state_log = sifted_states; mctx 974 maint/gnulib/lib/regexec.c mctx->last_node = halt_node; mctx 975 maint/gnulib/lib/regexec.c mctx->match_last = match_last; mctx 988 maint/gnulib/lib/regexec.c acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx, mctx 991 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 995 maint/gnulib/lib/regexec.c context = re_string_context_at (&mctx->input, idx - 1, mctx->eflags); mctx 1030 maint/gnulib/lib/regexec.c check_matching (re_match_context_t *mctx, bool fl_longest_match, mctx 1033 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 1037 maint/gnulib/lib/regexec.c Idx cur_str_idx = re_string_cur_idx (&mctx->input); mctx 1043 maint/gnulib/lib/regexec.c cur_state = acquire_init_state_context (&err, mctx, cur_str_idx); mctx 1051 maint/gnulib/lib/regexec.c if (mctx->state_log != NULL) mctx 1053 maint/gnulib/lib/regexec.c mctx->state_log[cur_str_idx] = cur_state; mctx 1060 maint/gnulib/lib/regexec.c err = check_subexp_matching_top (mctx, &cur_state->nodes, 0); mctx 1066 maint/gnulib/lib/regexec.c err = transit_state_bkref (mctx, &cur_state->nodes); mctx 1077 maint/gnulib/lib/regexec.c || check_halt_state_context (mctx, cur_state, cur_str_idx)) mctx 1089 maint/gnulib/lib/regexec.c while (!re_string_eoi (&mctx->input)) mctx 1092 maint/gnulib/lib/regexec.c Idx next_char_idx = re_string_cur_idx (&mctx->input) + 1; mctx 1094 maint/gnulib/lib/regexec.c if ((__glibc_unlikely (next_char_idx >= mctx->input.bufs_len) mctx 1095 maint/gnulib/lib/regexec.c && mctx->input.bufs_len < mctx->input.len) mctx 1096 maint/gnulib/lib/regexec.c || (__glibc_unlikely (next_char_idx >= mctx->input.valid_len) mctx 1097 maint/gnulib/lib/regexec.c && mctx->input.valid_len < mctx->input.len)) mctx 1099 maint/gnulib/lib/regexec.c err = extend_buffers (mctx, next_char_idx + 1); mctx 1107 maint/gnulib/lib/regexec.c cur_state = transit_state (&err, mctx, cur_state); mctx 1108 maint/gnulib/lib/regexec.c if (mctx->state_log != NULL) mctx 1109 maint/gnulib/lib/regexec.c cur_state = merge_state_with_log (&err, mctx, cur_state); mctx 1119 maint/gnulib/lib/regexec.c if (mctx->state_log == NULL mctx 1121 maint/gnulib/lib/regexec.c || (cur_state = find_recover_state (&err, mctx)) == NULL) mctx 1138 maint/gnulib/lib/regexec.c || check_halt_state_context (mctx, cur_state, mctx 1139 maint/gnulib/lib/regexec.c re_string_cur_idx (&mctx->input))) mctx 1142 maint/gnulib/lib/regexec.c match_last = re_string_cur_idx (&mctx->input); mctx 1180 maint/gnulib/lib/regexec.c check_halt_state_context (const re_match_context_t *mctx, mctx 1186 maint/gnulib/lib/regexec.c context = re_string_context_at (&mctx->input, idx, mctx->eflags); mctx 1188 maint/gnulib/lib/regexec.c if (check_halt_node_context (mctx->dfa, state->nodes.elems[i], context)) mctx 1199 maint/gnulib/lib/regexec.c proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs, mctx 1204 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 1207 maint/gnulib/lib/regexec.c re_node_set *cur_nodes = &mctx->state_log[*pidx]->nodes; mctx 1252 maint/gnulib/lib/regexec.c naccepted = check_node_accept_bytes (dfa, node, &mctx->input, *pidx); mctx 1266 maint/gnulib/lib/regexec.c char *buf = (char *) re_string_get_buffer (&mctx->input); mctx 1267 maint/gnulib/lib/regexec.c if (mctx->input.valid_len - *pidx < naccepted mctx 1282 maint/gnulib/lib/regexec.c if (re_node_set_contains (&mctx->state_log[*pidx]->nodes, mctx 1289 maint/gnulib/lib/regexec.c || check_node_accept (mctx, dfa->nodes + node, *pidx)) mctx 1293 maint/gnulib/lib/regexec.c if (fs && (*pidx > mctx->match_last || mctx->state_log[*pidx] == NULL mctx 1294 maint/gnulib/lib/regexec.c || !re_node_set_contains (&mctx->state_log[*pidx]->nodes, mctx 1364 maint/gnulib/lib/regexec.c set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch, mctx 1376 maint/gnulib/lib/regexec.c DEBUG_ASSERT (mctx->state_log != NULL); mctx 1403 maint/gnulib/lib/regexec.c if ((idx == pmatch[0].rm_eo && cur_node == mctx->last_node) mctx 1427 maint/gnulib/lib/regexec.c cur_node = proceed_next_node (mctx, nmatch, pmatch, prev_idx_match, mctx 1544 maint/gnulib/lib/regexec.c sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx) mctx 1551 maint/gnulib/lib/regexec.c DEBUG_ASSERT (mctx->state_log != NULL && mctx->state_log[str_idx] != NULL); mctx 1558 maint/gnulib/lib/regexec.c err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); mctx 1567 maint/gnulib/lib/regexec.c if (null_cnt > mctx->max_mb_elem_len) mctx 1577 maint/gnulib/lib/regexec.c if (mctx->state_log[str_idx]) mctx 1579 maint/gnulib/lib/regexec.c err = build_sifted_states (mctx, sctx, str_idx, &cur_dest); mctx 1588 maint/gnulib/lib/regexec.c err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); mctx 1600 maint/gnulib/lib/regexec.c build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, mctx 1603 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 1604 maint/gnulib/lib/regexec.c const re_node_set *cur_src = &mctx->state_log[str_idx]->non_eps_nodes; mctx 1623 maint/gnulib/lib/regexec.c naccepted = sift_states_iter_mb (mctx, sctx, prev_node, mctx 1629 maint/gnulib/lib/regexec.c && check_node_accept (mctx, dfa->nodes + prev_node, str_idx) mctx 1640 maint/gnulib/lib/regexec.c if (check_dst_limits (mctx, &sctx->limits, mctx 1656 maint/gnulib/lib/regexec.c clean_state_log_if_needed (re_match_context_t *mctx, Idx next_state_log_idx) mctx 1658 maint/gnulib/lib/regexec.c Idx top = mctx->state_log_top; mctx 1660 maint/gnulib/lib/regexec.c if ((next_state_log_idx >= mctx->input.bufs_len mctx 1661 maint/gnulib/lib/regexec.c && mctx->input.bufs_len < mctx->input.len) mctx 1662 maint/gnulib/lib/regexec.c || (next_state_log_idx >= mctx->input.valid_len mctx 1663 maint/gnulib/lib/regexec.c && mctx->input.valid_len < mctx->input.len)) mctx 1666 maint/gnulib/lib/regexec.c err = extend_buffers (mctx, next_state_log_idx + 1); mctx 1673 maint/gnulib/lib/regexec.c DEBUG_ASSERT (mctx->state_log != NULL); mctx 1674 maint/gnulib/lib/regexec.c memset (mctx->state_log + top + 1, '\0', mctx 1676 maint/gnulib/lib/regexec.c mctx->state_log_top = next_state_log_idx; mctx 1708 maint/gnulib/lib/regexec.c update_cur_sifted_state (const re_match_context_t *mctx, mctx 1712 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 1715 maint/gnulib/lib/regexec.c candidates = ((mctx->state_log[str_idx] == NULL) ? NULL mctx 1716 maint/gnulib/lib/regexec.c : &mctx->state_log[str_idx]->nodes); mctx 1734 maint/gnulib/lib/regexec.c mctx->bkref_ents, str_idx); mctx 1745 maint/gnulib/lib/regexec.c if (candidates && mctx->state_log[str_idx]->has_backref) mctx 1747 maint/gnulib/lib/regexec.c err = sift_states_bkref (mctx, sctx, str_idx, candidates); mctx 1832 maint/gnulib/lib/regexec.c check_dst_limits (const re_match_context_t *mctx, const re_node_set *limits, mctx 1835 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 1838 maint/gnulib/lib/regexec.c Idx dst_bkref_idx = search_cur_bkref_entry (mctx, dst_idx); mctx 1839 maint/gnulib/lib/regexec.c Idx src_bkref_idx = search_cur_bkref_entry (mctx, src_idx); mctx 1844 maint/gnulib/lib/regexec.c ent = mctx->bkref_ents + limits->elems[lim_idx]; mctx 1847 maint/gnulib/lib/regexec.c dst_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], mctx 1850 maint/gnulib/lib/regexec.c src_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], mctx 1867 maint/gnulib/lib/regexec.c check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, mctx 1870 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 1884 maint/gnulib/lib/regexec.c struct re_backref_cache_entry *ent = mctx->bkref_ents + bkref_idx; mctx 1914 maint/gnulib/lib/regexec.c check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx, mctx 1948 maint/gnulib/lib/regexec.c check_dst_limits_calc_pos (const re_match_context_t *mctx, Idx limit, mctx 1952 maint/gnulib/lib/regexec.c struct re_backref_cache_entry *lim = mctx->bkref_ents + limit; mctx 1969 maint/gnulib/lib/regexec.c return check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx, mctx 2065 maint/gnulib/lib/regexec.c sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx, mctx 2068 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 2072 maint/gnulib/lib/regexec.c Idx first_idx = search_cur_bkref_entry (mctx, str_idx); mctx 2092 maint/gnulib/lib/regexec.c entry = mctx->bkref_ents + first_idx; mctx 2112 maint/gnulib/lib/regexec.c || check_dst_limits (mctx, &sctx->limits, node, mctx 2132 maint/gnulib/lib/regexec.c err = sift_states_backward (mctx, &local_sctx); mctx 2147 maint/gnulib/lib/regexec.c entry = mctx->bkref_ents + enabled_idx; mctx 2163 maint/gnulib/lib/regexec.c sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, mctx 2166 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 2169 maint/gnulib/lib/regexec.c naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx); mctx 2192 maint/gnulib/lib/regexec.c transit_state (reg_errcode_t *err, re_match_context_t *mctx, mctx 2201 maint/gnulib/lib/regexec.c *err = transit_state_mb (mctx, state); mctx 2210 maint/gnulib/lib/regexec.c return transit_state_sb (err, mctx, state); mctx 2214 maint/gnulib/lib/regexec.c ch = re_string_fetch_byte (&mctx->input); mctx 2226 maint/gnulib/lib/regexec.c = re_string_context_at (&mctx->input, mctx 2227 maint/gnulib/lib/regexec.c re_string_cur_idx (&mctx->input) - 1, mctx 2228 maint/gnulib/lib/regexec.c mctx->eflags); mctx 2235 maint/gnulib/lib/regexec.c if (!build_trtable (mctx->dfa, state)) mctx 2247 maint/gnulib/lib/regexec.c merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, mctx 2250 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 2251 maint/gnulib/lib/regexec.c Idx cur_idx = re_string_cur_idx (&mctx->input); mctx 2253 maint/gnulib/lib/regexec.c if (cur_idx > mctx->state_log_top) mctx 2255 maint/gnulib/lib/regexec.c mctx->state_log[cur_idx] = next_state; mctx 2256 maint/gnulib/lib/regexec.c mctx->state_log_top = cur_idx; mctx 2258 maint/gnulib/lib/regexec.c else if (mctx->state_log[cur_idx] == 0) mctx 2260 maint/gnulib/lib/regexec.c mctx->state_log[cur_idx] = next_state; mctx 2271 maint/gnulib/lib/regexec.c pstate = mctx->state_log[cur_idx]; mctx 2286 maint/gnulib/lib/regexec.c context = re_string_context_at (&mctx->input, mctx 2287 maint/gnulib/lib/regexec.c re_string_cur_idx (&mctx->input) - 1, mctx 2288 maint/gnulib/lib/regexec.c mctx->eflags); mctx 2289 maint/gnulib/lib/regexec.c next_state = mctx->state_log[cur_idx] mctx 2303 maint/gnulib/lib/regexec.c *err = check_subexp_matching_top (mctx, &next_state->nodes, mctx 2311 maint/gnulib/lib/regexec.c *err = transit_state_bkref (mctx, &next_state->nodes); mctx 2314 maint/gnulib/lib/regexec.c next_state = mctx->state_log[cur_idx]; mctx 2325 maint/gnulib/lib/regexec.c find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) mctx 2330 maint/gnulib/lib/regexec.c Idx max = mctx->state_log_top; mctx 2331 maint/gnulib/lib/regexec.c Idx cur_str_idx = re_string_cur_idx (&mctx->input); mctx 2337 maint/gnulib/lib/regexec.c re_string_skip_bytes (&mctx->input, 1); mctx 2339 maint/gnulib/lib/regexec.c while (mctx->state_log[cur_str_idx] == NULL); mctx 2341 maint/gnulib/lib/regexec.c cur_state = merge_state_with_log (err, mctx, NULL); mctx 2355 maint/gnulib/lib/regexec.c check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes, mctx 2358 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 2375 maint/gnulib/lib/regexec.c err = match_ctx_add_subtop (mctx, node, str_idx); mctx 2388 maint/gnulib/lib/regexec.c transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx, mctx 2391 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 2394 maint/gnulib/lib/regexec.c Idx node_cnt, cur_str_idx = re_string_cur_idx (&mctx->input); mctx 2403 maint/gnulib/lib/regexec.c if (check_node_accept (mctx, dfa->nodes + cur_node, cur_str_idx)) mctx 2414 maint/gnulib/lib/regexec.c context = re_string_context_at (&mctx->input, cur_str_idx, mctx->eflags); mctx 2420 maint/gnulib/lib/regexec.c re_string_skip_bytes (&mctx->input, 1); mctx 2426 maint/gnulib/lib/regexec.c transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) mctx 2428 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 2446 maint/gnulib/lib/regexec.c context = re_string_context_at (&mctx->input, mctx 2447 maint/gnulib/lib/regexec.c re_string_cur_idx (&mctx->input), mctx 2448 maint/gnulib/lib/regexec.c mctx->eflags); mctx 2455 maint/gnulib/lib/regexec.c naccepted = check_node_accept_bytes (dfa, cur_node_idx, &mctx->input, mctx 2456 maint/gnulib/lib/regexec.c re_string_cur_idx (&mctx->input)); mctx 2461 maint/gnulib/lib/regexec.c dest_idx = re_string_cur_idx (&mctx->input) + naccepted; mctx 2462 maint/gnulib/lib/regexec.c mctx->max_mb_elem_len = ((mctx->max_mb_elem_len < naccepted) ? naccepted mctx 2463 maint/gnulib/lib/regexec.c : mctx->max_mb_elem_len); mctx 2464 maint/gnulib/lib/regexec.c err = clean_state_log_if_needed (mctx, dest_idx); mctx 2470 maint/gnulib/lib/regexec.c dest_state = mctx->state_log[dest_idx]; mctx 2480 maint/gnulib/lib/regexec.c context = re_string_context_at (&mctx->input, dest_idx - 1, mctx 2481 maint/gnulib/lib/regexec.c mctx->eflags); mctx 2482 maint/gnulib/lib/regexec.c mctx->state_log[dest_idx] mctx 2486 maint/gnulib/lib/regexec.c if (__glibc_unlikely (mctx->state_log[dest_idx] == NULL mctx 2494 maint/gnulib/lib/regexec.c transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) mctx 2496 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 2499 maint/gnulib/lib/regexec.c Idx cur_str_idx = re_string_cur_idx (&mctx->input); mctx 2515 maint/gnulib/lib/regexec.c context = re_string_context_at (&mctx->input, cur_str_idx, mctx 2516 maint/gnulib/lib/regexec.c mctx->eflags); mctx 2523 maint/gnulib/lib/regexec.c bkc_idx = mctx->nbkref_ents; mctx 2524 maint/gnulib/lib/regexec.c err = get_subexp (mctx, node_idx, cur_str_idx); mctx 2531 maint/gnulib/lib/regexec.c for (; bkc_idx < mctx->nbkref_ents; ++bkc_idx) mctx 2536 maint/gnulib/lib/regexec.c bkref_ent = mctx->bkref_ents + bkc_idx; mctx 2545 maint/gnulib/lib/regexec.c context = re_string_context_at (&mctx->input, dest_str_idx - 1, mctx 2546 maint/gnulib/lib/regexec.c mctx->eflags); mctx 2547 maint/gnulib/lib/regexec.c dest_state = mctx->state_log[dest_str_idx]; mctx 2548 maint/gnulib/lib/regexec.c prev_nelem = ((mctx->state_log[cur_str_idx] == NULL) ? 0 mctx 2549 maint/gnulib/lib/regexec.c : mctx->state_log[cur_str_idx]->nodes.nelem); mctx 2553 maint/gnulib/lib/regexec.c mctx->state_log[dest_str_idx] mctx 2556 maint/gnulib/lib/regexec.c if (__glibc_unlikely (mctx->state_log[dest_str_idx] == NULL mctx 2571 maint/gnulib/lib/regexec.c mctx->state_log[dest_str_idx] mctx 2574 maint/gnulib/lib/regexec.c if (__glibc_unlikely (mctx->state_log[dest_str_idx] == NULL mctx 2581 maint/gnulib/lib/regexec.c && mctx->state_log[cur_str_idx]->nodes.nelem > prev_nelem) mctx 2583 maint/gnulib/lib/regexec.c err = check_subexp_matching_top (mctx, new_dest_nodes, mctx 2587 maint/gnulib/lib/regexec.c err = transit_state_bkref (mctx, new_dest_nodes); mctx 2606 maint/gnulib/lib/regexec.c get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx) mctx 2608 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 2610 maint/gnulib/lib/regexec.c const char *buf = (const char *) re_string_get_buffer (&mctx->input); mctx 2612 maint/gnulib/lib/regexec.c Idx cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx); mctx 2616 maint/gnulib/lib/regexec.c = mctx->bkref_ents + cache_idx; mctx 2626 maint/gnulib/lib/regexec.c for (sub_top_idx = 0; sub_top_idx < mctx->nsub_tops; ++sub_top_idx) mctx 2629 maint/gnulib/lib/regexec.c re_sub_match_top_t *sub_top = mctx->sub_tops[sub_top_idx]; mctx 2650 maint/gnulib/lib/regexec.c > mctx->input.valid_len)) mctx 2653 maint/gnulib/lib/regexec.c if (bkref_str_off + sl_str_diff > mctx->input.len) mctx 2656 maint/gnulib/lib/regexec.c err = clean_state_log_if_needed (mctx, mctx 2661 maint/gnulib/lib/regexec.c buf = (const char *) re_string_get_buffer (&mctx->input); mctx 2669 maint/gnulib/lib/regexec.c err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, mctx 2674 maint/gnulib/lib/regexec.c buf = (const char *) re_string_get_buffer (&mctx->input); mctx 2697 maint/gnulib/lib/regexec.c if (__glibc_unlikely (bkref_str_off >= mctx->input.valid_len)) mctx 2700 maint/gnulib/lib/regexec.c if (bkref_str_off >= mctx->input.len) mctx 2703 maint/gnulib/lib/regexec.c err = extend_buffers (mctx, bkref_str_off + 1); mctx 2707 maint/gnulib/lib/regexec.c buf = (const char *) re_string_get_buffer (&mctx->input); mctx 2713 maint/gnulib/lib/regexec.c if (mctx->state_log[sl_str] == NULL) mctx 2716 maint/gnulib/lib/regexec.c nodes = &mctx->state_log[sl_str]->nodes; mctx 2730 maint/gnulib/lib/regexec.c err = check_arrival (mctx, sub_top->path, sub_top->node, mctx 2740 maint/gnulib/lib/regexec.c err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, mctx 2742 maint/gnulib/lib/regexec.c buf = (const char *) re_string_get_buffer (&mctx->input); mctx 2759 maint/gnulib/lib/regexec.c get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top, mctx 2765 maint/gnulib/lib/regexec.c err = check_arrival (mctx, &sub_last->path, sub_last->node, mctx 2770 maint/gnulib/lib/regexec.c err = match_ctx_add_entry (mctx, bkref_node, bkref_str, sub_top->str_idx, mctx 2775 maint/gnulib/lib/regexec.c return clean_state_log_if_needed (mctx, to_idx); mctx 2810 maint/gnulib/lib/regexec.c check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node, mctx 2813 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 2823 maint/gnulib/lib/regexec.c if (__glibc_unlikely (path->alloc < last_str + mctx->max_mb_elem_len + 1)) mctx 2827 maint/gnulib/lib/regexec.c Idx incr_alloc = last_str + mctx->max_mb_elem_len + 1; mctx 2846 maint/gnulib/lib/regexec.c backup_state_log = mctx->state_log; mctx 2847 maint/gnulib/lib/regexec.c backup_cur_idx = mctx->input.cur_idx; mctx 2848 maint/gnulib/lib/regexec.c mctx->state_log = path->array; mctx 2849 maint/gnulib/lib/regexec.c mctx->input.cur_idx = str_idx; mctx 2852 maint/gnulib/lib/regexec.c context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); mctx 2867 maint/gnulib/lib/regexec.c cur_state = mctx->state_log[str_idx]; mctx 2881 maint/gnulib/lib/regexec.c err = expand_bkref_cache (mctx, &next_nodes, str_idx, mctx 2895 maint/gnulib/lib/regexec.c mctx->state_log[str_idx] = cur_state; mctx 2898 maint/gnulib/lib/regexec.c for (null_cnt = 0; str_idx < last_str && null_cnt <= mctx->max_mb_elem_len;) mctx 2901 maint/gnulib/lib/regexec.c if (mctx->state_log[str_idx + 1]) mctx 2904 maint/gnulib/lib/regexec.c &mctx->state_log[str_idx + 1]->nodes); mctx 2913 maint/gnulib/lib/regexec.c err = check_arrival_add_next_nodes (mctx, str_idx, mctx 2931 maint/gnulib/lib/regexec.c err = expand_bkref_cache (mctx, &next_nodes, str_idx, mctx 2939 maint/gnulib/lib/regexec.c context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); mctx 2946 maint/gnulib/lib/regexec.c mctx->state_log[str_idx] = cur_state; mctx 2950 maint/gnulib/lib/regexec.c cur_nodes = (mctx->state_log[last_str] == NULL ? NULL mctx 2951 maint/gnulib/lib/regexec.c : &mctx->state_log[last_str]->nodes); mctx 2955 maint/gnulib/lib/regexec.c mctx->state_log = backup_state_log; mctx 2956 maint/gnulib/lib/regexec.c mctx->input.cur_idx = backup_cur_idx; mctx 2975 maint/gnulib/lib/regexec.c check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx, mctx 2978 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 2993 maint/gnulib/lib/regexec.c naccepted = check_node_accept_bytes (dfa, cur_node, &mctx->input, mctx 3000 maint/gnulib/lib/regexec.c dest_state = mctx->state_log[next_idx]; mctx 3017 maint/gnulib/lib/regexec.c mctx->state_log[next_idx] = re_acquire_state (&err, dfa, mctx 3019 maint/gnulib/lib/regexec.c if (__glibc_unlikely (mctx->state_log[next_idx] == NULL mctx 3029 maint/gnulib/lib/regexec.c || check_node_accept (mctx, dfa->nodes + cur_node, str_idx)) mctx 3146 maint/gnulib/lib/regexec.c expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, mctx 3149 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 3151 maint/gnulib/lib/regexec.c Idx cache_idx_start = search_cur_bkref_entry (mctx, cur_str); mctx 3158 maint/gnulib/lib/regexec.c ent = mctx->bkref_ents + cache_idx_start; mctx 3197 maint/gnulib/lib/regexec.c if (mctx->state_log[to_idx]) mctx 3200 maint/gnulib/lib/regexec.c if (re_node_set_contains (&mctx->state_log[to_idx]->nodes, mctx 3204 maint/gnulib/lib/regexec.c &mctx->state_log[to_idx]->nodes); mctx 3219 maint/gnulib/lib/regexec.c mctx->state_log[to_idx] = re_acquire_state (&err, dfa, &union_set); mctx 3221 maint/gnulib/lib/regexec.c if (__glibc_unlikely (mctx->state_log[to_idx] == NULL mctx 3899 maint/gnulib/lib/regexec.c check_node_accept (const re_match_context_t *mctx, const re_token_t *node, mctx 3903 maint/gnulib/lib/regexec.c ch = re_string_byte_at (&mctx->input, idx); mctx 3921 maint/gnulib/lib/regexec.c if ((ch == '\n' && !(mctx->dfa->syntax & RE_DOT_NEWLINE)) mctx 3922 maint/gnulib/lib/regexec.c || (ch == '\0' && (mctx->dfa->syntax & RE_DOT_NOT_NULL))) mctx 3934 maint/gnulib/lib/regexec.c unsigned int context = re_string_context_at (&mctx->input, idx, mctx 3935 maint/gnulib/lib/regexec.c mctx->eflags); mctx 3947 maint/gnulib/lib/regexec.c extend_buffers (re_match_context_t *mctx, int min_len) mctx 3950 maint/gnulib/lib/regexec.c re_string_t *pstr = &mctx->input; mctx 3964 maint/gnulib/lib/regexec.c if (mctx->state_log != NULL) mctx 3970 maint/gnulib/lib/regexec.c re_dfastate_t **new_array = re_realloc (mctx->state_log, re_dfastate_t *, mctx 3974 maint/gnulib/lib/regexec.c mctx->state_log = new_array; mctx 4009 maint/gnulib/lib/regexec.c match_ctx_init (re_match_context_t *mctx, int eflags, Idx n) mctx 4011 maint/gnulib/lib/regexec.c mctx->eflags = eflags; mctx 4012 maint/gnulib/lib/regexec.c mctx->match_last = -1; mctx 4022 maint/gnulib/lib/regexec.c mctx->bkref_ents = re_malloc (struct re_backref_cache_entry, n); mctx 4023 maint/gnulib/lib/regexec.c mctx->sub_tops = re_malloc (re_sub_match_top_t *, n); mctx 4024 maint/gnulib/lib/regexec.c if (__glibc_unlikely (mctx->bkref_ents == NULL || mctx->sub_tops == NULL)) mctx 4032 maint/gnulib/lib/regexec.c mctx->abkref_ents = n; mctx 4033 maint/gnulib/lib/regexec.c mctx->max_mb_elem_len = 1; mctx 4034 maint/gnulib/lib/regexec.c mctx->asub_tops = n; mctx 4043 maint/gnulib/lib/regexec.c match_ctx_clean (re_match_context_t *mctx) mctx 4046 maint/gnulib/lib/regexec.c for (st_idx = 0; st_idx < mctx->nsub_tops; ++st_idx) mctx 4049 maint/gnulib/lib/regexec.c re_sub_match_top_t *top = mctx->sub_tops[st_idx]; mctx 4065 maint/gnulib/lib/regexec.c mctx->nsub_tops = 0; mctx 4066 maint/gnulib/lib/regexec.c mctx->nbkref_ents = 0; mctx 4072 maint/gnulib/lib/regexec.c match_ctx_free (re_match_context_t *mctx) mctx 4075 maint/gnulib/lib/regexec.c match_ctx_clean (mctx); mctx 4076 maint/gnulib/lib/regexec.c re_free (mctx->sub_tops); mctx 4077 maint/gnulib/lib/regexec.c re_free (mctx->bkref_ents); mctx 4087 maint/gnulib/lib/regexec.c match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, Idx from, mctx 4090 maint/gnulib/lib/regexec.c if (mctx->nbkref_ents >= mctx->abkref_ents) mctx 4093 maint/gnulib/lib/regexec.c new_entry = re_realloc (mctx->bkref_ents, struct re_backref_cache_entry, mctx 4094 maint/gnulib/lib/regexec.c mctx->abkref_ents * 2); mctx 4097 maint/gnulib/lib/regexec.c re_free (mctx->bkref_ents); mctx 4100 maint/gnulib/lib/regexec.c mctx->bkref_ents = new_entry; mctx 4101 maint/gnulib/lib/regexec.c memset (mctx->bkref_ents + mctx->nbkref_ents, '\0', mctx 4102 maint/gnulib/lib/regexec.c sizeof (struct re_backref_cache_entry) * mctx->abkref_ents); mctx 4103 maint/gnulib/lib/regexec.c mctx->abkref_ents *= 2; mctx 4105 maint/gnulib/lib/regexec.c if (mctx->nbkref_ents > 0 mctx 4106 maint/gnulib/lib/regexec.c && mctx->bkref_ents[mctx->nbkref_ents - 1].str_idx == str_idx) mctx 4107 maint/gnulib/lib/regexec.c mctx->bkref_ents[mctx->nbkref_ents - 1].more = 1; mctx 4109 maint/gnulib/lib/regexec.c mctx->bkref_ents[mctx->nbkref_ents].node = node; mctx 4110 maint/gnulib/lib/regexec.c mctx->bkref_ents[mctx->nbkref_ents].str_idx = str_idx; mctx 4111 maint/gnulib/lib/regexec.c mctx->bkref_ents[mctx->nbkref_ents].subexp_from = from; mctx 4112 maint/gnulib/lib/regexec.c mctx->bkref_ents[mctx->nbkref_ents].subexp_to = to; mctx 4122 maint/gnulib/lib/regexec.c mctx->bkref_ents[mctx->nbkref_ents].eps_reachable_subexps_map mctx 4125 maint/gnulib/lib/regexec.c mctx->bkref_ents[mctx->nbkref_ents++].more = 0; mctx 4126 maint/gnulib/lib/regexec.c if (mctx->max_mb_elem_len < to - from) mctx 4127 maint/gnulib/lib/regexec.c mctx->max_mb_elem_len = to - from; mctx 4135 maint/gnulib/lib/regexec.c search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx) mctx 4138 maint/gnulib/lib/regexec.c last = right = mctx->nbkref_ents; mctx 4142 maint/gnulib/lib/regexec.c if (mctx->bkref_ents[mid].str_idx < str_idx) mctx 4147 maint/gnulib/lib/regexec.c if (left < last && mctx->bkref_ents[left].str_idx == str_idx) mctx 4158 maint/gnulib/lib/regexec.c match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx) mctx 4160 maint/gnulib/lib/regexec.c DEBUG_ASSERT (mctx->sub_tops != NULL); mctx 4161 maint/gnulib/lib/regexec.c DEBUG_ASSERT (mctx->asub_tops > 0); mctx 4162 maint/gnulib/lib/regexec.c if (__glibc_unlikely (mctx->nsub_tops == mctx->asub_tops)) mctx 4164 maint/gnulib/lib/regexec.c Idx new_asub_tops = mctx->asub_tops * 2; mctx 4165 maint/gnulib/lib/regexec.c re_sub_match_top_t **new_array = re_realloc (mctx->sub_tops, mctx 4170 maint/gnulib/lib/regexec.c mctx->sub_tops = new_array; mctx 4171 maint/gnulib/lib/regexec.c mctx->asub_tops = new_asub_tops; mctx 4173 maint/gnulib/lib/regexec.c mctx->sub_tops[mctx->nsub_tops] = calloc (1, sizeof (re_sub_match_top_t)); mctx 4174 maint/gnulib/lib/regexec.c if (__glibc_unlikely (mctx->sub_tops[mctx->nsub_tops] == NULL)) mctx 4176 maint/gnulib/lib/regexec.c mctx->sub_tops[mctx->nsub_tops]->node = node; mctx 4177 maint/gnulib/lib/regexec.c mctx->sub_tops[mctx->nsub_tops++]->str_idx = str_idx;