X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=doc%2Fhtml%2Fman%2Fcurs_initscr.3x.html;h=7f398881f2d59a27322d9567a6e95db953609393;hp=1b668b29744ec214314c2d829957c9631afea62c;hb=302a066a01e4de40f08b397e87ca0e97f20870a7;hpb=32f9f5f12cd9159261f9db228461049e8c770404 diff --git a/doc/html/man/curs_initscr.3x.html b/doc/html/man/curs_initscr.3x.html index 1b668b29..7f398881 100644 --- a/doc/html/man/curs_initscr.3x.html +++ b/doc/html/man/curs_initscr.3x.html @@ -1,6 +1,6 @@ @@ -45,45 +45,40 @@ - -
+
initscr, newterm, endwin, isendwin, set_term, delscreen - curses screen initialization and manipulation routines --
+
#include <curses.h> WINDOW *initscr(void); int endwin(void); bool isendwin(void); - SCREEN *newterm(char *type, FILE *outfd, FILE *infd); - SCREEN *set_term(SCREEN *new); - void delscreen(SCREEN* sp); + SCREEN *newterm(char *type, FILE *outfd, FILE *infd); + SCREEN *set_term(SCREEN *new); + void delscreen(SCREEN* sp); --
+
--
+
initscr is normally the first curses routine to call when initializing a program. A few special routines sometimes - need to be called before it; these are slk_init, filter, - ripoffline, use_env. For multiple-terminal applications, - newterm may be called before initscr. + need to be called before it; these are slk_init(3x), fil- + ter, ripoffline, use_env. For multiple-terminal applica- + tions, newterm may be called before initscr. The initscr code determines the terminal type and initial- izes all curses data structures. initscr also causes the - first call to refresh to clear the screen. If errors oc- - cur, initscr writes an appropriate error message to stan- - dard error and exits; otherwise, a pointer is returned to - stdscr. + first call to refresh(3x) to clear the screen. If errors + occur, initscr writes an appropriate error message to + standard error and exits; otherwise, a pointer is returned + to stdscr. --
+
A program that outputs to more than one terminal should use the newterm routine for each terminal instead of initscr. A program that needs to inspect capabilities, so @@ -103,8 +98,7 @@ If the type parameter is NULL, $TERM will be used. --
+
The program must also call endwin for each terminal being used before exiting from curses. If newterm is called more than once for the same terminal, the first terminal @@ -121,19 +115,17 @@ o resets the terminal into the proper non-visual mode. - Calling refresh or doupdate after a temporary escape caus- - es the program to resume visual mode. + Calling refresh(3x) or doupdate after a temporary escape + causes the program to resume visual mode. --
+
The isendwin routine returns TRUE if endwin has been called without any subsequent calls to wrefresh, and FALSE otherwise. --
+
The set_term routine is used to switch between different terminals. The screen reference new becomes the new cur- rent terminal. The previous terminal is returned by the @@ -142,16 +134,14 @@ rent terminal. --
+
The delscreen routine frees storage associated with the SCREEN data structure. The endwin routine does not do this, so delscreen should be called after endwin if a par- ticular SCREEN is no longer needed. --
+
endwin returns the integer ERR upon failure and OK upon successful completion. @@ -171,20 +161,17 @@ o set_term returns no error. --
+
Note that initscr and newterm may be macros. --
+
These functions were described in the XSI Curses standard, Issue 4. As of 2015, the current document is X/Open Curs- es, Issue 7. --
+
X/Open specifies that portable applications must not call initscr more than once: @@ -200,8 +187,7 @@ the return value of initscr in XSI Curses. --
+
If the TERM variable is missing or empty, initscr uses the value "unknown", which normally corresponds to a terminal entry with the generic (gn) capability. Generic entries @@ -211,13 +197,12 @@ ly. --
+
Quoting from X/Open Curses, section 3.1.1: Curses implementations may provide for special han- dling of the SIGINT, SIGQUIT and SIGTSTP signals if - their disposition is SIG_DFL at the time initscr() is + their disposition is SIG_DFL at the time initscr is called ... Any special handling for these signals may remain in @@ -274,8 +259,7 @@ stdscr, and update other data such as LINES and COLS. --
+
curses(3x), curs_kernel(3x), curs_refresh(3x), curs_slk(3x), curs_terminfo(3x), curs_util(3x), curs_vari- ables(3x).