ChewingKeyRest & key_rest,
const char * pinyin, int len) const {
/* "'" are not accepted in parse_one_key. */
- assert(NULL == strchr(pinyin, '\''));
gchar * input = g_strndup(pinyin, len);
+ assert(NULL == strchr(input, '\''));
guint16 tone = CHEWING_ZERO_TONE; guint16 tone_pos = 0;
guint16 parsed_len = len;
gchar * input = g_strndup(str, len);
parse_value_t * curstep = NULL, * nextstep = NULL;
- for (i = 0; i < len; ) {
+ for (i = 0; i < len; ++i) {
if (input[i] == '\'') {
curstep = &g_array_index(m_parse_steps, parse_value_t, i);
nextstep = &g_array_index(m_parse_steps, parse_value_t, i + 1);
break;
}
next_sep = k;
- i = next_sep;
}
/* dynamic programming here. */