diff options
| author | Miles Bader | 2001-10-20 05:50:33 +0000 |
|---|---|---|
| committer | Miles Bader | 2001-10-20 05:50:33 +0000 |
| commit | e850a61568ec13d52c3d9487bcebec37bafb8217 (patch) | |
| tree | ebf8a38f4f853fb56d19d10f1c9b2b5a189e06c1 /src | |
| parent | e617a35b400d43a2d00dc5a3f069bffdb7b37ad4 (diff) | |
| download | emacs-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.c | 59 |
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); | |||
| 58 | static void clear_frame (void); | 58 | static void clear_frame (void); |
| 59 | static void clear_end_of_line (int); | 59 | static void clear_end_of_line (int); |
| 60 | static void ins_del_lines (int vpos, int n); | 60 | static void ins_del_lines (int vpos, int n); |
| 61 | static void change_line_highlight (int, int, int, int); | ||
| 62 | static void reassert_line_highlight (int, int); | ||
| 63 | static void insert_glyphs (struct glyph *start, int len); | 61 | static void insert_glyphs (struct glyph *start, int len); |
| 64 | static void write_glyphs (struct glyph *string, int len); | 62 | static void write_glyphs (struct glyph *string, int len); |
| 65 | static void delete_glyphs (int n); | 63 | static void delete_glyphs (int n); |
| @@ -70,7 +68,6 @@ static void set_terminal_window (int size); | |||
| 70 | static void update_begin (struct frame * f); | 68 | static void update_begin (struct frame * f); |
| 71 | static void update_end (struct frame * f); | 69 | static void update_end (struct frame * f); |
| 72 | static WORD w32_face_attributes (struct frame *f, int face_id); | 70 | static WORD w32_face_attributes (struct frame *f, int face_id); |
| 73 | static int hl_mode (int new_highlight); | ||
| 74 | 71 | ||
| 75 | static COORD cursor_coords; | 72 | static COORD cursor_coords; |
| 76 | static HANDLE prev_screen, cur_screen; | 73 | static 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) | |||
| 176 | void | 171 | void |
| 177 | ins_del_lines (int vpos, int n) | 172 | ins_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. */ | ||
| 248 | static int | ||
| 249 | hl_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. */ | ||
| 262 | void | ||
| 263 | change_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. */ | ||
| 273 | void | ||
| 274 | reassert_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.") | |||
| 495 | void | 453 | void |
| 496 | reset_terminal_modes (void) | 454 | reset_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) | |||
| 533 | void | 487 | void |
| 534 | update_begin (struct frame * f) | 488 | update_begin (struct frame * f) |
| 535 | { | 489 | { |
| 536 | hl_mode (0); | ||
| 537 | } | 490 | } |
| 538 | 491 | ||
| 539 | void | 492 | void |
| 540 | update_end (struct frame * f) | 493 | update_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 | { |