From 32b8da1177162206e0d491fd978473231ffff199 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Tue, 24 Sep 2024 08:32:16 +0100 Subject: [PATCH] clipme(): remove some obsolete diagnostic code. This #if completely replaced the actually useful version of clipme(), so I think it must have been used early in development before the useful version was even written. Since then it's bit-rotted to the point where it doesn't even make sense: the "#endif" is nested inside a while loop that the "#if 0" and "#else" are outside, so that if the condition were changed to evaluate true, you'd get syntactic nonsense out of the preprocessor. And I can't see any use for it now, even if it did compile! Get rid of it. --- terminal/terminal.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/terminal/terminal.c b/terminal/terminal.c index 7e3526fb..642202af 100644 --- a/terminal/terminal.c +++ b/terminal/terminal.c @@ -6683,10 +6683,6 @@ static void clipme(Terminal *term, pos top, pos bottom, bool rect, bool desel, } while (poslt(top, bottom) && poslt(top, nlpos)) { -#if 0 - char cbuf[16], *p; - sprintf(cbuf, "", (ldata[top.x] & 0xFFFF)); -#else wchar_t cbuf[16], *p; int c; int x = top.x; @@ -6757,7 +6753,6 @@ static void clipme(Terminal *term, pos top, pos bottom, bool rect, bool desel, } } } -#endif for (p = cbuf; *p; p++) clip_addchar(&buf, *p, attr, tc);