DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

def_prog_mode(3curses)


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(3curses) function saves the current terminal modes as the ``program'' (in Curses) state for use by reset_prog_mode(3curses).

The def_shell_mode(3curses) function saves the current terminal modes as the ``shell'' (not in Curses) state for use by reset_shell_mode(3curses).

The reset_prog_mode(3curses) function restores the terminal to the ``program'' (in Curses) state.

The reset_shell_mode(3curses) 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(3curses) function achieves the effect of calling def_shell_mode(3curses) to save the prior terminal settings so they can be restored during the call to endwin(3curses), and of calling def_prog_mode(3curses) 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(3curses), endwin(3curses), initscr(3curses), curses(4)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004