hex_to_int
int hex_to_int(const char *, int *);
if (!hex_to_int(word, type))
if (!hex_to_int(word, flags))