set_curterm Subroutine

Purpose

Sets the current terminal variable to the specified terminal.

Library

Curses Library (libcurses.a)

Curses Syntax

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

set_curterm( Newterm)
TERMINAL *Newterm;

Description

The cur_term subroutine sets the cur_term variable to the terminal specified by the Newterm parameter. The cur_term subroutine is useful when the setupterm subroutine is called more than once. The set_curterm subroutine allows the programmer to toggle back and forth between terminals.

When information for a particular terminal is no longer required, remove it using the del_curterm subroutine.

Note: The cur_term subroutine is a low-level subroutine. You should use this subroutine only if your application must deal directly with the terminfo database to handle certain terminal capabilities. For example, use this subroutine if your application programs function keys.

Parameters

Item Description
Newterm Points to a TERMINAL structure. This structure contains information about a specific terminal.

Examples

To set the cur_term variable to point to the my_term terminal, use:

TERMINAL *newterm;
set_curterm(newterm);