terminfo: simplify a bit.