Date: Fri, 14 Aug 2020 06:44:34 +0000 (UTC) From: Gordon Bergling <gbe@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364229 - stable/12/lib/libc/locale Message-ID: <202008140644.07E6iYRn046516@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gbe (doc committer) Date: Fri Aug 14 06:44:34 2020 New Revision: 364229 URL: https://svnweb.freebsd.org/changeset/base/364229 Log: MFC r364031: mbsrtowcs(3): Clarify the RETURN VALUES section PR: 215848 Submitted by: Andrew Stevenson <andrew at ugh dot net dot au> Modified: stable/12/lib/libc/locale/mbsrtowcs.3 Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/locale/mbsrtowcs.3 ============================================================================== --- stable/12/lib/libc/locale/mbsrtowcs.3 Fri Aug 14 06:41:59 2020 (r364228) +++ stable/12/lib/libc/locale/mbsrtowcs.3 Fri Aug 14 06:44:34 2020 (r364229) @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd July 21, 2004 +.Dd August 7, 2020 .Dt MBSRTOWCS 3 .Os .Sh NAME @@ -98,15 +98,29 @@ except that conversion stops after reading at most bytes from the buffer pointed to by .Fa src . .Sh RETURN VALUES -The +If successful, and +.Fa dst +is not NULL, the .Fn mbsrtowcs and .Fn mbsnrtowcs functions return the number of wide characters stored in the array pointed to by +.Fa dst . +.Pp +If .Fa dst -if successful, otherwise it returns -.Po Vt size_t Pc Ns \-1 . +was NULL then the functions +.Fn mbsrtowcs +and +.Fn mbsnrtowcs +return the number of wide characters that would have been stored where +.Fa dst +points to an infinitely large array. +.Pp +If either one of the functions is not successful then +.Po Vt size_t Pc Ns \-1 +is returned. .Sh ERRORS The .Fn mbsrtowcs
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008140644.07E6iYRn046516>