Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tigetflag(3X) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

curses(3X)

tgetent(3X)

putp(3X)

terminfo(4)

term(5)

tigetflag(3X)                                                 tigetflag(3X)

NAME
     tigetflag, tigetnum, tigetstr, tparm - retrieve capabilities from the
     terminfo database

SYNOPSIS
     cc [flag ...] file ... -lcurses [library ...]

     #include <term.h>

     int tigetflag(char *capname);

     int tigetnum(char *capname);

     char *tigetstr(char *capname);

     char *tparm(char *cap, long p1, long p2, long p3, long p4,
           long p5, long p6, long p7, long p8, long p9);

DESCRIPTION
     The tigetflag(), tigetnum(), and tigetstr() functions obtain boolean,
     numeric and string capabilities, respectively, from the selected
     record of the terminfo database. For each capability, the value to use
     as capname appears in the Capname column in the table in terminfo(4).

     The tparm() function takes as cap a string capability. If cap is
     parameterised (as described in "X/Open Curses, Issue 4, Version 2,
     Section A.1.2"), tparm() resolves the parameterisation. If the
     parameterised string refers to parameters %p1 through %p9, then
     tparm() substitutes the values of p1 through p9, respectively.

RETURN VALUE
     Upon successful completion, tigetflg(), tigetnum() and tigetstr()
     return the specified capability. The tigetflag() function returns -2
     if capname is not a boolean capability. The tigetnum() function
     returns -2 if capname is not a numeric capability. The tigetstr()
     function returns (char *)-1 if capname is not a string capability.

     Upon successful completion, tparm() returns str with parameterisation
     resolved. Otherwise, it returns a null pointer.

ERRORS
     No errors are defined.

NOTES
     For parameterised string capabilities, the application should pass the
     return value from tigetstr() to tparm(), as described above.

     Applications intending to send terminal capabilities directly to the
     terminal (which should only be done using tputs() or putp()) instead
     of using Curses, normally should obey the following rules:





Page 1                       Reliant UNIX 5.44                Printed 11/98

tigetflag(3X)                                                 tigetflag(3X)

     -  Call resetshellmode() to restore the display modes before exit-
        ing.

     -  If using cursor addressing, output entercamode upon startup and
        output exitcamode before exiting.

     -  If using shell escapes, output exitcamode and call
        resetshellmode() before calling the shell; call resetprogmode()
        and output entercamode after returning from the shell.

     All parameterised terminal capabilities defined in terminfo(4) can be
     passed to tparm(). Some implementations create their own capabilities,
     create capabilities for non-terminal devices, and redefine the capa-
     bilities in terminfo(4). These practices are non-conforming because it
     may be that tparm() cannot parse these user-defined strings.

SEE ALSO
     curses(3X), defprogmode(3X), tgetent(3X), putp(3X), terminfo(4),
     term(5).



































Page 2                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026