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

Function re_compile_fastmap

compat/regex/regcomp.c:293–309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

291#ifdef _LIBC
292weak_alias (__re_set_syntax, re_set_syntax)
293#endif
294
295int
296re_compile_fastmap (struct re_pattern_buffer *bufp)
297{
298 re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
299 char *fastmap = bufp->fastmap;
300
301 memset (fastmap, '\0', sizeof (char) * SBC_MAX);
302 re_compile_fastmap_iter (bufp, dfa->init_state, fastmap);
303 if (dfa->init_state != dfa->init_state_word)
304 re_compile_fastmap_iter (bufp, dfa->init_state_word, fastmap);
305 if (dfa->init_state != dfa->init_state_nl)
306 re_compile_fastmap_iter (bufp, dfa->init_state_nl, fastmap);
307 if (dfa->init_state != dfa->init_state_begbuf)
308 re_compile_fastmap_iter (bufp, dfa->init_state_begbuf, fastmap);
309 bufp->fastmap_accurate = 1;
310 return 0;
311}
312#ifdef _LIBC

Callers 2

re_search_stubFunction · 0.85
regcompFunction · 0.85

Calls 1

re_compile_fastmap_iterFunction · 0.85

Tested by

no test coverage detected