On Thu, 19 Mar 2015 13:36:45 +0001 Jason McIntyre <[email protected]> wrote:
> On Thu, Mar 19, 2015 at 03:32:52PM +0200, Kaspars Bankovskis wrote: > > Is that really accurate to say that elements are stored in a pointer? > > > > no idea. it's why i asked stsp to look it over. > jmc I looked up the Linux and FreeBSD versions of the man pages and they had wording such as Linux: "At most n wide characters are written to dest." "At most n bytes are written to dest." FreeBSD: "No more than nwchars wide characters are stored." "Up to nbytes bytes are stored in mbstring." , so I proposed a similar change. Other OpenBSD man pages use similar form: "The strncpy() function copies not more than len characters from the string src to the buffer dst." "strlcpy() copies up to dstsize - 1 characters from the string src to dst," K&R also say for memcpy "copy n characters from ct to s" POSIX says for mbstowcs: "No more than n elements shall be modified in the array pointed to by pwcs." but I personally find the "shall be modified" form somewhat ambiguous. -- Andre Smagin
