MCPcopy Create free account
hub / github.com/coreboot/coreboot / compile_reg_expr

Function compile_reg_expr

util/nvramtool/reg_expr.c:12–23  ·  view source on GitHub ↗

* compile_reg_expr * * Compile a regular expression. ****************************************************************************/

Source from the content-addressed store, hash-verified

10 * Compile a regular expression.
11 ****************************************************************************/
12void compile_reg_expr(int cflags, const char *expr, regex_t *reg)
13{
14 static const size_t ERROR_BUF_SIZE = 256;
15 char error_msg[ERROR_BUF_SIZE];
16 int result;
17
18 if ((result = regcomp(reg, expr, cflags)) != 0) {
19 regerror(result, reg, error_msg, ERROR_BUF_SIZE);
20 fprintf(stderr, "%s: %s\n", prog_name, error_msg);
21 exit(1);
22 }
23}

Callers 3

process_input_fileFunction · 0.70
process_layout_fileFunction · 0.50
parse_assignmentFunction · 0.50

Calls 4

regcompFunction · 0.85
regerrorFunction · 0.85
fprintfFunction · 0.85
exitFunction · 0.85

Tested by

no test coverage detected