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

Function fetch_number

compat/regex/regcomp.c:3729–3747  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3727 free_charset (mbcset);
3728#endif /* RE_ENABLE_I18N */
3729 *err = REG_ESPACE;
3730 return NULL;
3731}
3732
3733/* This is intended for the expressions like "a{1,3}".
3734 Fetch a number from `input', and return the number.
3735 Return -1, if the number field is empty like "{,1}".
3736 Return -2, if an error has occurred. */
3737
3738static int
3739fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax)
3740{
3741 int num = -1;
3742 unsigned char c;
3743 while (1)
3744 {
3745 fetch_token (token, input, syntax);
3746 c = token->opr.c;
3747 if (BE (token->type == END_OF_RE, 0))
3748 return -2;
3749 if (token->type == OP_CLOSE_DUP_NUM || c == ',')
3750 break;

Callers 1

parse_dup_opFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected