diff options
-rw-r--r-- | scripts/chewing_table.h.in | 2 | ||||
-rw-r--r-- | src/storage/chewing_table.h | 2 | ||||
-rw-r--r-- | src/storage/pinyin_parser2.cpp | 7 |
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; |