2004-01-01 Paolo Bonzini * posix/regcomp.c (init_dfa): Remove spurious comment. (init_word_char): Remove function. (parse_expression): Do not call it. --- save/regcomp.c 2004-01-01 16:02:03.000000000 +0100 +++ ./regcomp.c 2004-01-01 16:04:32.000000000 +0100 @@ -24,7 +24,6 @@ static void re_compile_fastmap_iter (reg const re_dfastate_t *init_state, char *fastmap); static reg_errcode_t init_dfa (re_dfa_t *dfa, int pat_len); -static reg_errcode_t init_word_char (re_dfa_t *dfa); #ifdef RE_ENABLE_I18N static void free_charset (re_charset_t *cset); #endif /* RE_ENABLE_I18N */ @@ -840,7 +839,6 @@ init_dfa (dfa, pat_len) dfa->subexps_alloc = 1; dfa->subexps = re_malloc (re_subexp_t, dfa->subexps_alloc); - /* dfa->word_char = NULL; */ dfa->mb_cur_max = MB_CUR_MAX; #ifdef _LIBC @@ -880,25 +878,6 @@ init_dfa (dfa, pat_len) return REG_NOERROR; } -/* Initialize WORD_CHAR table, which indicate which character is - "word". In this case "word" means that it is the word construction - character used by some operators like "\<", "\>", etc. */ - -static reg_errcode_t -init_word_char (dfa) - re_dfa_t *dfa; -{ - int i, j, ch; - dfa->word_char = (re_bitset_ptr_t) calloc (sizeof (bitset), 1); - if (BE (dfa->word_char == NULL, 0)) - return REG_ESPACE; - for (i = 0, ch = 0; i < BITSET_UINTS; ++i) - for (j = 0; j < UINT_BITS; ++j, ++ch) - if (isalnum (ch) || ch == '_') - dfa->word_char[i] |= 1 << j; - return REG_NOERROR; -} - /* Free the work area which are only used while compiling. */ static void @@ -2194,14 +2173,6 @@ parse_expression (regexp, preg, token, s } break; case ANCHOR: - if ((token->opr.ctx_type - & (WORD_DELIM | INSIDE_WORD | WORD_FIRST | WORD_LAST)) - && dfa->word_char == NULL) - { - *err = init_word_char (dfa); - if (BE (*err != REG_NOERROR, 0)) - return NULL; - } if (token->opr.ctx_type == WORD_DELIM) { bin_tree_t *tree_first, *tree_last;