Fix t->text.
mm_buf_ungetc() and error handling.