xref: /illumos-gate/usr/src/man/man3curses/curs_termcap.3curses (revision 6dde88b51419b99fe0aab8e56184c693945826b8)
te
Copyright 1989 AT&T
Portions Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
CURS_TERMCAP 3CURSES "Dec 31, 1996"
NAME
curs_termcap, tgetent, tgetflag, tgetnum, tgetstr, tgoto - curses interfaces (emulated) to the termcap library
SYNOPSIS

cc [ flag ... ] file ... -lcurses [ library ... ]
#include <curses.h>
#include <term.h>

int tgetent(char *bp, 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);

int tputs(char *str, int affcnt, int (*putc)(void));
DESCRIPTION

These routines are included as a conversion aid for programs that use the termcap library. Their parameters are the same and the routines are emulated using the terminfo database. These routines are supported at Level 2 and should not be used in new applications.

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

The tgetflag() routine gets the boolean entry for id.

The tgetnum() routine gets the numeric entry for id.

The tgetstr() routine returns the string entry for id. Use tputs() to output the returned string.

The tgoto() routine instantiates the parameters into the given capability. The output from this routine is to be passed to tputs().

The tputs() routine is described on the curs_terminfo(3CURSES) manual page.

RETURN VALUES

Routines that return an integer return ERR upon failure and an integer value other than ERR upon successful completion.

Routines that return pointers return NULL on error.

ATTRIBUTES

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
MT-Level Unsafe
SEE ALSO

putc (3C), curs_terminfo (3CURSES), curses (3CURSES), attributes (7)

NOTES

The header <curses.h> automatically includes the headers <stdio.h> and <unctrl.h>.