From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26187 invoked by alias); 10 Feb 2006 15:41:59 -0000 Received: (qmail 26175 invoked by uid 22791); 10 Feb 2006 15:41:57 -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; Fri, 10 Feb 2006 15:41:53 +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 k1AFfo37002819 for ; Fri, 10 Feb 2006 15:41:50 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 k1AFfipO019787 for ; Fri, 10 Feb 2006 15:41:49 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 k1AFfh2Z012185 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Fri, 10 Feb 2006 15:41:44 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 C270ADA43; Fri, 10 Feb 2006 15:41:38 +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 1F33B47678; Fri, 10 Feb 2006 15:45:11 +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 CGQ94097 (AUTH "denis pilat"); Fri, 10 Feb 2006 16:41:29 +0100 (CET) Message-ID: <43ECB429.6070003@st.com> Date: Fri, 10 Feb 2006 15:41: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: Daniel Jacobowitz Cc: Andrew STUBBS , Eli Zaretskii , gdb-patches@sources.redhat.com, bash-maintainers@gnu.org Subject: Re: [readline-mingw] backspace key and TUI size References: <43E9A5B1.1030001@st.com> <20060208134335.GA22980@nevyn.them.org> <43EA1655.609@st.com> <20060208161452.GA26965@nevyn.them.org> <43EA201B.5080305@st.com> <20060208165114.GA28698@nevyn.them.org> <43EA2A39.4000107@st.com> <20060208173951.GA31572@nevyn.them.org> <43EB0CF9.1080406@st.com> <20060209134942.GA23253@nevyn.them.org> Content-Type: multipart/mixed; boundary="------------020404090409040601020203" X-O-Spoofed: Not Scanned X-O-General-Status: No X-O-Spam1-Status: Not Scanned X-O-Spam2-Status: Not Scanned X-O-URL-Status: Not Scanned X-O-Virus1-Status: No X-O-Virus2-Status: Not Scanned X-O-Virus3-Status: No X-O-Virus4-Status: No X-O-Virus5-Status: Not Scanned X-O-Image-Status: Not Scanned X-O-Attach-Status: Not Scanned X-SpheriQ-Ver: 4.2.01 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-02/txt/msg00245.txt.bz2 This is a multi-part message in MIME format. --------------020404090409040601020203 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 235 Daniel Jacobowitz wrote >>Regarding the TUI size, the approach seems to be fine, can I send you a >>new patch whith a ChangeLog for that ? >> >> > >Yes, please. > > > Attached is the new proposal with only TUI stuffs. Denis --------------020404090409040601020203 Content-Type: text/plain; name="readline.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="readline.patch" Content-length: 1037 Index: terminal.c =================================================================== --- terminal.c (revision 264) +++ terminal.c (working copy) @@ -70,6 +70,11 @@ #include "rlshell.h" #include "xmalloc.h" +#if defined (__MINGW32__) +# include +# include +#endif + #define CUSTOM_REDISPLAY_FUNC() (rl_redisplay_function != rl_redisplay) #define CUSTOM_INPUT_FUNC() (rl_getc_function != rl_getc) @@ -201,6 +206,20 @@ struct winsize window_size; #endif /* TIOCGWINSZ */ +/* For mingw version, we get console size from 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) ) + { + _rl_screenwidth = scr.dwSize.X; + _rl_screenheight = scr.srWindow.Bottom - scr.srWindow.Top + 1; + } + } +#endif + #if defined (TIOCGWINSZ) if (ioctl (tty, TIOCGWINSZ, &window_size) == 0) { --------------020404090409040601020203 Content-Type: text/plain; name="ChangeLog.gdb" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ChangeLog.gdb" Content-length: 159 2005-02-10 Denis Pilat * readline/terminal.c (_rl_get_screen_size): we get console size from windows API when compiling with minGW. --------------020404090409040601020203--