bug-ncurses
[Top][All Lists]
Advanced

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

Re: screen and curses problem


From: Thomas Dickey
Subject: Re: screen and curses problem
Date: Tue, 3 Jul 2007 07:16:00 -0400 (EDT)

On Tue, 3 Jul 2007, Miroslaw Dach wrote:

Hi Thomas,

Do you have any idea what could be wrong?

no - the closest I recall in this area is a memory-leak in the tgetent()
code.  But that should not cause a failure after only a few tries.

You may be able to see more by configuring ncurses --with-trace, and
tracing calls in the result.


I have recompiled ncurses with option --with-trace but could you give me
some hints how to trace what is going on when using ncurses.

When it's active, it writes to the file "trace" in the current directory.

There are two ways to turn on the tracing: the $NCURSES_TRACE environment variable, and the trace() function. I usually use the environment variable since it does not require modifying the application. (But note that setting it affects any subprocess, and tracing is intended for only one process).

The environment variable is checked in newterm and initscr - I don't
recall if tgetent's calling anything that checks it, so you may have
to make screen call trace().

The values for NCURSES_TRACE are a bitmask defined in curses.h (and in the curs_trace.3x manpage file). Looking in curses.h, you'll see definitions for TRACE_ORDINARY, etc. screen doesn't use much of ncurses, so setting it to TRACE_MAXIMUM won't give _too_ large a trace file.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




reply via email to

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