DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

tigetflag(3curses)


tigetflag -- retrieve capabilities from the terminfo database

Synopsis

cc [options] file -lcurses
#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(3curses), tigetnum(3curses), and tigetstr(3curses) 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 tables in terminfo(4).

The tparm(3curses) function takes as cap a string capability. If cap is parameterised tparm(3curses) resolves the parameterisation. If the parameterised string refers to parameters p1 through %p9, then tparm(3curses) substitutes the values of p1 through p9, respectively.

Return value

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

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

Errors

No errors are defined.

Usage

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

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

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

Standards Conformance

The Single UNIX Specification, Version 2; The Open Group.

References

def_prog_mode(3curses), tgetent(3curses), putp(3curses), term(4)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004