Newsgroups: comp.unix.programmer Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!ficc!peter From: peter@ficc.ferranti.com (Peter da Silva) Subject: Re: termcap str + params -> control seq. How? Message-ID: Reply-To: peter@ficc.ferranti.com (Peter da Silva) Organization: Xenix Support, FICC References: <12587@hydra.Helsinki.FI> <1991Apr02.223345.15465@buster.stafford.tx.us> Date: Wed, 3 Apr 91 18:43:04 GMT In article <1991Apr02.223345.15465@buster.stafford.tx.us> rli@buster.stafford.tx.us writes: > peter@ficc.ferranti.com (Peter da Silva) writes: > >In article <12587@hydra.Helsinki.FI> kankkune@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@ferranti.com +1 713 274 5180. 'U` "Have you hugged your wolf today?"