/* create scws engine */ scws_t scws_new() { scws_t s; s = (scws_t) malloc(sizeof (scws_st)); if (s == NULL) return s; memset(s, 0, sizeof (scws_st)); s->mblen = charset_table_get(NULL); s->off = s->len = 0; s->wend = -1; return s; }
void scws_set_charset(scws_t s, const char *cs) { s->mblen = charset_table_get(cs); }