summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2010-11-20 18:23:19 +0000
committerstsp <stsp@openbsd.org>2010-11-20 18:23:19 +0000
commit9edec12881efa5841614547494920f699c3265ac (patch)
treefe0ce74f9c66246afc3d41ce8ce24caf8679a76d /lib/libc
parentExplain how to start a rebuild in a more obvious way and add an example. (diff)
downloadwireguard-openbsd-9edec12881efa5841614547494920f699c3265ac.tar.xz
wireguard-openbsd-9edec12881efa5841614547494920f699c3265ac.zip
Add CAVEATS section documenting error handling caveats.
tweak and ok jmc, tedu
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/locale/mbtowc.311
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/libc/locale/mbtowc.3 b/lib/libc/locale/mbtowc.3
index c583a7901fb..c5b3039f198 100644
--- a/lib/libc/locale/mbtowc.3
+++ b/lib/libc/locale/mbtowc.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mbtowc.3,v 1.2 2007/05/31 19:19:29 jmc Exp $
+.\" $OpenBSD: mbtowc.3,v 1.3 2010/11/20 18:23:19 stsp Exp $
.\" $NetBSD: mbtowc.3,v 1.5 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: May 31 2007 $
+.Dd $Mdocdate: November 20 2010 $
.Dt MBTOWC 3
.Os
.\" ----------------------------------------------------------------------
@@ -177,3 +177,10 @@ The restrict qualifier is added at
.\" .St -isoC99 .
ISO/IEC 9899/1999
.Pq Dq ISO C99 .
+.Sh CAVEATS
+On error, callers of
+.Fn mbtowc
+cannot tell whether the multibyte character was invalid or incomplete.
+To treat incomplete data differently from invalid data the
+.Xr mbrtowc 3
+function can be used instead.