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 71 maint/gnulib/lib/regexec.c static int sift_states_iter_mb (const re_match_context_t *mctx, mctx 75 maint/gnulib/lib/regexec.c static reg_errcode_t sift_states_backward (const re_match_context_t *mctx, mctx 77 maint/gnulib/lib/regexec.c static reg_errcode_t build_sifted_states (const re_match_context_t *mctx, mctx 80 maint/gnulib/lib/regexec.c static reg_errcode_t update_cur_sifted_state (const re_match_context_t *mctx, mctx 87 maint/gnulib/lib/regexec.c static bool check_dst_limits (const re_match_context_t *mctx, mctx 91 maint/gnulib/lib/regexec.c static int check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, mctx 94 maint/gnulib/lib/regexec.c static int check_dst_limits_calc_pos (const re_match_context_t *mctx, mctx 104 maint/gnulib/lib/regexec.c static reg_errcode_t sift_states_bkref (const re_match_context_t *mctx, mctx 111 maint/gnulib/lib/regexec.c re_match_context_t *mctx); mctx 113 maint/gnulib/lib/regexec.c re_match_context_t *mctx, mctx 116 maint/gnulib/lib/regexec.c re_match_context_t *mctx, mctx 118 maint/gnulib/lib/regexec.c static reg_errcode_t check_subexp_matching_top (re_match_context_t *mctx, mctx 123 maint/gnulib/lib/regexec.c re_match_context_t *mctx, mctx 127 maint/gnulib/lib/regexec.c static reg_errcode_t transit_state_mb (re_match_context_t *mctx, mctx 130 maint/gnulib/lib/regexec.c static reg_errcode_t transit_state_bkref (re_match_context_t *mctx, mctx 132 maint/gnulib/lib/regexec.c static reg_errcode_t get_subexp (re_match_context_t *mctx, mctx 134 maint/gnulib/lib/regexec.c static reg_errcode_t get_subexp_sub (re_match_context_t *mctx, mctx 140 maint/gnulib/lib/regexec.c static reg_errcode_t check_arrival (re_match_context_t *mctx, mctx 144 maint/gnulib/lib/regexec.c static reg_errcode_t check_arrival_add_next_nodes (re_match_context_t *mctx, mctx 155 maint/gnulib/lib/regexec.c static reg_errcode_t expand_bkref_cache (re_match_context_t *mctx, mctx 171 maint/gnulib/lib/regexec.c static bool check_node_accept (const re_match_context_t *mctx, mctx 173 maint/gnulib/lib/regexec.c static reg_errcode_t extend_buffers (re_match_context_t *mctx, int min_len); mctx 601 maint/gnulib/lib/regexec.c re_match_context_t mctx = { .dfa = dfa }; mctx 636 maint/gnulib/lib/regexec.c err = re_string_allocate (&mctx.input, string, length, dfa->nodes_len + 1, mctx 641 maint/gnulib/lib/regexec.c mctx.input.stop = stop; mctx 642 maint/gnulib/lib/regexec.c mctx.input.raw_stop = stop; mctx 643 maint/gnulib/lib/regexec.c mctx.input.newline_anchor = preg->newline_anchor; mctx 645 maint/gnulib/lib/regexec.c err = match_ctx_init (&mctx, eflags, dfa->nbackref * 2); mctx 657 maint/gnulib/lib/regexec.c <= mctx.input.bufs_len))) mctx 663 maint/gnulib/lib/regexec.c mctx.state_log = re_malloc (re_dfastate_t *, mctx.input.bufs_len + 1); mctx 664 maint/gnulib/lib/regexec.c if (__glibc_unlikely (mctx.state_log == NULL)) mctx 672 maint/gnulib/lib/regexec.c mctx.input.tip_context = (eflags & REG_NOTBOL) ? CONTEXT_BEGBUF mctx 750 maint/gnulib/lib/regexec.c __re_size_t offset = match_first - mctx.input.raw_mbs_idx; mctx 752 maint/gnulib/lib/regexec.c >= (__re_size_t) mctx.input.valid_raw_len)) mctx 754 maint/gnulib/lib/regexec.c err = re_string_reconstruct (&mctx.input, match_first, mctx 759 maint/gnulib/lib/regexec.c offset = match_first - mctx.input.raw_mbs_idx; mctx 764 maint/gnulib/lib/regexec.c ? 0 : re_string_byte_at (&mctx.input, offset)); mctx 779 maint/gnulib/lib/regexec.c err = re_string_reconstruct (&mctx.input, match_first, eflags); mctx 786 maint/gnulib/lib/regexec.c if (!sb && !re_string_first_byte (&mctx.input, 0)) mctx 792 maint/gnulib/lib/regexec.c mctx.state_log_top = mctx.nbkref_ents = mctx.max_mb_elem_len = 0; mctx 793 maint/gnulib/lib/regexec.c match_last = check_matching (&mctx, fl_longest_match, mctx 804 maint/gnulib/lib/regexec.c mctx.match_last = match_last; mctx 807 maint/gnulib/lib/regexec.c re_dfastate_t *pstate = mctx.state_log[match_last]; mctx 808 maint/gnulib/lib/regexec.c mctx.last_node = check_halt_state_context (&mctx, pstate, mctx 814 maint/gnulib/lib/regexec.c err = prune_impossible_nodes (&mctx); mctx 826 maint/gnulib/lib/regexec.c match_ctx_clean (&mctx); mctx 843 maint/gnulib/lib/regexec.c pmatch[0].rm_eo = mctx.match_last; mctx 850 maint/gnulib/lib/regexec.c err = set_regs (preg, &mctx, nmatch, pmatch, mctx 863 maint/gnulib/lib/regexec.c if (__glibc_unlikely (mctx.input.offsets_needed != 0)) mctx 866 maint/gnulib/lib/regexec.c (pmatch[reg_idx].rm_so == mctx.input.valid_len mctx 867 maint/gnulib/lib/regexec.c ? mctx.input.valid_raw_len mctx 868 maint/gnulib/lib/regexec.c : mctx.input.offsets[pmatch[reg_idx].rm_so]); mctx 870 maint/gnulib/lib/regexec.c (pmatch[reg_idx].rm_eo == mctx.input.valid_len mctx 871 maint/gnulib/lib/regexec.c ? mctx.input.valid_raw_len mctx 872 maint/gnulib/lib/regexec.c : mctx.input.offsets[pmatch[reg_idx].rm_eo]); mctx 875 maint/gnulib/lib/regexec.c DEBUG_ASSERT (mctx.input.offsets_needed == 0); mctx 898 maint/gnulib/lib/regexec.c re_free (mctx.state_log); mctx 900 maint/gnulib/lib/regexec.c match_ctx_free (&mctx); mctx 901 maint/gnulib/lib/regexec.c re_string_destruct (&mctx.input); mctx 907 maint/gnulib/lib/regexec.c prune_impossible_nodes (re_match_context_t *mctx) mctx 909 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 915 maint/gnulib/lib/regexec.c DEBUG_ASSERT (mctx->state_log != NULL); mctx 916 maint/gnulib/lib/regexec.c match_last = mctx->match_last; mctx 917 maint/gnulib/lib/regexec.c halt_node = mctx->last_node; mctx 944 maint/gnulib/lib/regexec.c ret = sift_states_backward (mctx, &sctx); mctx 958 maint/gnulib/lib/regexec.c } while (mctx->state_log[match_last] == NULL mctx 959 maint/gnulib/lib/regexec.c || !mctx->state_log[match_last]->halt); mctx 960 maint/gnulib/lib/regexec.c halt_node = check_halt_state_context (mctx, mctx 961 maint/gnulib/lib/regexec.c mctx->state_log[match_last], mctx 974 maint/gnulib/lib/regexec.c ret = sift_states_backward (mctx, &sctx); mctx 984 maint/gnulib/lib/regexec.c re_free (mctx->state_log); mctx 985 maint/gnulib/lib/regexec.c mctx->state_log = sifted_states; mctx 987 maint/gnulib/lib/regexec.c mctx->last_node = halt_node; mctx 988 maint/gnulib/lib/regexec.c mctx->match_last = match_last; mctx 1002 maint/gnulib/lib/regexec.c acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx, mctx 1005 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 1009 maint/gnulib/lib/regexec.c context = re_string_context_at (&mctx->input, idx - 1, mctx->eflags); mctx 1044 maint/gnulib/lib/regexec.c check_matching (re_match_context_t *mctx, bool fl_longest_match, mctx 1047 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 1051 maint/gnulib/lib/regexec.c Idx cur_str_idx = re_string_cur_idx (&mctx->input); mctx 1057 maint/gnulib/lib/regexec.c cur_state = acquire_init_state_context (&err, mctx, cur_str_idx); mctx 1065 maint/gnulib/lib/regexec.c if (mctx->state_log != NULL) mctx 1067 maint/gnulib/lib/regexec.c mctx->state_log[cur_str_idx] = cur_state; mctx 1074 maint/gnulib/lib/regexec.c err = check_subexp_matching_top (mctx, &cur_state->nodes, 0); mctx 1080 maint/gnulib/lib/regexec.c err = transit_state_bkref (mctx, &cur_state->nodes); mctx 1091 maint/gnulib/lib/regexec.c || check_halt_state_context (mctx, cur_state, cur_str_idx)) mctx 1103 maint/gnulib/lib/regexec.c while (!re_string_eoi (&mctx->input)) mctx 1106 maint/gnulib/lib/regexec.c Idx next_char_idx = re_string_cur_idx (&mctx->input) + 1; mctx 1108 maint/gnulib/lib/regexec.c if ((__glibc_unlikely (next_char_idx >= mctx->input.bufs_len) mctx 1109 maint/gnulib/lib/regexec.c && mctx->input.bufs_len < mctx->input.len) mctx 1110 maint/gnulib/lib/regexec.c || (__glibc_unlikely (next_char_idx >= mctx->input.valid_len) mctx 1111 maint/gnulib/lib/regexec.c && mctx->input.valid_len < mctx->input.len)) mctx 1113 maint/gnulib/lib/regexec.c err = extend_buffers (mctx, next_char_idx + 1); mctx 1121 maint/gnulib/lib/regexec.c cur_state = transit_state (&err, mctx, cur_state); mctx 1122 maint/gnulib/lib/regexec.c if (mctx->state_log != NULL) mctx 1123 maint/gnulib/lib/regexec.c cur_state = merge_state_with_log (&err, mctx, cur_state); mctx 1133 maint/gnulib/lib/regexec.c if (mctx->state_log == NULL mctx 1135 maint/gnulib/lib/regexec.c || (cur_state = find_recover_state (&err, mctx)) == NULL) mctx 1152 maint/gnulib/lib/regexec.c || check_halt_state_context (mctx, cur_state, mctx 1153 maint/gnulib/lib/regexec.c re_string_cur_idx (&mctx->input))) mctx 1156 maint/gnulib/lib/regexec.c match_last = re_string_cur_idx (&mctx->input); mctx 1194 maint/gnulib/lib/regexec.c check_halt_state_context (const re_match_context_t *mctx, mctx 1200 maint/gnulib/lib/regexec.c context = re_string_context_at (&mctx->input, idx, mctx->eflags); mctx 1202 maint/gnulib/lib/regexec.c if (check_halt_node_context (mctx->dfa, state->nodes.elems[i], context)) mctx 1213 maint/gnulib/lib/regexec.c proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs, mctx 1218 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 1221 maint/gnulib/lib/regexec.c re_node_set *cur_nodes = &mctx->state_log[*pidx]->nodes; mctx 1267 maint/gnulib/lib/regexec.c naccepted = check_node_accept_bytes (dfa, node, &mctx->input, *pidx); mctx 1283 maint/gnulib/lib/regexec.c char *buf = (char *) re_string_get_buffer (&mctx->input); mctx 1284 maint/gnulib/lib/regexec.c if (mctx->input.valid_len - *pidx < naccepted mctx 1299 maint/gnulib/lib/regexec.c if (re_node_set_contains (&mctx->state_log[*pidx]->nodes, mctx 1306 maint/gnulib/lib/regexec.c || check_node_accept (mctx, dfa->nodes + node, *pidx)) mctx 1310 maint/gnulib/lib/regexec.c if (fs && (*pidx > mctx->match_last || mctx->state_log[*pidx] == NULL mctx 1311 maint/gnulib/lib/regexec.c || !re_node_set_contains (&mctx->state_log[*pidx]->nodes, mctx 1381 maint/gnulib/lib/regexec.c set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch, mctx 1393 maint/gnulib/lib/regexec.c DEBUG_ASSERT (mctx->state_log != NULL); mctx 1420 maint/gnulib/lib/regexec.c if ((idx == pmatch[0].rm_eo && cur_node == mctx->last_node) mctx 1444 maint/gnulib/lib/regexec.c cur_node = proceed_next_node (mctx, nmatch, pmatch, prev_idx_match, mctx 1561 maint/gnulib/lib/regexec.c sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx) mctx 1568 maint/gnulib/lib/regexec.c DEBUG_ASSERT (mctx->state_log != NULL && mctx->state_log[str_idx] != NULL); mctx 1575 maint/gnulib/lib/regexec.c err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); mctx 1584 maint/gnulib/lib/regexec.c if (null_cnt > mctx->max_mb_elem_len) mctx 1594 maint/gnulib/lib/regexec.c if (mctx->state_log[str_idx]) mctx 1596 maint/gnulib/lib/regexec.c err = build_sifted_states (mctx, sctx, str_idx, &cur_dest); mctx 1605 maint/gnulib/lib/regexec.c err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); mctx 1617 maint/gnulib/lib/regexec.c build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, mctx 1620 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 1621 maint/gnulib/lib/regexec.c const re_node_set *cur_src = &mctx->state_log[str_idx]->non_eps_nodes; mctx 1641 maint/gnulib/lib/regexec.c naccepted = sift_states_iter_mb (mctx, sctx, prev_node, mctx 1648 maint/gnulib/lib/regexec.c && check_node_accept (mctx, dfa->nodes + prev_node, str_idx) mctx 1659 maint/gnulib/lib/regexec.c if (check_dst_limits (mctx, &sctx->limits, mctx 1675 maint/gnulib/lib/regexec.c clean_state_log_if_needed (re_match_context_t *mctx, Idx next_state_log_idx) mctx 1677 maint/gnulib/lib/regexec.c Idx top = mctx->state_log_top; mctx 1679 maint/gnulib/lib/regexec.c if ((next_state_log_idx >= mctx->input.bufs_len mctx 1680 maint/gnulib/lib/regexec.c && mctx->input.bufs_len < mctx->input.len) mctx 1681 maint/gnulib/lib/regexec.c || (next_state_log_idx >= mctx->input.valid_len mctx 1682 maint/gnulib/lib/regexec.c && mctx->input.valid_len < mctx->input.len)) mctx 1685 maint/gnulib/lib/regexec.c err = extend_buffers (mctx, next_state_log_idx + 1); mctx 1692 maint/gnulib/lib/regexec.c memset (mctx->state_log + top + 1, '\0', mctx 1694 maint/gnulib/lib/regexec.c mctx->state_log_top = next_state_log_idx; mctx 1726 maint/gnulib/lib/regexec.c update_cur_sifted_state (const re_match_context_t *mctx, mctx 1730 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 1733 maint/gnulib/lib/regexec.c candidates = ((mctx->state_log[str_idx] == NULL) ? NULL mctx 1734 maint/gnulib/lib/regexec.c : &mctx->state_log[str_idx]->nodes); mctx 1752 maint/gnulib/lib/regexec.c mctx->bkref_ents, str_idx); mctx 1763 maint/gnulib/lib/regexec.c if (candidates && mctx->state_log[str_idx]->has_backref) mctx 1765 maint/gnulib/lib/regexec.c err = sift_states_bkref (mctx, sctx, str_idx, candidates); mctx 1850 maint/gnulib/lib/regexec.c check_dst_limits (const re_match_context_t *mctx, const re_node_set *limits, mctx 1853 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 1856 maint/gnulib/lib/regexec.c Idx dst_bkref_idx = search_cur_bkref_entry (mctx, dst_idx); mctx 1857 maint/gnulib/lib/regexec.c Idx src_bkref_idx = search_cur_bkref_entry (mctx, src_idx); mctx 1862 maint/gnulib/lib/regexec.c ent = mctx->bkref_ents + limits->elems[lim_idx]; mctx 1865 maint/gnulib/lib/regexec.c dst_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], mctx 1868 maint/gnulib/lib/regexec.c src_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], mctx 1885 maint/gnulib/lib/regexec.c check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, mctx 1888 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 1902 maint/gnulib/lib/regexec.c struct re_backref_cache_entry *ent = mctx->bkref_ents + bkref_idx; mctx 1932 maint/gnulib/lib/regexec.c check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx, mctx 1966 maint/gnulib/lib/regexec.c check_dst_limits_calc_pos (const re_match_context_t *mctx, Idx limit, mctx 1970 maint/gnulib/lib/regexec.c struct re_backref_cache_entry *lim = mctx->bkref_ents + limit; mctx 1987 maint/gnulib/lib/regexec.c return check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx, mctx 2083 maint/gnulib/lib/regexec.c sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx, mctx 2086 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 2090 maint/gnulib/lib/regexec.c Idx first_idx = search_cur_bkref_entry (mctx, str_idx); mctx 2110 maint/gnulib/lib/regexec.c entry = mctx->bkref_ents + first_idx; mctx 2130 maint/gnulib/lib/regexec.c || check_dst_limits (mctx, &sctx->limits, node, mctx 2150 maint/gnulib/lib/regexec.c err = sift_states_backward (mctx, &local_sctx); mctx 2165 maint/gnulib/lib/regexec.c entry = mctx->bkref_ents + enabled_idx; mctx 2182 maint/gnulib/lib/regexec.c sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, mctx 2185 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 2188 maint/gnulib/lib/regexec.c naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx); mctx 2213 maint/gnulib/lib/regexec.c transit_state (reg_errcode_t *err, re_match_context_t *mctx, mctx 2223 maint/gnulib/lib/regexec.c *err = transit_state_mb (mctx, state); mctx 2233 maint/gnulib/lib/regexec.c return transit_state_sb (err, mctx, state); mctx 2237 maint/gnulib/lib/regexec.c ch = re_string_fetch_byte (&mctx->input); mctx 2249 maint/gnulib/lib/regexec.c = re_string_context_at (&mctx->input, mctx 2250 maint/gnulib/lib/regexec.c re_string_cur_idx (&mctx->input) - 1, mctx 2251 maint/gnulib/lib/regexec.c mctx->eflags); mctx 2258 maint/gnulib/lib/regexec.c if (!build_trtable (mctx->dfa, state)) mctx 2270 maint/gnulib/lib/regexec.c merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, mctx 2273 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 2274 maint/gnulib/lib/regexec.c Idx cur_idx = re_string_cur_idx (&mctx->input); mctx 2276 maint/gnulib/lib/regexec.c if (cur_idx > mctx->state_log_top) mctx 2278 maint/gnulib/lib/regexec.c mctx->state_log[cur_idx] = next_state; mctx 2279 maint/gnulib/lib/regexec.c mctx->state_log_top = cur_idx; mctx 2281 maint/gnulib/lib/regexec.c else if (mctx->state_log[cur_idx] == 0) mctx 2283 maint/gnulib/lib/regexec.c mctx->state_log[cur_idx] = next_state; mctx 2294 maint/gnulib/lib/regexec.c pstate = mctx->state_log[cur_idx]; mctx 2309 maint/gnulib/lib/regexec.c context = re_string_context_at (&mctx->input, mctx 2310 maint/gnulib/lib/regexec.c re_string_cur_idx (&mctx->input) - 1, mctx 2311 maint/gnulib/lib/regexec.c mctx->eflags); mctx 2312 maint/gnulib/lib/regexec.c next_state = mctx->state_log[cur_idx] mctx 2326 maint/gnulib/lib/regexec.c *err = check_subexp_matching_top (mctx, &next_state->nodes, mctx 2334 maint/gnulib/lib/regexec.c *err = transit_state_bkref (mctx, &next_state->nodes); mctx 2337 maint/gnulib/lib/regexec.c next_state = mctx->state_log[cur_idx]; mctx 2348 maint/gnulib/lib/regexec.c find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) mctx 2353 maint/gnulib/lib/regexec.c Idx max = mctx->state_log_top; mctx 2354 maint/gnulib/lib/regexec.c Idx cur_str_idx = re_string_cur_idx (&mctx->input); mctx 2360 maint/gnulib/lib/regexec.c re_string_skip_bytes (&mctx->input, 1); mctx 2362 maint/gnulib/lib/regexec.c while (mctx->state_log[cur_str_idx] == NULL); mctx 2364 maint/gnulib/lib/regexec.c cur_state = merge_state_with_log (err, mctx, NULL); mctx 2378 maint/gnulib/lib/regexec.c check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes, mctx 2381 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 2398 maint/gnulib/lib/regexec.c err = match_ctx_add_subtop (mctx, node, str_idx); mctx 2411 maint/gnulib/lib/regexec.c transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx, mctx 2414 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 2417 maint/gnulib/lib/regexec.c Idx node_cnt, cur_str_idx = re_string_cur_idx (&mctx->input); mctx 2426 maint/gnulib/lib/regexec.c if (check_node_accept (mctx, dfa->nodes + cur_node, cur_str_idx)) mctx 2437 maint/gnulib/lib/regexec.c context = re_string_context_at (&mctx->input, cur_str_idx, mctx->eflags); mctx 2443 maint/gnulib/lib/regexec.c re_string_skip_bytes (&mctx->input, 1); mctx 2450 maint/gnulib/lib/regexec.c transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) mctx 2452 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 2470 maint/gnulib/lib/regexec.c context = re_string_context_at (&mctx->input, mctx 2471 maint/gnulib/lib/regexec.c re_string_cur_idx (&mctx->input), mctx 2472 maint/gnulib/lib/regexec.c mctx->eflags); mctx 2479 maint/gnulib/lib/regexec.c naccepted = check_node_accept_bytes (dfa, cur_node_idx, &mctx->input, mctx 2480 maint/gnulib/lib/regexec.c re_string_cur_idx (&mctx->input)); mctx 2485 maint/gnulib/lib/regexec.c dest_idx = re_string_cur_idx (&mctx->input) + naccepted; mctx 2486 maint/gnulib/lib/regexec.c mctx->max_mb_elem_len = ((mctx->max_mb_elem_len < naccepted) ? naccepted mctx 2487 maint/gnulib/lib/regexec.c : mctx->max_mb_elem_len); mctx 2488 maint/gnulib/lib/regexec.c err = clean_state_log_if_needed (mctx, dest_idx); mctx 2494 maint/gnulib/lib/regexec.c dest_state = mctx->state_log[dest_idx]; mctx 2504 maint/gnulib/lib/regexec.c context = re_string_context_at (&mctx->input, dest_idx - 1, mctx 2505 maint/gnulib/lib/regexec.c mctx->eflags); mctx 2506 maint/gnulib/lib/regexec.c mctx->state_log[dest_idx] mctx 2510 maint/gnulib/lib/regexec.c if (__glibc_unlikely (mctx->state_log[dest_idx] == NULL mctx 2519 maint/gnulib/lib/regexec.c transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) mctx 2521 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 2524 maint/gnulib/lib/regexec.c Idx cur_str_idx = re_string_cur_idx (&mctx->input); mctx 2540 maint/gnulib/lib/regexec.c context = re_string_context_at (&mctx->input, cur_str_idx, mctx 2541 maint/gnulib/lib/regexec.c mctx->eflags); mctx 2548 maint/gnulib/lib/regexec.c bkc_idx = mctx->nbkref_ents; mctx 2549 maint/gnulib/lib/regexec.c err = get_subexp (mctx, node_idx, cur_str_idx); mctx 2556 maint/gnulib/lib/regexec.c for (; bkc_idx < mctx->nbkref_ents; ++bkc_idx) mctx 2561 maint/gnulib/lib/regexec.c bkref_ent = mctx->bkref_ents + bkc_idx; mctx 2570 maint/gnulib/lib/regexec.c context = re_string_context_at (&mctx->input, dest_str_idx - 1, mctx 2571 maint/gnulib/lib/regexec.c mctx->eflags); mctx 2572 maint/gnulib/lib/regexec.c dest_state = mctx->state_log[dest_str_idx]; mctx 2573 maint/gnulib/lib/regexec.c prev_nelem = ((mctx->state_log[cur_str_idx] == NULL) ? 0 mctx 2574 maint/gnulib/lib/regexec.c : mctx->state_log[cur_str_idx]->nodes.nelem); mctx 2578 maint/gnulib/lib/regexec.c mctx->state_log[dest_str_idx] mctx 2581 maint/gnulib/lib/regexec.c if (__glibc_unlikely (mctx->state_log[dest_str_idx] == NULL mctx 2596 maint/gnulib/lib/regexec.c mctx->state_log[dest_str_idx] mctx 2599 maint/gnulib/lib/regexec.c if (__glibc_unlikely (mctx->state_log[dest_str_idx] == NULL mctx 2606 maint/gnulib/lib/regexec.c && mctx->state_log[cur_str_idx]->nodes.nelem > prev_nelem) mctx 2608 maint/gnulib/lib/regexec.c err = check_subexp_matching_top (mctx, new_dest_nodes, mctx 2612 maint/gnulib/lib/regexec.c err = transit_state_bkref (mctx, new_dest_nodes); mctx 2631 maint/gnulib/lib/regexec.c get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx) mctx 2633 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 2635 maint/gnulib/lib/regexec.c const char *buf = (const char *) re_string_get_buffer (&mctx->input); mctx 2637 maint/gnulib/lib/regexec.c Idx cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx); mctx 2641 maint/gnulib/lib/regexec.c = mctx->bkref_ents + cache_idx; mctx 2651 maint/gnulib/lib/regexec.c for (sub_top_idx = 0; sub_top_idx < mctx->nsub_tops; ++sub_top_idx) mctx 2654 maint/gnulib/lib/regexec.c re_sub_match_top_t *sub_top = mctx->sub_tops[sub_top_idx]; mctx 2675 maint/gnulib/lib/regexec.c > mctx->input.valid_len)) mctx 2678 maint/gnulib/lib/regexec.c if (bkref_str_off + sl_str_diff > mctx->input.len) mctx 2681 maint/gnulib/lib/regexec.c err = clean_state_log_if_needed (mctx, mctx 2686 maint/gnulib/lib/regexec.c buf = (const char *) re_string_get_buffer (&mctx->input); mctx 2694 maint/gnulib/lib/regexec.c err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, mctx 2699 maint/gnulib/lib/regexec.c buf = (const char *) re_string_get_buffer (&mctx->input); mctx 2722 maint/gnulib/lib/regexec.c if (__glibc_unlikely (bkref_str_off >= mctx->input.valid_len)) mctx 2725 maint/gnulib/lib/regexec.c if (bkref_str_off >= mctx->input.len) mctx 2728 maint/gnulib/lib/regexec.c err = extend_buffers (mctx, bkref_str_off + 1); mctx 2732 maint/gnulib/lib/regexec.c buf = (const char *) re_string_get_buffer (&mctx->input); mctx 2738 maint/gnulib/lib/regexec.c if (mctx->state_log[sl_str] == NULL) mctx 2741 maint/gnulib/lib/regexec.c nodes = &mctx->state_log[sl_str]->nodes; mctx 2755 maint/gnulib/lib/regexec.c err = check_arrival (mctx, sub_top->path, sub_top->node, mctx 2765 maint/gnulib/lib/regexec.c err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, mctx 2767 maint/gnulib/lib/regexec.c buf = (const char *) re_string_get_buffer (&mctx->input); mctx 2784 maint/gnulib/lib/regexec.c get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top, mctx 2790 maint/gnulib/lib/regexec.c err = check_arrival (mctx, &sub_last->path, sub_last->node, mctx 2795 maint/gnulib/lib/regexec.c err = match_ctx_add_entry (mctx, bkref_node, bkref_str, sub_top->str_idx, mctx 2800 maint/gnulib/lib/regexec.c return clean_state_log_if_needed (mctx, to_idx); mctx 2835 maint/gnulib/lib/regexec.c check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node, mctx 2838 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 2848 maint/gnulib/lib/regexec.c if (__glibc_unlikely (path->alloc < last_str + mctx->max_mb_elem_len + 1)) mctx 2852 maint/gnulib/lib/regexec.c Idx incr_alloc = last_str + mctx->max_mb_elem_len + 1; mctx 2871 maint/gnulib/lib/regexec.c backup_state_log = mctx->state_log; mctx 2872 maint/gnulib/lib/regexec.c backup_cur_idx = mctx->input.cur_idx; mctx 2873 maint/gnulib/lib/regexec.c mctx->state_log = path->array; mctx 2874 maint/gnulib/lib/regexec.c mctx->input.cur_idx = str_idx; mctx 2877 maint/gnulib/lib/regexec.c context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); mctx 2892 maint/gnulib/lib/regexec.c cur_state = mctx->state_log[str_idx]; mctx 2906 maint/gnulib/lib/regexec.c err = expand_bkref_cache (mctx, &next_nodes, str_idx, mctx 2920 maint/gnulib/lib/regexec.c mctx->state_log[str_idx] = cur_state; mctx 2923 maint/gnulib/lib/regexec.c for (null_cnt = 0; str_idx < last_str && null_cnt <= mctx->max_mb_elem_len;) mctx 2926 maint/gnulib/lib/regexec.c if (mctx->state_log[str_idx + 1]) mctx 2929 maint/gnulib/lib/regexec.c &mctx->state_log[str_idx + 1]->nodes); mctx 2938 maint/gnulib/lib/regexec.c err = check_arrival_add_next_nodes (mctx, str_idx, mctx 2956 maint/gnulib/lib/regexec.c err = expand_bkref_cache (mctx, &next_nodes, str_idx, mctx 2964 maint/gnulib/lib/regexec.c context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); mctx 2971 maint/gnulib/lib/regexec.c mctx->state_log[str_idx] = cur_state; mctx 2975 maint/gnulib/lib/regexec.c cur_nodes = (mctx->state_log[last_str] == NULL ? NULL mctx 2976 maint/gnulib/lib/regexec.c : &mctx->state_log[last_str]->nodes); mctx 2980 maint/gnulib/lib/regexec.c mctx->state_log = backup_state_log; mctx 2981 maint/gnulib/lib/regexec.c mctx->input.cur_idx = backup_cur_idx; mctx 3000 maint/gnulib/lib/regexec.c check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx, mctx 3003 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 3021 maint/gnulib/lib/regexec.c naccepted = check_node_accept_bytes (dfa, cur_node, &mctx->input, mctx 3028 maint/gnulib/lib/regexec.c dest_state = mctx->state_log[next_idx]; mctx 3045 maint/gnulib/lib/regexec.c mctx->state_log[next_idx] = re_acquire_state (&err, dfa, mctx 3047 maint/gnulib/lib/regexec.c if (__glibc_unlikely (mctx->state_log[next_idx] == NULL mctx 3057 maint/gnulib/lib/regexec.c || check_node_accept (mctx, dfa->nodes + cur_node, str_idx)) mctx 3174 maint/gnulib/lib/regexec.c expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, mctx 3177 maint/gnulib/lib/regexec.c const re_dfa_t *const dfa = mctx->dfa; mctx 3179 maint/gnulib/lib/regexec.c Idx cache_idx_start = search_cur_bkref_entry (mctx, cur_str); mctx 3186 maint/gnulib/lib/regexec.c ent = mctx->bkref_ents + cache_idx_start; mctx 3225 maint/gnulib/lib/regexec.c if (mctx->state_log[to_idx]) mctx 3228 maint/gnulib/lib/regexec.c if (re_node_set_contains (&mctx->state_log[to_idx]->nodes, mctx 3232 maint/gnulib/lib/regexec.c &mctx->state_log[to_idx]->nodes); mctx 3247 maint/gnulib/lib/regexec.c mctx->state_log[to_idx] = re_acquire_state (&err, dfa, &union_set); mctx 3249 maint/gnulib/lib/regexec.c if (__glibc_unlikely (mctx->state_log[to_idx] == NULL mctx 3937 maint/gnulib/lib/regexec.c check_node_accept (const re_match_context_t *mctx, const re_token_t *node, mctx 3941 maint/gnulib/lib/regexec.c ch = re_string_byte_at (&mctx->input, idx); mctx 3961 maint/gnulib/lib/regexec.c if ((ch == '\n' && !(mctx->dfa->syntax & RE_DOT_NEWLINE)) mctx 3962 maint/gnulib/lib/regexec.c || (ch == '\0' && (mctx->dfa->syntax & RE_DOT_NOT_NULL))) mctx 3974 maint/gnulib/lib/regexec.c unsigned int context = re_string_context_at (&mctx->input, idx, mctx 3975 maint/gnulib/lib/regexec.c mctx->eflags); mctx 3987 maint/gnulib/lib/regexec.c extend_buffers (re_match_context_t *mctx, int min_len) mctx 3990 maint/gnulib/lib/regexec.c re_string_t *pstr = &mctx->input; mctx 4004 maint/gnulib/lib/regexec.c if (mctx->state_log != NULL) mctx 4010 maint/gnulib/lib/regexec.c re_dfastate_t **new_array = re_realloc (mctx->state_log, re_dfastate_t *, mctx 4014 maint/gnulib/lib/regexec.c mctx->state_log = new_array; mctx 4053 maint/gnulib/lib/regexec.c match_ctx_init (re_match_context_t *mctx, int eflags, Idx n) mctx 4055 maint/gnulib/lib/regexec.c mctx->eflags = eflags; mctx 4056 maint/gnulib/lib/regexec.c mctx->match_last = -1; mctx 4066 maint/gnulib/lib/regexec.c mctx->bkref_ents = re_malloc (struct re_backref_cache_entry, n); mctx 4067 maint/gnulib/lib/regexec.c mctx->sub_tops = re_malloc (re_sub_match_top_t *, n); mctx 4068 maint/gnulib/lib/regexec.c if (__glibc_unlikely (mctx->bkref_ents == NULL || mctx->sub_tops == NULL)) mctx 4076 maint/gnulib/lib/regexec.c mctx->abkref_ents = n; mctx 4077 maint/gnulib/lib/regexec.c mctx->max_mb_elem_len = 1; mctx 4078 maint/gnulib/lib/regexec.c mctx->asub_tops = n; mctx 4087 maint/gnulib/lib/regexec.c match_ctx_clean (re_match_context_t *mctx) mctx 4090 maint/gnulib/lib/regexec.c for (st_idx = 0; st_idx < mctx->nsub_tops; ++st_idx) mctx 4093 maint/gnulib/lib/regexec.c re_sub_match_top_t *top = mctx->sub_tops[st_idx]; mctx 4109 maint/gnulib/lib/regexec.c mctx->nsub_tops = 0; mctx 4110 maint/gnulib/lib/regexec.c mctx->nbkref_ents = 0; mctx 4116 maint/gnulib/lib/regexec.c match_ctx_free (re_match_context_t *mctx) mctx 4119 maint/gnulib/lib/regexec.c match_ctx_clean (mctx); mctx 4120 maint/gnulib/lib/regexec.c re_free (mctx->sub_tops); mctx 4121 maint/gnulib/lib/regexec.c re_free (mctx->bkref_ents); mctx 4131 maint/gnulib/lib/regexec.c match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, Idx from, mctx 4134 maint/gnulib/lib/regexec.c if (mctx->nbkref_ents >= mctx->abkref_ents) mctx 4137 maint/gnulib/lib/regexec.c new_entry = re_realloc (mctx->bkref_ents, struct re_backref_cache_entry, mctx 4138 maint/gnulib/lib/regexec.c mctx->abkref_ents * 2); mctx 4141 maint/gnulib/lib/regexec.c re_free (mctx->bkref_ents); mctx 4144 maint/gnulib/lib/regexec.c mctx->bkref_ents = new_entry; mctx 4145 maint/gnulib/lib/regexec.c memset (mctx->bkref_ents + mctx->nbkref_ents, '\0', mctx 4146 maint/gnulib/lib/regexec.c sizeof (struct re_backref_cache_entry) * mctx->abkref_ents); mctx 4147 maint/gnulib/lib/regexec.c mctx->abkref_ents *= 2; mctx 4149 maint/gnulib/lib/regexec.c if (mctx->nbkref_ents > 0 mctx 4150 maint/gnulib/lib/regexec.c && mctx->bkref_ents[mctx->nbkref_ents - 1].str_idx == str_idx) mctx 4151 maint/gnulib/lib/regexec.c mctx->bkref_ents[mctx->nbkref_ents - 1].more = 1; mctx 4153 maint/gnulib/lib/regexec.c mctx->bkref_ents[mctx->nbkref_ents].node = node; mctx 4154 maint/gnulib/lib/regexec.c mctx->bkref_ents[mctx->nbkref_ents].str_idx = str_idx; mctx 4155 maint/gnulib/lib/regexec.c mctx->bkref_ents[mctx->nbkref_ents].subexp_from = from; mctx 4156 maint/gnulib/lib/regexec.c mctx->bkref_ents[mctx->nbkref_ents].subexp_to = to; mctx 4166 maint/gnulib/lib/regexec.c mctx->bkref_ents[mctx->nbkref_ents].eps_reachable_subexps_map mctx 4169 maint/gnulib/lib/regexec.c mctx->bkref_ents[mctx->nbkref_ents++].more = 0; mctx 4170 maint/gnulib/lib/regexec.c if (mctx->max_mb_elem_len < to - from) mctx 4171 maint/gnulib/lib/regexec.c mctx->max_mb_elem_len = to - from; mctx 4179 maint/gnulib/lib/regexec.c search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx) mctx 4182 maint/gnulib/lib/regexec.c last = right = mctx->nbkref_ents; mctx 4186 maint/gnulib/lib/regexec.c if (mctx->bkref_ents[mid].str_idx < str_idx) mctx 4191 maint/gnulib/lib/regexec.c if (left < last && mctx->bkref_ents[left].str_idx == str_idx) mctx 4202 maint/gnulib/lib/regexec.c match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx) mctx 4204 maint/gnulib/lib/regexec.c DEBUG_ASSERT (mctx->sub_tops != NULL); mctx 4205 maint/gnulib/lib/regexec.c DEBUG_ASSERT (mctx->asub_tops > 0); mctx 4206 maint/gnulib/lib/regexec.c if (__glibc_unlikely (mctx->nsub_tops == mctx->asub_tops)) mctx 4208 maint/gnulib/lib/regexec.c Idx new_asub_tops = mctx->asub_tops * 2; mctx 4209 maint/gnulib/lib/regexec.c re_sub_match_top_t **new_array = re_realloc (mctx->sub_tops, mctx 4214 maint/gnulib/lib/regexec.c mctx->sub_tops = new_array; mctx 4215 maint/gnulib/lib/regexec.c mctx->asub_tops = new_asub_tops; mctx 4217 maint/gnulib/lib/regexec.c mctx->sub_tops[mctx->nsub_tops] = calloc (1, sizeof (re_sub_match_top_t)); mctx 4218 maint/gnulib/lib/regexec.c if (__glibc_unlikely (mctx->sub_tops[mctx->nsub_tops] == NULL)) mctx 4220 maint/gnulib/lib/regexec.c mctx->sub_tops[mctx->nsub_tops]->node = node; mctx 4221 maint/gnulib/lib/regexec.c mctx->sub_tops[mctx->nsub_tops++]->str_idx = str_idx;