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

Technical Reference: Base Operating System and Extensions , Volume 2


tigetstr Routine

Purpose

Returns the value of a terminal's string capability.

Library

Curses Library (libcurses.a)

Syntax

#include <curses.h>
#include <term.h>


tigetstr( Capname)
register char *Capname;

Description

The tigetstr subroutine returns the value of terminal's string capability. Use this subroutine to get a capability for the current terminal pointed to by cur_term. When successful, this subroutine returns the current value of the capability specified by the Capname parameter. Otherwise, if it is not a string value, this subroutine returns (char*) -1.

Note: The tigetstr subroutine is a low-level routine. Use this subroutine only if your application must deal directly with the terminfo database to handle certain terminal capabilities (for example, programming function keys).

Parameters


Capname Identifies the terminal capability to check.

Example

To determine if "turn on soft labels" is a defined string capability for the current terminal, do the following:

char *rc;

rc = tigetstr("smln"); 

Return Values

Upon successful completion, the tigetstr subroutine returns the value of terminal's string capability.

(char *)-1 Indicates the value specified by the Capname parameter is not a string.

Implementation Specifics

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

Files


/usr/include/curses.h Contains C language subroutines and define statements for curses.

Related Information

List of Curses Subroutines, Curses Overview for Programming, 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 ]