No need for mbstate_t to be static
R_MAX should be R_CANCEL now