static uim_lisp set_prediction_src_string(uim_lisp ac_, uim_lisp str_) { #ifdef HAS_ANTHY_PREDICTION anthy_context_t ac; const char *str; ac = get_anthy_context(ac_); str = REFER_C_STR(str_); anthy_set_prediction_string(ac, str); #endif return uim_scm_f(); }
void Conversion::predict (void) { clear (); #ifdef HAS_ANTHY_PREDICTION std::string str; str = m_reading.get_by_char (); anthy_set_prediction_string (m_anthy_context, str.c_str ()); struct anthy_prediction_stat ps; anthy_get_prediction_stat (m_anthy_context, &ps); if (ps.nr_prediction > 0) m_predicting = true; else anthy_reset_context (m_anthy_context); #endif /* HAS_ANTHY_PREDICTION */ }