mdoc(7) police: sweep.
This commit is contained in:
parent
ecf768b1cc
commit
ec73cae726
@ -38,7 +38,7 @@
|
||||
.\" @(#)isalnum.3 5.2 (Berkeley) 6/29/91
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd December 22, 2000
|
||||
.Dd October 3, 2002
|
||||
.Dt ISWALNUM 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -107,14 +107,12 @@
|
||||
.Sh DESCRIPTION
|
||||
The above functions are character classification utility functions,
|
||||
for use with wide characters
|
||||
.Po
|
||||
.Fa wchar_t
|
||||
.Vt ( wchar_t
|
||||
or
|
||||
.Fa wint_t
|
||||
.Pc .
|
||||
.Vt wint_t ) .
|
||||
See the description for the similarly-named single byte classification
|
||||
functions (like
|
||||
.Xr isalnum 3 ),
|
||||
.Xr isalnum 3 ) ,
|
||||
for details.
|
||||
.Sh RETURN VALUES
|
||||
The functions return zero if the character tests false and
|
||||
@ -157,6 +155,8 @@ which are
|
||||
extensions.
|
||||
.Sh CAVEATS
|
||||
The result of these functions is undefined unless
|
||||
the argument is WEOF or a valid
|
||||
the argument is
|
||||
.Dv WEOF
|
||||
or a valid
|
||||
.Vt wchar_t
|
||||
value for the current locale.
|
||||
|
@ -23,6 +23,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd November 11, 2002
|
||||
.Dt MBRLEN 3
|
||||
.Os
|
||||
@ -38,7 +39,7 @@
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Fn mbrlen
|
||||
function determines the the number of bytes constituting the
|
||||
function determines the number of bytes constituting the
|
||||
multibyte character sequence pointed to by
|
||||
.Fa s ,
|
||||
examining at most
|
||||
@ -46,7 +47,7 @@ examining at most
|
||||
bytes.
|
||||
.Pp
|
||||
The
|
||||
.Ft mbstate_t
|
||||
.Vt mbstate_t
|
||||
argument,
|
||||
.Fa ps ,
|
||||
is used to keep track of the shift state.
|
||||
@ -54,7 +55,7 @@ If it is
|
||||
.Dv NULL ,
|
||||
.Fn mbrlen
|
||||
uses an internal, static
|
||||
.Ft mbstate_t
|
||||
.Vt mbstate_t
|
||||
object.
|
||||
.Pp
|
||||
It is equivalent to:
|
||||
@ -63,11 +64,13 @@ It is equivalent to:
|
||||
.Pp
|
||||
Except that when
|
||||
.Fa ps
|
||||
is a NULL pointer,
|
||||
is a
|
||||
.Dv NULL
|
||||
pointer,
|
||||
.Fn mbrlen
|
||||
uses its own static, internal
|
||||
.Ft mbstate_t
|
||||
object to keep track of shift state.
|
||||
.Vt mbstate_t
|
||||
object to keep track of the shift state.
|
||||
.Sh RETURN VALUES
|
||||
The
|
||||
.Fn mbrlen
|
||||
@ -78,7 +81,8 @@ The first
|
||||
.Fa n
|
||||
or fewer bytes of
|
||||
.Fa s
|
||||
represent the null wide character (L'\e0').
|
||||
represent the null wide character
|
||||
.Pq Li "L'\e0'" .
|
||||
.It >0
|
||||
The first
|
||||
.Fa n
|
||||
@ -87,21 +91,13 @@ or fewer bytes of
|
||||
represent a valid character,
|
||||
.Fn mbrtowc
|
||||
returns the length (in bytes) of the multibyte sequence.
|
||||
.It Xo
|
||||
.No ( Ns
|
||||
.Ft size_t Ns
|
||||
.No ) Ns \&-2
|
||||
.Xc
|
||||
.It Po Vt size_t Pc Ns \-2
|
||||
The first
|
||||
.Fa n
|
||||
bytes of
|
||||
.Fa s
|
||||
are an incomplete multibyte sequence.
|
||||
.It Xo
|
||||
.No ( Ns
|
||||
.Ft size_t Ns
|
||||
.No ) Ns \&-1
|
||||
.Xc
|
||||
.It Po Vt size_t Pc Ns \-1
|
||||
The byte sequence pointed to by
|
||||
.Fa s
|
||||
is an invalid multibyte sequence.
|
||||
|
@ -23,6 +23,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd August 15, 2002
|
||||
.Dt MBRTOWC 3
|
||||
.Os
|
||||
@ -34,7 +35,10 @@
|
||||
.Sh SYNOPSIS
|
||||
.In wchar.h
|
||||
.Ft size_t
|
||||
.Fn mbrtowc "wchar_t * restrict pwc" "const char * restrict s" "size_t n" "mbstate_t * restrict ps"
|
||||
.Fo mbrtowc
|
||||
.Fa "wchar_t * restrict pwc" "const char * restrict s" "size_t n"
|
||||
.Fa "mbstate_t * restrict ps"
|
||||
.Fc
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Fn mbrtowc
|
||||
@ -52,7 +56,7 @@ is not
|
||||
the multibyte character which
|
||||
.Fa s
|
||||
represents is stored in the
|
||||
.Ft wchar_t
|
||||
.Vt wchar_t
|
||||
it points to.
|
||||
.Pp
|
||||
If
|
||||
@ -65,13 +69,14 @@ behaves as if
|
||||
was
|
||||
.Dv NULL ,
|
||||
.Fa s
|
||||
was an empty string ("")
|
||||
was an empty string
|
||||
.Pq Qq
|
||||
and
|
||||
.Fa n
|
||||
was 1.
|
||||
.Pp
|
||||
The
|
||||
.Ft mbstate_t
|
||||
.Vt mbstate_t
|
||||
argument,
|
||||
.Fa ps ,
|
||||
is used to keep track of the shift state.
|
||||
@ -79,7 +84,7 @@ If it is
|
||||
.Dv NULL ,
|
||||
.Fn mbrtowc
|
||||
uses an internal, static
|
||||
.Ft mbstate_t
|
||||
.Vt mbstate_t
|
||||
object.
|
||||
.Sh RETURN VALUES
|
||||
The
|
||||
@ -91,7 +96,8 @@ The first
|
||||
.Fa n
|
||||
or fewer bytes of
|
||||
.Fa s
|
||||
represent the null wide character (L'\e0').
|
||||
represent the null wide character
|
||||
.Pq Li "L'\e0'" .
|
||||
.It >0
|
||||
The first
|
||||
.Fa n
|
||||
@ -100,21 +106,13 @@ or fewer bytes of
|
||||
represent a valid character,
|
||||
.Fn mbrtowc
|
||||
returns the length (in bytes) of the multibyte sequence.
|
||||
.It Xo
|
||||
.No ( Ns
|
||||
.Ft size_t Ns
|
||||
.No ) Ns \&-2
|
||||
.Xc
|
||||
.It Po Vt size_t Pc Ns \-2
|
||||
The first
|
||||
.Fa n
|
||||
bytes of
|
||||
.Fa s
|
||||
are an incomplete multibyte sequence.
|
||||
.It Xo
|
||||
.No ( Ns
|
||||
.Ft size_t Ns
|
||||
.No ) Ns \&-1
|
||||
.Xc
|
||||
.It Po Vt size_t Pc Ns \-1
|
||||
The byte sequence pointed to by
|
||||
.Fa s
|
||||
is an invalid multibyte sequence.
|
||||
|
@ -23,6 +23,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd August 16, 2002
|
||||
.Dt MBSINIT 3
|
||||
.Os
|
||||
@ -39,7 +40,7 @@
|
||||
The
|
||||
.Fn mbsinit
|
||||
function determines whether the
|
||||
.Ft mbstate_t
|
||||
.Vt mbstate_t
|
||||
object pointed to by
|
||||
.Fa ps
|
||||
describes an initial conversion state.
|
||||
|
@ -34,7 +34,10 @@
|
||||
.Sh SYNOPSIS
|
||||
.In wchar.h
|
||||
.Ft size_t
|
||||
.Fn mbsrtowcs "wchar_t * restrict dst" "const char ** restrict src" "size_t len" "mbstate_t * restrict ps"
|
||||
.Fo mbsrtowcs
|
||||
.Fa "wchar_t * restrict dst" "const char ** restrict src" "size_t len"
|
||||
.Fa "mbstate_t * restrict ps"
|
||||
.Fc
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Fn mbsrtowcs
|
||||
@ -43,10 +46,11 @@ function converts a sequence of multibyte characters pointed to indirectly by
|
||||
into a sequence of corresponding wide characters and stores at most
|
||||
.Fa len
|
||||
of them in the
|
||||
.Ft wchar_t
|
||||
.Vt wchar_t
|
||||
array pointed to by
|
||||
.Fa dst ,
|
||||
until it encounters a terminating null character ('\e0').
|
||||
until it encounters a terminating null character
|
||||
.Pq Li '\e0' .
|
||||
.Pp
|
||||
If
|
||||
.Fa dst
|
||||
@ -62,12 +66,12 @@ the pointer pointed to by
|
||||
.Fa src
|
||||
is updated to point to the character after the one that conversion stopped at.
|
||||
If conversion stops because a null character is encountered,
|
||||
.No * Ns Fa src
|
||||
.Fa *src
|
||||
is set to
|
||||
.Dv NULL .
|
||||
.Pp
|
||||
The
|
||||
.Ft mbstate_t
|
||||
.Vt mbstate_t
|
||||
argument,
|
||||
.Fa ps ,
|
||||
is used to keep track of the shift state.
|
||||
@ -75,7 +79,7 @@ If it is
|
||||
.Dv NULL ,
|
||||
.Fn mbsrtowcs
|
||||
uses an internal, static
|
||||
.Ft mbstate_t
|
||||
.Vt mbstate_t
|
||||
object.
|
||||
.Sh RETURN VALUES
|
||||
The
|
||||
@ -84,9 +88,7 @@ function returns the number of wide characters stored in
|
||||
the array pointed to by
|
||||
.Fa dst
|
||||
if successful, otherwise it returns
|
||||
.No ( Ns
|
||||
.Ft size_t Ns
|
||||
.No ) Ns -1 .
|
||||
.Po Vt size_t Pc Ns \-1 .
|
||||
.Sh ERRORS
|
||||
The
|
||||
.Fn mbsrtowcs
|
||||
|
@ -41,7 +41,7 @@
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm towlower
|
||||
.Nd upper case to lower case letter conversion (wide character version)
|
||||
.Nd "upper case to lower case letter conversion (wide character version)"
|
||||
.Sh LIBRARY
|
||||
.Lb libc
|
||||
.Sh SYNOPSIS
|
||||
@ -50,7 +50,7 @@
|
||||
.Fn towlower "wint_t wc"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Fn tolower
|
||||
.Fn towlower
|
||||
function converts an upper-case letter to the corresponding lower-case
|
||||
letter.
|
||||
.Sh RETURN VALUES
|
||||
|
@ -41,7 +41,7 @@
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm towupper
|
||||
.Nd lower case to upper case letter conversion (wide character version)
|
||||
.Nd "lower case to upper case letter conversion (wide character version)"
|
||||
.Sh LIBRARY
|
||||
.Lb libc
|
||||
.Sh SYNOPSIS
|
||||
|
@ -54,8 +54,8 @@ It is backwards compatible with
|
||||
so 0x00-0x7f refer to the
|
||||
.Tn ASCII
|
||||
character set.
|
||||
The multibyte encoding of non-
|
||||
.Tn ASCII
|
||||
The multibyte encoding of
|
||||
.No non- Ns Tn ASCII
|
||||
characters
|
||||
consist entirely of bytes whose high order bit is set.
|
||||
The actual
|
||||
@ -94,7 +94,9 @@ whereas
|
||||
is limited to a 16-bit character set,
|
||||
and that
|
||||
.Xr utf2 4
|
||||
accepts redundant, non-"shortest form" representations of characters.
|
||||
accepts redundant,
|
||||
.No non- Ns Dq "shortest form"
|
||||
representations of characters.
|
||||
.Sh SEE ALSO
|
||||
.Xr euc 4 ,
|
||||
.Xr utf2 4
|
||||
|
@ -23,6 +23,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd August 15, 2002
|
||||
.Dt WCRTOMB 3
|
||||
.Os
|
||||
@ -68,7 +69,7 @@ If it is
|
||||
.Dv NULL ,
|
||||
.Fn wcrtomb
|
||||
uses an internal, static
|
||||
.Ft mbstate_t
|
||||
.Vt mbstate_t
|
||||
object.
|
||||
.Sh RETURN VALUES
|
||||
The
|
||||
@ -77,9 +78,7 @@ functions returns the length (in bytes) of the multibyte sequence
|
||||
needed to represent
|
||||
.Fa wc ,
|
||||
or
|
||||
.No ( Ns
|
||||
.Ft size_t Ns
|
||||
.No ) Ns \&-1
|
||||
.Po Vt size_t Pc Ns \-1
|
||||
if
|
||||
.Fa wc
|
||||
is not a valid wide character code.
|
||||
|
@ -35,7 +35,10 @@
|
||||
.Sh SYNOPSIS
|
||||
.In wchar.h
|
||||
.Ft size_t
|
||||
.Fn wcsftime "wchar_t * restrict wcs" "size_t maxsize" "const wchar_t * restrict format" "const struct tm * restrict timeptr"
|
||||
.Fo wcsftime
|
||||
.Fa "wchar_t * restrict wcs" "size_t maxsize"
|
||||
.Fa "const wchar_t * restrict format" "const struct tm * restrict timeptr"
|
||||
.Fc
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Fn wcsftime
|
||||
@ -48,7 +51,9 @@ for a detailed description.
|
||||
.Sh COMPATIBILITY
|
||||
Some early implementations of
|
||||
.Fn wcsftime
|
||||
had a format argument with type
|
||||
had a
|
||||
.Fa format
|
||||
argument with type
|
||||
.Vt "const char *"
|
||||
instead of
|
||||
.Vt "const wchar_t *" .
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" Copyright (c) [year] [your name]
|
||||
.\" Copyright (c) 2002 Tim J. Robbins
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
@ -23,6 +23,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd August 16, 2002
|
||||
.Dt WCSRTOMBS 3
|
||||
.Os
|
||||
@ -34,7 +35,10 @@
|
||||
.Sh SYNOPSIS
|
||||
.In wchar.h
|
||||
.Ft size_t
|
||||
.Fn wcsrtombs "char * restrict dst" "const wchar_t ** restrict src" "size_t len" "mbstate_t * restrict ps"
|
||||
.Fo wcsrtombs
|
||||
.Fa "char * restrict dst" "const wchar_t ** restrict src"
|
||||
.Fa "size_t len" "mbstate_t * restrict ps"
|
||||
.Fc
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Fn wcsrtombs
|
||||
@ -62,12 +66,12 @@ the pointer pointed to by
|
||||
.Fa src
|
||||
is updated to point to the character after the one that conversion stopped at.
|
||||
If conversion stops because a null character is encountered,
|
||||
.No * Ns Fa src
|
||||
.Fa *src
|
||||
is set to
|
||||
.Dv NULL .
|
||||
.Pp
|
||||
The
|
||||
.Ft mbstate_t
|
||||
.Vt mbstate_t
|
||||
argument,
|
||||
.Fa ps ,
|
||||
is used to keep track of the shift state.
|
||||
@ -75,7 +79,7 @@ If it is
|
||||
.Dv NULL ,
|
||||
.Fn wcsrtombs
|
||||
uses an internal, static
|
||||
.Ft mbstate_t
|
||||
.Vt mbstate_t
|
||||
object.
|
||||
.Sh RETURN VALUES
|
||||
The
|
||||
@ -84,9 +88,7 @@ function returns the number of bytes stored in
|
||||
the array pointed to by
|
||||
.Fa dst
|
||||
(not including any terminating null), if successful, otherwise it returns
|
||||
.No ( Ns
|
||||
.Ft size_t Ns
|
||||
.No ) Ns -1 .
|
||||
.Po Vt size_t Pc Ns \-1 .
|
||||
.Sh ERRORS
|
||||
The
|
||||
.Fn wcsrtombs
|
||||
@ -97,8 +99,8 @@ An invalid wide character was encountered.
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Xr mbsrtowcs 3 ,
|
||||
.Xr wcstombs 3 ,
|
||||
.Xr wcrtomb 3
|
||||
.Xr wcrtomb 3 ,
|
||||
.Xr wcstombs 3
|
||||
.Sh STANDARDS
|
||||
The
|
||||
.Fn wcsrtombs
|
||||
|
@ -74,7 +74,7 @@ functions are wide-character versions of the
|
||||
.Fn strtoimax
|
||||
and
|
||||
.Fn strtoumax
|
||||
functions.
|
||||
functions, respectively.
|
||||
Refer to their manual pages (for example
|
||||
.Xr strtol 3 )
|
||||
for details.
|
||||
|
@ -28,8 +28,7 @@
|
||||
.Dt WCTRANS 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm towctrans ,
|
||||
.Nm wctrans
|
||||
.Nm towctrans , wctrans
|
||||
.Nd "wide character mapping functions"
|
||||
.Sh LIBRARY
|
||||
.Lb libc
|
||||
@ -50,7 +49,7 @@ may be used as the second argument for calls to
|
||||
.Pp
|
||||
The following character mapping names are recognised:
|
||||
.Bl -column -offset indent ".Li tolower" ".Li toupper"
|
||||
.It Li tolower Ta Li toupper
|
||||
.It Li "tolower toupper"
|
||||
.El
|
||||
.Pp
|
||||
The
|
||||
|
@ -28,8 +28,7 @@
|
||||
.Dt WCTYPE 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm iswctype ,
|
||||
.Nm wctype
|
||||
.Nm iswctype , wctype
|
||||
.Nd "wide character class functions"
|
||||
.Sh LIBRARY
|
||||
.Lb libc
|
||||
@ -50,9 +49,9 @@ may be used as the second argument for calls to
|
||||
.Pp
|
||||
The following character class names are recognised:
|
||||
.Bl -column -offset indent ".Li alnum" ".Li cntrl" ".Li phonogram" ".Li print" ".Li special"
|
||||
.It Li alnum Ta Li cntrl Ta Li ideogram Ta Li print Ta Li special
|
||||
.It Li alpha Ta Li digit Ta Li lower Ta Li punct Ta Li upper
|
||||
.It Li blank Ta Li graph Ta Li phonogram Ta Li space Ta Li xdigit
|
||||
.It Li "alnum cntrl ideogram print special"
|
||||
.It Li "alpha digit lower punct upper"
|
||||
.It Li "blank graph phonogram space xdigit"
|
||||
.El
|
||||
.Pp
|
||||
The
|
||||
@ -82,7 +81,7 @@ that can be used in subsequent calls to
|
||||
.Fn iswctype .
|
||||
.Sh EXAMPLES
|
||||
Reimplement
|
||||
.Fn iswalpha
|
||||
.Xr iswalpha 3
|
||||
in terms of
|
||||
.Fn iswctype
|
||||
and
|
||||
@ -104,10 +103,10 @@ and
|
||||
functions conform to
|
||||
.St -p1003.1-2001 .
|
||||
The
|
||||
.Li ideogram ,
|
||||
.Li phonogram
|
||||
.Dq Li ideogram ,
|
||||
.Dq Li phonogram
|
||||
and
|
||||
.Li special
|
||||
.Dq Li special
|
||||
character classes are extensions.
|
||||
.Sh HISTORY
|
||||
The
|
||||
|
@ -23,6 +23,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd October 3, 2002
|
||||
.Dt WCWIDTH 3
|
||||
.Os
|
||||
@ -47,7 +48,7 @@ The
|
||||
function returns 0 if the
|
||||
.Fa wc
|
||||
argument is a null wide character (L'\e0'),
|
||||
-1 if
|
||||
\-1 if
|
||||
.Fa wc
|
||||
is not printable,
|
||||
otherwise it returns the number of column positions the
|
||||
@ -67,11 +68,11 @@ while ((ch = getwchar()) != WEOF) {
|
||||
if ((w = wcwidth(ch)) > 0)
|
||||
column += w;
|
||||
if (column >= 20) {
|
||||
putwchar(L'\n');
|
||||
putwchar(L'\en');
|
||||
column = 0;
|
||||
}
|
||||
putwchar(ch);
|
||||
if (ch == L'\n')
|
||||
if (ch == L'\en')
|
||||
column = 0;
|
||||
}
|
||||
.Ed
|
||||
|
Loading…
x
Reference in New Issue
Block a user