[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
signature.asc
Description: PGP signature
- [PATCH 03/16] man/curs_initscr.3x: Clarify `endwin()` failure modes., (continued)
- [PATCH 03/16] man/curs_initscr.3x: Clarify `endwin()` failure modes., G. Branden Robinson, 2025/03/08
- [PATCH 04/16] man/curs_initscr.3x: Fix style nit., G. Branden Robinson, 2025/03/08
- [PATCH 05/16] man/curs_initscr.3x: Clarify `newterm()` failure mode., G. Branden Robinson, 2025/03/08
- [PATCH 06/16] man/curs_inopts.3x: Describe `keypad()` behavior in more detail., G. Branden Robinson, 2025/03/08
- [PATCH 07/16] man/curs_inopts.3x: Fix content errors regarding `notimeout()` and `wtimeout()`., G. Branden Robinson, 2025/03/08
- [PATCH 08/16] man/curs_inopts.3x: Fix content nit., G. Branden Robinson, 2025/03/08
- [PATCH 10/16] man/curs_kernel.3x: Clarify `ripoffline()` behavior., G. Branden Robinson, 2025/03/08
- [PATCH 09/16] man/curs_ins{,_w}ch.3x: Fix style nit., G. Branden Robinson, 2025/03/08
- [PATCH 11/16] man/curs_kernel.3x: Document uselessness of `ripoffline()` function pointer argument's return value., G. Branden Robinson, 2025/03/08
- [PATCH 12/16] man/curs_kernel.3x: Update "NOTES" section regarding initscr() storing null pointers via `ripoffline()` callback.,
G. Branden Robinson <=
- [PATCH 13/16] man/curs_move.3x: Fix style nit., G. Branden Robinson, 2025/03/08
- [PATCH 14/16] man/curs_outopts.3x: Clarify description of `immedok()`., G. Branden Robinson, 2025/03/08
- [PATCH 15/16] ncurses/base/lib_initscr.c: De-anonymize fatal diagnostics from `initscr()`., G. Branden Robinson, 2025/03/08
- [PATCH 16/16] ncurses/base/lib_getch.c: Delete unnecessary test., G. Branden Robinson, 2025/03/08