bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 11/40] man/curs_initscr.3x: Clarify BSD `initscr()` behavior.


From: G. Branden Robinson
Subject: [PATCH 11/40] man/curs_initscr.3x: Clarify BSD `initscr()` behavior.
Date: Sat, 1 Feb 2025 11:30:30 -0600

---
 man/curs_initscr.3x | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/man/curs_initscr.3x b/man/curs_initscr.3x
index 468f7acd7..5b2141d8a 100644
--- a/man/curs_initscr.3x
+++ b/man/curs_initscr.3x
@@ -333,9 +333,22 @@ .SS Differences
 .bP
 This implementation allows using \fB\%initscr\fP after \fB\%endwin\fP.
 .PP
-Old versions of curses, e.g., BSD 4.4, would return a null pointer
-from \fB\%initscr\fP when an error is detected, rather than exiting.
-It is safe but redundant to check the return value of \fB\%initscr\fP
+.I \%initscr
+in BSD
+.IR curses ","
+from its inception (1980) through the Net/2 release (1991) returned
+.I ERR
+cast to a
+.I \%WINDOW
+pointer when detecting an error.
+.\" 
https://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/src/lib/libcurses/initscr.c
+.\" 
https://minnie.tuhs.org/cgi-bin/utree.pl?file=Net2/usr/src/lib/libcurses/initscr.c
+4.4BSD (1995)
+instead returned a null pointer.
+.\" 
https://minnie.tuhs.org/cgi-bin/utree.pl?file=4.4BSD/usr/src/lib/libcurses/initscr.c
+Neither exited the application.
+It is safe but redundant to check the return value of
+.I \%initscr
 in X/Open Curses.
 .PP
 Calling \fB\%endwin\fP does not dispose of the memory allocated in
-- 
2.30.2

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]