def_prog_mode(CURSES)
def_prog_mode --
save/restore program or shell terminal modes
Synopsis
cc [options] file -lcurses
#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(CURSES)
function saves the current terminal modes as the ``program'' (in Curses)
state for use by
reset_prog_mode(CURSES).
The
def_shell_mode(CURSES)
function saves the current terminal modes as the ``shell'' (not in Curses)
state for use by
reset_shell_mode(CURSES).
The
reset_prog_mode(CURSES)
function restores the terminal to the ``program'' (in Curses) state.
The
reset_shell_mode(CURSES)
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.
Usage
The
initscr(CURSES)
function achieves the effect of calling
def_shell_mode(CURSES)
to save the prior terminal settings so they can be restored during the call to
endwin(CURSES),
and of calling
def_prog_mode(CURSES)
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.
Standards Conformance
The Single UNIX Specification, Version 2; The Open Group.
References
doupdate(CURSES),
endwin(CURSES),
initscr(CURSES),
curses(F)
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 01 June 2005