[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions , Volume 2

tgetent, tgetflag, tgetnum, tgetstr, or tgoto Subroutine


Termcap database emulation


Curses Library (libcurses.a)


#include <curses.h>
int tgetent
(char *bp, 
const char *name);
int tgetflag
(char id[2]); 
int tgetnum
(char id[2]);
char *tgetstr
(char id[2], 
char **area);
char *tgoto
(char *cap,
int col,
int row);


The tgetent subroutine looks up the termcap entry for name, The emulation ignores the buffer pointer bp.

The tgetflag subroutine gets the boolean entry for id.

The tgetnum subroutine gets the numeric entry for id.

The tgetstr subroutine gets the string entry for id. If area is not a null pointer and does not point to a null pointer, the tgetstr subroutine 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 subroutine 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 subroutines.




Return Values

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

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

The putc, setupterm (setupterm Subroutine), tigetflg (tigetflag, tigetnum, tigetstr, or tparm Subroutine) subroutines.

Curses Overview for Programming, List of Curses Subroutines, Understanding Terminals with Curses in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.

[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]