]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - man/curs_initscr.3x
ncurses 6.4 - patch 20231223
[ncurses.git] / man / curs_initscr.3x
index fcb73d677f53ff02b36fe4f9295b55078b859390..3f7c37d6ecf89a503500d8edd90e7e5796a7e2fb 100644 (file)
@@ -27,8 +27,8 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_initscr.3x,v 1.59 2023/12/17 23:56:04 tom Exp $
-.TH curs_initscr 3X 2023-12-17 "ncurses 6.4" "Library calls"
+.\" $Id: curs_initscr.3x,v 1.60 2023/12/23 16:27:25 tom Exp $
+.TH curs_initscr 3X 2023-12-23 "ncurses 6.4" "Library calls"
 .ie \n(.g \{\
 .ds `` \(lq
 .ds '' \(rq
 .ie \n(.g \{\
 .ds `` \(lq
 .ds '' \(rq
@@ -91,7 +91,7 @@ terminal cannot support a screen-oriented program, would also use
 \fBnewterm\fP.
 .PP
 The routine \fBnewterm\fP should be called once for each terminal.
 \fBnewterm\fP.
 .PP
 The routine \fBnewterm\fP should be called once for each terminal.
-It returns a variable of type \fBSCREEN *\fP which should be saved
+It returns a variable of type \fISCREEN *\fP which should be saved
 as a reference to that terminal.
 \fBnewterm\fP's arguments are
 .bP
 as a reference to that terminal.
 \fBnewterm\fP's arguments are
 .bP
@@ -104,8 +104,8 @@ an input stream connected to the terminal
 If the \fItype\fP parameter is \fBNULL\fP, \fB$TERM\fP will be used.
 .PP
 The file descriptor of the output stream is passed to \fBsetupterm\fP(3X),
 If the \fItype\fP parameter is \fBNULL\fP, \fB$TERM\fP will be used.
 .PP
 The file descriptor of the output stream is passed to \fBsetupterm\fP(3X),
-which returns a pointer to a \fBTERMINAL\fP structure.
-\fBnewterm\fP's return value holds a pointer to the \fBTERMINAL\fP structure.
+which returns a pointer to a \fI\%TERMINAL\fP structure.
+\fBnewterm\fP's return value holds a pointer to the \fI\%TERMINAL\fP structure.
 .SS endwin
 The program must also call
 \fBendwin\fP for each terminal being used before exiting from \fBcurses\fP.
 .SS endwin
 The program must also call
 \fBendwin\fP for each terminal being used before exiting from \fBcurses\fP.
@@ -138,14 +138,14 @@ and \fBFALSE\fP otherwise.
 The \fBset_term\fP routine is used to switch between different terminals.
 The screen reference \fInew\fP becomes the new current terminal.
 The previous terminal is returned by the routine.
 The \fBset_term\fP routine is used to switch between different terminals.
 The screen reference \fInew\fP becomes the new current terminal.
 The previous terminal is returned by the routine.
-This is the only routine which manipulates \fBSCREEN\fP pointers;
+This is the only routine which manipulates \fISCREEN\fP pointers;
 all other routines affect only the current terminal.
 .SS delscreen
 The \fBdelscreen\fP routine frees storage associated with the
 all other routines affect only the current terminal.
 .SS delscreen
 The \fBdelscreen\fP routine frees storage associated with the
-\fBSCREEN\fP data structure.
+\fISCREEN\fP data structure.
 The \fBendwin\fP routine does not do
 this, so \fBdelscreen\fP should be called after \fBendwin\fP if a
 The \fBendwin\fP routine does not do
 this, so \fBdelscreen\fP should be called after \fBendwin\fP if a
-particular \fBSCREEN\fP is no longer needed.
+particular \fISCREEN\fP is no longer needed.
 .SH RETURN VALUE
 \fBendwin\fP returns the integer \fBERR\fP upon failure and \fBOK\fP
 upon successful completion.
 .SH RETURN VALUE
 \fBendwin\fP returns the integer \fBERR\fP upon failure and \fBOK\fP
 upon successful completion.
@@ -193,18 +193,18 @@ in XSI Curses.
 .PP
 Calling \fBendwin\fP does not dispose of the memory allocated in \fBinitscr\fP
 or \fBnewterm\fP.
 .PP
 Calling \fBendwin\fP does not dispose of the memory allocated in \fBinitscr\fP
 or \fBnewterm\fP.
-Deleting a \fBSCREEN\fP provides a way to do this:
+Deleting a \fISCREEN\fP provides a way to do this:
 .bP
 .bP
-X/Open Curses does not say what happens to \fBWINDOW\fPs when \fBdelscreen\fP
-\*(``frees storage associated with the \fBSCREEN\fP\*(''
+X/Open Curses does not say what happens to \fI\%WINDOW\fPs when \fBdelscreen\fP
+\*(``frees storage associated with the \fISCREEN\fP\*(''
 nor does the SVr4 documentation help,
 nor does the SVr4 documentation help,
-adding that it should be called after \fBendwin\fP if a \fBSCREEN\fP
+adding that it should be called after \fBendwin\fP if a \fISCREEN\fP
 is no longer needed.
 .bP
 is no longer needed.
 .bP
-However, \fBWINDOW\fPs are implicitly associated with a \fBSCREEN\fP.
+However, \fI\%WINDOW\fPs are implicitly associated with a \fISCREEN\fP.
 so that it is reasonable to expect \fBdelscreen\fP to deal with these.
 .bP
 so that it is reasonable to expect \fBdelscreen\fP to deal with these.
 .bP
-SVr4 curses deletes the standard \fBWINDOW\fP structures
+SVr4 curses deletes the standard \fI\%WINDOW\fP structures
 \fBstdscr\fP and \fBcurscr\fP as well as a work area \fBnewscr\fP.
 SVr4 curses ignores other windows.
 .bP
 \fBstdscr\fP and \fBcurscr\fP as well as a work area \fBnewscr\fP.
 SVr4 curses ignores other windows.
 .bP
@@ -214,11 +214,11 @@ using that information to delete those windows when \fBdelscreen\fP is called.
 .bP
 NetBSD copied this feature of \fI\%ncurses\fP in 2001.
 PDCurses follows the SVr4 model,
 .bP
 NetBSD copied this feature of \fI\%ncurses\fP in 2001.
 PDCurses follows the SVr4 model,
-deleting only the standard \fBWINDOW\fP structures.
+deleting only the standard \fI\%WINDOW\fP structures.
 .SS "High-level versus Low-level"
 Different implementations may disagree regarding the level of some functions.
 .SS "High-level versus Low-level"
 Different implementations may disagree regarding the level of some functions.
-For example, \fBSCREEN\fP (returned by \fBnewterm\fP) and
-\fBTERMINAL\fP (returned by \fBsetupterm\fP(3X)) hold file descriptors for
+For example, \fISCREEN\fP (returned by \fBnewterm\fP) and
+\fI\%TERMINAL\fP (returned by \fBsetupterm\fP(3X)) hold file descriptors for
 the output stream.
 If an application switches screens using \fBset_term\fR,
 or switches terminals using \fBset_curterm\fP(3X),
 the output stream.
 If an application switches screens using \fBset_term\fR,
 or switches terminals using \fBset_curterm\fP(3X),
@@ -227,16 +227,16 @@ behavior depending on which structure holds the corresponding descriptor.
 .PP
 For example
 .bP
 .PP
 For example
 .bP
-NetBSD's \fBbaudrate\fP(3X) function uses the descriptor in \fBTERMINAL\fP.
-\fI\%ncurses\fP and SVr4 use the descriptor in \fBSCREEN\fP.
+NetBSD's \fBbaudrate\fP(3X) function uses the descriptor in \fI\%TERMINAL\fP.
+\fI\%ncurses\fP and SVr4 use the descriptor in \fISCREEN\fP.
 .bP
 NetBSD and \fI\%ncurses\fP use the descriptor
 .bP
 NetBSD and \fI\%ncurses\fP use the descriptor
-in \fBTERMINAL\fP
+in \fI\%TERMINAL\fP
 for terminal I/O modes,
 e.g.,
 \fBdef_shell_mode\fP(3X),
 \fBdef_prog_mode\fP(3X).
 for terminal I/O modes,
 e.g.,
 \fBdef_shell_mode\fP(3X),
 \fBdef_prog_mode\fP(3X).
-SVr4 curses uses the descriptor in \fBSCREEN\fP.
+SVr4 curses uses the descriptor in \fISCREEN\fP.
 .SS "Unset \fITERM\fP Variable"
 If the \fITERM\fP variable is missing or empty, \fBinitscr\fP uses the
 value \*(``unknown\*('',
 .SS "Unset \fITERM\fP Variable"
 If the \fITERM\fP variable is missing or empty, \fBinitscr\fP uses the
 value \*(``unknown\*('',
@@ -274,14 +274,15 @@ The handler \fIattempts\fP to cleanup the screen on exit.
 Although it \fIusually\fP works as expected, there are limitations:
 .RS 5
 .bP
 Although it \fIusually\fP works as expected, there are limitations:
 .RS 5
 .bP
-Walking the \fBSCREEN\fP list is unsafe, since all list management
+Walking the \fISCREEN\fP list is unsafe, since all list management
 is done without any signal blocking.
 .bP
 On systems which have \fBREENTRANT\fP turned on, \fBset_term\fP uses
 functions which could deadlock or misbehave in other ways.
 .bP
 is done without any signal blocking.
 .bP
 On systems which have \fBREENTRANT\fP turned on, \fBset_term\fP uses
 functions which could deadlock or misbehave in other ways.
 .bP
-\fBendwin\fP calls other functions, many of which use stdio or
-other library functions which are clearly unsafe.
+\fBendwin\fP calls other functions,
+many of which use \fI\%stdio\fP(3) or other library functions which are
+clearly unsafe.
 .RE
 .TP 5
 .B SIGTERM
 .RE
 .TP 5
 .B SIGTERM