diff options
Diffstat (limited to 'man3/mbrlen.3')
| -rw-r--r-- | man3/mbrlen.3 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/man3/mbrlen.3 b/man3/mbrlen.3 index ca9ecc0c1e..405ffe060a 100644 --- a/man3/mbrlen.3 +++ b/man3/mbrlen.3 @@ -29,13 +29,13 @@ null wide character, it returns the number of bytes that were consumed from shift state \fI*ps\fP to the initial state and returns 0. .PP If the \fIn\fP bytes starting at \fIs\fP do not contain a complete multibyte -character, \fBmbrlen\fP returns \fI(size_t)(-2)\fP. This can happen even if +character, \fBmbrlen\fP returns \fI(size_t)(\-2)\fP. This can happen even if \fIn\fP >= \fIMB_CUR_MAX\fP, if the multibyte string contains redundant shift sequences. .PP If the multibyte string starting at \fIs\fP contains an invalid multibyte sequence before the next complete character, \fBmbrlen\fP returns -\fI(size_t)(-1)\fP and sets \fBerrno\fP to \fBEILSEQ\fP. In this case, +\fI(size_t)(\-1)\fP and sets \fBerrno\fP to \fBEILSEQ\fP. In this case, the effects on \fI*ps\fP are undefined. .PP If \fIps\fP is a NULL pointer, a static anonymous state only known to the @@ -43,9 +43,9 @@ mbrlen function is used instead. .SH "RETURN VALUE" The \fBmbrlen\fP function returns the number of bytes parsed from the multibyte sequence starting at \fIs\fP, if a non-null wide character was recognized. -It returns 0, if a null wide character was recognized. It returns (size_t)(-1) +It returns 0, if a null wide character was recognized. It returns (size_t)(\-1) and sets \fBerrno\fP to \fBEILSEQ\fP, if an invalid multibyte sequence was -encountered. It returns (size_t)(-2) if it couldn't parse a complete multibyte +encountered. It returns (size_t)(\-2) if it couldn't parse a complete multibyte character, meaning that \fIn\fP should be increased. .SH "CONFORMING TO" ISO/ANSI C, UNIX98 |
