DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

endwin(3curses)


endwin -- suspend Curses session

Synopsis

cc [options] file -lcurses
#include <curses.h>

int endwin(void);

Description

The endwin(3curses) function restores the terminal after Curses activity by at least restoring the saved shell terminal mode, flushing any output to the terminal and moving the cursor to the first column of the last line of the screen. Refreshing a window resumes program mode. The application must call endwin(3curses) for each terminal being used before exiting. If newterm(3curses) is called more than once for the same terminal, the first screen created must be the last one for which endwin(3curses) is called.

Return value

Upon successful completion, endwin(3curses) returns OK. Otherwise, it returns ERR.

Errors

No errors are defined.

Usage

The endwin(3curses) function does not free storage associated with a screen, so delscreen(3curses) should be called after endwin(3curses) if a particular screen is no longer needed.

To leave Curses mode temporarily, portable applications should call endwin(3curses). Subsequently, to return to Curses mode, they should call doupdate(3curses), refresh(3curses) or wrefresh(3curses).

Standards Conformance

The Single UNIX Specification, Version 2; The Open Group.

References

delscreen(3curses), doupdate(3curses), initscr(3curses), isendwin(3curses), curses(4)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004