On Thu, Sep 04, 2008 at 06:25:48AM +1000, Peter Chubb wrote: > >>>>> "Thomas" == Thomas Dickey <[EMAIL PROTECTED]> writes: > > Thomas> On Wed, Sep 03, 2008 at 01:10:14AM +0200, Peter Chubb wrote: > >> Hi Ian, Here's the patch to fix three issues: ski was looking > >> inside a private data structure for ncurses, so when libbfd was > >> available, it FTBFS. > >> > >> Also, there was a memory leak (about 240 bytes for each line > >> disassembled) and an incompatibility with the latest libcurses (An > >> explicit \r blanks the line nowadays). > > Thomas> hmm - \r, or \n? > > Thomas> man addch says something like > > Thomas> If ch is a tab, newline, or backspace, the cursor is > Thomas> moved appropriately within the window. A newline also does a > Thomas> clrtoeol() before moving. Tabs are considered to be at every > Thomas> ... > > It's the combination that's deadly. We need to keep the clr to eol; > but at thye current cursor position, not the start of the line. Doing > \r\n means move to start of line, then clear to end of line, then move > to next line ... which of course clears the entire line that's just > been printed out, giving a blank line instead of a line of > disassembled instructions.
\n\r would work (I suppose that the problem is that sometimes you're writing via curses, sometimes via a regular tty driver - where that would make a difference). -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net
pgp0ZSvo9UPel.pgp
Description: PGP signature