diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2017-06-22 22:14:49 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2017-06-22 22:14:49 +0300 |
commit | a702a6b6d6009068f4608a865bdd06a07259cf67 (patch) | |
tree | d585379df26577cf83ed1c11ea66d6e6bae41362 /support/regcomp.c | |
parent | 0ac746db72a0879bbd44325fe15b3ae33c63ecef (diff) | |
download | egawk-a702a6b6d6009068f4608a865bdd06a07259cf67.tar.gz egawk-a702a6b6d6009068f4608a865bdd06a07259cf67.tar.bz2 egawk-a702a6b6d6009068f4608a865bdd06a07259cf67.zip |
Update regex routines from GLIBC.
Diffstat (limited to 'support/regcomp.c')
-rw-r--r-- | support/regcomp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/support/regcomp.c b/support/regcomp.c index 5ac53701..c45e91fc 100644 --- a/support/regcomp.c +++ b/support/regcomp.c @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002-2016 Free Software Foundation, Inc. + Copyright (C) 2002-2017 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. @@ -961,8 +961,9 @@ static void internal_function init_word_char (re_dfa_t *dfa) { - int i, j, ch; dfa->word_ops_used = 1; + int i = 0; + int ch = 0; #ifndef GAWK if (BE (dfa->map_notascii == 0, 1)) { @@ -996,8 +997,8 @@ init_word_char (re_dfa_t *dfa) } #endif - for (i = 0, ch = 0; i < BITSET_WORDS; ++i) - for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) + for (; i < BITSET_WORDS; ++i) + for (int j = 0; j < BITSET_WORD_BITS; ++j, ++ch) if (isalnum (ch) || ch == '_') dfa->word_char[i] |= (bitset_word_t) 1 << j; } |