Bug 215848 - [patch] Ambiguity in returns for mbsrtowcs
Summary: [patch] Ambiguity in returns for mbsrtowcs
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Gordon Bergling
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-01-07 00:46 UTC by Andrew Stevenson
Modified: 2020-08-14 06:49 UTC (History)
2 users (show)

See Also:


Attachments
diff to mbsrtowcs.3 (820 bytes, patch)
2017-01-07 00:46 UTC, Andrew Stevenson
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 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 2020-08-07 16:57:17 UTC
Committed, thanks for the patch!
Comment 3 commit-hook freebsd_committer 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