[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mvwprintw

From: Bob Rossi
Subject: Re: mvwprintw
Date: Mon, 3 Apr 2006 17:15:19 -0400
User-agent: Mutt/1.5.9i

On Mon, Apr 03, 2006 at 03:35:09PM -0400, Thomas Dickey wrote:
> On Mon, 3 Apr 2006, Bob Rossi wrote:
> >After ncurses calls tty_update.c:854 _nc_flush();
> >I see the corruption. What do you think? My fault writing data to
> >stdout or ncurses corruption?
> That's essentially calling
>       fflush(stdout);
> so anything written by ncurses or other functions to stdout would be
> written then.
> Note that PUTC() is a large macro defined in ncurses/curses.priv.h,
> so the actual bytes may be corrupted in that chunk of code.
> (I'm not home - will read the trace there).

OK, I've got more info. I've tracked it down to here
 tputs(buffer, 1, _nc_outch);

If I put a _nc_flush () call before that, there is no error. An 
_nc_flush () after that line produces the corrupted terminal. 

(tgdb) p buffer
$1 =   "."

For some reason, I can't step into tputs to debug it. Any idea why?

However, I can set a breakpoint on _nc_outch. From the tputs call,
_nc_outch get's called with 
(tgdb) p ch
$1 = 49
(tgdb) p (char)ch
$2 = 49 '1'

and it goes into the branch

putc(ch, NC_OUTPUT);
(tgdb) p ch
$3 = 67
(tgdb) p (char)ch
$4 = 67 'C'

and it goes into the branch

putc(ch, NC_OUTPUT);

Is this expected?

Bob Rossi

reply via email to

[Prev in Thread] Current Thread [Next in Thread]