[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch] make man page of addnstr() say that n = number of bytes
From: |
Benno Schulenberg |
Subject: |
[patch] make man page of addnstr() say that n = number of bytes |
Date: |
Mon, 16 Mar 2020 17:10:35 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
Hello,
Reading the man page of waddnstr() yesterday, I noticed that it says:
"The four functions with n as the last argument write at most n characters".
However, this is not right. When the string is a single multibyte character
that consists of three bytes, then specifying 1 or 2 for n means that nothing
gets written to the screen. Only when specifying 3 for n does the three-byte
character get "printed".
Attached patch fixes this in the manual page. But maybe the manual should
also say that when not all bytes of a multibyte character are covered by the
n, that then nothing is written, zero bytes? As that is what seems to happen.
Benno
addnstr-writes-bytes-not-characters.patch
Description: Text Data
signature.asc
Description: OpenPGP digital signature
- [patch] make man page of addnstr() say that n = number of bytes,
Benno Schulenberg <=