stefan@spcc386.UUCP (Stefan Posthuma) (06/28/89)
On Xenix 386 (2.3.1), I am writing a screen-oriented program. Now I want to get rid of the cursor on the screen. Since all terminals we use can do this, I added the 'civis' and the 'cnormal' descriptions to the terminfo database entries. So 'tput civis' and 'tput cnormal' work perfectly well. But now I want to use these capabilities in my program. I haven't found any standard Terminfo routines to do this, and I don't know how to read the Terminfo database directly without a lot of trouble. Right now I use 'system("tput civis")' calls to control the cursor, but I don't like the extra processes and the time it takes. Any suggestions? -------------------------------------------------------------------------------- "Oh my God, it is the attack of the Half-Crazed Mutant Teenage Alien Computer Junkies!!" +------------------------------------ "Relax! It are just some SPCC employees" | uunet!mcvax!spcc386!stefan -------------------------------------------+ Anything I said has been used against me.
daveh@marob.masa.com (Dave Hammond) (06/29/89)
In article <255@spcc386.UUCP> stefan@spcc386.UUCP (Stefan Posthuma) writes: >[... re: cursor visbility control ...] >But now I want to use these capabilities in my program. I haven't found any >standard Terminfo routines to do this, and I don't know how to read the >Terminfo database directly without a lot of trouble. The AT&T man entry (sorry, no Xenix manuals handy) for terminfo defines the function `curs_set': curs_set(visibility) The cursor state is set to invisible, normal, or very visibile for _visibility_ equal to 0, 1, or 2. The previous visibility is returned (or -1 for terminals w/out the required support). BTW, a quick `nm -ng /lib/386/Slibtinfo.a' shows entry points for curs_set(). Documented or not, the function exists in the Xenix terminfo. -- Dave Hammond daveh@marob.masa.com