summaryrefslogtreecommitdiffstats
path: root/src/pinyin.cpp
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2016-07-11 13:06:10 +0800
committerPeng Wu <alexepico@gmail.com>2016-07-11 13:06:10 +0800
commit1847e018aff8c4bfe69e4ac73841ba20fed89999 (patch)
tree016380dbf3f9fe2bf0d46c300763442200ba8752 /src/pinyin.cpp
parent3eec489d3c827dc3c7275418fbb0c1f84a5164ad (diff)
downloadlibpinyin-1847e018aff8c4bfe69e4ac73841ba20fed89999.tar.gz
libpinyin-1847e018aff8c4bfe69e4ac73841ba20fed89999.tar.xz
libpinyin-1847e018aff8c4bfe69e4ac73841ba20fed89999.zip
add comments
Diffstat (limited to 'src/pinyin.cpp')
-rw-r--r--src/pinyin.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pinyin.cpp b/src/pinyin.cpp
index 8153e37..c15e38b 100644
--- a/src/pinyin.cpp
+++ b/src/pinyin.cpp
@@ -2334,6 +2334,8 @@ static size_t _compute_zero_start(PhoneticKeyMatrix & matrix, size_t offset) {
return offset;
}
+/* when lookup offset:
+ get the previous non-zero ChewingKey, then the first zero ChewingKey. */
bool pinyin_get_pinyin_offset(pinyin_instance_t * instance,
size_t cursor,
size_t * poffset) {
@@ -2468,6 +2470,9 @@ bool pinyin_get_phrase_token(pinyin_instance_t * instance,
return true;
}
+/* for auxiliary text:
+ use slow string concatenation,
+ and show the first ChewingKey and ChewingKeyRest together. */
static gchar * _get_aux_text_prefix(pinyin_instance_t * instance,
size_t cursor,
pinyin_option_t options) {