termcap str + params -> control seq. How?
Peter da Silva
peter at ficc.ferranti.com
Thu Apr 4 04:43:04 AEST 1991
In article <1991Apr02.223345.15465 at buster.stafford.tx.us> rli at buster.stafford.tx.us writes:
> peter at ficc.ferranti.com (Peter da Silva) writes:
> >In article <12587 at hydra.Helsinki.FI> kankkune at cs.Helsinki.FI (Risto Kankkunen) writes:
> >> What is the standard way to apply parameters to the termcap strings you
> >> have read with tgetent?
> >tgoto.
> WRONG ANSWER:
> tparm( str, p1, p2, p3, ...)
> is the proper way to instantiate strings with parameters.
Really. Termcap, termcap... let's see what the manual says:
tgetent, check.
tgetnum, check.
tgetflag, check.
tgetstr, check.
tgoto, check.
tputs, check.
tparm... um...
Not in Xenix/286, let's try System V.2... It's under "curses... termcap
emulation". OK:
tgetent, check.
tgetflag, check.
tgetnum, check.
tgetstr, check.
tgoto, check.
tputs, check.
tparm... um...
Someone's swiped my V.3.2 manuals, but nm /usr/lib/libcurses.a shows there
*is* an entry for tparm. So it showed up in V.3.2. After some digging, I found
it in SunOS but not in BSD. Under the System V compatibility library. Yep,
it's a V.3 thing.
> Newsgroups: comp.unix.programmer
Now if this was comp.unix.sysv386 you might have a point.
> Also,
> tputs() is the method used to output non cursor positioning
> strings after instantiation. tgoto() is a special case and is
> only used for cursor positioning, which means that it is *very*
> tied to cm.
It's used for expanding "cs", too, at the very least.
> This is all defined in the manual under curses(3x).
Whose manual?
If you're using termcap in the first place, rather than terminfo or curses,
portability is obviously a concern. In that case it behooves you to use the
least common denominator.
tgoto.
--
Peter da Silva. `-_-' peter at ferranti.com
+1 713 274 5180. 'U` "Have you hugged your wolf today?"
More information about the Comp.unix.programmer
mailing list