separate the functions from pinyin_console.c into funs.c
fixed memory dump error
the bug fixed now, use `emalloc` instead of `malloc`