fixes python scripts
authorPeng Wu <alexepico@gmail.com>
Tue, 13 Dec 2011 09:21:38 +0000 (17:21 +0800)
committerPeng Wu <alexepico@gmail.com>
Tue, 13 Dec 2011 09:21:38 +0000 (17:21 +0800)
scripts/genpinyinheader.py
scripts/genpinyintable.py
scripts/pinyin_parser_table.h.in

index defe018..8a0a8fd 100644 (file)
@@ -23,7 +23,7 @@
 import os
 from genpinyintable import gen_content_table, \
     gen_pinyin_index, gen_bopomofo_index, \
-    gen_chewing_key_to_table_index
+    gen_chewing_key_table
 from genspecialtable import gen_divided_table, gen_resplit_table
 
 def get_table_content(tablename):
@@ -38,7 +38,7 @@ def get_table_content(tablename):
     if tablename == 'RESPLIT_TABLE':
         return gen_resplit_table()
     if tablename == 'TABLE_INDEX':
-        return gen_chewing_key_to_table_index()
+        return gen_chewing_key_table()
 
 
 def expand_file(filename):
index 4f4e64f..c0f91c6 100644 (file)
@@ -84,7 +84,7 @@ def gen_bopomofo_index():
     return ',\n'.join(entries)
 
 
-def gen_chewing_key_table_index_map():
+def gen_chewing_key_table():
     return gen_table_index(content_table)
 
 
@@ -96,5 +96,5 @@ sort_all()
 ### main function ###
 if __name__ == "__main__":
     #s = gen_content_table() + gen_pinyin_index() + gen_bopomofo_index()
-    s = gen_chewing_key_table_index_map()
+    s = gen_chewing_key_table()
     print(s)
index ae8093d..6a9bccb 100644 (file)
@@ -26,6 +26,21 @@ const resplit_table_item_t resplit_table[] = {
 @RESPLIT_TABLE@
 };
 
+const gint chewing_key_table[CHEWING_NUMBER_OF_INITIALS *
+                             CHEWING_NUMBER_OF_MIDDLES *
+                             CHEWING_NUMBER_OF_FINALS] = {
+@TABLE_INDEX@
+};
+
+const char * chewing_tone_table[CHEWING_NUMBER_OF_TONES] = {
+"",
+"ˉ",
+'ˊ',
+'ˇ',
+'ˋ',
+'˙'
+};
+
 };
 
 #endif