Saves/restores the program or shell terminal modes.
Curses Library (libcurses.a)
#include <curses.h>
int def_prog_mode
(void);
int def_shell_mode
(void);
int reset_prog_mode
(void);
int reset_shell_mode
(void);
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.
Upon successful completion, these subroutines return OK. Otherwise, they return ERR.
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.