Minor
authorBehdad Esfahbod <behdad@behdad.org>
Thu, 2 Jun 2011 00:52:00 +0000 (20:52 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Thu, 2 Jun 2011 03:15:48 +0000 (23:15 -0400)
src/gen-arabic-table.py
src/hb-ot-shape-complex-arabic-table.hh

index 762cd38..10fb22d 100755 (executable)
@@ -2,8 +2,14 @@
 
 import sys
 
-header = sys.stdin.readline (), sys.stdin.readline ()
-while sys.stdin.readline ().find ('##################') < 0:
+if len (sys.argv) < 2:
+       print >>sys.stderr, "usage: ./gen-arabic-table.py ArabicShaping.txt"
+       sys.exit (1)
+
+f = file (sys.argv[1])
+
+header = f.readline (), f.readline ()
+while f.readline ().find ('##################') < 0:
        pass
 
 
@@ -11,9 +17,9 @@ print "/* == Start of generated table == */"
 print "/*"
 print " * The following table is generated by running:"
 print " *"
-print " *   ./gen-arabic-table.py ArabicShaping.txt"
+print " *   ./gen-arabic-table.py ArabicShaping.txt"
 print " *"
-print " * on the ArabicShaping.txt file with the header:"
+print " * on files with these headers:"
 print " *"
 for line in header:
        print " * %s" % (line.strip())
@@ -28,7 +34,7 @@ max_u = 0
 num = 0
 last = -1
 block = ''
-for line in sys.stdin:
+for line in f:
        
        if line[0] == '#':
                if line.find (" characters"):
@@ -67,12 +73,11 @@ for line in sys.stdin:
        print "  %s, /* %s */" % (value, '; '.join(fields))
 
 print
-print "  JOINING_TYPE_X  /* dummy */"
 print "};"
 print
 
-print "#define JOINING_TABLE_FIRST     0x%04x" % min_u
-print "#define JOINING_TABLE_LAST      0x%04x" % max_u
+print "#define JOINING_TABLE_FIRST     0x%04X" % min_u
+print "#define JOINING_TABLE_LAST      0x%04X" % max_u
 print
 
 print "/* == End of generated table == */"
index ea2350e..2b66dcc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2010  Google, Inc.
+ * Copyright © 2011  Google, Inc.
  *
  *  This is part of HarfBuzz, a text shaping library.
  *
@@ -35,9 +35,9 @@ HB_BEGIN_DECLS
 /*
  * The following table is generated by running:
  *
- *   ./gen-arabic-table.py ArabicShaping.txt
+ *   ./gen-arabic-table.py ArabicShaping.txt
  *
- * on the ArabicShaping.txt file with the header:
+ * on files with these headers:
  *
  * # ArabicShaping-6.1.0.txt
  * # Date: 2011-04-15, 23:16:00 GMT [KW]
@@ -748,11 +748,10 @@ static const uint8_t joining_table[] =
   JOINING_TYPE_R, /* 08AB; WAW WITH DOT WITHIN; R; WAW */
   JOINING_TYPE_R, /* 08AC; ROHINGYA YEH; R; ROHINGYA YEH */
 
-  JOINING_TYPE_X  /* dummy */
 };
 
 #define JOINING_TABLE_FIRST    0x0600
-#define JOINING_TABLE_LAST     0x08ac
+#define JOINING_TABLE_LAST     0x08AC
 
 /* == End of generated table == */