text_to_tstate
if (tstate_str != NULL && text_to_tstate(tstate_str, &tstate) != 0)
text_to_tstate(excl_tstate_str, &excl_tstate) != 0)