MCPcopy Create free account
hub / github.com/git/git / check_halt_state_context

Function check_halt_state_context

compat/regex/regexec.c:1227–1242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1225
1226/* Check the halt state STATE match the current context.
1227 Return 0 if not match, if the node, STATE has, is a halt node and
1228 match the context, return the node. */
1229
1230static int
1231internal_function
1232check_halt_state_context (const re_match_context_t *mctx,
1233 const re_dfastate_t *state, int idx)
1234{
1235 int i;
1236 unsigned int context;
1237#ifdef DEBUG
1238 assert (state->halt);
1239#endif
1240 context = re_string_context_at (&mctx->input, idx, mctx->eflags);
1241 for (i = 0; i < state->nodes.nelem; ++i)
1242 if (check_halt_node_context (mctx->dfa, state->nodes.elems[i], context))
1243 return state->nodes.elems[i];
1244 return 0;
1245}

Callers 3

re_search_internalFunction · 0.85
prune_impossible_nodesFunction · 0.85
internal_functionFunction · 0.85

Calls 2

re_string_context_atFunction · 0.85
check_halt_node_contextFunction · 0.85

Tested by

no test coverage detected