a terminfo parsing library