summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2013-10-15 11:16:44 +0800
committerPeng Wu <alexepico@gmail.com>2013-10-15 11:16:44 +0800
commite43ef570c2cedda6396d28cf526b246f84d2be3e (patch)
treec8de72ac39817b899412a96ee2514197919d8267
parentf9c37981048738ca06b541e8de90cd346ae26fc0 (diff)
downloadlibzhuyin-e43ef570c2cedda6396d28cf526b246f84d2be3e.tar.gz
libzhuyin-e43ef570c2cedda6396d28cf526b246f84d2be3e.tar.xz
libzhuyin-e43ef570c2cedda6396d28cf526b246f84d2be3e.zip
continue renaming
-rw-r--r--src/storage/chewing_key.h2
-rw-r--r--src/storage/pinyin_custom2.h8
-rw-r--r--src/storage/pinyin_parser2.cpp14
3 files changed, 12 insertions, 12 deletions
diff --git a/src/storage/chewing_key.h b/src/storage/chewing_key.h
index 9e115c4..37b0173 100644
--- a/src/storage/chewing_key.h
+++ b/src/storage/chewing_key.h
@@ -66,7 +66,7 @@ public:
gint get_table_index();
/* Note: the return value should be freed by g_free. */
- gchar * get_pinyin_string(FullPinyinScheme scheme = PINYIN_DEFAULT);
+ gchar * get_pinyin_string(FullPinyinScheme scheme = FULL_PINYIN_DEFAULT);
gchar * get_bopomofo_string();
};
diff --git a/src/storage/pinyin_custom2.h b/src/storage/pinyin_custom2.h
index 306be05..58b09e0 100644
--- a/src/storage/pinyin_custom2.h
+++ b/src/storage/pinyin_custom2.h
@@ -67,10 +67,10 @@ enum PinyinAmbiguity2{
enum FullPinyinScheme
{
- PINYIN_HANYU = 1,
- PINYIN_LUOMA = 2,
- PINYIN_SECONDARY_BOPOMOFO = 3,
- PINYIN_DEFAULT = PINYIN_HANYU
+ FULL_PINYIN_HANYU = 1,
+ FULL_PINYIN_LUOMA = 2,
+ FULL_PINYIN_SECONDARY_BOPOMOFO = 3,
+ FULL_PINYIN_DEFAULT = FULL_PINYIN_HANYU
};
/**
diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp
index 0d5977e..43f6cb4 100644
--- a/src/storage/pinyin_parser2.cpp
+++ b/src/storage/pinyin_parser2.cpp
@@ -100,13 +100,13 @@ gchar * _ChewingKey::get_pinyin_string(FullPinyinScheme scheme) {
const char * pinyin_str = NULL;
switch(scheme) {
- case PINYIN_HANYU:
+ case FULL_PINYIN_HANYU:
pinyin_str = item.m_hanyu_pinyin;
break;
- case PINYIN_LUOMA:
+ case FULL_PINYIN_LUOMA:
pinyin_str = item.m_luoma_pinyin;
break;
- case PINYIN_SECONDARY_BOPOMOFO:
+ case FULL_PINYIN_SECONDARY_BOPOMOFO:
pinyin_str = item.m_secondary_bopomofo;
break;
default:
@@ -241,7 +241,7 @@ FullPinyinParser2::FullPinyinParser2 (){
m_pinyin_index = NULL; m_pinyin_index_len = 0;
m_parse_steps = g_array_new(TRUE, FALSE, sizeof(parse_value_t));
- set_scheme(PINYIN_DEFAULT);
+ set_scheme(FULL_PINYIN_DEFAULT);
}
bool FullPinyinParser2::parse_one_key (pinyin_option_t options,
@@ -426,15 +426,15 @@ int FullPinyinParser2::final_step(size_t step_len, ChewingKeyVector & keys,
bool FullPinyinParser2::set_scheme(FullPinyinScheme scheme){
switch(scheme){
- case PINYIN_HANYU:
+ case FULL_PINYIN_HANYU:
m_pinyin_index = hanyu_pinyin_index;
m_pinyin_index_len = G_N_ELEMENTS(hanyu_pinyin_index);
break;
- case PINYIN_LUOMA:
+ case FULL_PINYIN_LUOMA:
m_pinyin_index = luoma_pinyin_index;
m_pinyin_index_len = G_N_ELEMENTS(luoma_pinyin_index);
break;
- case PINYIN_SECONDARY_BOPOMOFO:
+ case FULL_PINYIN_SECONDARY_BOPOMOFO:
m_pinyin_index = secondary_bopomofo_index;
m_pinyin_index_len = G_N_ELEMENTS(secondary_bopomofo_index);
break;