[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Base Operating System and Extensions Technical Reference, Volume 2

def_prog_mode, def_shell_mode, reset_prog_mode or reset_shell_mode Subroutine

Purpose

Saves/restores the program or shell terminal modes.

Library

Curses Library (libcurses.a)

Syntax

#include <curses.h>

int def_prog_mode
(void);

int def_shell_mode
(void);

int reset_prog_mode
(void);

int reset_shell_mode
(void);

Description

The def_prog_mode subroutine saves the current terminal modes as the "program" (in Curses) state for use by the reset_prog_mode subroutine.

The def_shell_mode subroutine saves the current terminal modes as the "shell" (not in Curses) state for use by the reset_shell_mode subroutine.

The reset_prog_mode subroutine restores the terminal to the "program" (in Curses) state.

The reset_shell_mode subroutine restores the terminal to the "shell" (not in Curses) state.

These subroutines affect the mode of the terminal associated with the current screen.

Return Values

Upon successful completion, these subroutines return OK. Otherwise, they return ERR.

Examples

For the def_prog_mode subroutine:

To save the "in curses" state, enter:

def_prog_mode();

For the def_shell_mode subroutine:

To save the "out of curses" state, enter:

def_shell_mode();

This routine saves the "out of curses" state.

Implementation Specifics

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

Related Information

The doupdate, endwin, initscr, and the setupterm subroutines.

Curses Overview for Programming, List of Curses Subroutines, Understanding Terminals with Curses in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]