Re: [PATCH 13/16] Make ANSI terminal escape sequences work in TUI

Joel Brobecker
2018-12-24T08:02:30Z

> I am very sour on the curses design now.

I would be too!

> gdb/ChangeLog
> 2018-11-27 Tom Tromey <tom@tromey.com>
>
> PR tui/14126:
> * tui/tui.c (tui_enable): Call start_color and
> use_default_colors.
> * tui/tui-io.c (struct color_pair): New.
> (color_pair_map, last_color_pair, last_style): New globals.
> (tui_setup_io): Clean up color map when shutting down.
> (curses_colors): New constant.
> (get_color_pair, apply_ansi_escape): New functions.
> (tui_write): Rewrite.
> (tui_puts_internal): New function, from tui_puts. Add "height"
> parameter.
> (tui_puts): Use tui_puts_internal.
> (tui_redisplay_readline): Use tui_puts_internal.
> (_initialize_tui_io): New function.
> (color_map): New globals.
> (get_color): New function.
> * configure.ac: Check for use_default_colors.
> * config.in, configure: Rebuild.

I scan the patch. I didn't go into too much detail, but for what
it's worth, what I read made sense to me.

--
Joel