Module Name: src Committed By: rillig Date: Sat Feb 3 10:55:38 UTC 2024
Modified Files: src/lib/libc/locale: mblen.3 Log Message: mblen.3: clean up wording and grammar To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/locale/mblen.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/locale/mblen.3 diff -u src/lib/libc/locale/mblen.3:1.6 src/lib/libc/locale/mblen.3:1.7 --- src/lib/libc/locale/mblen.3:1.6 Sat Oct 14 07:51:01 2006 +++ src/lib/libc/locale/mblen.3 Sat Feb 3 10:55:38 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: mblen.3,v 1.6 2006/10/14 07:51:01 wiz Exp $ +.\" $NetBSD: mblen.3,v 1.7 2024/02/03 10:55:38 rillig Exp $ .\" .\" Copyright (c)2002 Citrus Project, .\" All rights reserved. @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 3, 2002 +.Dd February 3, 2024 .Dt MBLEN 3 .Os .\" ---------------------------------------------------------------------- @@ -47,18 +47,20 @@ function usually determines the number o a multibyte character pointed to by .Fa s and returns it. -This function shall only examine max n bytes of the array beginning from +This function examines at most +.Fa n +bytes of the array beginning from .Fa s . .Pp In state-dependent encodings, .Fa s -may point the special sequence bytes to change the shift-state. +may point to the special sequence bytes to change the shift-state. Although such sequence bytes corresponds to no individual wide-character code, the .Fn mblen -changes the own state by them and treats them -as if they are a part of the subsequent multibyte character. +function changes its own state by them and treats them +as if they were part of the subsequent multibyte character. .Pp Unlike .Xr mbrlen 3 , @@ -106,8 +108,7 @@ determines whether the current encoding This function returns 0 if the encoding is state-independent, otherwise non-zero. .It "n == 0" -In this case, -the first +The first .Fa n bytes of the array pointed to by .Fa s @@ -128,11 +129,11 @@ points to a nul byte .Pq Sq \e0 . .It "positive" The value returned is -a number of bytes for the valid multibyte character pointed to by +the number of bytes for the valid multibyte character pointed to by .Fa s . -There are no cases that this value is greater than -.Fa n -or the value of the +The value returned is at most +.Fa n , +and at most the value of the .Dv MB_CUR_MAX macro. .It "-1" @@ -140,7 +141,7 @@ macro. points to an invalid or incomplete multibyte character. The .Fn mblen -also sets +function also sets .Va errno to indicate the error. .El @@ -151,7 +152,7 @@ is equal to .Dv NULL , the .Fn mblen -returns: +function returns: .Bl -tag -width 0123456789 .It "0" The current encoding is state-independent.