On Tue, Nov 14, 2023 at 03:50:31PM +0100, наб wrote:
> On Mon, Nov 13, 2023 at 08:13:02PM -0500, Thomas Dickey wrote:
> > The null terminator should be checked only for the special case where
> > the passed-in length is negative.
> I agree in principle but the manual says
> > The four functions with n as the last argument write at most n bytes, or
> > until a terminating null is reached.  If n is -1, then the entire string
> > will be added.
> Which reads to me like it ought to behave like printf(%.*s),
> terminating at the first specified condition ‒
> a C string with a limit, not a range ‒
> so if it's supposed to be a range then maybe something to the effect of

no - as I understand the history of this feature, if the length is specified,
it's possible to send a null character in the middle of the string.
 
> Also I just noticed the comma in mvwaddnstr is italic,

thanks - I have a to-do item to extend the script which I've been
developing to check manpages, to flag these (from seeing Branden's
reports, etc).

-- 
Thomas E. Dickey <dic...@invisible-island.net>
https://invisible-island.net

Attachment: signature.asc
Description: PGP signature

Reply via email to