This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [readline] TUI size computation for mingw32 hosts
- From: Daniel Jacobowitz <drow at false dot org>
- To: Denis PILAT <denis dot pilat at st dot com>, bash-maintainers at gnu dot org
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Fri, 10 Nov 2006 15:20:15 -0500
- Subject: Re: [readline] TUI size computation for mingw32 hosts
- References: <451BCA71.5040109@st.com>
Hi Chet,
Not sure if you ever saw the attached message. Could you let me know
if this fix is OK for readline, so that I can update GDB's bundled
copy? Thanks in advance.
On Thu, Sep 28, 2006 at 03:13:21PM +0200, Denis PILAT wrote:
> Attached is a patch that fix a problem of calculating console window size
> when gdb is hosted on windows.
>
> I already fixed this problem in gdb 6.4 version, that was integrated into
> readline (cf
> http://sources.redhat.com/ml/gdb-patches/2006-02/msg00245.html)
> , but the readline I got from the 6.5 version cancels the modification
> with some new
> code that overwrote variables I used.
>
>
> Denis
> 2006-09-28 Denis Pilat <denis.pilat@st.com>
>
> * readline/terminal.c (_rl_get_screen_size): use wr and wc variable to store
> window size.
>
>
> Index: terminal.c
> ===================================================================
> --- terminal.c (revision 527)
> +++ terminal.c (working copy)
> @@ -226,8 +226,8 @@ _rl_get_screen_size (tty, ignore_env)
> CONSOLE_SCREEN_BUFFER_INFO scr;
> if (GetConsoleScreenBufferInfo (hConOut, &scr))
> {
> - _rl_screenwidth = scr.dwSize.X;
> - _rl_screenheight = scr.srWindow.Bottom - scr.srWindow.Top + 1;
> + wc = scr.dwSize.X;
> + wr = scr.srWindow.Bottom - scr.srWindow.Top + 1;
> }
> }
> #endif
--
Daniel Jacobowitz
CodeSourcery