Partial C99 cleanup of term.c #1020