tty output: remove some unneeded/double escape codes - chess-puzzles - chess puzzle book generator
(HTM) git clone git://git.codemadness.org/chess-puzzles
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 526df2437b7f656c5f7f68f207478dd2ee15db53
(DIR) parent 7ec50aca8a290c15c92a71fde6dc99977330ea10
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 21 Dec 2023 00:56:37 +0100
tty output: remove some unneeded/double escape codes
Diffstat:
M fen.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
---
(DIR) diff --git a/fen.c b/fen.c
@@ -293,14 +293,11 @@ showboard_tty(void)
showboardfen();
printf("\n\n");
- SETFGCOLOR(0x00, 0x00, 0x00);
-
color = border;
SETBGCOLOR(color[0], color[1], color[2]);
SETFGCOLOR(0xff, 0xff, 0xff);
fputs(" ", stdout);
printf("\x1b[0m"); /* reset */
- SETFGCOLOR(0x00, 0x00, 0x00);
putchar('\n');
for (iy = 0; iy < 8; iy++) {
@@ -334,8 +331,8 @@ showboard_tty(void)
SETFGCOLOR(0xff, 0xff, 0xff);
else
SETFGCOLOR(0x00, 0x00, 0x00);
- /* workaround: use black chess symbol, because the color
- is filled and better visible */
+ /* workaround: use black unicode chess symbol, because
+ the color is filled and better visible */
showpiece_tty(tolower(piece));
} else {
fputs(" ", stdout);
@@ -355,7 +352,6 @@ showboard_tty(void)
}
printf("\x1b[0m"); /* reset */
- SETFGCOLOR(0x00, 0x00, 0x00);
putchar('\n');
}
color = border;