Hi Paul.

Paul Eggert <egg...@cs.ucla.edu> 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