mirror of https://github.com/mkerrisk/man-pages
getwchar.3, infnan.3, iswalnum.3, iswalpha.3, iswcntrl.3, iswctype.3, iswdigit.3, iswgraph.3, iswlower.3, iswprint.3, iswpunct.3, iswspace.3, iswupper.3, iswxdigit.3, lsearch.3, mblen.3, mbrlen.3, memmove.3, memset.3, putwchar.3, rewinddir.3, towctrans.3, towlower.3, towupper.3, ungetwc.3, wcschr.3, wcscmp.3, wcscspn.3, wcspbrk.3, wcsrchr.3, wcsspn.3, wctomb.3, wctrans.3, wmemchr.3, wmemcmp.3, wmemcpy.3, wmemmove.3, wmemset.3, console.4, hd.4, lp.4, mem.4, mouse.4, ram.4, sync.8: Convert inline formatting (\fX...\fP) to dot-directive formatting
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
173e4d50e7
commit
35cfd37865
|
@ -29,13 +29,19 @@ The
|
|||
function is the wide-character equivalent of the
|
||||
.BR getchar (3)
|
||||
function.
|
||||
It reads a wide character from \fIstdin\fP and returns
|
||||
It reads a wide character from
|
||||
.I stdin
|
||||
and returns
|
||||
it.
|
||||
If the end of stream is reached, or if \fIferror(stdin)\fP becomes
|
||||
true, it returns
|
||||
If the end of stream is reached, or if
|
||||
.I ferror(stdin)
|
||||
becomes true, it returns
|
||||
.BR WEOF .
|
||||
If a wide-character conversion error occurs, it sets
|
||||
\fIerrno\fP to \fBEILSEQ\fP and returns
|
||||
.I errno
|
||||
to
|
||||
.B EILSEQ
|
||||
and returns
|
||||
.BR WEOF .
|
||||
.PP
|
||||
For a nonlocking counterpart, see
|
||||
|
|
|
@ -46,28 +46,40 @@ The
|
|||
.BR infnan ()
|
||||
function returns a suitable value for infinity and
|
||||
"not-a-number" (NaN) results.
|
||||
The value of \fIerror\fP can be
|
||||
The value of
|
||||
.I error
|
||||
can be
|
||||
.B ERANGE
|
||||
to represent infinity or anything else to represent NaN.
|
||||
\fIerrno\fP
|
||||
.I errno
|
||||
is also set.
|
||||
.SH RETURN VALUE
|
||||
If \fIerror\fP is
|
||||
If
|
||||
.I error
|
||||
is
|
||||
.B ERANGE
|
||||
(Infinity),
|
||||
.B HUGE_VAL
|
||||
is returned.
|
||||
.PP
|
||||
If \fIerror\fP is \-\fBERANGE\fP (\-Infinity), \-\fBHUGE_VAL\fP is returned.
|
||||
If
|
||||
.I error
|
||||
is \-\fBERANGE\fP (\-Infinity), \-\fBHUGE_VAL\fP is returned.
|
||||
.PP
|
||||
If \fIerror\fP is anything else, NAN is returned.
|
||||
If
|
||||
.I error
|
||||
is anything else, NAN is returned.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B EDOM
|
||||
The value of \fIerror\fP is "not-a-number" (NaN).
|
||||
The value of
|
||||
.I error
|
||||
is "not-a-number" (NaN).
|
||||
.TP
|
||||
.B ERANGE
|
||||
The value of \fIerror\fP is positive infinity or negative infinity.
|
||||
The value of
|
||||
.I error
|
||||
is positive infinity or negative infinity.
|
||||
.SH CONFORMING TO
|
||||
4.3BSD.
|
||||
.SH NOTES
|
||||
|
|
|
@ -28,7 +28,9 @@ The
|
|||
function is the wide-character equivalent of the
|
||||
.BR isalnum (3)
|
||||
function.
|
||||
It tests whether \fIwc\fP is a wide character
|
||||
It tests whether
|
||||
.I wc
|
||||
is a wide character
|
||||
belonging to the wide-character class "alnum".
|
||||
.PP
|
||||
The wide-character class "alnum" is a subclass of the wide-character class
|
||||
|
@ -56,7 +58,9 @@ to \(aqZ\(aq, \(aqa\(aq to \(aqz\(aq and the digits \(aq0\(aq to \(aq9\(aq.
|
|||
The
|
||||
.BR iswalnum ()
|
||||
function returns nonzero
|
||||
if \fIwc\fP is a wide character
|
||||
if
|
||||
.I wc
|
||||
is a wide character
|
||||
belonging to the wide-character class "alnum".
|
||||
Otherwise it returns zero.
|
||||
.SH CONFORMING TO
|
||||
|
|
|
@ -28,7 +28,9 @@ The
|
|||
function is the wide-character equivalent of the
|
||||
.BR isalpha (3)
|
||||
function.
|
||||
It tests whether \fIwc\fP is a wide character
|
||||
It tests whether
|
||||
.I wc
|
||||
is a wide character
|
||||
belonging to the wide-character class "alpha".
|
||||
.PP
|
||||
The wide-character class "alpha" is a subclass of the
|
||||
|
@ -60,7 +62,9 @@ letters \(aqA\(aq to \(aqZ\(aq and \(aqa\(aq to \(aqz\(aq.
|
|||
The
|
||||
.BR iswalpha ()
|
||||
function returns nonzero
|
||||
if \fIwc\fP is a wide character
|
||||
if
|
||||
.I wc
|
||||
is a wide character
|
||||
belonging to the wide-character class "alpha".
|
||||
Otherwise it returns zero.
|
||||
.SH CONFORMING TO
|
||||
|
|
|
@ -28,20 +28,27 @@ The
|
|||
function is the wide-character equivalent of the
|
||||
.BR iscntrl (3)
|
||||
function.
|
||||
It tests whether \fIwc\fP is a wide character
|
||||
It tests whether
|
||||
.I wc
|
||||
is a wide character
|
||||
belonging to the wide-character class "cntrl".
|
||||
.PP
|
||||
The wide-character class "cntrl" is disjoint from the wide-character class
|
||||
"print" and therefore also disjoint from its subclasses "graph", "alpha",
|
||||
"upper", "lower", "digit", "xdigit", "punct".
|
||||
.PP
|
||||
For an unsigned char \fIc\fP, \fIiscntrl(c)\fP
|
||||
implies \fIiswcntrl(btowc(c))\fP,
|
||||
For an unsigned char
|
||||
.IR c ,
|
||||
.I iscntrl(c)
|
||||
implies
|
||||
.IR iswcntrl(btowc(c)) ,
|
||||
but not vice versa.
|
||||
.SH RETURN VALUE
|
||||
The
|
||||
.BR iswcntrl ()
|
||||
function returns nonzero if \fIwc\fP is a
|
||||
function returns nonzero if
|
||||
.I wc
|
||||
is a
|
||||
wide character belonging to the wide-character class "cntrl".
|
||||
Otherwise it returns zero.
|
||||
.SH CONFORMING TO
|
||||
|
|
|
@ -23,18 +23,25 @@ iswctype \- wide-character classification
|
|||
.BI "int iswctype(wint_t " wc ", wctype_t " desc );
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
If \fIwc\fP is a wide character having the character property designated by
|
||||
\fIdesc\fP (or in other words: belongs to the character class designated by
|
||||
\fIdesc\fP), the
|
||||
If
|
||||
.I wc
|
||||
is a wide character having the character property designated by
|
||||
.I desc
|
||||
(or in other words: belongs to the character class designated by
|
||||
.IR desc ),
|
||||
the
|
||||
.BR iswctype ()
|
||||
function returns nonzero.
|
||||
Otherwise it
|
||||
returns zero.
|
||||
If \fIwc\fP is
|
||||
If
|
||||
.I wc
|
||||
is
|
||||
.BR WEOF ,
|
||||
zero is returned.
|
||||
.PP
|
||||
\fIdesc\fP must be a character property descriptor
|
||||
.I desc
|
||||
must be a character property descriptor
|
||||
returned by the
|
||||
.BR wctype (3)
|
||||
function.
|
||||
|
@ -42,7 +49,9 @@ function.
|
|||
The
|
||||
.BR iswctype ()
|
||||
function returns nonzero if
|
||||
the \fIwc\fP has the designated
|
||||
the
|
||||
.I wc
|
||||
has the designated
|
||||
property.
|
||||
Otherwise it returns 0.
|
||||
.SH CONFORMING TO
|
||||
|
|
|
@ -28,7 +28,9 @@ The
|
|||
function is the wide-character equivalent of the
|
||||
.BR isdigit (3)
|
||||
function.
|
||||
It tests whether \fIwc\fP is a wide character
|
||||
It tests whether
|
||||
.I wc
|
||||
is a wide character
|
||||
belonging to the wide-character class "digit".
|
||||
.PP
|
||||
The wide-character class "digit" is a subclass of the wide-character class
|
||||
|
@ -59,7 +61,9 @@ contains exactly the digits \(aq0\(aq to \(aq9\(aq.
|
|||
The
|
||||
.BR iswdigit ()
|
||||
function returns nonzero
|
||||
if \fIwc\fP is a wide character
|
||||
if
|
||||
.I wc
|
||||
is a wide character
|
||||
belonging to the wide-character class "digit".
|
||||
Otherwise it returns zero.
|
||||
.SH CONFORMING TO
|
||||
|
|
|
@ -28,7 +28,9 @@ The
|
|||
function is the wide-character equivalent of the
|
||||
.BR isgraph (3)
|
||||
function.
|
||||
It tests whether \fIwc\fP is a wide character
|
||||
It tests whether
|
||||
.I wc
|
||||
is a wide character
|
||||
belonging to the wide-character class "graph".
|
||||
.PP
|
||||
The wide-character class "graph" is a subclass of the wide-character class
|
||||
|
@ -52,7 +54,9 @@ the wide-character classes "alnum" and "punct".
|
|||
The
|
||||
.BR iswgraph ()
|
||||
function returns nonzero
|
||||
if \fIwc\fP is a wide character
|
||||
if
|
||||
.I wc
|
||||
is a wide character
|
||||
belonging to the wide-character class "graph".
|
||||
Otherwise it returns zero.
|
||||
.SH CONFORMING TO
|
||||
|
|
|
@ -28,7 +28,9 @@ The
|
|||
function is the wide-character equivalent of the
|
||||
.BR islower (3)
|
||||
function.
|
||||
It tests whether \fIwc\fP is a wide character
|
||||
It tests whether
|
||||
.I wc
|
||||
is a wide character
|
||||
belonging to the wide-character class "lower".
|
||||
.PP
|
||||
The wide-character class "lower" is a subclass of the wide-character class
|
||||
|
@ -53,9 +55,12 @@ the wide-character class
|
|||
"lower" is disjoint from the wide-character class "digit".
|
||||
.PP
|
||||
The wide-character class "lower" contains at least
|
||||
those characters \fIwc\fP
|
||||
which are equal to \fItowlower(wc)\fP and different
|
||||
from \fItowupper(wc)\fP.
|
||||
those characters
|
||||
.I wc
|
||||
which are equal to
|
||||
.I towlower(wc)
|
||||
and different from
|
||||
.IR towupper(wc) .
|
||||
.PP
|
||||
The wide-character class "lower" always contains
|
||||
at least the letters \(aqa\(aq to \(aqz\(aq.
|
||||
|
@ -63,7 +68,9 @@ at least the letters \(aqa\(aq to \(aqz\(aq.
|
|||
The
|
||||
.BR iswlower ()
|
||||
function returns nonzero
|
||||
if \fIwc\fP is a wide character
|
||||
if
|
||||
.I wc
|
||||
is a wide character
|
||||
belonging to the wide-character class "lower".
|
||||
Otherwise it returns zero.
|
||||
.SH CONFORMING TO
|
||||
|
|
|
@ -28,7 +28,9 @@ The
|
|||
function is the wide-character equivalent of the
|
||||
.BR isprint (3)
|
||||
function.
|
||||
It tests whether \fIwc\fP is a wide character
|
||||
It tests whether
|
||||
.I wc
|
||||
is a wide character
|
||||
belonging to the wide-character class "print".
|
||||
.PP
|
||||
The wide-character class "print" is disjoint from the wide-character class
|
||||
|
@ -38,7 +40,9 @@ The wide-character class "print" contains the wide-character class "graph".
|
|||
.SH RETURN VALUE
|
||||
The
|
||||
.BR iswprint ()
|
||||
function returns nonzero if \fIwc\fP is a
|
||||
function returns nonzero if
|
||||
.I wc
|
||||
is a
|
||||
wide character belonging to the wide-character class "print".
|
||||
Otherwise it returns zero.
|
||||
.SH CONFORMING TO
|
||||
|
|
|
@ -28,7 +28,9 @@ The
|
|||
function is the wide-character equivalent of the
|
||||
.BR ispunct (3)
|
||||
function.
|
||||
It tests whether \fIwc\fP is a wide character
|
||||
It tests whether
|
||||
.I wc
|
||||
is a wide character
|
||||
belonging to the wide-character class "punct".
|
||||
.PP
|
||||
The wide-character class "punct" is a subclass of the wide-character class
|
||||
|
@ -50,7 +52,9 @@ the wide-character class
|
|||
The
|
||||
.BR iswpunct ()
|
||||
function returns nonzero
|
||||
if \fIwc\fP is a wide-character
|
||||
if
|
||||
.I wc
|
||||
is a wide-character
|
||||
belonging to the wide-character class "punct".
|
||||
Otherwise it returns zero.
|
||||
.SH CONFORMING TO
|
||||
|
|
|
@ -28,7 +28,9 @@ The
|
|||
function is the wide-character equivalent of the
|
||||
.BR isspace (3)
|
||||
function.
|
||||
It tests whether \fIwc\fP is a wide character
|
||||
It tests whether
|
||||
.I wc
|
||||
is a wide character
|
||||
belonging to the wide-character class "space".
|
||||
.PP
|
||||
The wide-character class "space" is disjoint from the wide-character class
|
||||
|
@ -46,7 +48,9 @@ characters \(aq\\f\(aq, \(aq\\n\(aq, \(aq\\r\(aq, \(aq\\t\(aq, \(aq\\v\(aq.
|
|||
.SH RETURN VALUE
|
||||
The
|
||||
.BR iswspace ()
|
||||
function returns nonzero if \fIwc\fP is a wide character
|
||||
function returns nonzero if
|
||||
.I wc
|
||||
is a wide character
|
||||
belonging to the wide-character class "space".
|
||||
Otherwise it returns zero.
|
||||
.SH CONFORMING TO
|
||||
|
|
|
@ -28,7 +28,9 @@ The
|
|||
function is the wide-character equivalent of the
|
||||
.BR isupper (3)
|
||||
function.
|
||||
It tests whether \fIwc\fP is a wide character
|
||||
It tests whether
|
||||
.I wc
|
||||
is a wide character
|
||||
belonging to the wide-character class "upper".
|
||||
.PP
|
||||
The wide-character class "upper" is a subclass of the wide-character class
|
||||
|
@ -48,15 +50,21 @@ Being a subclass of the wide-character class "alnum", the wide-character class
|
|||
Being a subclass of the wide-character class "alpha", the wide-character class
|
||||
"upper" is disjoint from the wide-character class "digit".
|
||||
.PP
|
||||
The wide-character class "upper" contains at least those characters \fIwc\fP
|
||||
which are equal to \fItowupper(wc)\fP and different from \fItowlower(wc)\fP.
|
||||
The wide-character class "upper" contains at least those characters
|
||||
.I wc
|
||||
which are equal to
|
||||
.I towupper(wc)
|
||||
and different from
|
||||
.IR towlower(wc) .
|
||||
.PP
|
||||
The wide-character class "upper" always contains at least the
|
||||
letters \(aqA\(aq to \(aqZ\(aq.
|
||||
.SH RETURN VALUE
|
||||
The
|
||||
.BR iswupper ()
|
||||
function returns nonzero if \fIwc\fP is a wide character
|
||||
function returns nonzero if
|
||||
.I wc
|
||||
is a wide character
|
||||
belonging to the wide-character class "upper".
|
||||
Otherwise it returns zero.
|
||||
.SH CONFORMING TO
|
||||
|
|
|
@ -28,7 +28,9 @@ The
|
|||
function is the wide-character equivalent of the
|
||||
.BR isxdigit (3)
|
||||
function.
|
||||
It tests whether \fIwc\fP is a wide character
|
||||
It tests whether
|
||||
.I wc
|
||||
is a wide character
|
||||
belonging to the wide-character class "xdigit".
|
||||
.PP
|
||||
The wide-character class "xdigit" is a subclass of the wide-character class
|
||||
|
@ -51,7 +53,9 @@ and the digits \(aq0\(aq to \(aq9\(aq.
|
|||
.SH RETURN VALUE
|
||||
The
|
||||
.BR iswxdigit ()
|
||||
function returns nonzero if \fIwc\fP is a wide character
|
||||
function returns nonzero if
|
||||
.I wc
|
||||
is a wide character
|
||||
belonging to the wide-character class "xdigit".
|
||||
Otherwise it returns zero.
|
||||
.SH CONFORMING TO
|
||||
|
|
|
@ -41,18 +41,31 @@ lfind, lsearch \- linear search of an array
|
|||
and
|
||||
.BR lsearch ()
|
||||
perform a linear search for
|
||||
\fIkey\fP in the array \fIbase\fP which has \fI*nmemb\fP elements of
|
||||
\fIsize\fP bytes each.
|
||||
.I key
|
||||
in the array
|
||||
.IR base
|
||||
which has
|
||||
.I *nmemb
|
||||
elements of
|
||||
.I size
|
||||
bytes each.
|
||||
The comparison function referenced by
|
||||
\fIcompar\fP is expected to have two arguments which point to the
|
||||
\fIkey\fP object and to an array member, in that order, and which
|
||||
returns zero if the \fIkey\fP object matches the array member, and
|
||||
.I compar
|
||||
is expected to have two arguments which point to the
|
||||
.I key
|
||||
object and to an array member, in that order, and which
|
||||
returns zero if the
|
||||
.I key
|
||||
object matches the array member, and
|
||||
nonzero otherwise.
|
||||
.PP
|
||||
If
|
||||
.BR lsearch ()
|
||||
does not find a matching element, then the \fIkey\fP
|
||||
object is inserted at the end of the table, and \fI*nmemb\fP is
|
||||
does not find a matching element, then the
|
||||
.I key
|
||||
object is inserted at the end of the table, and
|
||||
.I *nmemb
|
||||
is
|
||||
incremented.
|
||||
In particular, one should know that a matching element
|
||||
exists, or that more room is available.
|
||||
|
|
34
man3/mblen.3
34
man3/mblen.3
|
@ -23,32 +23,48 @@ mblen \- determine number of bytes in next multibyte character
|
|||
.BI "int mblen(const char *" s ", size_t " n );
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
If \fIs\fP is not a NULL pointer, the
|
||||
If
|
||||
.I s
|
||||
is not a NULL pointer, the
|
||||
.BR mblen ()
|
||||
function inspects at most
|
||||
\fIn\fP bytes of the multibyte string starting at \fIs\fP and extracts the
|
||||
.I n
|
||||
bytes of the multibyte string starting at
|
||||
.I s
|
||||
and extracts the
|
||||
next complete multibyte character.
|
||||
It uses a static anonymous shift state known only to the
|
||||
.BR mblen ()
|
||||
function.
|
||||
If the multibyte character is not the null wide
|
||||
character, it returns the number of bytes that were consumed from \fIs\fP.
|
||||
character, it returns the number of bytes that were consumed from
|
||||
.IR s .
|
||||
If the multibyte character is the null wide character, it returns 0.
|
||||
.PP
|
||||
If the \fIn\fP bytes starting at \fIs\fP do not contain a complete multibyte
|
||||
If the
|
||||
.IR n
|
||||
bytes starting at
|
||||
.I s
|
||||
do not contain a complete multibyte
|
||||
character,
|
||||
.BR mblen ()
|
||||
returns \-1.
|
||||
This can happen even if
|
||||
\fIn\fP is greater than or equal to \fIMB_CUR_MAX\fP,
|
||||
.I n
|
||||
is greater than or equal to
|
||||
.IR MB_CUR_MAX ,
|
||||
if the multibyte string contains redundant shift sequences.
|
||||
.PP
|
||||
If the multibyte string starting at \fIs\fP contains an invalid multibyte
|
||||
If the multibyte string starting at
|
||||
.I s
|
||||
contains an invalid multibyte
|
||||
sequence before the next complete character,
|
||||
.BR mblen ()
|
||||
also returns \-1.
|
||||
.PP
|
||||
If \fIs\fP is a NULL pointer, the
|
||||
If
|
||||
.I s
|
||||
is a NULL pointer, the
|
||||
.BR mblen ()
|
||||
function
|
||||
.\" The Dinkumware doc and the Single UNIX specification say this, but
|
||||
|
@ -61,7 +77,9 @@ The
|
|||
.BR mblen ()
|
||||
function returns the number of
|
||||
bytes parsed from the multibyte
|
||||
sequence starting at \fIs\fP, if a non-null wide character was recognized.
|
||||
sequence starting at
|
||||
.IR s ,
|
||||
if a non-null wide character was recognized.
|
||||
It returns 0, if a null wide character was recognized.
|
||||
It returns \-1, if an
|
||||
invalid multibyte sequence was encountered or if it couldn't parse a complete
|
||||
|
|
|
@ -25,32 +25,57 @@ mbrlen \- determine number of bytes in next multibyte character
|
|||
.SH DESCRIPTION
|
||||
The
|
||||
.BR mbrlen ()
|
||||
function inspects at most \fIn\fP bytes of the multibyte
|
||||
string starting at \fIs\fP and extracts the next complete multibyte character.
|
||||
It updates the shift state \fI*ps\fP.
|
||||
function inspects at most
|
||||
.I n
|
||||
bytes of the multibyte
|
||||
string starting at
|
||||
.I s
|
||||
and extracts the next complete multibyte character.
|
||||
It updates the shift state
|
||||
.IR *ps .
|
||||
If the multibyte character is not the
|
||||
null wide character, it returns the number of bytes that were consumed from
|
||||
\fIs\fP.
|
||||
.IR s .
|
||||
If the multibyte character is the null wide character, it resets the
|
||||
shift state \fI*ps\fP to the initial state and returns 0.
|
||||
shift state
|
||||
.I *ps
|
||||
to the initial state and returns 0.
|
||||
.PP
|
||||
If the \fIn\fP bytes starting at \fIs\fP do not contain a complete multibyte
|
||||
If the
|
||||
.IR n
|
||||
bytes starting at
|
||||
.I s
|
||||
do not contain a complete multibyte
|
||||
character,
|
||||
.BR mbrlen ()
|
||||
returns \fI(size_t)\ \-2\fP.
|
||||
returns
|
||||
.IR "(size_t)\ \-2" .
|
||||
This can happen even if
|
||||
\fIn\fP >= \fIMB_CUR_MAX\fP, if the multibyte string contains redundant shift
|
||||
.I n
|
||||
>=
|
||||
.IR MB_CUR_MAX ,
|
||||
if the multibyte string contains redundant shift
|
||||
sequences.
|
||||
.PP
|
||||
If the multibyte string starting at \fIs\fP contains an invalid multibyte
|
||||
If the multibyte string starting at
|
||||
.I s
|
||||
contains an invalid multibyte
|
||||
sequence before the next complete character,
|
||||
.BR mbrlen ()
|
||||
returns
|
||||
\fI(size_t)\ \-1\fP and sets \fIerrno\fP to \fBEILSEQ\fP.
|
||||
.IR "(size_t)\ \-1"
|
||||
and sets
|
||||
.I errno
|
||||
to
|
||||
.BR EILSEQ .
|
||||
In this case,
|
||||
the effects on \fI*ps\fP are undefined.
|
||||
the effects on
|
||||
.I *ps
|
||||
are undefined.
|
||||
.PP
|
||||
If \fIps\fP is a NULL pointer, a static anonymous state known only to the
|
||||
If
|
||||
.I ps
|
||||
is a NULL pointer, a static anonymous state known only to the
|
||||
.BR mbrlen ()
|
||||
function is used instead.
|
||||
.SH RETURN VALUE
|
||||
|
@ -58,14 +83,24 @@ The
|
|||
.BR mbrlen ()
|
||||
function returns the number of bytes
|
||||
parsed from the multibyte
|
||||
sequence starting at \fIs\fP, if a non-null wide character was recognized.
|
||||
sequence starting at
|
||||
.IR s ,
|
||||
if a non-null wide character was recognized.
|
||||
It returns 0, if a null wide character was recognized.
|
||||
It returns
|
||||
.I "(size_t)\ \-1"
|
||||
and sets \fIerrno\fP to \fBEILSEQ\fP, if an invalid multibyte sequence was
|
||||
and sets
|
||||
.I errno
|
||||
to
|
||||
.BR EILSEQ ,
|
||||
if an invalid multibyte sequence was
|
||||
encountered.
|
||||
It returns \fI(size_t)\ \-2\fP if it couldn't parse a complete multibyte
|
||||
character, meaning that \fIn\fP should be increased.
|
||||
It returns
|
||||
.IR "(size_t)\ \-2"
|
||||
if it couldn't parse a complete multibyte
|
||||
character, meaning that
|
||||
.I n
|
||||
should be increased.
|
||||
.SH CONFORMING TO
|
||||
C99.
|
||||
.SH NOTES
|
||||
|
|
|
@ -39,8 +39,12 @@ memmove \- copy memory area
|
|||
.SH DESCRIPTION
|
||||
The
|
||||
.BR memmove ()
|
||||
function copies \fIn\fP bytes from memory area
|
||||
\fIsrc\fP to memory area \fIdest\fP.
|
||||
function copies
|
||||
.I n
|
||||
bytes from memory area
|
||||
.I src
|
||||
to memory area
|
||||
.IR dest .
|
||||
The memory areas may overlap: copying takes place as though
|
||||
the bytes in
|
||||
.I src
|
||||
|
@ -53,7 +57,8 @@ and the bytes are then copied from the temporary array to
|
|||
.SH RETURN VALUE
|
||||
The
|
||||
.BR memmove ()
|
||||
function returns a pointer to \fIdest\fP.
|
||||
function returns a pointer to
|
||||
.IR dest .
|
||||
.SH CONFORMING TO
|
||||
SVr4, 4.3BSD, C89, C99, POSIX.1-2001.
|
||||
.SH SEE ALSO
|
||||
|
|
|
@ -39,13 +39,18 @@ memset \- fill memory with a constant byte
|
|||
.SH DESCRIPTION
|
||||
The
|
||||
.BR memset ()
|
||||
function fills the first \fIn\fP bytes of the
|
||||
memory area pointed to by \fIs\fP with the constant byte \fIc\fP.
|
||||
function fills the first
|
||||
.I n
|
||||
bytes of the
|
||||
memory area pointed to by
|
||||
.I s
|
||||
with the constant byte
|
||||
.IR c .
|
||||
.SH RETURN VALUE
|
||||
The
|
||||
.BR memset ()
|
||||
function returns a pointer to the memory area
|
||||
\fIs\fP.
|
||||
.IR s .
|
||||
.SH CONFORMING TO
|
||||
SVr4, 4.3BSD, C89, C99, POSIX.1-2001.
|
||||
.SH SEE ALSO
|
||||
|
|
|
@ -29,20 +29,32 @@ The
|
|||
function is the wide-character equivalent of the
|
||||
.BR putchar (3)
|
||||
function.
|
||||
It writes the wide character \fIwc\fP to \fIstdout\fP.
|
||||
If \fIferror(stdout)\fP becomes true, it returns
|
||||
It writes the wide character
|
||||
.I wc
|
||||
to
|
||||
.IR stdout .
|
||||
If
|
||||
.I ferror(stdout)
|
||||
becomes true, it returns
|
||||
.BR WEOF .
|
||||
If a wide character
|
||||
conversion error occurs, it sets \fIerrno\fP to \fBEILSEQ\fP and returns
|
||||
conversion error occurs, it sets
|
||||
.IR errno
|
||||
to
|
||||
.B EILSEQ
|
||||
and returns
|
||||
.BR WEOF .
|
||||
Otherwise it returns \fIwc\fP.
|
||||
Otherwise it returns
|
||||
.IR wc .
|
||||
.PP
|
||||
For a nonlocking counterpart, see
|
||||
.BR unlocked_stdio (3).
|
||||
.SH RETURN VALUE
|
||||
The
|
||||
.BR putwchar ()
|
||||
function returns \fIwc\fP if no error occurred, or
|
||||
function returns
|
||||
.I wc
|
||||
if no error occurred, or
|
||||
.B WEOF
|
||||
to indicate an error.
|
||||
.SH CONFORMING TO
|
||||
|
@ -58,7 +70,8 @@ current locale.
|
|||
It is reasonable to expect that
|
||||
.BR putwchar ()
|
||||
will actually write
|
||||
the multibyte sequence corresponding to the wide character \fIwc\fP.
|
||||
the multibyte sequence corresponding to the wide character
|
||||
.IR wc .
|
||||
.SH SEE ALSO
|
||||
.BR fputwc (3),
|
||||
.BR unlocked_stdio (3)
|
||||
|
|
|
@ -43,7 +43,9 @@ rewinddir \- reset directory stream
|
|||
The
|
||||
.BR rewinddir ()
|
||||
function resets the position of the directory
|
||||
stream \fIdirp\fP to the beginning of the directory.
|
||||
stream
|
||||
.I dirp
|
||||
to the beginning of the directory.
|
||||
.SH RETURN VALUE
|
||||
The
|
||||
.BR rewinddir ()
|
||||
|
|
|
@ -23,13 +23,22 @@ towctrans \- wide-character transliteration
|
|||
.BI "wint_t towctrans(wint_t " wc ", wctrans_t " desc );
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
If \fIwc\fP is a wide character, the
|
||||
If
|
||||
.I wc
|
||||
is a wide character, the
|
||||
.BR towctrans ()
|
||||
function
|
||||
translates it according to the transliteration descriptor \fIdesc\fP.
|
||||
If \fIwc\fP is \fBWEOF\fP, \fBWEOF\fP is returned.
|
||||
translates it according to the transliteration descriptor
|
||||
.IR desc .
|
||||
If
|
||||
.IR wc
|
||||
is
|
||||
.BR WEOF ,
|
||||
.B WEOF
|
||||
is returned.
|
||||
.PP
|
||||
\fIdesc\fP must be a transliteration descriptor returned by
|
||||
.I desc
|
||||
must be a transliteration descriptor returned by
|
||||
the
|
||||
.BR wctrans (3)
|
||||
function.
|
||||
|
@ -37,7 +46,12 @@ function.
|
|||
The
|
||||
.BR towctrans ()
|
||||
function returns the translated wide character,
|
||||
or \fBWEOF\fP if \fIwc\fP is \fBWEOF\fP.
|
||||
or
|
||||
.BR WEOF
|
||||
if
|
||||
.I wc
|
||||
is
|
||||
.BR WEOF .
|
||||
.SH CONFORMING TO
|
||||
C99.
|
||||
.SH NOTES
|
||||
|
|
|
@ -28,15 +28,28 @@ The
|
|||
function is the wide-character equivalent of the
|
||||
.BR tolower (3)
|
||||
function.
|
||||
If \fIwc\fP is a wide character, it is converted to
|
||||
If
|
||||
.I wc
|
||||
is a wide character, it is converted to
|
||||
lowercase.
|
||||
Characters which do not have case are returned unchanged.
|
||||
If \fIwc\fP is \fBWEOF\fP, \fBWEOF\fP is returned.
|
||||
If
|
||||
.IR wc
|
||||
is
|
||||
.BR WEOF ,
|
||||
.B WEOF
|
||||
is returned.
|
||||
.SH RETURN VALUE
|
||||
The
|
||||
.BR towlower ()
|
||||
function returns the lowercase equivalent of \fIwc\fP,
|
||||
or \fBWEOF\fP if \fIwc\fP is \fBWEOF\fP.
|
||||
function returns the lowercase equivalent of
|
||||
.IR wc ,
|
||||
or
|
||||
.BR WEOF
|
||||
if
|
||||
.I wc
|
||||
is
|
||||
.BR WEOF .
|
||||
.SH CONFORMING TO
|
||||
C99.
|
||||
.SH NOTES
|
||||
|
|
|
@ -28,15 +28,28 @@ The
|
|||
function is the wide-character equivalent of the
|
||||
.BR toupper (3)
|
||||
function.
|
||||
If \fIwc\fP is a wide character, it is converted to
|
||||
If
|
||||
.I wc
|
||||
is a wide character, it is converted to
|
||||
uppercase.
|
||||
Characters which do not have case are returned unchanged.
|
||||
If \fIwc\fP is \fBWEOF\fP, \fBWEOF\fP is returned.
|
||||
If
|
||||
.IR wc
|
||||
is
|
||||
.BR WEOF ,
|
||||
.B WEOF
|
||||
is returned.
|
||||
.SH RETURN VALUE
|
||||
The
|
||||
.BR towupper ()
|
||||
function returns the uppercase equivalent of \fIwc\fP,
|
||||
or \fBWEOF\fP if \fIwc\fP is \fBWEOF\fP.
|
||||
function returns the uppercase equivalent of
|
||||
.IR wc ,
|
||||
or
|
||||
.BR WEOF
|
||||
if
|
||||
.I wc
|
||||
is
|
||||
.BR WEOF .
|
||||
.SH CONFORMING TO
|
||||
C99.
|
||||
.SH NOTES
|
||||
|
|
|
@ -28,20 +28,38 @@ The
|
|||
function is the wide-character equivalent of the
|
||||
.BR ungetc (3)
|
||||
function.
|
||||
It pushes back a wide character onto \fIstream\fP and returns it.
|
||||
It pushes back a wide character onto
|
||||
.I stream
|
||||
and returns it.
|
||||
.PP
|
||||
If \fIwc\fP is \fBWEOF\fP, it returns \fBWEOF\fP.
|
||||
If \fIwc\fP is an invalid wide character,
|
||||
it sets \fIerrno\fP to \fBEILSEQ\fP and returns \fBWEOF\fP.
|
||||
If
|
||||
.I wc
|
||||
is
|
||||
.BR WEOF ,
|
||||
it returns
|
||||
.BR WEOF .
|
||||
If
|
||||
.I wc
|
||||
is an invalid wide character,
|
||||
it sets
|
||||
.IR errno
|
||||
to
|
||||
.B EILSEQ
|
||||
and returns
|
||||
.BR WEOF .
|
||||
.PP
|
||||
If \fIwc\fP is a valid wide character, it is pushed back onto the stream
|
||||
If
|
||||
.I wc
|
||||
is a valid wide character, it is pushed back onto the stream
|
||||
and thus becomes available for future wide-character read operations.
|
||||
The file-position indicator is decremented by one or more.
|
||||
The end-of-file
|
||||
indicator is cleared.
|
||||
The backing storage of the file is not affected.
|
||||
.PP
|
||||
Note: \fIwc\fP need not be the last wide-character read from the stream;
|
||||
Note:
|
||||
.I wc
|
||||
need not be the last wide-character read from the stream;
|
||||
it can be any other valid wide character.
|
||||
.PP
|
||||
If the implementation supports multiple push-back operations in a row, the
|
||||
|
@ -50,7 +68,11 @@ level of push-back is guaranteed.
|
|||
.SH RETURN VALUE
|
||||
The
|
||||
.BR ungetwc ()
|
||||
function returns \fIwc\fP when successful, or \fBWEOF\fP upon
|
||||
function returns
|
||||
.IR wc
|
||||
when successful, or
|
||||
.B WEOF
|
||||
upon
|
||||
failure.
|
||||
.SH CONFORMING TO
|
||||
C99.
|
||||
|
|
|
@ -29,14 +29,21 @@ function is the wide-character equivalent
|
|||
of the
|
||||
.BR strchr (3)
|
||||
function.
|
||||
It searches the first occurrence of \fIwc\fP in the wide-character
|
||||
string pointed to by \fIwcs\fP.
|
||||
It searches the first occurrence of
|
||||
.I wc
|
||||
in the wide-character
|
||||
string pointed to by
|
||||
.IR wcs .
|
||||
.SH RETURN VALUE
|
||||
The
|
||||
.BR wcschr ()
|
||||
function returns a pointer to the first occurrence of
|
||||
\fIwc\fP in the wide-character string pointed to by \fIwcs\fP, or NULL if
|
||||
\fIwc\fP does not occur in the string.
|
||||
.I wc
|
||||
in the wide-character string pointed to by
|
||||
.IR wcs ,
|
||||
or NULL if
|
||||
.I wc
|
||||
does not occur in the string.
|
||||
.SH CONFORMING TO
|
||||
C99.
|
||||
.SH SEE ALSO
|
||||
|
|
|
@ -29,19 +29,33 @@ function is the wide-character equivalent
|
|||
of the
|
||||
.BR strcmp (3)
|
||||
function.
|
||||
It compares the wide-character string pointed to by \fIs1\fP and the
|
||||
wide-character string pointed to by \fIs2\fP.
|
||||
It compares the wide-character string pointed to by
|
||||
.I s1
|
||||
and the
|
||||
wide-character string pointed to by
|
||||
.IR s2 .
|
||||
.SH RETURN VALUE
|
||||
The
|
||||
.BR wcscmp ()
|
||||
function returns zero if the wide-character strings at
|
||||
\fIs1\fP and \fIs2\fP are equal.
|
||||
.I s1
|
||||
and
|
||||
.I s2
|
||||
are equal.
|
||||
It returns an integer greater than zero if
|
||||
at the first differing position \fIi\fP, the corresponding wide-character
|
||||
\fIs1[i]\fP is greater than \fIs2[i]\fP.
|
||||
at the first differing position
|
||||
.IR i ,
|
||||
the corresponding wide-character
|
||||
.I s1[i]
|
||||
is greater than
|
||||
.IR s2[i] .
|
||||
It returns an integer less than zero if
|
||||
at the first differing position \fIi\fP, the corresponding wide-character
|
||||
\fIs1[i]\fP is less than \fIs2[i]\fP.
|
||||
at the first differing position
|
||||
.IR i ,
|
||||
the corresponding wide-character
|
||||
.I s1[i]
|
||||
is less than
|
||||
.IR s2[i] .
|
||||
.SH CONFORMING TO
|
||||
C99.
|
||||
.SH SEE ALSO
|
||||
|
|
|
@ -29,24 +29,35 @@ function is the wide-character equivalent
|
|||
of the
|
||||
.BR strcspn (3)
|
||||
function.
|
||||
It determines the length of the longest initial segment of \fIwcs\fP
|
||||
which consists entirely of wide-characters not listed in \fIreject\fP.
|
||||
It determines the length of the longest initial segment of
|
||||
.I wcs
|
||||
which consists entirely of wide-characters not listed in
|
||||
.IR reject .
|
||||
In
|
||||
other words, it searches for the first occurrence in the wide-character
|
||||
string \fIwcs\fP of any of the characters in the wide-character string
|
||||
\fIreject\fP.
|
||||
string
|
||||
.I wcs
|
||||
of any of the characters in the wide-character string
|
||||
.IR reject .
|
||||
.SH RETURN VALUE
|
||||
The
|
||||
.BR wcscspn ()
|
||||
function returns the number of
|
||||
wide characters in the longest
|
||||
initial segment of \fIwcs\fP which consists entirely of wide-characters not
|
||||
listed in \fIreject\fP.
|
||||
initial segment of
|
||||
.I wcs
|
||||
which consists entirely of wide-characters not
|
||||
listed in
|
||||
.IR reject .
|
||||
In other words, it returns the position of the first
|
||||
occurrence in the wide-character string \fIwcs\fP
|
||||
occurrence in the wide-character string
|
||||
.I wcs
|
||||
of any of the characters in
|
||||
the wide-character string \fIreject\fP,
|
||||
or \fIwcslen(wcs)\fP if there is none.
|
||||
the wide-character string
|
||||
.IR reject ,
|
||||
or
|
||||
.IR wcslen(wcs)
|
||||
if there is none.
|
||||
.SH CONFORMING TO
|
||||
C99.
|
||||
.SH SEE ALSO
|
||||
|
|
|
@ -30,15 +30,21 @@ of the
|
|||
.BR strpbrk (3)
|
||||
function.
|
||||
It searches for the first occurrence in the wide-character
|
||||
string pointed to by \fIwcs\fP of any of the
|
||||
string pointed to by
|
||||
.I wcs
|
||||
of any of the
|
||||
characters in the wide-character
|
||||
string pointed to by \fIaccept\fP.
|
||||
string pointed to by
|
||||
.IR accept .
|
||||
.SH RETURN VALUE
|
||||
The
|
||||
.BR wcspbrk ()
|
||||
function returns a pointer to the first occurrence in
|
||||
\fIwcs\fP of any of the characters listed in \fIaccept\fP.
|
||||
If \fIwcs\fP
|
||||
.I wcs
|
||||
of any of the characters listed in
|
||||
.IR accept .
|
||||
If
|
||||
.I wcs
|
||||
contains none of these characters, NULL is returned.
|
||||
.SH CONFORMING TO
|
||||
C99.
|
||||
|
|
|
@ -29,14 +29,21 @@ function is the wide-character equivalent
|
|||
of the
|
||||
.BR strrchr (3)
|
||||
function.
|
||||
It searches the last occurrence of \fIwc\fP in the wide-character
|
||||
string pointed to by \fIwcs\fP.
|
||||
It searches the last occurrence of
|
||||
.I wc
|
||||
in the wide-character
|
||||
string pointed to by
|
||||
.IR wcs .
|
||||
.SH RETURN VALUE
|
||||
The
|
||||
.BR wcsrchr ()
|
||||
function returns a pointer to the last occurrence of
|
||||
\fIwc\fP in the wide-character string pointed to by \fIwcs\fP, or NULL if
|
||||
\fIwc\fP does not occur in the string.
|
||||
.I wc
|
||||
in the wide-character string pointed to by
|
||||
.IR wcs ,
|
||||
or NULL if
|
||||
.I wc
|
||||
does not occur in the string.
|
||||
.SH CONFORMING TO
|
||||
C99.
|
||||
.SH SEE ALSO
|
||||
|
|
|
@ -29,22 +29,33 @@ The
|
|||
function is the wide-character equivalent of the
|
||||
.BR strspn (3)
|
||||
function.
|
||||
It determines the length of the longest initial segment of \fIwcs\fP
|
||||
which consists entirely of wide-characters listed in \fIaccept\fP.
|
||||
It determines the length of the longest initial segment of
|
||||
.I wcs
|
||||
which consists entirely of wide-characters listed in
|
||||
.IR accept .
|
||||
In other
|
||||
words, it searches for the first occurrence in the wide-character string
|
||||
\fIwcs\fP of a wide-character not contained in the wide-character string
|
||||
\fIaccept\fP.
|
||||
.I wcs
|
||||
of a wide-character not contained in the wide-character string
|
||||
.IR accept .
|
||||
.SH RETURN VALUE
|
||||
The
|
||||
.BR wcsspn ()
|
||||
function returns the number of
|
||||
wide characters in the longest
|
||||
initial segment of \fIwcs\fP which consists entirely of wide-characters listed
|
||||
in \fIaccept\fP.
|
||||
initial segment of
|
||||
.I wcs
|
||||
which consists entirely of wide-characters listed
|
||||
in
|
||||
.IR accept .
|
||||
In other words, it returns the position of the first
|
||||
occurrence in the wide-character string \fIwcs\fP of a wide-character not
|
||||
contained in the wide-character string \fIaccept\fP, or \fIwcslen(wcs)\fP
|
||||
occurrence in the wide-character string
|
||||
.I wcs
|
||||
of a wide-character not
|
||||
contained in the wide-character string
|
||||
.IR accept ,
|
||||
or
|
||||
.I wcslen(wcs)
|
||||
if there is none.
|
||||
.SH CONFORMING TO
|
||||
C99.
|
||||
|
|
|
@ -23,12 +23,16 @@ wctomb \- convert a wide character to a multibyte sequence
|
|||
.BI "int wctomb(char *" s ", wchar_t " wc );
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
If \fIs\fP is not NULL,
|
||||
If
|
||||
.I s
|
||||
is not NULL,
|
||||
the
|
||||
.BR wctomb ()
|
||||
function converts the wide character
|
||||
\fIwc\fP to its multibyte representation and stores it at the beginning of
|
||||
the character array pointed to by \fIs\fP.
|
||||
.I wc
|
||||
to its multibyte representation and stores it at the beginning of
|
||||
the character array pointed to by
|
||||
.IR s .
|
||||
It updates the shift state, which
|
||||
is stored in a static anonymous variable
|
||||
known only to the
|
||||
|
@ -36,13 +40,18 @@ known only to the
|
|||
function,
|
||||
and returns the length of said multibyte representation,
|
||||
that is, the number of
|
||||
bytes written at \fIs\fP.
|
||||
bytes written at
|
||||
.IR s .
|
||||
.PP
|
||||
The programmer must ensure that there is
|
||||
room for at least \fBMB_CUR_MAX\fP
|
||||
bytes at \fIs\fP.
|
||||
room for at least
|
||||
.B MB_CUR_MAX
|
||||
bytes at
|
||||
.IR s .
|
||||
.PP
|
||||
If \fIs\fP is NULL, the
|
||||
If
|
||||
.I s
|
||||
is NULL, the
|
||||
.BR wctomb ()
|
||||
function
|
||||
.\" The Dinkumware doc and the Single UNIX specification say this, but
|
||||
|
@ -52,16 +61,23 @@ to the initial state, and
|
|||
returns nonzero if the encoding has nontrivial shift state,
|
||||
or zero if the encoding is stateless.
|
||||
.SH RETURN VALUE
|
||||
If \fIs\fP is not NULL, the
|
||||
If
|
||||
.I s
|
||||
is not NULL, the
|
||||
.BR wctomb ()
|
||||
function
|
||||
returns the number of bytes
|
||||
that have been written to the byte array at \fIs\fP.
|
||||
If \fIwc\fP can not be
|
||||
that have been written to the byte array at
|
||||
.IR s .
|
||||
If
|
||||
.I wc
|
||||
can not be
|
||||
represented as a multibyte sequence (according
|
||||
to the current locale), \-1 is returned.
|
||||
.PP
|
||||
If \fIs\fP is NULL, the
|
||||
If
|
||||
.I s
|
||||
is NULL, the
|
||||
.BR wctomb ()
|
||||
function returns nonzero if the
|
||||
encoding has nontrivial shift state, or zero if the encoding is stateless.
|
||||
|
|
|
@ -23,12 +23,17 @@ wctrans \- wide-character translation mapping
|
|||
.BI "wctrans_t wctrans(const char *" name );
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
The \fIwctrans_t\fP type represents a mapping
|
||||
The
|
||||
.I wctrans_t
|
||||
type represents a mapping
|
||||
which can map a wide character to
|
||||
another wide character.
|
||||
Its nature is implementation-dependent, but the special
|
||||
value \fI(wctrans_t)\ 0\fP denotes an invalid mapping.
|
||||
Nonzero \fIwctrans_t\fP
|
||||
value
|
||||
.IR "(wctrans_t)\ 0"
|
||||
denotes an invalid mapping.
|
||||
Nonzero
|
||||
.I wctrans_t
|
||||
values can be passed to the
|
||||
.BR towctrans (3)
|
||||
function to actually perform
|
||||
|
@ -49,9 +54,11 @@ following names are valid in all locales.
|
|||
.SH RETURN VALUE
|
||||
The
|
||||
.BR wctrans ()
|
||||
function returns a mapping descriptor if the \fIname\fP
|
||||
function returns a mapping descriptor if the
|
||||
.I name
|
||||
is valid.
|
||||
Otherwise it returns \fI(wctrans_t) 0\fP.
|
||||
Otherwise it returns
|
||||
.IR "(wctrans_t)\ 0" .
|
||||
.SH CONFORMING TO
|
||||
C99.
|
||||
.SH NOTES
|
||||
|
|
|
@ -28,13 +28,25 @@ The
|
|||
function is the wide-character equivalent of the
|
||||
.BR memchr (3)
|
||||
function.
|
||||
It searches the \fIn\fP wide characters starting at \fIs\fP for
|
||||
the first occurrence of the wide character \fIc\fP.
|
||||
It searches the
|
||||
.IR n
|
||||
wide characters starting at
|
||||
.I s
|
||||
for
|
||||
the first occurrence of the wide character
|
||||
.IR c .
|
||||
.SH RETURN VALUE
|
||||
The
|
||||
.BR wmemchr ()
|
||||
function returns a pointer to the first occurrence of \fIc\fP
|
||||
among the \fIn\fP wide characters starting at \fIs\fP, or NULL if \fIc\fP does
|
||||
function returns a pointer to the first occurrence of
|
||||
.I c
|
||||
among the
|
||||
.IR n
|
||||
wide characters starting at
|
||||
.IR s ,
|
||||
or NULL if
|
||||
.I c
|
||||
does
|
||||
not occur among these.
|
||||
.SH CONFORMING TO
|
||||
C99.
|
||||
|
|
|
@ -27,20 +27,41 @@ The
|
|||
function is the wide-character equivalent of the
|
||||
.BR memcmp (3)
|
||||
function.
|
||||
It compares the \fIn\fP wide-characters starting at \fIs1\fP and the
|
||||
\fIn\fP wide-characters starting at \fIs2\fP.
|
||||
It compares the
|
||||
.IR n
|
||||
wide-characters starting at
|
||||
.I s1
|
||||
and the
|
||||
.I n
|
||||
wide-characters starting at
|
||||
.IR s2 .
|
||||
.SH RETURN VALUE
|
||||
The
|
||||
.BR wmemcmp ()
|
||||
function returns
|
||||
zero if the wide-character arrays of size
|
||||
\fIn\fP at \fIs1\fP and \fIs2\fP are equal.
|
||||
.I n
|
||||
at
|
||||
.IR s1
|
||||
and
|
||||
.I s2
|
||||
are equal.
|
||||
It returns an integer greater than
|
||||
zero if at the first differing position \fIi\fP (\fIi\fP < \fIn\fP), the
|
||||
corresponding wide-character \fIs1[i]\fP is greater than \fIs2[i]\fP.
|
||||
zero if at the first differing position
|
||||
.I i
|
||||
.RI ( i " <"
|
||||
.IR n ),
|
||||
the
|
||||
corresponding wide-character
|
||||
.I s1[i]
|
||||
is greater than
|
||||
.IR s2[i] .
|
||||
It returns an integer less than zero if
|
||||
at the first differing position \fIi\fP
|
||||
(\fIi\fP < \fIn\fP), the corresponding
|
||||
at the first differing position
|
||||
.I i
|
||||
(\fIi\fP <
|
||||
.IR n ),
|
||||
the corresponding
|
||||
wide-character \fIs1[i]\fP is less than
|
||||
\fIs2[i]\fP.
|
||||
.SH CONFORMING TO
|
||||
|
|
|
@ -28,19 +28,27 @@ The
|
|||
function is the wide-character equivalent of the
|
||||
.BR memcpy (3)
|
||||
function.
|
||||
It copies \fIn\fP wide characters from the array starting at
|
||||
\fIsrc\fP to the array starting at \fIdest\fP.
|
||||
It copies
|
||||
.I n
|
||||
wide characters from the array starting at
|
||||
.I src
|
||||
to the array starting at
|
||||
.IR dest .
|
||||
.PP
|
||||
The arrays may not overlap; use
|
||||
.BR wmemmove (3)
|
||||
to copy between overlapping
|
||||
arrays.
|
||||
.PP
|
||||
The programmer must ensure that there is room for at least \fIn\fP wide
|
||||
characters at \fIdest\fP.
|
||||
The programmer must ensure that there is room for at least
|
||||
.I n
|
||||
wide
|
||||
characters at
|
||||
.IR dest .
|
||||
.SH RETURN VALUE
|
||||
.BR wmemcpy ()
|
||||
returns \fIdest\fP.
|
||||
returns
|
||||
.IR dest .
|
||||
.SH CONFORMING TO
|
||||
C99.
|
||||
.SH SEE ALSO
|
||||
|
|
|
@ -28,16 +28,25 @@ The
|
|||
function is the wide-character equivalent of the
|
||||
.BR memmove (3)
|
||||
function.
|
||||
It copies \fIn\fP wide characters from the array
|
||||
starting at \fIsrc\fP to the array starting at \fIdest\fP.
|
||||
It copies
|
||||
.I n
|
||||
wide characters from the array
|
||||
starting at
|
||||
.I src
|
||||
to the array starting at
|
||||
.IR dest .
|
||||
The arrays may
|
||||
overlap.
|
||||
.PP
|
||||
The programmer must ensure that there is room for at least \fIn\fP wide
|
||||
characters at \fIdest\fP.
|
||||
The programmer must ensure that there is room for at least
|
||||
.I n
|
||||
wide
|
||||
characters at
|
||||
.IR dest .
|
||||
.SH RETURN VALUE
|
||||
.BR wmemmove ()
|
||||
returns \fIdest\fP.
|
||||
returns
|
||||
.IR dest .
|
||||
.SH CONFORMING TO
|
||||
C99.
|
||||
.SH SEE ALSO
|
||||
|
|
|
@ -28,11 +28,18 @@ The
|
|||
function is the wide-character equivalent of the
|
||||
.BR memset (3)
|
||||
function.
|
||||
It fills the array of \fIn\fP wide-characters starting at \fIwcs\fP
|
||||
with \fIn\fP copies of the wide character \fIwc\fP.
|
||||
It fills the array of
|
||||
.I n
|
||||
wide-characters starting at
|
||||
.I wcs
|
||||
with
|
||||
.I n
|
||||
copies of the wide character
|
||||
.IR wc .
|
||||
.SH RETURN VALUE
|
||||
.BR wmemset ()
|
||||
returns \fIwcs\fP.
|
||||
returns
|
||||
.IR wcs .
|
||||
.SH CONFORMING TO
|
||||
C99.
|
||||
.SH SEE ALSO
|
||||
|
|
|
@ -13,19 +13,32 @@
|
|||
.SH NAME
|
||||
console \- console terminal and virtual consoles
|
||||
.SH DESCRIPTION
|
||||
A Linux system has up to 63 \fIvirtual consoles\fP
|
||||
A Linux system has up to 63
|
||||
.I "virtual consoles"
|
||||
(character devices with major number 4 and minor number 1 to 63),
|
||||
usually called \fI/dev/tty\fP\fIn\fP with 1 \(<= \fIn\fP \(<= 63.
|
||||
usually called
|
||||
.I /dev/ttyn
|
||||
with 1 \(<=
|
||||
.I n
|
||||
\(<= 63.
|
||||
The current console is also addressed by
|
||||
\fI/dev/console\fP or \fI/dev/tty0\fP, the character device with
|
||||
.I /dev/console
|
||||
or
|
||||
.IR /dev/tty0 ,
|
||||
the character device with
|
||||
major number 4 and minor number 0.
|
||||
The device files /dev/* are usually created using the script MAKEDEV,
|
||||
The device files
|
||||
.I /dev/*
|
||||
are usually created using the script MAKEDEV,
|
||||
or using
|
||||
.BR mknod (1),
|
||||
usually with mode 0622 and owner root.tty.
|
||||
usually with mode 0622 and owner
|
||||
.IR root.tty .
|
||||
.LP
|
||||
Before kernel version 1.1.54 the number of virtual consoles was
|
||||
compiled into the kernel (in tty.h: #define NR_CONSOLES 8)
|
||||
compiled into the kernel (in
|
||||
.IR tty.h :
|
||||
#define NR_CONSOLES 8)
|
||||
and could be changed by editing and recompiling.
|
||||
Since version 1.1.54 virtual consoles are created on the fly,
|
||||
as soon as they are needed.
|
||||
|
@ -49,7 +62,9 @@ and display its output there.
|
|||
.BR doshell (8).)
|
||||
.LP
|
||||
Common ways to switch consoles are: (a) use Alt+F\fIn\fP or
|
||||
Ctrl+Alt+F\fIn\fP to switch to console \fIn\fP; AltGr+F\fIn\fP
|
||||
Ctrl+Alt+F\fIn\fP to switch to console
|
||||
.IR n ;
|
||||
AltGr+F\fIn\fP
|
||||
might bring you to console \fIn\fP+12 [here Alt and AltGr refer
|
||||
to the left and right Alt keys, respectively];
|
||||
(b) use Alt+RightArrow or Alt+LeftArrow to cycle through
|
||||
|
@ -61,7 +76,8 @@ the above mentioned key combinations are according to the default settings.)
|
|||
.LP
|
||||
The command
|
||||
.BR deallocvt (1)
|
||||
(formerly \fBdisalloc\fP)
|
||||
(formerly
|
||||
.BR disalloc )
|
||||
will free the memory taken by the screen buffers for consoles
|
||||
that no longer have any associated process.
|
||||
.SS Properties
|
||||
|
|
14
man4/hd.4
14
man4/hd.4
|
@ -30,12 +30,20 @@
|
|||
.SH NAME
|
||||
hd \- MFM/IDE hard disk devices
|
||||
.SH DESCRIPTION
|
||||
The \fBhd*\fP devices are block devices to access MFM/IDE hard disk drives
|
||||
The
|
||||
.B hd*
|
||||
devices are block devices to access MFM/IDE hard disk drives
|
||||
in raw mode.
|
||||
The master drive on the primary IDE controller (major device
|
||||
number 3) is \fBhda\fR; the slave drive is \fBhdb\fR.
|
||||
number 3) is
|
||||
.BR hda ;
|
||||
the slave drive is
|
||||
.BR hdb .
|
||||
The master drive of the second controller (major device number 22)
|
||||
is \fBhdc\fR and the slave \fBhdd\fR.
|
||||
is
|
||||
.B hdc
|
||||
and the slave
|
||||
.BR hdd .
|
||||
.LP
|
||||
General IDE block device names have the form
|
||||
.BI hd X\c
|
||||
|
|
30
man4/lp.4
30
man4/lp.4
|
@ -46,7 +46,8 @@ The following
|
|||
calls are supported:
|
||||
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPTIME, int \fP\fIarg\fP\fB)\fP"
|
||||
Sets the amount of time that the driver sleeps before rechecking the printer
|
||||
when the printer's buffer appears to be filled to \fIarg\fP.
|
||||
when the printer's buffer appears to be filled to
|
||||
.IR arg .
|
||||
If you have a fast printer, decrease this number;
|
||||
if you have a slow printer then increase it.
|
||||
This is in hundredths of a second, the default 2
|
||||
|
@ -55,29 +56,36 @@ It only influences the polling driver.
|
|||
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPCHAR, int \fP\fIarg\fP\fB)\fP"
|
||||
Sets the maximum number of busy-wait iterations which the polling driver does
|
||||
while waiting for the printer to get ready for receiving a character to
|
||||
\fIarg\fP.
|
||||
.IR arg .
|
||||
If printing is too slow, increase this number; if the
|
||||
system gets too slow, decrease this number.
|
||||
The default is 1000.
|
||||
It only influences the polling driver.
|
||||
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPABORT, int \fP\fIarg\fP\fB)\fP"
|
||||
If \fIarg\fP is 0, the printer driver will retry on errors, otherwise
|
||||
If
|
||||
.I arg
|
||||
is 0, the printer driver will retry on errors, otherwise
|
||||
it will abort.
|
||||
The default is 0.
|
||||
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPABORTOPEN, int \fP\fIarg\fP\fB)\fP"
|
||||
If \fIarg\fP is 0,
|
||||
If
|
||||
.I arg
|
||||
is 0,
|
||||
.BR open (2)
|
||||
will be aborted on error, otherwise error will be ignored.
|
||||
The default is to ignore it.
|
||||
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPCAREFUL, int \fP\fIarg\fP\fB)\fP"
|
||||
If \fIarg\fP is 0, then the out-of-paper, offline and error signals are
|
||||
If
|
||||
.I arg
|
||||
is 0, then the out-of-paper, offline and error signals are
|
||||
required to be false on all writes, otherwise they are ignored.
|
||||
The default is to ignore them.
|
||||
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPWAIT, int \fP\fIarg\fP\fB)\fP"
|
||||
Sets the number of busy waiting iterations to wait before strobing the
|
||||
printer to accept a just-written character, and the number of iterations to
|
||||
wait before turning the strobe off again,
|
||||
to \fIarg\fP.
|
||||
to
|
||||
.IR arg .
|
||||
The specification says this time should be 0.5
|
||||
microseconds, but experience has shown the delay caused by the code is
|
||||
already enough.
|
||||
|
@ -91,11 +99,15 @@ It takes an
|
|||
.I int
|
||||
containing the new IRQ as argument.
|
||||
As a side effect, the printer will be reset.
|
||||
When \fIarg\fP is 0, the polling driver will be used, which is also default.
|
||||
When
|
||||
.I arg
|
||||
is 0, the polling driver will be used, which is also default.
|
||||
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPGETIRQ, int *\fP\fIarg\fP\fB)\fP"
|
||||
Stores the currently used IRQ in \fIarg\fP.
|
||||
Stores the currently used IRQ in
|
||||
.IR arg .
|
||||
.IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPGETSTATUS, int *\fP\fIarg\fP\fB)\fP"
|
||||
Stores the value of the status port in \fIarg\fP.
|
||||
Stores the value of the status port in
|
||||
.IR arg .
|
||||
The bits have the following meaning:
|
||||
.TS
|
||||
l l.
|
||||
|
|
|
@ -27,7 +27,8 @@
|
|||
.SH NAME
|
||||
mem, kmem, port \- system memory, kernel memory and system ports
|
||||
.SH DESCRIPTION
|
||||
\fBmem\fP is a character device file
|
||||
.B mem
|
||||
is a character device file
|
||||
that is an image of the main memory of the computer.
|
||||
It may be used, for example, to examine (and even patch) the system.
|
||||
.LP
|
||||
|
@ -62,7 +63,8 @@ mknod \-m 640 /dev/kmem c 1 2
|
|||
chown root:kmem /dev/kmem
|
||||
.RE
|
||||
.LP
|
||||
\fBport\fP is similar to
|
||||
.B port
|
||||
is similar to
|
||||
.BR mem ,
|
||||
but the I/O ports are accessed.
|
||||
.LP
|
||||
|
|
57
man4/mouse.4
57
man4/mouse.4
|
@ -52,8 +52,12 @@ About 14 ms later the mouse will send 0x4D (\(aqM\(aq) on the data line.
|
|||
After a further 63 ms, a Microsoft-compatible 3-button mouse will send
|
||||
0x33 (\(aq3\(aq).
|
||||
.PP
|
||||
The relative mouse movement is sent as \fIdx\fP (positive means right)
|
||||
and \fIdy\fP (positive means down).
|
||||
The relative mouse movement is sent as
|
||||
.I dx
|
||||
(positive means right)
|
||||
and
|
||||
.I dy
|
||||
(positive means down).
|
||||
Various mice can operate at different speeds.
|
||||
To select speeds, cycle through the
|
||||
speeds 9600, 4800, 2400 and 1200 bit/s, each time writing the two characters
|
||||
|
@ -71,11 +75,20 @@ bit/s string
|
|||
|
||||
The first byte of a data packet can be used to synchronization purposes.
|
||||
.SS Microsoft protocol
|
||||
The \fBMicrosoft\fP protocol uses 1 start bit, 7 data bits, no parity
|
||||
The
|
||||
.B Microsoft
|
||||
protocol uses 1 start bit, 7 data bits, no parity
|
||||
and one stop bit at the speed of 1200 bits/sec.
|
||||
Data is sent to RxD in 3-byte packets.
|
||||
The \fIdx\fP and \fIdy\fP movements are sent as
|
||||
two's-complement, \fIlb\fP (\fIrb\fP) are set when the left (right)
|
||||
The
|
||||
.IR dx
|
||||
and
|
||||
.I dy
|
||||
movements are sent as
|
||||
two's-complement,
|
||||
.I lb
|
||||
.RI ( rb )
|
||||
are set when the left (right)
|
||||
button is pressed:
|
||||
.TS
|
||||
center;
|
||||
|
@ -104,14 +117,22 @@ bit set).
|
|||
In particular, a press of the middle button is reported
|
||||
as 0,0,0,0x20 when no other buttons are down.
|
||||
.SS Mousesystems protocol
|
||||
The \fBMousesystems\fP protocol uses 1 start bit, 8 data bits, no parity
|
||||
The
|
||||
.B Mousesystems
|
||||
protocol uses 1 start bit, 8 data bits, no parity
|
||||
and two stop bits at the speed of 1200 bits/sec.
|
||||
Data is sent to RxD in
|
||||
5-byte packets.
|
||||
\fIdx\fP is sent as the sum of the two two's-complement
|
||||
values, \fIdy\fP is send as negated sum of the two two's-complement
|
||||
.I dx
|
||||
is sent as the sum of the two two's-complement
|
||||
values,
|
||||
.I dy
|
||||
is send as negated sum of the two two's-complement
|
||||
values.
|
||||
\fIlb\fP (\fImb\fP, \fIrb\fP) are cleared when the left (middle,
|
||||
.I lb
|
||||
.RI ( mb ,
|
||||
.IR rb )
|
||||
are cleared when the left (middle,
|
||||
right) button is pressed:
|
||||
.TS
|
||||
center;
|
||||
|
@ -127,16 +148,26 @@ byte d7 d6 d5 d4 d3 d2 d1 d0
|
|||
Bytes 4 and 5 describe the change that occurred since bytes 2 and 3
|
||||
were transmitted.
|
||||
.SS Sun protocol
|
||||
The \fBSun\fP protocol is the 3-byte version of the above 5-byte
|
||||
The
|
||||
.B Sun
|
||||
protocol is the 3-byte version of the above 5-byte
|
||||
Mousesystems protocol: the last two bytes are not sent.
|
||||
.SS MM protocol
|
||||
The \fBMM\fP protocol uses 1 start bit, 8 data bits, odd parity and one
|
||||
The
|
||||
.B MM
|
||||
protocol uses 1 start bit, 8 data bits, odd parity and one
|
||||
stop bit at the speed of 1200 bits/sec.
|
||||
Data is sent to RxD in 3-byte
|
||||
packets.
|
||||
\fIdx\fP and \fIdy\fP are sent as single signed values, the
|
||||
.I dx
|
||||
and
|
||||
.I dy
|
||||
are sent as single signed values, the
|
||||
sign bit indicating a negative value.
|
||||
\fIlb\fP (\fImb\fP, \fIrb\fP) are
|
||||
.I lb
|
||||
.RI ( mb ,
|
||||
.IR rb )
|
||||
are
|
||||
set when the left (middle, right) button is pressed:
|
||||
.TS
|
||||
center;
|
||||
|
|
|
@ -27,7 +27,9 @@
|
|||
.SH NAME
|
||||
ram \- ram disk device
|
||||
.SH DESCRIPTION
|
||||
The \fIram\fP device is a block device to access the ram disk in raw mode.
|
||||
The
|
||||
.I ram
|
||||
device is a block device to access the ram disk in raw mode.
|
||||
.LP
|
||||
It is typically created by:
|
||||
.RS
|
||||
|
|
|
@ -60,8 +60,13 @@ Print version information on standard output, then exit successfully.
|
|||
.B "\-\-"
|
||||
Terminate option list.
|
||||
.SH ENVIRONMENT
|
||||
The variables \fBLANG\fP, \fBLC_ALL\fP, \fBLC_CTYPE\fP,
|
||||
and \fBLC_MESSAGES\fP have the usual meaning.
|
||||
The variables
|
||||
.BR LANG ,
|
||||
.BR LC_ALL ,
|
||||
.BR LC_CTYPE ,
|
||||
and
|
||||
.B LC_MESSAGES
|
||||
have the usual meaning.
|
||||
.SH CONFORMING TO
|
||||
POSIX.2.
|
||||
.SH NOTES
|
||||
|
|
Loading…
Reference in New Issue