Bug 215848

Summary: [patch] Ambiguity in returns for mbsrtowcs
Product: Documentation Reporter: Andrew Stevenson <andrew>
Component: Manual PagesAssignee: Gordon Bergling <gbe>
Status: Closed FIXED    
Severity: Affects Some People CC: doc, gbe
Priority: --- Keywords: patch
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
diff to mbsrtowcs.3 none

Description Andrew Stevenson 2017-01-07 00:46:59 UTC
Created attachment 178593 [details]
diff to mbsrtowcs.3

It's not clear from the man pages of several multi-byte and wide character functions that, if you pass NULL as the destination, they return the number of characters that would have been written where dst an actual array. I attach a diff to fix one of them.

I haven't done others because:

a) I need to confirm which ones this is true for

and

b) I wasn't sure how great my wording was.

If someone who knows more about this than I wants to make similar changes to other man pages then that is great. Otherwise, once final wording is decided upon, I might get time to test and submit more.

I am using 11-stable r310981
Comment 1 commit-hook freebsd_committer freebsd_triage 2020-08-07 16:56:56 UTC
A commit references this bug:

Author: gbe
Date: Fri Aug  7 16:56:43 UTC 2020
New revision: 364031
URL: https://svnweb.freebsd.org/changeset/base/364031

Log:
  mbsrtowcs(3): Clarify the RETURN VALUES section

  PR:		215848
  Submitted by:	Andrew Stevenson <andrew at ugh dot net dot au>
  MFC after:	1 week

Changes:
  head/lib/libc/locale/mbsrtowcs.3
Comment 2 Gordon Bergling freebsd_committer freebsd_triage 2020-08-07 16:57:17 UTC
Committed, thanks for the patch!
Comment 3 commit-hook freebsd_committer freebsd_triage 2020-08-14 06:44:45 UTC
A commit references this bug:

Author: gbe
Date: Fri Aug 14 06:44:34 UTC 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>

Changes:
_U  stable/12/
  stable/12/lib/libc/locale/mbsrtowcs.3