diff options
author | Peng Huang <shawn.p.huang@gmail.com> | 2011-03-21 13:00:05 -0400 |
---|---|---|
committer | Peng Huang <shawn.p.huang@gmail.com> | 2011-03-21 13:00:05 -0400 |
commit | d85a24507314194f1597c4c5d6c460408fcd3a9e (patch) | |
tree | 8e39c9f0ac426050b594712ba59468b0d52b1bcb /src/PYTypes.h | |
parent | 5d68b85c32049841ad1ac6220c6b03a528da7662 (diff) | |
download | ibus-libpinyin-d85a24507314194f1597c4c5d6c460408fcd3a9e.tar.gz ibus-libpinyin-d85a24507314194f1597c4c5d6c460408fcd3a9e.tar.xz ibus-libpinyin-d85a24507314194f1597c4c5d6c460408fcd3a9e.zip |
Add auto correct "on" => "ong", and combine some fuzzy pinyin options to save flag bits.
BUG=none
TEST=Linux desktop
Review URL: http://codereview.appspot.com/4273085
Diffstat (limited to 'src/PYTypes.h')
-rw-r--r-- | src/PYTypes.h | 53 |
1 files changed, 27 insertions, 26 deletions
diff --git a/src/PYTypes.h b/src/PYTypes.h index c8919ad..65d2b11 100644 --- a/src/PYTypes.h +++ b/src/PYTypes.h @@ -95,34 +95,35 @@ namespace PY { #define PINYIN_CORRECT_UEN_TO_UN (1U << 5) #define PINYIN_CORRECT_UE_TO_VE (1U << 6) #define PINYIN_CORRECT_V_TO_U (1U << 7) -#define PINYIN_CORRECT_ALL (0x000000fe) +#define PINYIN_CORRECT_ON_TO_ONG (1U << 8) +#define PINYIN_CORRECT_ALL (0x000001fe) -#define PINYIN_FUZZY_C_CH (1U << 8) -#define PINYIN_FUZZY_CH_C (1U << 9) -#define PINYIN_FUZZY_Z_ZH (1U << 10) -#define PINYIN_FUZZY_ZH_Z (1U << 11) -#define PINYIN_FUZZY_S_SH (1U << 12) -#define PINYIN_FUZZY_SH_S (1U << 13) -#define PINYIN_FUZZY_L_N (1U << 14) -#define PINYIN_FUZZY_N_L (1U << 15) -#define PINYIN_FUZZY_F_H (1U << 16) -#define PINYIN_FUZZY_H_F (1U << 17) -#define PINYIN_FUZZY_L_R (1U << 18) -#define PINYIN_FUZZY_R_L (1U << 19) -#define PINYIN_FUZZY_K_G (1U << 20) -#define PINYIN_FUZZY_G_K (1U << 21) +#define PINYIN_FUZZY_C_CH (1U << 9) +#define PINYIN_FUZZY_CH_C (1U << 10) +#define PINYIN_FUZZY_Z_ZH (1U << 11) +#define PINYIN_FUZZY_ZH_Z (1U << 12) +#define PINYIN_FUZZY_S_SH (1U << 13) +#define PINYIN_FUZZY_SH_S (1U << 14) +#define PINYIN_FUZZY_L_N (1U << 15) +#define PINYIN_FUZZY_N_L (1U << 16) +#define PINYIN_FUZZY_F_H (1U << 17) +#define PINYIN_FUZZY_H_F (1U << 18) +#define PINYIN_FUZZY_L_R (1U << 19) +#define PINYIN_FUZZY_R_L (1U << 20) +#define PINYIN_FUZZY_K_G (1U << 21) +#define PINYIN_FUZZY_G_K (1U << 22) -#define PINYIN_FUZZY_AN_ANG (1U << 22) -#define PINYIN_FUZZY_ANG_AN (1U << 23) -#define PINYIN_FUZZY_EN_ENG (1U << 24) -#define PINYIN_FUZZY_ENG_EN (1U << 25) -#define PINYIN_FUZZY_IN_ING (1U << 26) -#define PINYIN_FUZZY_ING_IN (1U << 27) -#define PINYIN_FUZZY_IAN_IANG (1U << 28) -#define PINYIN_FUZZY_IANG_IAN (1U << 29) -#define PINYIN_FUZZY_UAN_UANG (1U << 30) -#define PINYIN_FUZZY_UANG_UAN (1U << 31) -#define PINYIN_FUZZY_ALL (0xffffff00) +#define PINYIN_FUZZY_AN_ANG (1U << 23) +#define PINYIN_FUZZY_ANG_AN (1U << 24) +#define PINYIN_FUZZY_EN_ENG (1U << 25) +#define PINYIN_FUZZY_ENG_EN (1U << 26) +#define PINYIN_FUZZY_IN_ING (1U << 27) +#define PINYIN_FUZZY_ING_IN (1U << 28) +#define PINYIN_FUZZY_IAN_IANG PINYIN_FUZZY_AN_ANG +#define PINYIN_FUZZY_IANG_IAN PINYIN_FUZZY_ANG_AN +#define PINYIN_FUZZY_UAN_UANG PINYIN_FUZZY_AN_ANG +#define PINYIN_FUZZY_UANG_UAN PINYIN_FUZZY_ANG_AN +#define PINYIN_FUZZY_ALL (0x1ffffe00) struct Pinyin { const gchar *text; |