potential DECgraphics optimization

Add a comment about something that occurred to me when fixing the
^C-during-DECgraphics-output situation several days ago.  I don't
think there's any compelling reason to avoid this optimization, but
this only describes it without actually implementing it.
This commit is contained in:
PatR
2024-02-17 03:28:40 -08:00
parent 20d2ac726c
commit 2e6802d2b3

View File

@@ -3710,6 +3710,18 @@ g_putch(int in_ch)
}
(void) putchar((ch ^ 0x80)); /* Strip 8th bit */
} else {
/*
* TODO?
* for DECgraphics, we only need to switch back from the
* line drawing character set to the normal one if 'ch' is
* a lowercase letter or one of a handful of punctuation
* characters (the range is contiguous but somewhat odd):
* if (GFlag && ch >= 0x5f && ch <= 0x7e).
* Leaving it on for other characters might result in only
* deferring this graph_off(), but it could possibly skip
* both this graph_off() and the need for next graph_on()
* depending on whatever follows 'ch'.
*/
if (GFlag) {
graph_off();
GFlag = FALSE;