'\" 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] .TH curs_termcap 3CURSES "31 Dec 1996" "SunOS 5.11" "Curses Library Functions" .SH NAME curs_termcap, tgetent, tgetflag, tgetnum, tgetstr, tgoto \- curses interfaces (emulated) to the termcap library .SH SYNOPSIS .LP .nf \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lcurses\fR [ \fIlibrary\fR ... ] #include #include \fBint\fR \fBtgetent\fR(\fBchar *\fR\fIbp\fR, \fBchar *\fR\fIname\fR); .fi .LP .nf \fBint\fR \fBtgetflag\fR(\fBchar\fR \fIid\fR[2]); .fi .LP .nf \fBint\fR \fBtgetnum\fR(\fBchar\fR \fIid\fR[2]); .fi .LP .nf \fBchar *\fR\fBtgetstr\fR(\fBchar\fR \fIid\fR[2], \fBchar **\fR\fIarea\fR); .fi .LP .nf \fBchar *\fR\fBtgoto\fR(\fBchar *\fR\fIcap\fR, \fBint\fR \fIcol\fR, \fBint\fR \fIrow\fR); .fi .LP .nf \fBint\fR \fBtputs\fR(\fBchar *\fR\fIstr\fR, \fBint\fR \fIaffcnt\fR, \fBint (*\fR\fIputc\fR)(void)); .fi .SH DESCRIPTION .sp .LP These routines are included as a conversion aid for programs that use the \fItermcap\fR library. Their parameters are the same and the routines are emulated using the \fIterminfo\fR database. These routines are supported at Level 2 and should not be used in new applications. .sp .LP The \fBtgetent()\fR routine looks up the termcap entry for \fIname\fR. The emulation ignores the buffer pointer \fIbp\fR. .sp .LP The \fBtgetflag()\fR routine gets the boolean entry for \fIid\fR. .sp .LP The \fBtgetnum()\fR routine gets the numeric entry for \fIid\fR. .sp .LP The \fBtgetstr()\fR routine returns the string entry for \fIid\fR. Use \fBtputs()\fR to output the returned string. .sp .LP The \fBtgoto()\fR routine instantiates the parameters into the given capability. The output from this routine is to be passed to \fBtputs()\fR. .sp .LP The \fBtputs()\fR routine is described on the \fBcurs_terminfo\fR(3CURSES) manual page. .SH RETURN VALUES .sp .LP Routines that return an integer return \fBERR\fR upon failure and an integer value other than \fBERR\fR upon successful completion. .sp .LP Routines that return pointers return \fINULL\fR on error. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ MT-LevelUnsafe .TE .SH SEE ALSO .sp .LP \fBcurs_terminfo\fR(3CURSES), \fBcurses\fR(3CURSES), \fBputc\fR(3C), \fBattributes\fR(5) .SH NOTES .sp .LP The header <\fBcurses.h\fR> automatically includes the headers <\fBstdio.h\fR> and <\fBunctrl.h\fR>.