summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2015-03-22 17:52:31 +0000
committerstsp <stsp@openbsd.org>2015-03-22 17:52:31 +0000
commit7260b7bbaaf772adf8914b0a69ded5118be962fe (patch)
treef2b5fda91554d123176e26d4190637954129fe9b
parentsys/sysctl.h includes linux/sysctl.h, remove the extra unchecked include (diff)
downloadwireguard-openbsd-7260b7bbaaf772adf8914b0a69ded5118be962fe.tar.xz
wireguard-openbsd-7260b7bbaaf772adf8914b0a69ded5118be962fe.zip
More wide character string function man page improvements based on feedback
by Kaspars Bankovskis. ok jmc@
-rw-r--r--lib/libc/locale/mbstowcs.312
-rw-r--r--lib/libc/locale/wcrtomb.317
-rw-r--r--lib/libc/locale/wcstombs.310
3 files changed, 15 insertions, 24 deletions
diff --git a/lib/libc/locale/mbstowcs.3 b/lib/libc/locale/mbstowcs.3
index c62e423ab92..857ee655c29 100644
--- a/lib/libc/locale/mbstowcs.3
+++ b/lib/libc/locale/mbstowcs.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mbstowcs.3,v 1.6 2015/03/19 12:41:51 jmc Exp $
+.\" $OpenBSD: mbstowcs.3,v 1.7 2015/03/22 17:52:31 stsp Exp $
.\" $NetBSD: mbstowcs.3,v 1.6 2003/09/08 17:54:31 wiz Exp $
.\"
.\" Copyright (c)2002 Citrus Project,
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: March 19 2015 $
+.Dd $Mdocdate: March 22 2015 $
.Dt MBSTOWCS 3
.Os
.\" ----------------------------------------------------------------------
@@ -39,16 +39,12 @@
.Fn mbstowcs "wchar_t * restrict pwcs" "const char * restrict s" "size_t n"
.\" ----------------------------------------------------------------------
.Sh DESCRIPTION
-The
.Fn mbstowcs
converts a null-terminated multibyte character string pointed to by
.Fa s
-to the corresponding wide-character string and stores it in the array
-pointed to by
-.Fa pwcs .
-Up to
+to the corresponding wide-character string and stores up to
.Fa n
-elements are stored in
+wide characters in the array pointed to by
.Fa pwcs .
Each character will be converted as if
.Xr mbtowc 3
diff --git a/lib/libc/locale/wcrtomb.3 b/lib/libc/locale/wcrtomb.3
index 17e8d983420..b12875a0143 100644
--- a/lib/libc/locale/wcrtomb.3
+++ b/lib/libc/locale/wcrtomb.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: wcrtomb.3,v 1.8 2015/03/19 12:41:51 jmc Exp $
+.\" $OpenBSD: wcrtomb.3,v 1.9 2015/03/22 17:52:31 stsp Exp $
.\" $NetBSD: wcrtomb.3,v 1.4 2003/09/08 17:54:31 wiz Exp $
.\"
.\" Copyright (c)2002 Citrus Project,
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: March 19 2015 $
+.Dd $Mdocdate: March 22 2015 $
.Dt WCRTOMB 3
.Os
.\" ----------------------------------------------------------------------
@@ -42,16 +42,13 @@
.Fn wcrtomb
converts the wide character given by
.Fa wc
-to the corresponding multibyte character, and stores it in the array
-pointed to by
+to the corresponding multibyte character, and stores up to
+.Dv MB_CUR_MAX
+bytes in the array pointed to by
.Fa s
-unless
+if
.Fa s
-is a null pointer.
-Up to
-.Dv MB_CUR_MAX
-bytes are stored in
-.Fa s .
+is not a null pointer.
.Pp
The behaviour of
.Fn wcrtomb
diff --git a/lib/libc/locale/wcstombs.3 b/lib/libc/locale/wcstombs.3
index 5593b8625ad..685676892eb 100644
--- a/lib/libc/locale/wcstombs.3
+++ b/lib/libc/locale/wcstombs.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: wcstombs.3,v 1.6 2015/03/19 12:41:51 jmc Exp $
+.\" $OpenBSD: wcstombs.3,v 1.7 2015/03/22 17:52:31 stsp Exp $
.\" $NetBSD: wcstombs.3,v 1.5 2003/09/08 17:54:32 wiz Exp $
.\"
.\" Copyright (c)2002 Citrus Project,
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: March 19 2015 $
+.Dd $Mdocdate: March 22 2015 $
.Dt WCSTOMBS 3
.Os
.\" ----------------------------------------------------------------------
@@ -43,11 +43,9 @@
converts the null-terminated wide-character string pointed to by
.Fa pwcs
to the corresponding multibyte character string,
-and stores it in the array pointed to by
-.Fa s .
-Up to
+and stores up to
.Fa n
-bytes are stored in
+bytes in the array pointed to by
.Fa s .
Each character will be converted as if
.Xr wctomb 3