diff options
author | Joel Brobecker <brobecker@gnat.com> | 2012-10-18 18:55:41 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2012-10-18 18:55:41 +0000 |
commit | f462b01f69c185f714d410e8f8a3f2146868a269 (patch) | |
tree | 71bdf86cc99d61822522855ced01f9b26d60099c | |
parent | a29a8af823af0415dae4d3b2ffd60cb3b53ec011 (diff) | |
download | gdb-f462b01f69c185f714d410e8f8a3f2146868a269.zip gdb-f462b01f69c185f714d410e8f8a3f2146868a269.tar.gz gdb-f462b01f69c185f714d410e8f8a3f2146868a269.tar.bz2 |
Remove some extraneous changes in readline/terminal.c
This patch removes some unnecessary differences between the official
version of readline, and GDB's copy of it.
readline/ChangeLog.gdb:
* 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.
-rw-r--r-- | readline/ChangeLog.gdb | 7 | ||||
-rw-r--r-- | readline/terminal.c | 19 |
2 files changed, 7 insertions, 19 deletions
diff --git a/readline/ChangeLog.gdb b/readline/ChangeLog.gdb index 276b1c8..7e0d264 100644 --- a/readline/ChangeLog.gdb +++ b/readline/ChangeLog.gdb @@ -1,3 +1,10 @@ +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 diff --git a/readline/terminal.c b/readline/terminal.c index 255b5e6..8094186 100644 --- a/readline/terminal.c +++ b/readline/terminal.c @@ -81,11 +81,6 @@ static void _win_get_screensize PARAMS((int *, int *)); 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) @@ -250,20 +245,6 @@ _rl_get_screen_size (tty, ignore_env) } #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__) |