+2012-10-18 Joel Brobecker <brobecker@adacore.com>
+
+ * terminal.c: Remove duplicate includes of windows.h and
+ wincon.h.
+ (_rl_get_screen_size): Remove redundant code for MinGW getting
+ the console size from the Windows API.
+
2012-02-24 Pierre Muller <muller@ics.u-strasbg.fr>
* signals.c (_rl_block_sigwinch, _rl_release_sigwinch): Add
static void _emx_get_screensize PARAMS((int *, int *));
#endif
-#if defined (__MINGW32__)
-# include <windows.h>
-# include <wincon.h>
-#endif
-
#define CUSTOM_REDISPLAY_FUNC() (rl_redisplay_function != rl_redisplay)
#define CUSTOM_INPUT_FUNC() (rl_getc_function != rl_getc)
}
#endif /* TIOCGWINSZ */
- /* 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
-
#if defined (__EMX__)
_emx_get_screensize (&wc, &wr);
#elif defined (__MINGW32__)