+ /* Determine if the info returned by GetConsoleScreenBufferInfo
+ is realistic. Old MS Telnet servers used to only fill out
+ the dwSize portion, even modern one fill the whole struct with
+ garbage when using non-MS telnet clients. */
+ if ((w32_use_full_screen_buffer
+ && (info.dwSize.Y < 20 || info.dwSize.Y > 100
+ || info.dwSize.X < 40 || info.dwSize.X > 200))
+ || (!w32_use_full_screen_buffer
+ && (info.srWindow.Bottom - info.srWindow.Top < 20
+ || info.srWindow.Bottom - info.srWindow.Top > 100
+ || info.srWindow.Right - info.srWindow.Left < 40
+ || info.srWindow.Right - info.srWindow.Left > 100)))
+ {
+ FRAME_LINES (SELECTED_FRAME ()) = 25;
+ SET_FRAME_COLS (SELECTED_FRAME (), 80);
+ }
+
+ else if (w32_use_full_screen_buffer)