bug-ncurses
[Top][All Lists]
Advanced

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

[PATCH 12/16] man/curs_kernel.3x: Update "NOTES" section regarding inits


From: G. Branden Robinson
Subject: [PATCH 12/16] man/curs_kernel.3x: Update "NOTES" section regarding initscr() storing null pointers via `ripoffline()` callback.
Date: Sat, 8 Mar 2025 12:00:27 -0600

X/Open Curses Issue 4 Version 2 and Issue 7 both have an "application
usage" note warning the user that `initscr()` may store a null pointer
to the `WINDOW` pointer argument of the user-supplied callback function
given to `ripoffline()`.  Offer a similar admonition.
---
 man/curs_kernel.3x | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/man/curs_kernel.3x b/man/curs_kernel.3x
index 7c87df378..4c27bf59f 100644
--- a/man/curs_kernel.3x
+++ b/man/curs_kernel.3x
@@ -363,6 +363,22 @@ .SH NOTES
 .IR int ","
 .I \%ncurses
 pays no attention to its return value.
+.PP
+If
+.B \%ripoffline
+cannot allocate memory for the required
+.I \%WINDOW
+structure backing the ripped-off line,
+it stores a null pointer to the
+.I \%WINDOW
+pointer argument supplied by the
+.I init
+function the application specifies.
+The application must check this argument for validity after calling
+.B \%initscr
+and prior to performing
+.I curses
+operations on that window.
 .SH EXTENSIONS
 In
 .IR \%ncurses ","
-- 
2.30.2

Attachment: signature.asc
Description: PGP signature


reply via email to

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