summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2010-11-20 18:23:20 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2010-11-20 18:23:20 +0000
commit2fcce56307d1ceb3af1a9fc40c291d59d9cc098d (patch)
treea2851ebbf6add5bff6bad68559bbc8af2857a0b8
parent52a8aeca7ffa272a8386c137b2aca70c69f5ad3d (diff)
Add CAVEATS section documenting error handling caveats.
tweak and ok jmc, tedu
-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.