From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23578 invoked by alias); 28 Sep 2006 13:13:35 -0000 Received: (qmail 23569 invoked by uid 22791); 28 Sep 2006 13:13:34 -0000 X-Spam-Check-By: sourceware.org Received: from fra-del-03.spheriq.net (HELO fra-del-03.spheriq.net) (195.46.51.99) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 28 Sep 2006 13:13:32 +0000 Received: from fra-out-01.spheriq.net (fra-out-01.spheriq.net [195.46.51.129]) by fra-del-03.spheriq.net with ESMTP id k8SDDTr7026773 for ; Thu, 28 Sep 2006 13:13:29 GMT Received: from fra-cus-02.spheriq.net (fra-cus-02.spheriq.net [195.46.51.38]) by fra-out-01.spheriq.net with ESMTP id k8SDDRiS013536 for ; Thu, 28 Sep 2006 13:13:28 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by fra-cus-02.spheriq.net with ESMTP id k8SDDOFa016518 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Thu, 28 Sep 2006 13:13:26 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 994C6DA47; Thu, 28 Sep 2006 13:13:23 +0000 (GMT) Received: from mail1.cro.st.com (mail1.cro.st.com [164.129.40.131]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 6021847467; Thu, 28 Sep 2006 13:13:23 +0000 (GMT) Received: from st.com (crx1177.cro.st.com [164.129.47.77]) by mail1.cro.st.com (MOS 3.5.8-GR) with ESMTP id CIO09485 (AUTH "denis pilat"); Thu, 28 Sep 2006 15:13:22 +0200 (CEST) Message-ID: <451BCA71.5040109@st.com> Date: Thu, 28 Sep 2006 13:13:00 -0000 From: Denis PILAT User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.0.1) Gecko/20020920 Netscape/7.0 MIME-Version: 1.0 To: bash-maintainers@gnu.org, gdb-patches Subject: [readline] TUI size computation for mingw32 hosts Content-Type: multipart/mixed; boundary="------------010602060607080409040503" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-09/txt/msg00205.txt.bz2 This is a multi-part message in MIME format. --------------010602060607080409040503 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 390 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 --------------010602060607080409040503 Content-Type: text/plain; name="terminal.c.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="terminal.c.patch" Content-length: 641 2006-09-28 Denis Pilat * 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 --------------010602060607080409040503--