DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

tgetent(3curses)


tgetent -- termcap database emulation (TO BE WITHDRAWN)

Synopsis

cc [options] file -lcurses
#include <term.h>

int tgetent(char *bp, const char *name);

int tgetflag(char id2);

int tgetnum(char id2);

char *tgetstr(char id2, char **area);

char *tgoto(char *cap, int col, int row);

Description

The tgetent(3curses) function looks up the termcap entry for name. The emulation ignores the buffer pointer bp.

The tgetflag(3curses) function gets the boolean entry for id.

The tgetnum(3curses) function gets the numeric entry for id.

The tgetstr(3curses) function gets the string entry for id. If area is not a null pointer and does not point to a null pointer, tgetstr(3curses) copies the string entry into the buffer pointed to by *area and advances the variable pointed to by area to the first byte after the copy of the string entry.

The tgoto(3curses) function instantiates the parameters col and row into the capability cap and returns a pointer to the resulting string.

All of the information available in the terminfo database need not be available through these functions.

Return value

Upon successful completion, functions that return an integer return OK. Otherwise, they return ERR.

Functions that return pointers return a null pointer on error.

Errors

No errors are defined.

Usage

These functions are included as a conversion aid for programs that use the termcap library. Their arguments are the same and the functions are emulated using the terminfo database.

These functions are only guaranteed to operate reliably on character sets in which each character fits into a single byte, whose attributes can be expressed using only constants with the A_ prefix.

Any terminal capabilities from the terminfo database that cannot be retrieved using these interfaces can be retrieved using the interfaces described on the tigetflag(3curses) page.

Portable applications must use tputs(3curses) to output the strings returned by tgetstr(3curses) and tgoto(3curses).

Standards Conformance

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

References

putc(3S), setupterm(3curses), tigetflag(3curses), term(4)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004