]> Savannah Git Hosting - gnulib.git/commitdiff
dfa: remove DFA_CASE_FOLD flag in favor of RE_ICASE
authorArnold D. Robbins <arnold@skeeve.com>
Tue, 13 Dec 2016 20:10:08 +0000 (22:10 +0200)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 13 Dec 2016 22:16:58 +0000 (14:16 -0800)
* dfa.h (DFA_CASE_FOLD): Remove.
* dfa.c (dfasyntax): Set dfa->syntax.case_fold based on RE_ICASE.

ChangeLog
NEWS
lib/dfa.c
lib/dfa.h

index 51b89eff58b78000fb2f29d9b6f225376f77f49a..8f1671a1981301d836df28b8cae2e9b56c5f9537 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-12-13   Arnold D. Robbins  <arnold@skeeve.com>
+
+       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  <gnu@jweaton.org>
 
        link: fix test to declare use of rename()
diff --git a/NEWS b/NEWS
index cd30859ddfde0b64356645cc215e245235594b0c..dd9e22845b6755f7c23b5c1b44eee55d45bc40d1 100644 (file)
--- 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.
index 33754fca9d0ce23b760fbea2058a5ba7be1835d0..d8d18844b7f6be0973b3a61e47d3e221ae21422d 100644 (file)
--- 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;
index 9787d768f61c89cc9fcb99389637d267ca3e2237..500ee761e6270c4a1c3139df5aceea250d6e2e34 100644 (file)
--- 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