From f98dda5d83059dc45076a795d048239dd889de47 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Wed, 14 Oct 2015 16:21:52 +0800 Subject: use zhuyin instead of chewing --- src/storage/pinyin_parser2.h | 24 ++++++++++++------------ src/storage/zhuyin_parser2.cpp | 6 +++--- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/storage/pinyin_parser2.h b/src/storage/pinyin_parser2.h index e4a7871..713a9dc 100644 --- a/src/storage/pinyin_parser2.h +++ b/src/storage/pinyin_parser2.h @@ -81,12 +81,12 @@ typedef struct { typedef struct { const char m_input; const char * m_chewing; -} chewing_symbol_item_t; +} zhuyin_symbol_item_t; typedef struct { const char m_input; const char m_tone; -} chewing_tone_item_t; +} zhuyin_tone_item_t; typedef GArray * ParseValueVector; @@ -276,8 +276,8 @@ class ChewingSimpleParser2 : public ChewingParser2 /* Note: some internal pointers to chewing scheme table. */ protected: - const chewing_symbol_item_t * m_symbol_table; - const chewing_tone_item_t * m_tone_table; + const zhuyin_symbol_item_t * m_symbol_table; + const zhuyin_tone_item_t * m_tone_table; public: ChewingSimpleParser2() { @@ -315,10 +315,10 @@ protected: /* some internal pointers to chewing scheme table. */ const chewing_index_item_t * m_chewing_index; size_t m_chewing_index_len; - const chewing_symbol_item_t * m_initial_table; - const chewing_symbol_item_t * m_middle_table; - const chewing_symbol_item_t * m_final_table; - const chewing_tone_item_t * m_tone_table; + const zhuyin_symbol_item_t * m_initial_table; + const zhuyin_symbol_item_t * m_middle_table; + const zhuyin_symbol_item_t * m_final_table; + const zhuyin_tone_item_t * m_tone_table; public: ChewingDiscreteParser2() { @@ -346,10 +346,10 @@ class ChewingDaChenCP26Parser2 : public ChewingParser2 /* some internal pointers to chewing scheme table. */ const chewing_index_item_t * m_chewing_index; size_t m_chewing_index_len; - const chewing_symbol_item_t * m_initial_table; - const chewing_symbol_item_t * m_middle_table; - const chewing_symbol_item_t * m_final_table; - const chewing_tone_item_t * m_tone_table; + const zhuyin_symbol_item_t * m_initial_table; + const zhuyin_symbol_item_t * m_middle_table; + const zhuyin_symbol_item_t * m_final_table; + const zhuyin_tone_item_t * m_tone_table; public: ChewingDaChenCP26Parser2(); diff --git a/src/storage/zhuyin_parser2.cpp b/src/storage/zhuyin_parser2.cpp index 6f7b0bb..2b866e7 100644 --- a/src/storage/zhuyin_parser2.cpp +++ b/src/storage/zhuyin_parser2.cpp @@ -102,7 +102,7 @@ static inline bool search_chewing_index(pinyin_option_t options, /* the chewing string must be freed with g_free. */ -static bool search_chewing_symbols(const chewing_symbol_item_t * symbol_table, +static bool search_chewing_symbols(const zhuyin_symbol_item_t * symbol_table, const char key, const char ** chewing) { *chewing = ""; /* just iterate the table, as we only have < 50 items. */ @@ -116,7 +116,7 @@ static bool search_chewing_symbols(const chewing_symbol_item_t * symbol_table, return false; } -static bool search_chewing_tones(const chewing_tone_item_t * tone_table, +static bool search_chewing_tones(const zhuyin_tone_item_t * tone_table, const char key, unsigned char * tone) { *tone = CHEWING_ZERO_TONE; /* just iterate the table, as we only have < 10 items. */ @@ -130,7 +130,7 @@ static bool search_chewing_tones(const chewing_tone_item_t * tone_table, return false; } -static int search_chewing_symbols2(const chewing_symbol_item_t * symbol_table, +static int search_chewing_symbols2(const zhuyin_symbol_item_t * symbol_table, const char key, const char ** first, const char ** second) { -- cgit