def_prog_mode(3X) def_prog_mode(3X)
NAME
defprogmode, defshellmode, resetprogmode, resetshellmode -
save/restore program or shell terminal modes
SYNOPSIS
cc [flag ...] file ... -lcurses [library ...]
#include <curses.h>
int defprogmode(void);
int defshellmode(void);
int resetprogmode(void);
int resetshellmode(void);
DESCRIPTION
The defprogmode() function saves the current terminal modes as the
"program" (in Curses) state for use by resetprogmode().
The defshellmode() function saves the current terminal modes as the
"shell" (not in Curses) state for use by resetshellmode().
The resetprogmode() function restores the terminal to the "program"
(in Curses) state.
The resetshellmode() 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.
NOTES
The initscr() function achieves the effect of calling defshellmode()
to save the prior terminal settings so they can be restored during the
call to endwin(), and of calling defprogmode() 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 termi-
nal mode.
SEE ALSO
curses(3X), doupdate(3X), endwin(3X), initscr(3X), curses(5).
Page 1 Reliant UNIX 5.44 Printed 11/98