summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2015-10-14 16:21:52 +0800
committerPeng Wu <alexepico@gmail.com>2015-10-14 16:21:52 +0800
commitf98dda5d83059dc45076a795d048239dd889de47 (patch)
tree055e2abe2c3de6cbba4b66384f0f86341d3e6ba2
parentdc867750ebef213bf8717cb46777a8a68b550f4a (diff)
downloadlibpinyin-f98dda5d83059dc45076a795d048239dd889de47.tar.gz
libpinyin-f98dda5d83059dc45076a795d048239dd889de47.tar.xz
libpinyin-f98dda5d83059dc45076a795d048239dd889de47.zip
use zhuyin instead of chewing
-rw-r--r--src/storage/pinyin_parser2.h24
-rw-r--r--src/storage/zhuyin_parser2.cpp6
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) {