]> granicus.if.org Git - fribidi/commitdiff
When reading DerivedBidiClass.txt, should only default to L.
authorbehdad <behdad>
Sat, 22 May 2004 12:17:10 +0000 (12:17 +0000)
committerbehdad <behdad>
Sat, 22 May 2004 12:17:10 +0000 (12:17 +0000)
TODO
gen.tab/gen-bidi-type-tab.c

diff --git a/TODO b/TODO
index 7fbf9b35262abd00c423c515082da107051205dc..1f57acdcecb12975db8b96c6d7e7210ecd77f35a 100644 (file)
--- a/TODO
+++ b/TODO
@@ -11,7 +11,7 @@ Implementation issues:
 
 * Update CapRTL with new Unicode reference code.
 
-* Revise reorder API, in fribidi_main.c reorder after link break.
+* Revise reorder API, in fribidi_main.c reorder after line break.
 
 * Add an option to fribidi_main.c to assume two consecutive returns as
   paragraph separators.
@@ -23,6 +23,7 @@ Implementation issues:
   - Checking that not removing explicit marks in analyze is not changing the
     output in anyway.
   - Tests with BN.  Right now ^ is BN in CapRTL scheme.
+  - Test tables.
 
 * Change fribidi-main cmd-line parameters: --mirror --no-mirror...  change the
   defaults too.
@@ -30,4 +31,4 @@ Implementation issues:
 * indent:  support function attributes and _PARAMS like things.  Also
   FRIBIDI_BEGIN_DECLS, and LIKELY.
 
-* c2man:  parse Author and Copyright from the while file.
+* c2man:  parse Author and Copyright from the whole file.
index 786ff139ee880411a6fce6155a4a419e6e584e13..c858b608c043c6dddab7cca918605b12a7748c94 100644 (file)
@@ -1,10 +1,10 @@
 /* FriBidi
  * gen-bidi-type-tab.c - generate bidi-type.tab.i for libfribidi
  *
- * $Id: gen-bidi-type-tab.c,v 1.6 2004-05-22 11:21:40 behdad Exp $
+ * $Id: gen-bidi-type-tab.c,v 1.7 2004-05-22 12:17:10 behdad Exp $
  * $Author: behdad $
- * $Date: 2004-05-22 11:21:40 $
- * $Revision: 1.6 $
+ * $Date: 2004-05-22 12:17:10 $
+ * $Revision: 1.7 $
  * $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/gen.tab/gen-bidi-type-tab.c,v $
  *
  * Author:
@@ -142,7 +142,19 @@ static int table[FRIBIDI_UNICODE_CHARS];
 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 @@ init_tab (
   /* 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 @@ init_tab (
     {
       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 @@ init_tab (
 }
 
 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 @@ read_unicode_data_txt (
   char tp[10];
   unsigned long c, l;
 
+  init_tab_unicode_data_txt();
+
   l = 0;
   while (fgets (s, sizeof s, f))
     {
@@ -233,6 +250,8 @@ read_derived_bidi_class_txt (
   char tp[10];
   unsigned long c, c2, l;
 
+  init_tab_derived_bidi_class_txt();
+
   l = 0;
   while (fgets (s, sizeof s, f))
     {