]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man3/mbsrtowcs.3
dist.mk, All pages: .TH: Generate date at 'make dist'
[thirdparty/man-pages.git] / man3 / mbsrtowcs.3
index 975a51e55e6ce465b55e85a3a1a227b7f49f9e13..ef61409d1a14f76e25b3b0985ed250950d182ec7 100644 (file)
@@ -1,11 +1,6 @@
 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
 .\"
-.\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
-.\" This is free documentation; you can redistribute it and/or
-.\" modify it under the terms of the GNU General Public License as
-.\" published by the Free Software Foundation; either version 2 of
-.\" the License, or (at your option) any later version.
-.\" %%%LICENSE_END
+.\" SPDX-License-Identifier: GPL-2.0-or-later
 .\"
 .\" References consulted:
 .\"   GNU glibc-2 source code and manual
 .\"   OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
 .\"   ISO/IEC 9899:1999
 .\"
-.TH MBSRTOWCS 3  2011-09-28 "GNU" "Linux Programmer's Manual"
+.TH MBSRTOWCS 3 (date) "Linux man-pages (unreleased)"
 .SH NAME
 mbsrtowcs \- convert a multibyte string to a wide-character string
+.SH LIBRARY
+Standard C library
+.RI ( libc ", " \-lc )
 .SH SYNOPSIS
 .nf
 .B #include <wchar.h>
-.sp
-.BI "size_t mbsrtowcs(wchar_t *" dest ", const char **" src ,
-.BI "                  size_t " len ", mbstate_t *" ps );
+.PP
+.BI "size_t mbsrtowcs(wchar_t *restrict " dest ", const char **restrict " src ,
+.BI "                 size_t " len ", mbstate_t *restrict " ps );
 .fi
 .SH DESCRIPTION
 If
 .I dest
-is not a NULL pointer, the
+is not NULL, the
 .BR mbsrtowcs ()
 function converts the
 multibyte string
@@ -54,7 +52,7 @@ by the number of bytes consumed.
 The conversion can stop for three reasons:
 .IP 1. 3
 An invalid multibyte sequence has been encountered.
-In this case
+In this case,
 .I *src
 is left pointing to the invalid multibyte sequence,
 .I (size_t)\ \-1
@@ -65,10 +63,9 @@ is set to
 .BR EILSEQ .
 .IP 2.
 .I len
-non-L\(aq\\0\(aq wide characters have been stored at
+non-L\(aq\e0\(aq wide characters have been stored at
 .IR dest .
-In this
-case
+In this case,
 .I *src
 is left pointing to the next
 multibyte sequence to be converted,
@@ -77,12 +74,12 @@ and the number of wide characters written to
 is returned.
 .IP 3.
 The multibyte string has been completely converted, including the
-terminating null wide character (\(aq\\0\(aq), which has the side
+terminating null wide character (\(aq\e0\(aq), which has the side
 effect of bringing back
 .I *ps
 to the
 initial state.
-In this case
+In this case,
 .I *src
 is set to NULL, and the number of wide
 characters written to
@@ -90,7 +87,7 @@ characters written to
 excluding the terminating null wide character, is returned.
 .PP
 If
-.IR dest 
+.I dest
 is NULL,
 .I len
 is ignored,
@@ -101,7 +98,7 @@ and that no length limit exists.
 In both of the above cases,
 if
 .I ps
-is a NULL pointer, a static anonymous
+is NULL, a static anonymous
 state known only to the
 .BR mbsrtowcs ()
 function is used instead.
@@ -124,8 +121,27 @@ is returned, and
 .I errno
 set to
 .BR EILSEQ .
-.SH CONFORMING TO
-C99.
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.ad l
+.nh
+.TS
+allbox;
+lb lb lbx
+l l l.
+Interface      Attribute       Value
+T{
+.BR mbsrtowcs ()
+T}     Thread safety   T{
+MT-Unsafe race:mbsrtowcs/!ps
+T}
+.TE
+.hy
+.ad
+.sp 1
+.SH STANDARDS
+POSIX.1-2001, POSIX.1-2008, C99.
 .SH NOTES
 The behavior of
 .BR mbsrtowcs ()
@@ -139,5 +155,7 @@ Passing NULL as
 is not multithread safe.
 .SH SEE ALSO
 .BR iconv (3),
+.BR mbrtowc (3),
+.BR mbsinit (3),
 .BR mbsnrtowcs (3),
 .BR mbstowcs (3)