summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2002-11-29 17:35:09 +0000
committerru <ru@FreeBSD.org>2002-11-29 17:35:09 +0000
commitec73cae726e446f544ac3ffee1b7be5036ef8f63 (patch)
treec0880323842b2dd8494228497e990a3ea94fab9c /lib/libc
parentecf768b1cc4a92d482b44d778465265d5c7eda3f (diff)
downloadFreeBSD-src-ec73cae726e446f544ac3ffee1b7be5036ef8f63.zip
FreeBSD-src-ec73cae726e446f544ac3ffee1b7be5036ef8f63.tar.gz
mdoc(7) police: sweep.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/locale/iswalnum.314
-rw-r--r--lib/libc/locale/mbrlen.330
-rw-r--r--lib/libc/locale/mbrtowc.330
-rw-r--r--lib/libc/locale/mbsinit.33
-rw-r--r--lib/libc/locale/mbsrtowcs.320
-rw-r--r--lib/libc/locale/towlower.34
-rw-r--r--lib/libc/locale/towupper.32
-rw-r--r--lib/libc/locale/utf8.58
-rw-r--r--lib/libc/locale/wcrtomb.37
-rw-r--r--lib/libc/locale/wcsftime.39
-rw-r--r--lib/libc/locale/wcsrtombs.322
-rw-r--r--lib/libc/locale/wcstol.32
-rw-r--r--lib/libc/locale/wctrans.35
-rw-r--r--lib/libc/locale/wctype.317
-rw-r--r--lib/libc/locale/wcwidth.37
15 files changed, 92 insertions, 88 deletions
diff --git a/lib/libc/locale/iswalnum.3 b/lib/libc/locale/iswalnum.3
index 86b04a7..8a20532 100644
--- a/lib/libc/locale/iswalnum.3
+++ b/lib/libc/locale/iswalnum.3
@@ -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.
diff --git a/lib/libc/locale/mbrlen.3 b/lib/libc/locale/mbrlen.3
index d9d522f..51548a4 100644
--- a/lib/libc/locale/mbrlen.3
+++ b/lib/libc/locale/mbrlen.3
@@ -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.
diff --git a/lib/libc/locale/mbrtowc.3 b/lib/libc/locale/mbrtowc.3
index 435f146..b986db2 100644
--- a/lib/libc/locale/mbrtowc.3
+++ b/lib/libc/locale/mbrtowc.3
@@ -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.
diff --git a/lib/libc/locale/mbsinit.3 b/lib/libc/locale/mbsinit.3
index 295bb68..37c01cf 100644
--- a/lib/libc/locale/mbsinit.3
+++ b/lib/libc/locale/mbsinit.3
@@ -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.
diff --git a/lib/libc/locale/mbsrtowcs.3 b/lib/libc/locale/mbsrtowcs.3
index 79e9009..c45a4f3 100644
--- a/lib/libc/locale/mbsrtowcs.3
+++ b/lib/libc/locale/mbsrtowcs.3
@@ -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
diff --git a/lib/libc/locale/towlower.3 b/lib/libc/locale/towlower.3
index 27f4cd0..63d6431 100644
--- a/lib/libc/locale/towlower.3
+++ b/lib/libc/locale/towlower.3
@@ -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
diff --git a/lib/libc/locale/towupper.3 b/lib/libc/locale/towupper.3
index 86696e8..0fdefa9 100644
--- a/lib/libc/locale/towupper.3
+++ b/lib/libc/locale/towupper.3
@@ -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
diff --git a/lib/libc/locale/utf8.5 b/lib/libc/locale/utf8.5
index 79eb82f..ae3b079 100644
--- a/lib/libc/locale/utf8.5
+++ b/lib/libc/locale/utf8.5
@@ -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
diff --git a/lib/libc/locale/wcrtomb.3 b/lib/libc/locale/wcrtomb.3
index 8614f62..a2da1c2 100644
--- a/lib/libc/locale/wcrtomb.3
+++ b/lib/libc/locale/wcrtomb.3
@@ -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.
diff --git a/lib/libc/locale/wcsftime.3 b/lib/libc/locale/wcsftime.3
index 3c43469..92aee93 100644
--- a/lib/libc/locale/wcsftime.3
+++ b/lib/libc/locale/wcsftime.3
@@ -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 *" .
diff --git a/lib/libc/locale/wcsrtombs.3 b/lib/libc/locale/wcsrtombs.3
index f4ecf41..155f78e 100644
--- a/lib/libc/locale/wcsrtombs.3
+++ b/lib/libc/locale/wcsrtombs.3
@@ -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
diff --git a/lib/libc/locale/wcstol.3 b/lib/libc/locale/wcstol.3
index 8128c50..e69a726 100644
--- a/lib/libc/locale/wcstol.3
+++ b/lib/libc/locale/wcstol.3
@@ -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.
diff --git a/lib/libc/locale/wctrans.3 b/lib/libc/locale/wctrans.3
index 0941e80..ce3e68c 100644
--- a/lib/libc/locale/wctrans.3
+++ b/lib/libc/locale/wctrans.3
@@ -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
diff --git a/lib/libc/locale/wctype.3 b/lib/libc/locale/wctype.3
index 7843af7..9ea2b30 100644
--- a/lib/libc/locale/wctype.3
+++ b/lib/libc/locale/wctype.3
@@ -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
diff --git a/lib/libc/locale/wcwidth.3 b/lib/libc/locale/wcwidth.3
index 78c969e..6e9dcd6 100644
--- a/lib/libc/locale/wcwidth.3
+++ b/lib/libc/locale/wcwidth.3
@@ -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
OpenPOWER on IntegriCloud