bug-grep
[Top][All Lists]
Advanced

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

[PATCH] fix for non-MBS locales


From: Aharon Robbins
Subject: [PATCH] fix for non-MBS locales
Date: Tue, 20 Apr 2010 13:48:21 +0300
User-agent: Heirloom mailx 12.4 7/29/08

>From 4a422ff749cb4bbed270776038adb9a5977f47b6 Mon Sep 17 00:00:00 2001
From: Arnold D. Robbins <address@hidden>
Date: Tue, 20 Apr 2010 13:45:53 +0300
Subject: [PATCH] Fix add_utf8_anychar to work in non-MBS situation

dfa.c (add_utf8_anychar): Bracket body in `#if MBS_SUPPORT'.
Reported by Anders Wallin, fixed by Arnold Robbins.
---
 src/dfa.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/dfa.c b/src/dfa.c
index 7d39e5c..7ed3f2c 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -1474,6 +1474,7 @@ addtok_wc (wint_t wc)
 static void
 add_utf8_anychar (void)
 {
+#if MBS_SUPPORT
   static const charclass utf8_classes[5] = {
       {  0,  0,  0,  0, ~0, ~0, 0, 0 },            /* 80-bf: non-lead bytes */
       { ~0, ~0, ~0, ~0, 0, 0, 0, 0 },              /* 00-7f: 1-byte sequence */
@@ -1507,6 +1508,7 @@ add_utf8_anychar (void)
       addtok (CAT);
       addtok (OR);
     }
+#endif
 }
 
 /* The grammar understood by the parser is as follows.
-- 
1.6.5.2





reply via email to

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