void scws_set_rule(scws_t s, const char *fpath) { if (s->r != NULL) scws_rule_free(s->r); s->r = scws_rule_new(fpath, s->mblen); }
/* close & free the engine */ void scws_free(scws_t s) { if (s->d) { xdict_close(s->d); s->d = NULL; } if (s->r) { scws_rule_free(s->r); s->r = NULL; } free(s); }