restartterm Subroutine

Purpose

Re-initializes the terminal structures after a restore.

Library

Curses Library (libcurses.a)

Syntax

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

restartterm ( Term,  FileNumber,  ErrorCode)
char *Term;
int FileNumber;
int *ErrorCode;

Description

The restartterm subroutine is similar to the setupterm subroutine except that it is called after restoring memory to a previous state. For example, you would call the restartterm subroutine after a call to scr_restore if the terminal type has changed. The restartterm subroutine assumes that the windows and the input and output options are the same as when memory was saved, but the terminal type and baud rate may be different.

Parameters

Item Description
Term Specifies the terminal name to obtain the terminal for. If 0 is passed for the parameter, the value of the $TERM environment variable is used.
FileNumber Specifies the output file's file descriptor (1 equals standard out).
ErrorCode Specifies a pointer to an integer to return the error code to. If 0, then the restartterm subroutine exits with an error message instead of returning.

Example

To restart an aixterm after a previous memory save and exit on error with a message, enter:

restartterm("aixterm", 1, (int*)0);

Prerequisite Information

Curses Overview for Programming and Understanding Terminals with Curses in AIX® Version 7.1 General Programming Concepts: Writing and Debugging Programs .