[FriBidi-commit] fribidi/gen.tab gen-bidi-type-tab.c,1.6,1.7

Behdad Esfahbod behdad at pdx.freedesktop.org
Sat May 22 05:17:12 PDT 2004


Update of /cvs/fribidi/fribidi/gen.tab
In directory pdx:/tmp/cvs-serv10359/gen.tab

Modified Files:
	gen-bidi-type-tab.c 
Log Message:
When reading DerivedBidiClass.txt, should only default to L.


Index: gen-bidi-type-tab.c
===================================================================
RCS file: /cvs/fribidi/fribidi/gen.tab/gen-bidi-type-tab.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- a/gen-bidi-type-tab.c	22 May 2004 11:21:40 -0000	1.6
+++ b/gen-bidi-type-tab.c	22 May 2004 12:17:10 -0000	1.7
@@ -142,7 +142,19 @@
 static char s[4000];
 
 static void
-init_tab (
+init (
+)
+{
+  register int i;
+
+  for (i = 0; i < type_names_count; i++)
+    names[i] = 0;
+  for (i = type_names_count - 1; i >= 0; i--)
+    names[type_names[i].key] = type_names[i].name;
+}
+
+static void
+clear_tab (
 )
 {
   register FriBidiChar c;
@@ -150,6 +162,15 @@
   /* default types for reserved and noncharacter code points */
   for (c = 0; c < FRIBIDI_UNICODE_CHARS; c++)
     table[c] = LTR;
+}
+
+static void
+init_tab_unicode_data_txt (
+)
+{
+  register FriBidiChar c;
+
+  clear_tab();
 
   for (c = 0x0590; c < 0x0600; c++)
     table[c] = RTL;
@@ -178,6 +199,7 @@
     {
       for (c = 0x10800; c < 0x11000; c++)
 	table[c] = RTL;
+
       for (c = 0xE0000; c < 0xE0100; c++)
 	table[c] = BN;
       for (c = 0xE01F0; c < 0xE1000; c++)
@@ -186,17 +208,10 @@
 }
 
 static void
-init (
+init_tab_derived_bidi_class_txt(
 )
 {
-  register int i;
-
-  for (i = 0; i < type_names_count; i++)
-    names[i] = 0;
-  for (i = type_names_count - 1; i >= 0; i--)
-    names[type_names[i].key] = type_names[i].name;
-
-  init_tab ();
+  clear_tab();
 }
 
 static void
@@ -207,6 +222,8 @@
   char tp[10];
   unsigned long c, l;
 
+  init_tab_unicode_data_txt();
+
   l = 0;
   while (fgets (s, sizeof s, f))
     {
@@ -233,6 +250,8 @@
   char tp[10];
   unsigned long c, c2, l;
 
+  init_tab_derived_bidi_class_txt();
+
   l = 0;
   while (fgets (s, sizeof s, f))
     {




More information about the FriBidi-Commit mailing list