summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2014-03-13 10:33:41 +0800
committerPeng Wu <alexepico@gmail.com>2014-03-13 13:11:12 +0800
commit72d7b9d4edf40758a77ce8b8276fb3625cc9d522 (patch)
tree888dcecb5c0f77f86905289d0975d7b4a346223f
parent2b6fde2addb455fd8b2e1376ced543d777bb78db (diff)
downloadlibzhuyin-72d7b9d4edf40758a77ce8b8276fb3625cc9d522.tar.gz
libzhuyin-72d7b9d4edf40758a77ce8b8276fb3625cc9d522.tar.xz
libzhuyin-72d7b9d4edf40758a77ce8b8276fb3625cc9d522.zip
disable "'" support in full pinyin
-rw-r--r--src/storage/pinyin_parser2.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp
index ff55246..f82c0d2 100644
--- a/src/storage/pinyin_parser2.cpp
+++ b/src/storage/pinyin_parser2.cpp
@@ -35,6 +35,10 @@
using namespace zhuyin;
+
+#define PINYIN_SUPPORT_QUOTATION 0
+
+
static bool check_pinyin_options(pinyin_option_t options, const pinyin_index_item_t * item) {
guint32 flags = item->m_flags;
assert (flags & IS_PINYIN);
@@ -311,6 +315,8 @@ int FullPinyinParser2::parse (pinyin_option_t options, ChewingKeyVector & keys,
parse_value_t * curstep = NULL, * nextstep = NULL;
for (i = 0; i < len; ++i) {
+
+#if PINYIN_SUPPORT_QUOTATION
if (input[i] == '\'') {
curstep = &g_array_index(m_parse_steps, parse_value_t, i);
nextstep = &g_array_index(m_parse_steps, parse_value_t, i + 1);
@@ -324,6 +330,11 @@ int FullPinyinParser2::parse (pinyin_option_t options, ChewingKeyVector & keys,
next_sep = 0;
continue;
}
+#else
+ if (input[i] == '\'') {
+ break;
+ }
+#endif
/* forward to next "'" */
if ( 0 == next_sep ) {