- /* For MinGW, we get the console size from the Windows API. */
-#if defined (__MINGW32__)
- HANDLE hConOut = GetStdHandle (STD_OUTPUT_HANDLE);
- if (hConOut != INVALID_HANDLE_VALUE)
- {
- CONSOLE_SCREEN_BUFFER_INFO scr;
- if (GetConsoleScreenBufferInfo (hConOut, &scr))
- {
- wc = scr.dwSize.X;
- wr = scr.srWindow.Bottom - scr.srWindow.Top + 1;
- }
- }
-#endif
-