From: Arnold D. Robbins Date: Tue, 13 Dec 2016 20:10:08 +0000 (+0200) Subject: dfa: remove DFA_CASE_FOLD flag in favor of RE_ICASE X-Git-Tag: v1.0~6503 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=8fcfa5ef213f6bd4c48043475ac38ea74ae86785;p=gnulib.git dfa: remove DFA_CASE_FOLD flag in favor of RE_ICASE * dfa.h (DFA_CASE_FOLD): Remove. * dfa.c (dfasyntax): Set dfa->syntax.case_fold based on RE_ICASE. --- diff --git a/ChangeLog b/ChangeLog index 51b89eff58..8f1671a198 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2016-12-13 Arnold D. Robbins + + dfa: remove DFA_CASE_FOLD flag in favor of RE_ICASE + * dfa.h (DFA_CASE_FOLD): Remove. + * dfa.c (dfasyntax): Set dfa->syntax.case_fold based on RE_ICASE. + 2016-12-13 John W. Eaton link: fix test to declare use of rename() diff --git a/NEWS b/NEWS index cd30859ddf..dd9e22845b 100644 --- a/NEWS +++ b/NEWS @@ -45,6 +45,8 @@ User visible incompatible changes Date Modules Changes +2016-12-13 dfa Remove DFA_CASE_FOLD flag. Now based on RE_ICASE. + 2016-09-05 progname This module is deprecated. Please switch to the 'getprogname' module and its getprogname() function to obtain the name of the current program. diff --git a/lib/dfa.c b/lib/dfa.c index 33754fca9d..d8d18844b7 100644 --- a/lib/dfa.c +++ b/lib/dfa.c @@ -3992,7 +3992,7 @@ dfasyntax (struct dfa *dfa, struct localeinfo const *linfo, dfa->canychar = -1; dfa->lex.cur_mb_len = 1; dfa->syntax.syntax_bits_set = true; - dfa->syntax.case_fold = (dfaopts & DFA_CASE_FOLD) != 0; + dfa->syntax.case_fold = (bits & RE_ICASE) != 0 dfa->syntax.anchor = (dfaopts & DFA_ANCHOR) != 0; dfa->syntax.eolbyte = dfaopts & DFA_EOL_NUL ? '\0' : '\n'; dfa->syntax.syntax_bits = bits; diff --git a/lib/dfa.h b/lib/dfa.h index 9787d768f6..500ee761e6 100644 --- a/lib/dfa.h +++ b/lib/dfa.h @@ -58,11 +58,8 @@ enum possibly true for other apps. */ DFA_ANCHOR = 1 << 0, - /* Ignore case while matching. */ - DFA_CASE_FOLD = 1 << 1, - /* '\0' in data is end-of-line, instead of the traditional '\n'. */ - DFA_EOL_NUL = 1 << 2 + DFA_EOL_NUL = 1 << 1 }; /* Initialize or reinitialize a DFA. This must be called before