aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiles Bader2001-10-20 05:50:33 +0000
committerMiles Bader2001-10-20 05:50:33 +0000
commite850a61568ec13d52c3d9487bcebec37bafb8217 (patch)
treeebf8a38f4f853fb56d19d10f1c9b2b5a189e06c1 /src
parente617a35b400d43a2d00dc5a3f069bffdb7b37ad4 (diff)
downloademacs-e850a61568ec13d52c3d9487bcebec37bafb8217.tar.gz
emacs-e850a61568ec13d52c3d9487bcebec37bafb8217.zip
(reassert_line_highlight, change_line_highlight): Functions removed.
(initialize_w32_display): Don't set reassert_line_highlight_hook or change_line_highlight_hook. (hl_mode): Function removed. (reset_terminal_modes, set_terminal_modes, update_begin) (update_end, w32_face_attributes, initialize_w32_display): (clear_frame, ins_del_lines): Don't call it.
Diffstat (limited to 'src')
-rw-r--r--src/w32console.c59
1 files changed, 2 insertions, 57 deletions
diff --git a/src/w32console.c b/src/w32console.c
index 1f9a5cb2d5f..5bd4ab1f3f4 100644
--- a/src/w32console.c
+++ b/src/w32console.c
@@ -58,8 +58,6 @@ static void clear_to_end (void);
58static void clear_frame (void); 58static void clear_frame (void);
59static void clear_end_of_line (int); 59static void clear_end_of_line (int);
60static void ins_del_lines (int vpos, int n); 60static void ins_del_lines (int vpos, int n);
61static void change_line_highlight (int, int, int, int);
62static void reassert_line_highlight (int, int);
63static void insert_glyphs (struct glyph *start, int len); 61static void insert_glyphs (struct glyph *start, int len);
64static void write_glyphs (struct glyph *string, int len); 62static void write_glyphs (struct glyph *string, int len);
65static void delete_glyphs (int n); 63static void delete_glyphs (int n);
@@ -70,7 +68,6 @@ static void set_terminal_window (int size);
70static void update_begin (struct frame * f); 68static void update_begin (struct frame * f);
71static void update_end (struct frame * f); 69static void update_end (struct frame * f);
72static WORD w32_face_attributes (struct frame *f, int face_id); 70static WORD w32_face_attributes (struct frame *f, int face_id);
73static int hl_mode (int new_highlight);
74 71
75static COORD cursor_coords; 72static COORD cursor_coords;
76static HANDLE prev_screen, cur_screen; 73static HANDLE prev_screen, cur_screen;
@@ -140,8 +137,6 @@ clear_frame (void)
140 137
141 GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &info); 138 GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &info);
142 139
143 hl_mode (0);
144
145 /* Remember that the screen buffer might be wider than the window. */ 140 /* Remember that the screen buffer might be wider than the window. */
146 n = FRAME_HEIGHT (f) * info.dwSize.X; 141 n = FRAME_HEIGHT (f) * info.dwSize.X;
147 dest.X = dest.Y = 0; 142 dest.X = dest.Y = 0;
@@ -176,7 +171,7 @@ clear_end_of_line (int end)
176void 171void
177ins_del_lines (int vpos, int n) 172ins_del_lines (int vpos, int n)
178{ 173{
179 int i, nb, save_highlight; 174 int i, nb;
180 SMALL_RECT scroll; 175 SMALL_RECT scroll;
181 COORD dest; 176 COORD dest;
182 CHAR_INFO fill; 177 CHAR_INFO fill;
@@ -199,8 +194,6 @@ ins_del_lines (int vpos, int n)
199 194
200 dest.X = 0; 195 dest.X = 0;
201 196
202 save_highlight = hl_mode (0);
203
204 fill.Char.AsciiChar = 0x20; 197 fill.Char.AsciiChar = 0x20;
205 fill.Attributes = char_attr_normal; 198 fill.Attributes = char_attr_normal;
206 199
@@ -240,41 +233,6 @@ ins_del_lines (int vpos, int n)
240 233
241 cursor_coords.X = 0; 234 cursor_coords.X = 0;
242 cursor_coords.Y = vpos; 235 cursor_coords.Y = vpos;
243
244 hl_mode (save_highlight);
245}
246
247/* Changes attribute to use when drawing characters to control. */
248static int
249hl_mode (int new_highlight)
250{
251 static int highlight = 0;
252 int old_highlight;
253
254 old_highlight = highlight;
255 highlight = (new_highlight != 0);
256
257 return old_highlight;
258}
259
260/* Call this when about to modify line at position VPOS and change whether it
261 is highlighted. */
262void
263change_line_highlight (int new_highlight, int vpos, int y,
264 int first_unused_hpos)
265{
266 hl_mode (new_highlight);
267 move_cursor (vpos, 0);
268 clear_end_of_line (first_unused_hpos);
269}
270
271/* External interface to control of standout mode. Call this when about to
272 * modify line at position VPOS and not change whether it is highlighted. */
273void
274reassert_line_highlight (int highlight, int vpos)
275{
276 hl_mode (highlight);
277 vpos; /* pedantic compiler silencer */
278} 236}
279 237
280#undef LEFT 238#undef LEFT
@@ -495,8 +453,6 @@ SOUND is nil to use the normal beep.")
495void 453void
496reset_terminal_modes (void) 454reset_terminal_modes (void)
497{ 455{
498 hl_mode (0);
499
500#ifdef USE_SEPARATE_SCREEN 456#ifdef USE_SEPARATE_SCREEN
501 SetConsoleActiveScreenBuffer (prev_screen); 457 SetConsoleActiveScreenBuffer (prev_screen);
502#else 458#else
@@ -510,8 +466,6 @@ set_terminal_modes (void)
510{ 466{
511 CONSOLE_CURSOR_INFO cci; 467 CONSOLE_CURSOR_INFO cci;
512 468
513 hl_mode (0);
514
515 /* make cursor big and visible (100 on Win95 makes it disappear) */ 469 /* make cursor big and visible (100 on Win95 makes it disappear) */
516 cci.dwSize = 99; 470 cci.dwSize = 99;
517 cci.bVisible = TRUE; 471 cci.bVisible = TRUE;
@@ -533,13 +487,11 @@ set_terminal_modes (void)
533void 487void
534update_begin (struct frame * f) 488update_begin (struct frame * f)
535{ 489{
536 hl_mode (0);
537} 490}
538 491
539void 492void
540update_end (struct frame * f) 493update_end (struct frame * f)
541{ 494{
542 hl_mode (0);
543 SetConsoleCursorPosition (cur_screen, cursor_coords); 495 SetConsoleCursorPosition (cur_screen, cursor_coords);
544} 496}
545 497
@@ -561,12 +513,8 @@ w32_face_attributes (f, face_id)
561 int face_id; 513 int face_id;
562{ 514{
563 WORD char_attr; 515 WORD char_attr;
564 int highlight_on_p;
565 struct face *face = FACE_FROM_ID (f, face_id); 516 struct face *face = FACE_FROM_ID (f, face_id);
566 517
567 highlight_on_p = hl_mode (0);
568 hl_mode (highlight_on_p);
569
570 xassert (face != NULL); 518 xassert (face != NULL);
571 519
572 char_attr = char_attr_normal; 520 char_attr = char_attr_normal;
@@ -586,7 +534,7 @@ w32_face_attributes (f, face_id)
586 if (((char_attr & 0x00f0) >> 4) == (char_attr & 0x000f)) 534 if (((char_attr & 0x00f0) >> 4) == (char_attr & 0x000f))
587 char_attr ^= 0x0007; 535 char_attr ^= 0x0007;
588 536
589 if (face->tty_reverse_p || highlight_on_p) 537 if (face->tty_reverse_p)
590 char_attr = (char_attr & 0xff00) + ((char_attr & 0x000f) << 4) 538 char_attr = (char_attr & 0xff00) + ((char_attr & 0x000f) << 4)
591 + ((char_attr & 0x00f0) >> 4); 539 + ((char_attr & 0x00f0) >> 4);
592 540
@@ -632,8 +580,6 @@ initialize_w32_display (void)
632 clear_frame_hook = clear_frame; 580 clear_frame_hook = clear_frame;
633 clear_end_of_line_hook = clear_end_of_line; 581 clear_end_of_line_hook = clear_end_of_line;
634 ins_del_lines_hook = ins_del_lines; 582 ins_del_lines_hook = ins_del_lines;
635 change_line_highlight_hook = change_line_highlight;
636 reassert_line_highlight_hook = reassert_line_highlight;
637 insert_glyphs_hook = insert_glyphs; 583 insert_glyphs_hook = insert_glyphs;
638 write_glyphs_hook = write_glyphs; 584 write_glyphs_hook = write_glyphs;
639 delete_glyphs_hook = delete_glyphs; 585 delete_glyphs_hook = delete_glyphs;
@@ -713,7 +659,6 @@ initialize_w32_display (void)
713 659
714 meta_key = 1; 660 meta_key = 1;
715 char_attr_normal = info.wAttributes; 661 char_attr_normal = info.wAttributes;
716 hl_mode (0);
717 662
718 if (w32_use_full_screen_buffer) 663 if (w32_use_full_screen_buffer)
719 { 664 {