| 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 | |
| 3738 | static int |
| 3739 | fetch_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; |