]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - man/curs_initscr.3x
ncurses 6.4 - patch 20231111
[ncurses.git] / man / curs_initscr.3x
index 829a50aebb0e59504d61aa7f139bc08db19e2455..aab21a66472ccd64a1a80a1ae6cc59857f5f691b 100644 (file)
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_initscr.3x,v 1.45 2023/08/19 19:46:20 tom Exp $
-.TH curs_initscr 3X 2023-08-19 "ncurses 6.4" "Library calls"
+.\" $Id: curs_initscr.3x,v 1.54 2023/11/11 23:20:20 tom Exp $
+.TH curs_initscr 3X 2023-11-11 "ncurses 6.4" "Library calls"
+.ie \n(.g \{\
+.ds `` \(lq
+.ds '' \(rq
+.\}
+.el \{\
+.ie t .ds `` ``
+.el   .ds `` ""
+.ie t .ds '' ''
+.el   .ds '' ""
+.\}
+.
 .de bP
 .ie n  .IP \(bu 4
 .el    .IP \(bu 2
 ..
-.ie \n(.g .ds `` \(lq
-.el       .ds `` ``
-.ie \n(.g .ds '' \(rq
-.el       .ds '' ''
-.na
-.hy 0
 .SH NAME
-\fBinitscr\fP,
-\fBnewterm\fP,
-\fBendwin\fP,
-\fBisendwin\fP,
-\fBset_term\fP,
-\fBdelscreen\fP \- \fBcurses\fP screen initialization and manipulation routines
-.ad
-.hy
+\fB\%initscr\fP,
+\fB\%newterm\fP,
+\fB\%endwin\fP,
+\fB\%isendwin\fP,
+\fB\%set_term\fP,
+\fB\%delscreen\fP \-
+initialize, manipulate, or tear down \fIcurses\fR terminal interface
 .SH SYNOPSIS
-\fB#include <curses.h>\fP
-.sp
-\fBWINDOW *initscr(void);\fP
-.br
-\fBint endwin(void);\fP
-.sp
-\fBbool isendwin(void);\fP
-.sp
-\fBSCREEN *newterm(const char *\fItype\fB, FILE *\fIoutf\fB, FILE *\fIinf\fB);\fR
-.br
-\fBSCREEN *set_term(SCREEN *\fInew\fB);\fR
-.br
-\fBvoid delscreen(SCREEN* \fIsp\fB);\fR
+.nf
+\fB#include <curses.h>
+.PP
+\fBWINDOW *initscr(void);
+\fBint endwin(void);
+.PP
+\fBbool isendwin(void);
+.PP
+\fBSCREEN *newterm(const char *\fItype\fP, FILE *\fIoutf\fP, FILE *\fIinf\fP);
+\fBSCREEN *set_term(SCREEN *\fInew\fP);
+\fBvoid delscreen(SCREEN* \fIsp\fP);
+.fi
 .SH DESCRIPTION
 .SS initscr
 \fBinitscr\fP is normally the first \fBcurses\fP routine to call when
@@ -152,7 +155,15 @@ Routines that return pointers always return \fBNULL\fP on error.
 X/Open defines no error conditions.
 In this implementation
 .bP
-\fBendwin\fP returns an error if the terminal was not initialized.
+\fBendwin\fP returns an error if
+.RS
+.bP
+the terminal was not initialized, or
+.bP
+\fBendwin\fP is called more than once without updating the screen, or
+.bP
+\fBreset_shell_mode\fP(3X) returns an error.
+.RE
 .bP
 \fBnewterm\fP
 returns an error if it cannot allocate the data structures for the screen,
@@ -235,25 +246,23 @@ Generic entries are detected by \fBsetupterm\fP(3X)
 and cannot be used for full-screen operation.
 Other implementations may handle a missing/empty TERM variable differently.
 .SS Signal Handlers
-Quoting from X/Open Curses, section 3.1.1:
+Quoting from X/Open Curses Issue 7, section 3.1.1:
 .RS 5
-.hy 0
 .PP
-.I Curses implementations may provide for special handling of the
-.I \fBSIGINT\fP,
-.I \fBSIGQUIT\fP and
-.I \fBSIGTSTP\fP signals
-.I if their disposition is \fBSIG_DFL\fP at the time
-\fBinitscr\fI is called \fR...
+Curses implementations may provide for special handling of the
+\%SIGINT,
+\%SIGQUIT,
+and \%SIGTSTP signals if their disposition is \%SIG_DFL at the time
+.I \%initscr
+is called.\|.\|.
 .PP
-.I Any special handling for these signals may remain in effect for the
-.I life of the process or until the process changes the disposition of
-.I the signal.
+Any special handling for these signals may remain in effect for the
+life of the process or until the process changes the disposition of
+the signal.
 .PP
-.I None of the Curses functions are required to be safe
-.I with respect to signals \fP...
+None of the Curses functions are required to be safe
+with respect to signals.\|.\|.
 .RE
-.hy
 .PP
 This implementation establishes signal handlers during initialization,
 e.g., \fBinitscr\fP or \fBnewterm\fP.
@@ -299,10 +308,10 @@ At the same time, \fBwgetch\fP calls \fBresizeterm\fP to adjust the
 standard screen \fBstdscr\fP,
 and update other data such as \fBLINES\fP and \fBCOLS\fP.
 .SH SEE ALSO
-\fBcurses\fP(3X),
-\fBcurs_kernel\fP(3X),
-\fBcurs_refresh\fP(3X),
-\fBcurs_slk\fP(3X),
-\fBcurs_terminfo\fP(3X),
-\fBcurs_util\fP(3X),
-\fBcurs_variables\fP(3X).
+\fB\%curses\fP(3X),
+\fB\%curs_kernel\fP(3X),
+\fB\%curs_refresh\fP(3X),
+\fB\%curs_slk\fP(3X),
+\fB\%curs_terminfo\fP(3X),
+\fB\%curs_util\fP(3X),
+\fB\%curs_variables\fP(3X)