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

Technical Reference: Base Operating System and Extensions, Volume 2

tgetent, tgetflag, tgetnum, tgetstr, or tgoto Subroutine

Purpose

Termcap database emulation

Library

Curses Library (libcurses.a)

Syntax

#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);

Description

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.

Parameters

bp  
name  
col  
row  
**area  
cap

id[2]

Return Values

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

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.2 General Programming Concepts: Writing and Debugging Programs.

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