]> granicus.if.org Git - fribidi/commitdiff
gen-brackets-tab.c: Declare variables at top-of-block
authorChun-wei Fan <fanchunwei@src.gnome.org>
Tue, 27 Feb 2018 04:30:50 +0000 (12:30 +0800)
committerKhaled Hosny <khaledhosny@eglug.org>
Tue, 27 Feb 2018 08:34:18 +0000 (10:34 +0200)
This is the only change that is required for fribidi to build on pre-C99
compilers.

gen.tab/gen-brackets-tab.c

index aab06ebba28bddf7d3b824934097c275ca867352..8c1f1df52f8bccd115863cbc92373b29e3e20783 100644 (file)
@@ -151,6 +151,8 @@ read_unicode_data_txt_equivalence (
       int i;
       const char *s = buf;
       char ce_string[256]; /* For parsing the equivalence */
+      char *p = NULL;
+      int ce, in_tag;
 
       l++;
 
@@ -170,9 +172,9 @@ read_unicode_data_txt_equivalence (
         continue;
 
       /* split and parse ce */
-      char *p = ce_string;
-      int ce = -1;
-      int in_tag = 0;
+      p = ce_string;
+      ce = -1;
+      in_tag = 0;
       while(*p)
         {
           if (*p==';')