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:
For the def_shell_mode subroutine:
To save the "out of curses" state, enter:
This routine saves the "out of curses" state.
This subroutine is part of Base Operating System (BOS) Runtime.
The doupdate (doupdate, refresh, wnoutrefresh, or wrefresh Subroutines), endwin (endwin Subroutine), initscr (initscr and newterm Subroutine), and the setupterm (setupterm Subroutine) subroutines.
Curses Overview for Programming, List of Curses Subroutines, Understanding Terminals with Curses in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.