changeset 38235:5debeeaf0598

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.
author Arnold D. Robbins <arnold@skeeve.com>
date Tue, 13 Dec 2016 22:10:08 +0200
parents 1f7f312e4bb3
children 49027c051a1f
files ChangeLog NEWS lib/dfa.c lib/dfa.h
diffstat 4 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Dec 13 12:43:09 2016 -0500
+++ b/ChangeLog	Tue Dec 13 22:10:08 2016 +0200
@@ -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()
--- a/NEWS	Tue Dec 13 12:43:09 2016 -0500
+++ b/NEWS	Tue Dec 13 22:10:08 2016 +0200
@@ -45,6 +45,8 @@
 
 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.
--- a/lib/dfa.c	Tue Dec 13 12:43:09 2016 -0500
+++ b/lib/dfa.c	Tue Dec 13 22:10:08 2016 +0200
@@ -3992,7 +3992,7 @@
   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;
--- a/lib/dfa.h	Tue Dec 13 12:43:09 2016 -0500
+++ b/lib/dfa.h	Tue Dec 13 22:10:08 2016 +0200
@@ -58,11 +58,8 @@
        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