From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2322 invoked by alias); 24 Feb 2006 08:34:51 -0000 Received: (qmail 2314 invoked by uid 22791); 24 Feb 2006 08:34:50 -0000 X-Spam-Check-By: sourceware.org Received: from romy.inter.net.il (HELO romy.inter.net.il) (192.114.186.66) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 24 Feb 2006 08:34:50 +0000 Received: from HOME-C4E4A596F7 (IGLD-83-130-198-86.inter.net.il [83.130.198.86]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id DPZ54555 (AUTH halo1); Fri, 24 Feb 2006 10:34:44 +0200 (IST) Date: Fri, 24 Feb 2006 08:36:00 -0000 Message-Id: From: Eli Zaretskii To: Denis PILAT , Andrew STUBBS CC: gdb-patches@sources.redhat.com, bash-maintainers@gnu.org In-reply-to: <20060223182145.GA25411@nevyn.them.org> (message from Daniel Jacobowitz on Thu, 23 Feb 2006 13:21:45 -0500) Subject: Re: [readline-mingw] backspace key and TUI size Reply-to: Eli Zaretskii References: <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> <43ECB429.6070003@st.com> <20060220153647.GA16058@nevyn.them.org> <20060223182145.GA25411@nevyn.them.org> 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/msg00457.txt.bz2 > Date: Thu, 23 Feb 2006 13:21:45 -0500 > From: Daniel Jacobowitz > > This gets show width and show height to work on Windows consoles, and > probably helps the TUI. However, it does not fix paging. I'm not > planning to fix it, either - I wasted all morning on it. Here's the > story in case someone else goes down the same rathole someday. FWIW, paging does work in the DJGPP port, so you may wish to take a look at how it does that. > First, GDB disables paging because tgetnum ("li") fails, so it assumes > we're in a non-console environment. You will see that the DJGPP port ifdef's around that code in utils.c. > Next, readline sets cols to 79 instead of 80 because we don't have > both automatic margins ("am") and ignored newlines beyond the automatic > margins ("xn"). This causes utils.c to start printing the prompt > at the last column of the previous line instead of the first column > of the next line. This part I don't understand: it doesn't happen with DJGPP, AFAICS, but I don't see any ifdefs in the code to explain the difference. Can you post a short test case that exhibits this problem, and show the code that causes utils.c to print the prompt at the wrong place? > I think it'll happen on any terminal without "xn", given the current > logic in gdb and readline, whether or not the terminal has "am". > But I don't know any other platform using such a terminal at the > moment I think DJGPP is one such other platform.