aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGeoff Voelker1996-01-21 00:28:26 +0000
committerGeoff Voelker1996-01-21 00:28:26 +0000
commitb47278e10c0825f8fd4eb694e512fb5fe7456c11 (patch)
tree627d1ce6c3cc309e04760e56f1f814f18413d9cb /src
parent7fb46567ca81c0e50e691e1968ba1258ef3ec7f6 (diff)
downloademacs-b47278e10c0825f8fd4eb694e512fb5fe7456c11.tar.gz
emacs-b47278e10c0825f8fd4eb694e512fb5fe7456c11.zip
(clear_frame): Use FillConsoleOutput* calls instead of
ScrollConsoleScreenBuffer (which has a bug on Win95).
Diffstat (limited to 'src')
-rw-r--r--src/w32console.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/src/w32console.c b/src/w32console.c
index 102693d44e1..31ec9363569 100644
--- a/src/w32console.c
+++ b/src/w32console.c
@@ -123,25 +123,18 @@ clear_to_end (void)
123void 123void
124clear_frame (void) 124clear_frame (void)
125{ 125{
126 SMALL_RECT scroll;
127 COORD dest;
128 CHAR_INFO fill;
129 FRAME_PTR f = PICK_FRAME (); 126 FRAME_PTR f = PICK_FRAME ();
130 127 COORD dest;
128 int n, r;
129
131 hl_mode (0); 130 hl_mode (0);
132 131
133 scroll.Top = 0; 132 n = FRAME_HEIGHT (f) * FRAME_WIDTH (f);
134 scroll.Bottom = FRAME_HEIGHT (f) - 1; 133 dest.X = dest.Y = 0;
135 scroll.Left = 0; 134
136 scroll.Right = FRAME_WIDTH (f) - 1; 135 FillConsoleOutputAttribute (cur_screen, char_attr, n, dest, &r);
137 136 FillConsoleOutputCharacter (cur_screen, ' ', n, dest, &r);
138 dest.Y = FRAME_HEIGHT (f); 137
139 dest.X = 0;
140
141 fill.Char.AsciiChar = 0x20;
142 fill.Attributes = char_attr;
143
144 ScrollConsoleScreenBuffer (cur_screen, &scroll, NULL, dest, &fill);
145 move_cursor (0, 0); 138 move_cursor (0, 0);
146} 139}
147 140
@@ -347,6 +340,9 @@ write_glyphs (register GLYPH *string, register int len)
347 char *chars; 340 char *chars;
348 int i; 341 int i;
349 342
343 if (len <= 0)
344 return;
345
350 attrs = alloca (len * sizeof (*attrs)); 346 attrs = alloca (len * sizeof (*attrs));
351 chars = alloca (len * sizeof (*chars)); 347 chars = alloca (len * sizeof (*chars));
352 if (attrs == NULL || chars == NULL) 348 if (attrs == NULL || chars == NULL)