Using terminfo for portable color output and cursor control [1]