X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=doc%2Fhtml%2Fman%2Fcurs_initscr.3x.html;h=d487e93335168244ae353d2f5660fe75b8d70694;hp=3c47ac6c2ce3f12c3cbc39f71609ab618e059b4c;hb=3eda6f30a84d53844d2ebceadb457e2e7e9cfbf3;hpb=6a530b46563470c2ca73579d1994a0c8e275dd98 diff --git a/doc/html/man/curs_initscr.3x.html b/doc/html/man/curs_initscr.3x.html index 3c47ac6c..d487e933 100644 --- a/doc/html/man/curs_initscr.3x.html +++ b/doc/html/man/curs_initscr.3x.html @@ -1,6 +1,6 @@ @@ -45,14 +45,12 @@ - -
+
initscr, newterm, endwin, isendwin, set_term, delscreen - curses screen initialization and manipulation routines --
+
#include <curses.h> WINDOW *initscr(void); @@ -63,27 +61,24 @@ 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 @@ -114,26 +108,34 @@ A program should always call endwin before exiting or es- caping from curses mode temporarily. This routine - o restores tty modes, + o resets colors to correspond with the default color + pair 0, - o moves the cursor to the lower left-hand corner of the - screen and + o moves the cursor to the lower left-hand corner of the + screen, - o resets the terminal into the proper non-visual mode. + o clears the remainder of the line so that it uses the + default colors, - Calling refresh or doupdate after a temporary escape caus- - es the program to resume visual mode. + o sets the cursor to normal visibility (see + curs_set(3x)), + o stops cursor-addressing mode using the exit_ca_mode + terminal capability, --
+ o restores tty modes (see reset_shell_mode(3x)). + + Calling refresh(3x) or doupdate(3x) after a temporary es- + cape 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 +144,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 +171,13 @@ 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 +193,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 +203,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 +265,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). @@ -299,7 +289,6 @@