From: David Griffith Date: Wed, 4 Jan 2023 04:58:14 +0000 (-0800) Subject: Reworked faulty show_cell_normal() from the old IRC formatting code. X-Git-Url: https://scope-eye.net/git/?a=commitdiff_plain;h=2e7406ade90ee59ada54f8851a5d1d675a222044;p=liskon_frotz.git Reworked faulty show_cell_normal() from the old IRC formatting code. Philip Lafleur's patch at http://ifarchive.org/if-archive/infocom/interpreters/frotz/frotz-2.43-irc.diff.gz did not account for the possibility of the text style having more than one value. I didn't catch this oversight at the time. --- diff --git a/src/dumb/doutput.c b/src/dumb/doutput.c index dc88ac3..28f5b3a 100644 --- a/src/dumb/doutput.c +++ b/src/dumb/doutput.c @@ -358,15 +358,7 @@ static void show_cell_bbcode(cell_t cel) /* Print a cell to stdout without using formatting codes. */ static void show_cell_normal(cell_t cel) { - switch (cel.style) { - case NORMAL_STYLE: - case FIXED_WIDTH_STYLE: /* NORMAL_STYLE falls through to here */ - zputchar(cel.c); - break; - case PICTURE_STYLE: - zputchar(show_pictures ? cel.c : ' '); - break; - case REVERSE_STYLE: + if (cel.style & REVERSE_STYLE) { if (cel.c == ' ') printf("%s", rv_blank_str); else { @@ -391,8 +383,11 @@ static void show_cell_normal(cell_t cel) break; } } - break; } + else if (cel.style & PICTURE_STYLE) + zputchar(show_pictures ? cel.c : ' '); + else /* Only NORMAL_STYLE and FIXED_WIDTH_STYLE are left. */ + zputchar(cel.c); }