HP-UX Reference (11i v2 04/09) - 3 Library Functions A-M (vol 6)

d
def_prog_mode(3X) def_prog_mode(3X)
(CURSES)
NAME
def_prog_mode, def_shell_mode, reset_prog_mode, reset_shell_mode save or restore program or shell
terminal modes
SYNOPSIS
#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()
function saves the current terminal modes as the ‘program (in Curses) state
for use by
reset_prog_mode()
.
The
def_shell_mode()
function saves the current terminal modes as the ‘‘shell’’ (not in Curses) state
for use by
reset_shell_mode()
.
The
reset_prog_mode()
function restores the terminal to the ‘‘program’’ (in Curses) state.
The
reset_shell_mode()
function restores the terminal to the ‘‘shell’’ (not in Curses) state.
These functions affect the mode of the terminal associated with the current screen.
RETURN VALUE
Upon successful completion, these functions return OK. Otherwise, they return ERR.
ERRORS
No errors are defined.
APPLICATION USAGE
The
initscr() function achieves the effect of calling def_shell_mode()
to save the prior terminal
settings so they can be restored during the call to
endwin(), and of calling def_prog_mode()
to
specify an initial definition of the program terminal mode.
Applications normally do not need to refer to the shell terminal mode. Applications may find it useful to
save and restore the program terminal mode.
SEE ALSO
doupdate(3X), endwin(3X), initscr(3X), <curses.h>.
CHANGE HISTORY
First released in X/Open Curses, Issue 2.
X/Open Curses, Issue 4
The
reset_prog_mode() and reset_shell_mode()
functions are merged with this entry. In pre-
vious issues, they appeared in entries of their own.
The entry is rewritten for clarity. The argument list for all these functions is explicitly declared as void.
HP-UX 11i Version 2: September 2004 1 Hewlett-Packard Company Section 3185