ansi_console: rework struct to avoid typedef for functions.