1c1
< /* $FreeBSD: head/contrib/libreadline/terminal.c 157195 2006-03-27 23:53:05Z ache $ */
---
> /* $FreeBSD: head/contrib/libreadline/terminal.c 165675 2006-12-31 09:22:31Z ache $ */
4c4
< /* Copyright (C) 1996-2005 Free Software Foundation, Inc.
---
> /* Copyright (C) 1996-2006 Free Software Foundation, Inc.
69a70,80
> #if defined (__MINGW32__)
> # include <windows.h>
> # include <wincon.h>
>
> static void _win_get_screensize PARAMS((int *, int *));
> #endif
>
> #if defined (__EMX__)
> static void _emx_get_screensize PARAMS((int *, int *));
> #endif
>
73c84,87
< int rl_prefer_env_winsize;
---
> /* If the calling application sets this to a non-zero value, readline will
> use the $LINES and $COLUMNS environment variables to set its idea of the
> window size before interrogating the kernel. */
> int rl_prefer_env_winsize = 0;
115d128
< #if defined (HACK_TERMCAP_MOTION)
117d129
< #endif /* HACK_TERMCAP_MOTION */
187a200,219
> #if defined (__MINGW32__)
> static void
> _win_get_screensize (swp, shp)
> int *swp, *shp;
> {
> HANDLE hConOut;
> CONSOLE_SCREEN_BUFFER_INFO scr;
>
> hConOut = GetStdHandle (STD_OUTPUT_HANDLE);
> if (hConOut != INVALID_HANDLE_VALUE)
> {
> if (GetConsoleScreenBufferInfo (hConOut, &scr))
> {
> *swp = scr.dwSize.X;
> *shp = scr.srWindow.Bottom - scr.srWindow.Top + 1;
> }
> }
> }
> #endif
>
212c244,246
< _emx_get_screensize (&_rl_screenwidth, &_rl_screenheight);
---
> _emx_get_screensize (&wc, &wr);
> #elif defined (__MINGW32__)
> _win_get_screensize (&wc, &wr);
362d395
< #if defined (HACK_TERMCAP_MOTION)
364d396
< #endif
461,463c493
< #if defined (HACK_TERMCAP_MOTION)
< term_forward_char = (char *)NULL;
< #endif
---
> _rl_term_forward_char = (char *)NULL;
< /* $FreeBSD: head/contrib/libreadline/terminal.c 157195 2006-03-27 23:53:05Z ache $ */
---
> /* $FreeBSD: head/contrib/libreadline/terminal.c 165675 2006-12-31 09:22:31Z ache $ */
4c4
< /* Copyright (C) 1996-2005 Free Software Foundation, Inc.
---
> /* Copyright (C) 1996-2006 Free Software Foundation, Inc.
69a70,80
> #if defined (__MINGW32__)
> # include <windows.h>
> # include <wincon.h>
>
> static void _win_get_screensize PARAMS((int *, int *));
> #endif
>
> #if defined (__EMX__)
> static void _emx_get_screensize PARAMS((int *, int *));
> #endif
>
73c84,87
< int rl_prefer_env_winsize;
---
> /* If the calling application sets this to a non-zero value, readline will
> use the $LINES and $COLUMNS environment variables to set its idea of the
> window size before interrogating the kernel. */
> int rl_prefer_env_winsize = 0;
115d128
< #if defined (HACK_TERMCAP_MOTION)
117d129
< #endif /* HACK_TERMCAP_MOTION */
187a200,219
> #if defined (__MINGW32__)
> static void
> _win_get_screensize (swp, shp)
> int *swp, *shp;
> {
> HANDLE hConOut;
> CONSOLE_SCREEN_BUFFER_INFO scr;
>
> hConOut = GetStdHandle (STD_OUTPUT_HANDLE);
> if (hConOut != INVALID_HANDLE_VALUE)
> {
> if (GetConsoleScreenBufferInfo (hConOut, &scr))
> {
> *swp = scr.dwSize.X;
> *shp = scr.srWindow.Bottom - scr.srWindow.Top + 1;
> }
> }
> }
> #endif
>
212c244,246
< _emx_get_screensize (&_rl_screenwidth, &_rl_screenheight);
---
> _emx_get_screensize (&wc, &wr);
> #elif defined (__MINGW32__)
> _win_get_screensize (&wc, &wr);
362d395
< #if defined (HACK_TERMCAP_MOTION)
364d396
< #endif
461,463c493
< #if defined (HACK_TERMCAP_MOTION)
< term_forward_char = (char *)NULL;
< #endif
---
> _rl_term_forward_char = (char *)NULL;