diff options
author | Tom de Vries <tdevries@suse.de> | 2023-07-12 12:07:40 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-07-12 12:07:40 +0200 |
commit | 275cef134913f0b96240876576502273ae0bdb6d (patch) | |
tree | be7a9ea731f545160ba2ec3dc5b46e0527f21e1b /gdb | |
parent | 0bad8af9cec3d21b2c2f23468ac771b69ebf7518 (diff) | |
download | gdb-275cef134913f0b96240876576502273ae0bdb6d.zip gdb-275cef134913f0b96240876576502273ae0bdb6d.tar.gz gdb-275cef134913f0b96240876576502273ae0bdb6d.tar.bz2 |
[gdb/tui] Merge tui border-kind corner translation tables
The tables:
- tui_border_kind_translate_ulcorner
- tui_border_kind_translate_urcorner
- tui_border_kind_translate_llcorner
- tui_border_kind_translate_lrcorner
are identical.
Merge and rename to tui_border_kind_translate_corner.
Tested on x86_64-linux.
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/tui/tui-win.c | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c index 1406e07..2cc8177 100644 --- a/gdb/tui/tui-win.c +++ b/gdb/tui/tui-win.c @@ -128,8 +128,8 @@ static struct tui_translate tui_border_mode_translate[] = { { 0, 0 } }; -/* Translation tables for border-kind (acs excluded), one for each border - character (see wborder, border curses operations). */ +/* Translation tables for border-kind (acs excluded), one for vline, hline and + corners (see wborder, border curses operations). */ static struct tui_translate tui_border_kind_translate_vline[] = { { "space", ' ' }, { "ascii", '|' }, @@ -142,25 +142,7 @@ static struct tui_translate tui_border_kind_translate_hline[] = { { 0, 0 } }; -static struct tui_translate tui_border_kind_translate_ulcorner[] = { - { "space", ' ' }, - { "ascii", '+' }, - { 0, 0 } -}; - -static struct tui_translate tui_border_kind_translate_urcorner[] = { - { "space", ' ' }, - { "ascii", '+' }, - { 0, 0 } -}; - -static struct tui_translate tui_border_kind_translate_llcorner[] = { - { "space", ' ' }, - { "ascii", '+' }, - { 0, 0 } -}; - -static struct tui_translate tui_border_kind_translate_lrcorner[] = { +static struct tui_translate tui_border_kind_translate_corner[] = { { "space", ' ' }, { "ascii", '+' }, { 0, 0 } @@ -287,20 +269,20 @@ tui_update_variables () /* If one corner changes, all characters are changed. Only check the first one. */ - int val = translate_acs (tui_border_kind, tui_border_kind_translate_lrcorner, + int val = translate_acs (tui_border_kind, tui_border_kind_translate_corner, ACS_LRCORNER); need_redraw |= assign_return_if_changed<chtype> (tui_border_lrcorner, val); tui_border_llcorner - = translate_acs (tui_border_kind, tui_border_kind_translate_llcorner, + = translate_acs (tui_border_kind, tui_border_kind_translate_corner, ACS_LLCORNER); tui_border_ulcorner - = translate_acs (tui_border_kind, tui_border_kind_translate_ulcorner, + = translate_acs (tui_border_kind, tui_border_kind_translate_corner, ACS_ULCORNER); tui_border_urcorner = - translate_acs (tui_border_kind, tui_border_kind_translate_urcorner, + translate_acs (tui_border_kind, tui_border_kind_translate_corner, ACS_URCORNER); tui_border_hline |