[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Wed, 23 May 2007 13:45:13 +0100 (BST)
I've got a few questions, as I've been for a time
already trying to understand how curses works, though
I haven't yet.
First questions are about terminfo, which is why I'm
about now. While trying to use it (rather than curses
or termcap emulation), I'm finding a problem I cannot
If I set foreground and background colors, then write
some text, and then send a clr_eol, those parts "not
controlled" by the terminal interface gets twisted,
which doesn't happend if I don't send the clr_eol.
I've done a test case (for xterm-256color), and have
ulpoaded a few screenshots for this, so I'm not
The following screenshot:
shows the output while under the `sleep' you can see
on this test case:
If during that sleep I give another window the focus
and get back to it before it's done, I get to see
I thought this had something to do with the fact that
I'm using fullscreen. I can notice non-desired color
appears on those parts of the screen where character
cells doesn't fit, and somehow it might not be used or
updated by curses libs.
All that I can say is that I couldn't see this
happening back when I used curses routines.
However, when using termingo I can also see this
happening within a "standard-sized" terminal, as you
can see in the followin two screenshots. I just
changed the colors so they would be more noticeable:
Because of this, my best guess is that I'm not using
terminfo correctly, rather than this being a bug
within either ncurses (from which I'm running last
without any patches applied) or xterm (version 223)
The next question about terminfo is why mvcur doesn't
move the cursor straight away as it says it should.
I've tested it right after a clr_screen and passing
to it, both, (0, 0, 5, 5) and (-1, -1, 5, 5), but
can't see the cursor moving anywhere.
Another thing I've been looking for but haven't found
is how does curses do so when within an appl. pressing
shift+PgUp doesn't cause the screen to scroll, hence
showing what you typed before launchng that app. on
the terminal. I can see emacs doesn't handle this, but
I'd like to.
and my last question is about ncurses source code
itself, It might seem too dumb, I feel actually a bit
embarrased about asking it, but well.
Everytime I try to look at it's source code when I
find any problems I end up giving away because of not
being able to find code for some functions.
I use cscope and have a recursive database within
ncurses' source root dir. Taking the following
definition as example:
extern NCURSES_EXPORT(char *) _nc_trace_ttymode(TTY
where am I supossed to see code for that function? the
expanded version of it should look like this:
extern char * __cdecl _nc_trace_ttymode(TTY *tty);
but I can't find that function being defined elsewhere
in a c module, so I can't see it's code anywhere.
Things like this are what are stopping me from
understanding curses internally, isn't there any
document explaning how curses works in deep, or
could someone tell me where should I start looking at
it's source code?
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
- various questions,
chinlu chinawa <=