MCPcopy Create free account
hub / github.com/coreutils/coreutils / new_control_record

Function new_control_record

src/csplit.c:1009–1024  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1007/* Return a new, initialized control record. */
1008
1009static struct control *
1010new_control_record (void)
1011{
1012 static idx_t control_allocated = 0; /* Total space allocated. */
1013 struct control *p;
1014
1015 if (control_used == control_allocated)
1016 controls = xpalloc (controls, &control_allocated, 1, -1, sizeof *controls);
1017 p = &controls[control_used++];
1018 p->regexpr = false;
1019 p->repeat = 0;
1020 p->repeat_forever = false;
1021 p->lines_required = 0;
1022 p->offset = 0;
1023 return p;
1024}
1025
1026/* Check if there is a numeric offset after a regular expression.
1027 STR is the entire command line argument.

Callers 2

extract_regexpFunction · 0.85
parse_patternsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected