curses & terminfo questions
rew
wilber at alice.att.com
Sun Jun 23 13:46:34 AEST 1991
I have a couple of curses and terminfo questions.
First, just what, precisely, does initscr() do? First, can I count on it
having called savetty(), so that
initscr();
resetty();
has the effect of resetting the terminal modes to what they were before
initscr() was called? (And, if so, how does one set the terminal back to
the modes curses uses, after having called resetty()? Calling initscr()
won't do since it will clear out stdscr.)
Second, does initscr() send the termcap "ti"/ terminfo "smcup" (enter cursor
address mode) string and the termcap "vs" / terminfo "cvvis" (cursor very
visible) string?
Basically, I want to know what must be done to provide a "subshell" capability
within a curses program. E.g., "!" gives you a subshell with the terminal
reset to its normal state, and then exiting the subshell puts you back into
curses with the terminal set for full screen cursor addressing. If in fact
initscr does send the ti and vs strings then the subshell routine must undo
this by sending te and ve (and then, when the subshell is exited, resending ti
and vs).
Similarly, precisely what does the terminfo routine setupterm() do?
The documentation I have says it "initializes the terminal". Does that mean
that it frobs around with any ioctl calls for the terminal? If so, what
gets twiddled? And does setupterm() send the smcup string?
Finally, is there any way within curses to find out if a terminal has a
usable standout mode? (I.e., some way to tell if standout() and standend()
are actually doing anything?)
Bob Wilber wilber at homxb.att.com
More information about the Comp.unix.questions
mailing list