Scope-eye.net Git Repository
/
liskon_frotz.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b1f9d44
)
Fixed weirdness in os_char_width() carried over from old DOS interface.
author
David Griffith
<dave@661.org>
Fri, 26 Jan 2018 12:55:45 +0000
(
04:55
-0800)
committer
David Griffith
<dave@661.org>
Fri, 26 Jan 2018 12:55:45 +0000
(
04:55
-0800)
src/curses/ux_text.c
patch
|
blob
|
history
diff --git
a/src/curses/ux_text.c
b/src/curses/ux_text.c
index 60065324566a2259ef32b4e4547ecb706b48a32f..95228b320cbe74760a47181ecc957a4697ee6180 100644
(file)
--- a/
src/curses/ux_text.c
+++ b/
src/curses/ux_text.c
@@
-277,14
+277,13
@@
int os_char_width (zchar c)
int width = 0;
const char *ptr = latin1_to_ascii + 3 * (c - ZC_LATIN1_MIN);
- char c1 = *ptr++;
- char c2 = *ptr++;
- char c3 = *ptr++;
+ char c2, c3;
- /* Why, oh, why did you declare variables that way??? */
+ ptr++;
+ c2 = *ptr++;
+ c3 = *ptr++;
- if (c1 == c1) /* let's avoid confusing the compiler (and me) */
- width++;
+ width++;
if (c2 != ' ')
width++;
if (c3 != ' ')