Lines Matching defs:ch_pos

242 bool MatrixSearch::reset_search(size_t ch_pos, bool clear_fixed_this_step,
245 if (!inited_ || ch_pos > pys_decoded_len_ || ch_pos >= kMaxRowNum)
248 if (0 == ch_pos) {
253 if (clear_dmi_this_step && matrix_[ch_pos].dmi_num > 0) {
254 dict_handles_to_clear = dmi_pool_[matrix_[ch_pos].dmi_pos].dict_handles;
259 if (pys_decoded_len_ > ch_pos && !clear_dmi_this_step) {
261 if (matrix_[ch_pos + 1].dmi_num > 0) {
263 dmi_pool_[matrix_[ch_pos + 1].dmi_pos].dict_handles;
268 dict_trie_->reset_milestones(ch_pos, dict_handles_to_clear[0]);
270 user_dict_->reset_milestones(ch_pos, dict_handles_to_clear[1]);
273 pys_decoded_len_ = ch_pos;
276 dmi_pool_used_ = matrix_[ch_pos - 1].dmi_pos
277 + matrix_[ch_pos - 1].dmi_num;
278 matrix_[ch_pos].dmi_num = 0;
280 dmi_pool_used_ = matrix_[ch_pos].dmi_pos + matrix_[ch_pos].dmi_num;
284 mtrx_nd_pool_used_ = matrix_[ch_pos - 1].mtrx_nd_pos
285 + matrix_[ch_pos - 1].mtrx_nd_num;
286 matrix_[ch_pos].mtrx_nd_num = 0;
288 mtrx_nd_pool_used_ = matrix_[ch_pos].mtrx_nd_pos
289 + matrix_[ch_pos].mtrx_nd_num;
296 spl_start_[c_phrase_.length] <= ch_pos))) {
297 size_t fixed_ch_pos = ch_pos;
320 if (clear_dmi_this_step && ch_pos == fixed_ch_pos &&
344 if (clear_dmi_this_step && ch_pos == fixed_ch_pos) {
353 if (clear_mtrx_this_step && ch_pos == fixed_ch_pos) {
362 for (uint16 re_pos = fixed_ch_pos; re_pos < ch_pos; re_pos++) {
370 // If ch_pos is in this spelling
373 if (ch_pos >= spl_start && ch_pos < spl_end) {
429 size_t ch_pos = 0;
430 for (ch_pos = 0; ch_pos < pys_decoded_len_; ch_pos++) {
431 if ('\0' == py[ch_pos] || py[ch_pos] != pys_[ch_pos])
436 if (ch_pos == pys_decoded_len_)
439 reset_search(ch_pos, clear_fix, false, false);
441 memcpy(pys_ + ch_pos, py + ch_pos, py_len - ch_pos);
444 while ('\0' != pys_[ch_pos]) {
445 if (!add_char(py[ch_pos])) {
446 pys_decoded_len_ = ch_pos;
449 ch_pos++;
477 return ch_pos;