summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2015-04-29 15:54:47 +0800
committerPeng Wu <alexepico@gmail.com>2015-04-29 15:54:47 +0800
commitfe54b6c86d94e95cd38026d4d84c7b05859a8d4f (patch)
tree5bfddbdffa2c702d9266d4ab1512a658836748a7
parent39641675ecda9f9e39a9b8073dc03c74eb435234 (diff)
downloadlibzhuyin-fe54b6c86d94e95cd38026d4d84c7b05859a8d4f.tar.gz
libzhuyin-fe54b6c86d94e95cd38026d4d84c7b05859a8d4f.tar.xz
libzhuyin-fe54b6c86d94e95cd38026d4d84c7b05859a8d4f.zip
fixes space key display
-rw-r--r--scripts/chewing_table.h.in2
-rw-r--r--src/storage/chewing_table.h2
-rw-r--r--src/storage/pinyin_parser2.cpp7
3 files changed, 8 insertions, 3 deletions
diff --git a/scripts/chewing_table.h.in b/scripts/chewing_table.h.in
index d4dbcfc..d0d0f59 100644
--- a/scripts/chewing_table.h.in
+++ b/scripts/chewing_table.h.in
@@ -109,7 +109,7 @@ const chewing_tone_item_t chewing_dachen_cp26_tones[] = {
const char * chewing_tone_table[CHEWING_NUMBER_OF_TONES] = {
"",
-"ˉ",
+" ",
"ˊ",
"ˇ",
"ˋ",
diff --git a/src/storage/chewing_table.h b/src/storage/chewing_table.h
index 661be86..fb36d64 100644
--- a/src/storage/chewing_table.h
+++ b/src/storage/chewing_table.h
@@ -490,7 +490,7 @@ const chewing_tone_item_t chewing_dachen_cp26_tones[] = {
const char * chewing_tone_table[CHEWING_NUMBER_OF_TONES] = {
"",
-"ˉ",
+" ",
"ˊ",
"ˇ",
"ˋ",
diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp
index 51f3ae8..f78653f 100644
--- a/src/storage/pinyin_parser2.cpp
+++ b/src/storage/pinyin_parser2.cpp
@@ -1289,6 +1289,11 @@ bool ChewingDirectParser2::parse_one_key(pinyin_option_t options,
break;
}
}
+
+ /* check the force tone option. */
+ if (options & FORCE_TONE && CHEWING_ZERO_TONE == tone) {
+ return false;
+ }
}
gchar * chewing = g_strndup(str, len);
@@ -1334,7 +1339,7 @@ int ChewingDirectParser2::parse(pinyin_option_t options,
return parsed_len;
}
- /* skip consecutive spaces */
+ /* skip consecutive spaces. */
for (i = next; i < len; ++i) {
if (' ' != str[i] && '\'' != str[i])
break;