[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume 2

tigetnum Subroutine

Purpose

Gets the value of terminal's numeric capability.

Library

Curses Library (libcurses.a)

Syntax

#include <curses.h>
#include <term.h>
tigetnum(CapName) 
register char *CapName;

Description

The tigetnum subroutine returns the value of terminal's numeric capability. Use this subroutine to get a capability for the current terminal. When successful, this subroutine returns the current value of the capability specified by the CapName parameter. Otherwise, if it is not a numeric value, this subroutine returns -2.

Note: The tigetnum 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).

Return Values

Upon successful completion, the tigetnum subroutine returns the value of terminal's numeric capability.

-2 Indicates the value specified by the CapName parameter is not numeric.

Parameters

CapName Identifies the terminal capability to check for.

Example

To determine if number of labels is a defined numeric capability for the current terminal, use:

rc = tigetnum("nlab"); 

Implementation Specifics

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

Related Information

Curses Overview for Programming in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.

List of Curses Subroutines in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.

Understanding Terminals with Curses in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.


[ Previous | Next | Contents | Glossary | Home | Search ]