X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fregex_internal.c;h=7f9a3ae0e5662b3e80da8dd5b98c74e7f9a4d837;hb=af2a4457f1d94e99384ac79017f0f39bb07af26e;hp=78e16f330147e97e27ca3489bd9815f1de04da5c;hpb=331f6ee713f7038d6d1a1c0451016c8aaab6a079;p=gnulib.git diff --git a/lib/regex_internal.c b/lib/regex_internal.c index 78e16f330..7f9a3ae0e 100644 --- a/lib/regex_internal.c +++ b/lib/regex_internal.c @@ -1,5 +1,6 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software + Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -706,7 +707,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) if (pstr->is_utf8) { - const unsigned char *raw, *p, *q, *end; + const unsigned char *raw, *p, *end; /* Special case UTF-8. Multi-byte chars start with any byte other than 0x80 - 0xbf. */ @@ -735,13 +736,11 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) unsigned char buf[6]; size_t mbclen; - q = p; if (BE (pstr->trans != NULL, 0)) { int i = mlen < 6 ? mlen : 6; while (--i >= 0) buf[i] = pstr->trans[p[i]]; - q = buf; } /* XXX Don't use mbrtowc, we know which conversion to use (UTF-8 -> UCS4). */ @@ -1690,11 +1689,9 @@ create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, for (i = 0 ; i < nodes->nelem ; i++) { - unsigned int constraint = 0; re_token_t *node = dfa->nodes + nodes->elems[i]; re_token_type_t type = node->type; - if (node->constraint) - constraint = node->constraint; + unsigned int constraint = node->constraint; if (type == CHARACTER && !constraint) continue; @@ -1707,8 +1704,6 @@ create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, newstate->halt = 1; else if (type == OP_BACK_REF) newstate->has_backref = 1; - else if (type == ANCHOR) - constraint = node->opr.ctx_type; if (constraint) {