Mercurial > emacs
comparison src/w32console.c @ 83336:24c69010999c
Merged from miles@gnu.org--gnu-2005 (patch 470-473)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-470
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-471
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-472
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-473
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-376
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Sun, 10 Jul 2005 19:23:59 +0000 |
parents | a948ecc89102 |
children | a0d1312ede66 f9a65d7ebd29 |
comparison
equal
deleted
inserted
replaced
83335:60208d3a0bb1 | 83336:24c69010999c |
---|---|
633 GetConsoleScreenBufferInfo (cur_screen, &info); | 633 GetConsoleScreenBufferInfo (cur_screen, &info); |
634 | 634 |
635 meta_key = 1; | 635 meta_key = 1; |
636 char_attr_normal = info.wAttributes; | 636 char_attr_normal = info.wAttributes; |
637 | 637 |
638 if (w32_use_full_screen_buffer) | 638 /* Determine if the info returned by GetConsoleScreenBufferInfo |
639 is realistic. Old MS Telnet servers used to only fill out | |
640 the dwSize portion, even modern one fill the whole struct with | |
641 garbage when using non-MS telnet clients. */ | |
642 if ((w32_use_full_screen_buffer | |
643 && (info.dwSize.Y < 20 || info.dwSize.Y > 100 | |
644 || info.dwSize.X < 40 || info.dwSize.X > 200)) | |
645 || (!w32_use_full_screen_buffer | |
646 && (info.srWindow.Bottom - info.srWindow.Top < 20 | |
647 || info.srWindow.Bottom - info.srWindow.Top > 100 | |
648 || info.srWindow.Right - info.srWindow.Left < 40 | |
649 || info.srWindow.Right - info.srWindow.Left > 100))) | |
650 { | |
651 FRAME_LINES (SELECTED_FRAME ()) = 25; | |
652 SET_FRAME_COLS (SELECTED_FRAME (), 80); | |
653 } | |
654 | |
655 else if (w32_use_full_screen_buffer) | |
639 { | 656 { |
640 FRAME_LINES (SELECTED_FRAME ()) = info.dwSize.Y; /* lines per page */ | 657 FRAME_LINES (SELECTED_FRAME ()) = info.dwSize.Y; /* lines per page */ |
641 SET_FRAME_COLS (SELECTED_FRAME (), info.dwSize.X); /* characters per line */ | 658 SET_FRAME_COLS (SELECTED_FRAME (), info.dwSize.X); /* characters per line */ |
642 } | 659 } |
643 else | 660 else |
689 doc: /* Non-nil means make terminal frames use the full screen buffer dimensions. | 706 doc: /* Non-nil means make terminal frames use the full screen buffer dimensions. |
690 This is desirable when running Emacs over telnet, and is the default. | 707 This is desirable when running Emacs over telnet, and is the default. |
691 A value of nil means use the current console window dimensions; this | 708 A value of nil means use the current console window dimensions; this |
692 may be preferrable when working directly at the console with a large | 709 may be preferrable when working directly at the console with a large |
693 scroll-back buffer. */); | 710 scroll-back buffer. */); |
694 w32_use_full_screen_buffer = 1; | 711 w32_use_full_screen_buffer = 0; |
695 | 712 |
696 defsubr (&Sset_screen_color); | 713 defsubr (&Sset_screen_color); |
697 defsubr (&Sset_cursor_size); | 714 defsubr (&Sset_cursor_size); |
698 defsubr (&Sset_message_beep); | 715 defsubr (&Sset_message_beep); |
699 } | 716 } |