bug-grep
[Top][All Lists]
Advanced

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

bug#21486: [PATCH 3/3] dfa: cache transition from a state with dot expre


From: arnold
Subject: bug#21486: [PATCH 3/3] dfa: cache transition from a state with dot expression in non-UTF8 multibyte locales
Date: Tue, 16 Aug 2016 04:14:54 -0600
User-agent: Heirloom mailx 12.4 7/29/08

Hi Paul.

Paul Eggert <address@hidden> wrote:

> I also installed the attached patch 2, which ports the resulting dfa.c
> to C90; as I understand it Gawk still needs this.

Thanks for this. You're correct, although at some point I'll move to C99.

You still need this additional change to fully move to C90.

Thanks!

Arnold
-------------------------
--- ../grep/src/dfa.c   2016-08-16 11:40:09.008803100 +0300
+++ dfa.c       2016-08-16 11:46:52.901810300 +0300
@@ -3900,9 +3939,11 @@
   bool exact = false;
   bool begline = false;
   bool endline = false;
+  size_t rj;
   bool need_begline = false;
   bool need_endline = false;
   bool case_fold_unibyte = case_fold && MB_CUR_MAX == 1;
+  struct dfamust *dm;
 
   for (ri = 0; ri < d->tindex; ++ri)
     {
@@ -4079,7 +4120,7 @@
                 }
             }
 
-          size_t rj = ri + 2;
+          rj = ri + 2;
           if (d->tokens[ri + 1] == CAT)
             {
               for (; rj < d->tindex - 1; rj += 2)
@@ -4108,7 +4149,7 @@
     }
  done:;
 
-  struct dfamust *dm = NULL;
+  dm = NULL;
   if (*result)
     {
       dm = xmalloc (sizeof *dm);





reply via email to

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