Sans ncurses

Karl Pearson karlp at ourldsfamily.com
Thu Jun 10 03:26:12 UTC 2004


On Wed, June 9, 2004 10:17 am, Rick Stevens said:
>> I'll get to it but hope someone has experience with this and can point
>> me in the right direction.
>
> Take a look at the termcap or terminfo entry for your terminal type.
> Do an "echo $TERM" to find out which kind of terminal you're emulating
> (odds are it's "xterm"), then edit /etc/termcap and look for the
> entry that matches (for xterms, the primary entry is "xterm-xfree86").
> The stuff in that entry show what escape sequences do what (do "man
> termcap" for a list of what the entries mean).

I've found that tput cup will do screen positioning. It's as easy as using
the names used in the terminfo file after re-composing the entry and then
seeing what's named what. For example, tput clear will clear the screen
(duh) and tput home with send the cursor to 0,0 without clearing the
screen.

The problem I've found is that it's way slow. I suspect it's because it
has to call tput which in term looks up the term type (I use uvxterms, a
kluged term type I created with line drawing and other extensions), then
parses through the terminfo DB to get what 'home' means, then escapes the
sequence it finds. For simple things, I don't mind, but this program,
which I've started to write, is pretty intensive, so the slowness may be a
'deal buster'.

Thanks Rick. Good info. I'll look into it to see if it's faster than tput...

Karl





More information about the Redhat-install-list mailing list