From: Paul Eggert Date: Sun, 30 Dec 2012 22:28:55 +0000 (-0800) Subject: regex: simplify based on Gawk version X-Git-Tag: v0.1~289 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=37dd8efe0cd37c5fa3cb6afbf5e5df99cc6308f6;p=gnulib.git regex: simplify based on Gawk version * lib/regex_internal.c (re_dfa_add_node): Simplify. Reported by Aharon Robbins in . --- diff --git a/ChangeLog b/ChangeLog index 0c3c7f12e..2363f6ecd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-12-30 Paul Eggert + + regex: simplify based on Gawk version + * lib/regex_internal.c (re_dfa_add_node): Simplify. + Reported by Aharon Robbins in + . + 2012-12-29 Paul Eggert regex: check that pattern char is single-byte diff --git a/lib/regex_internal.c b/lib/regex_internal.c index cac019099..0042369a1 100644 --- a/lib/regex_internal.c +++ b/lib/regex_internal.c @@ -1443,11 +1443,9 @@ re_dfa_add_node (re_dfa_t *dfa, re_token_t token) dfa->nodes[dfa->nodes_len] = token; dfa->nodes[dfa->nodes_len].constraint = 0; #ifdef RE_ENABLE_I18N - { - int type = token.type; dfa->nodes[dfa->nodes_len].accept_mb = - (type == OP_PERIOD && dfa->mb_cur_max > 1) || type == COMPLEX_BRACKET; - } + ((token.type == OP_PERIOD && dfa->mb_cur_max > 1) + || token.type == COMPLEX_BRACKET); #endif dfa->nexts[dfa->nodes_len] = REG_MISSING; re_node_set_init_empty (dfa->edests + dfa->nodes_len);