Ticket #152 (closed defect: fixed)
minor display bug with -T and TERMINFO
| Reported by: | alain | Owned by: | josephpiche |
|---|---|---|---|
| Priority: | lowest | Milestone: | 3.7.12 |
| Component: | source | Version: | |
| Severity: | trivial | Keywords: | |
| Cc: | patch: | no |
Description
Viewing the attached screenshot may help ;-)
With -T, in a white foreground xterm (or konsole or rxvt), after the first stone on the board, the foreground color is not reset to original value (black) but instead is light-grey.
In gg_utils, this correspond to the fputs (line 159)
void
write_color_char_no_space(int c, int x)
{
#ifdef TERMINFO
fprintf(stderr, "%s%c", tparm(setaf, c, 0, 0, 0, 0, 0, 0, 0, 0), x);
fputs(tparm(setaf, max_color, 0, 0, 0, 0, 0, 0, 0, 0), stderr);
#elif
Attachments
Regression Results
| Attachment | Rev. | PASS | FAIL | Nodes | Status | |
| fix-terminfo.patch | never tested | |||||
| remove-ncurses.patch | never tested |
Change History
Changed 5 years ago by alain
-
attachment
display-Tbug.png
added
comment:1 follow-up: ↓ 2 Changed 5 years ago by gunnar
I'm kind of more inclined to remove the colored displays altogether, but if someone actually uses them I suppose they could stay.
I don't know anything about terminfo. Is it max_color that happens to indicate light-gray and is there any more appropriate value?
comment:2 in reply to: ↑ 1 Changed 5 years ago by nando
Replying to gunnar:
I'm kind of more inclined to remove the colored displays altogether, but if someone actually uses them I suppose they could stay.
FWIW, I do, quite often actually.
comment:3 in reply to: ↑ description Changed 4 years ago by josephpiche
- Owner changed from gnugo to josephpiche
- Status changed from new to assigned
I am also in favor of keeping the colors. After looking at the source of utils/gg_utils.c and compiling gnugo with config options TERMINFO 0 and ANSI_COLOR 1, it still occurs.
comment:4 Changed 4 years ago by josephpiche
My mistake, the ansi color does work. Compiling with "--without-curses" and "--enable-color" gives a working -T on a white background.
One possible solution is to disable ncurses altogether and only use ansi color. I see no problem with this, as it also would remove a dependency of compiling gnugo, but if someone has some objection to this I can continue to look at it and try to fix it.
comment:5 Changed 4 years ago by gunnar
We once had a debugboard utility using ncurses but it has long been retired and eventually completely removed. But ncurses use for colors predated that utility so I assume it was introduced specifically to support colored displays.
I'm all for removing the ncurses dependency if it's not needed.
comment:6 in reply to: ↑ description Changed 4 years ago by josephpiche
I haven't done many patches before, so I'm not quite sure if this will work. Plus, I excluded changes to files make by autoconf, as I'm not sure I have the right version or am running the command correctly.
Changed 4 years ago by josephpiche
-
attachment
fix-terminfo.patch
added
A better patch that actually fixes the terminfo code

screnshot