Current File : //usr/man/man3xcurses/tigetflag.3xcurses
'\" te
.\"  Copyright (c) 1990, 1995 by Mortice Kern Systems Inc.  All Rights Reserved  Portions Copyright (c) 1996, Sun Microsystems, Inc.  All Rights Reserved
.TH tigetflag 3XCURSES "5 Jun 2002" "SunOS 5.11" "X/Open Curses Library Functions"
.SH NAME
tigetflag, tigetnum, tigetstr, tparm \- return the value of a terminfo capability
.SH SYNOPSIS
.LP
.nf
\fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-I\fR /usr/xpg4/include \fB -L \fR /usr/xpg4/lib \e
\fB -R \fR /usr/xpg4/lib \fB -lcurses \fR [ \fIlibrary\fR... ]

\fBc89\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lcurses\fR [ \fIlibrary\fR... ]

#include <term.h>

\fBint\fR \fBtigetflag\fR(\fBchar *\fR\fIcapname\fR);
.fi

.LP
.nf
\fBint\fR \fBtigetnum\fR(\fBchar *\fR\fIcapname\fR);
.fi

.LP
.nf
\fBchar *\fR\fBtigetstr\fR(\fBchar *\fR\fIcapname\fR);
.fi

.LP
.nf
\fBchar *\fR\fBtparm\fR(\fBchar *\fR\fIcap\fR, \fBlong\fR \fIp1\fR, \fBlong\fR \fIp2\fR, \fBlong\fR \fIp3\fR, \fBlong\fR \fIp4\fR, \fBlong\fR \fIp5\fR,
     \fBlong\fR \fIp6\fR, \fBlong\fR \fIp7\fR,\fBlong\fR \fIp8\fR, \fBlong\fR \fIp9\fR);
.fi

.SH PARAMETERS
.sp
.ne 2
.mk
.na
\fB\fIcapname\fR\fR
.ad
.RS 11n
.rt  
Is the name of the \fBterminfo\fR capability for which the value is  required.
.RE

.sp
.ne 2
.mk
.na
\fB\fIcap\fR\fR
.ad
.RS 11n
.rt  
Is a pointer to a string capability.
.RE

.sp
.ne 2
.mk
.na
\fB\fIp1\fR...\fIp9\fR\fR
.ad
.RS 11n
.rt  
Are the parameters to be instantiated.
.RE

.SH DESCRIPTION
.sp
.LP
The \fBtigetflag()\fR, \fBtigetnum()\fR, and \fBtigetstr()\fR functions  return values for \fBterminfo\fR capabilities passed to them.
.sp
.LP
The following null-terminated arrays contain the \fIcapnames\fR,  the \fBtermcap\fR codes and full C names for each of the \fBterminfo\fR variables.
.sp
.in +2
.nf
char *boolnames, *boolcodes, *boolfnames
char *numnames, *numcodes, *numfnames
char *strnames, *strcodes, *strfnames
.fi
.in -2

.sp
.LP
The \fBtparm()\fR function instantiates a parameterized string using  nine arguments. The string is suitable for output processing by \fBtputs()\fR.
.SH RETURN VALUES
.sp
.LP
On success, the \fBtigetflg()\fR, \fBtigetnum()\fR, and \fBtigetstr()\fR functions return the specified \fBterminfo\fR capability.
.sp
.LP
\fBtigetflag()\fR returns \(mi1 if \fIcapname\fR is not a Boolean capability.
.sp
.LP
\fBtigetnum()\fR returns \(mi2 if \fIcapname\fR is not a numeric capability.
.sp
.LP
\fBtigetstr()\fR returns \fB(char *)\fR\(mi1 if \fIcapname\fR is not a string  capability.
.sp
.LP
On success, the \fBtparm()\fR function returns \fIcap\fR in a static buffer with the parameterization resolved.  Otherwise, it returns a null pointer.
.SH ERRORS
.sp
.LP
None.
.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
_
Interface StabilityCommitted
_
MT-LevelUnsafe
_
StandardSee \fBstandards\fR(5).
.TE

.SH SEE ALSO
.sp
.LP
\fBlibcurses\fR(3XCURSES), \fBtgetent\fR(3XCURSES), \fBterminfo\fR(4), \fBattributes\fR(5), \fBstandards\fR(5)