diff options
-rw-r--r-- | scripts/genpinyintable.py | 5 | ||||
-rw-r--r-- | src/storage/chewing_key.h | 2 | ||||
-rw-r--r-- | src/storage/pinyin_parser2.cpp | 14 | ||||
-rw-r--r-- | src/storage/pinyin_parser2.h | 2 |
4 files changed, 3 insertions, 20 deletions
diff --git a/scripts/genpinyintable.py b/scripts/genpinyintable.py index cc60034..574f513 100644 --- a/scripts/genpinyintable.py +++ b/scripts/genpinyintable.py @@ -58,6 +58,7 @@ def sort_all(): pinyin_index = sorted(pinyin_index, key=sortfunc) bopomofo_index = sorted(bopomofo_index, key=sortfunc) +''' def get_sheng_yun(pinyin): if pinyin == None: return None, None @@ -70,12 +71,12 @@ def get_sheng_yun(pinyin): if s in shengmu_list: return s, pinyin[i:] return "", pinyin +''' def gen_content_table(): entries = [] for ((correct, bopomofo, chewing)) in content_table: - (shengmu, yunmu) = get_sheng_yun(correct) - entry = '{{"{0}", "{1}", "{2}", "{3}", {4}}}'.format(correct, shengmu, yunmu, bopomofo, chewing) + entry = '{{"{0}", "{1}", {2}}}'.format(correct, bopomofo, chewing) entries.append(entry) return ',\n'.join(entries) diff --git a/src/storage/chewing_key.h b/src/storage/chewing_key.h index f3202e8..db0123d 100644 --- a/src/storage/chewing_key.h +++ b/src/storage/chewing_key.h @@ -66,8 +66,6 @@ public: /* Note: the return value should be freed by g_free. */ gchar * get_pinyin_string(); - gchar * get_shengmu_string(); - gchar * get_yunmu_string(); gchar * get_chewing_string(); }; diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp index 5d406ae..30ca566 100644 --- a/src/storage/pinyin_parser2.cpp +++ b/src/storage/pinyin_parser2.cpp @@ -94,20 +94,6 @@ gchar * _ChewingKey::get_pinyin_string() { } } -gchar * _ChewingKey::get_shengmu_string() { - gint index = get_table_index(); - assert(index < G_N_ELEMENTS(content_table)); - const content_table_item_t & item = content_table[index]; - return g_strdup(item.m_shengmu_str); -} - -gchar * _ChewingKey::get_yunmu_string() { - gint index = get_table_index(); - assert(index < G_N_ELEMENTS(content_table)); - const content_table_item_t & item = content_table[index]; - return g_strdup(item.m_yunmu_str); -} - gchar * _ChewingKey::get_chewing_string() { assert(m_tone < CHEWING_NUMBER_OF_TONES); gint index = get_table_index(); diff --git a/src/storage/pinyin_parser2.h b/src/storage/pinyin_parser2.h index e40b30c..644dd07 100644 --- a/src/storage/pinyin_parser2.h +++ b/src/storage/pinyin_parser2.h @@ -31,8 +31,6 @@ namespace pinyin{ typedef struct { const char * m_pinyin_str; - const char * m_shengmu_str; - const char * m_yunmu_str; const char * m_chewing_str; ChewingKey m_chewing_key; } content_table_item_t; |