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

Function create_grep_pat

grep.c:123–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123static struct grep_pat *create_grep_pat(const char *pat, size_t patlen,
124 const char *origin, int no,
125 enum grep_pat_token t,
126 enum grep_header_field field)
127{
128 struct grep_pat *p = xcalloc(1, sizeof(*p));
129 p->pattern = xmemdupz(pat, patlen);
130 p->patternlen = patlen;
131 p->origin = origin;
132 p->no = no;
133 p->token = t;
134 p->field = field;
135 return p;
136}
137
138static void do_append_grep_pat(struct grep_pat ***tail, struct grep_pat *p)
139{

Callers 3

do_append_grep_patFunction · 0.85
append_grep_patFunction · 0.85

Calls 2

xcallocFunction · 0.85
xmemdupzFunction · 0.85

Tested by

no test coverage detected