bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 2/2] dfa: remove one dependency on MB_CUR_MAX


From: Paul Eggert
Subject: [PATCH 2/2] dfa: remove one dependency on MB_CUR_MAX
Date: Tue, 17 Dec 2019 00:26:01 -0800

* lib/dfa.c (dfamust): No need to refer to MB_CUR_MAX here.
---
 ChangeLog | 3 +++
 lib/dfa.c | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index acd67f9dc..561b0ba0a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2019-12-16  Paul Eggert  <address@hidden>
 
+       dfa: remove one dependency on MB_CUR_MAX
+       * lib/dfa.c (dfamust): No need to refer to MB_CUR_MAX here.
+
        dfa: remove struct lexer_state.cur_mb_len
        * lib/dfa.c (struct lexer_state): Remove cur_mb_len member,
        as it’s not needed and the code is simpler without it.
diff --git a/lib/dfa.c b/lib/dfa.c
index fa947463b..8e59df0c7 100644
--- a/lib/dfa.c
+++ b/lib/dfa.c
@@ -4022,7 +4022,7 @@ dfamust (struct dfa const *d)
   bool endline = false;
   bool need_begline = false;
   bool need_endline = false;
-  bool case_fold_unibyte = d->syntax.case_fold && MB_CUR_MAX == 1;
+  bool case_fold_unibyte = d->syntax.case_fold & !d->localeinfo.multibyte;
 
   for (idx_t ri = 1; ri + 1 < d->tindex; ri++)
     {
-- 
2.17.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]