mirror of https://github.com/mkerrisk/man-pages
Formatting fixes
This commit is contained in:
parent
9ff08aad91
commit
dcec8eb551
|
@ -158,7 +158,7 @@ data from a file descriptor. Programs that receive signals as events
|
|||
normally use the signal handler only to raise a global flag. The global
|
||||
flag will indicate that the event must be processed in the main loop of
|
||||
the program. A signal will cause the \fBselect\fP() (or \fBpselect\fP())
|
||||
call to return with \fBerrno\fP set to \fBEINTR\fP. This behavior is
|
||||
call to return with \fIerrno\fP set to \fBEINTR\fP. This behavior is
|
||||
essential so that signals can be processed in the main loop of the
|
||||
program, otherwise \fBselect\fP() would block indefinitely. Now, somewhere
|
||||
in the main loop will be a conditional to check the global flag. So we
|
||||
|
@ -680,7 +680,7 @@ If \fBselect\fP() timed out, then the file descriptors sets should be all
|
|||
empty (but may not be on some systems). However the return value will
|
||||
definitely be zero.
|
||||
|
||||
A return value of \-1 indicates an error, with \fBerrno\fP being
|
||||
A return value of \-1 indicates an error, with \fIerrno\fP being
|
||||
set appropriately. In the case of an error, the returned sets and
|
||||
the timeout struct contents are undefined and should not be used.
|
||||
\fBpselect\fP() however never modifies \fIntimeout\fP.
|
||||
|
|
|
@ -30,7 +30,7 @@ The \fBfgetwc\fP() function is the wide-character equivalent of the \fBfgetc\fP(
|
|||
function. It reads a wide character from \fIstream\fP and returns it. If
|
||||
the end of stream is reached, or if \fIferror(stream)\fP becomes true,
|
||||
it returns WEOF. If a wide character conversion error occurs, it sets
|
||||
\fBerrno\fP to \fBEILSEQ\fP and returns WEOF.
|
||||
\fIerrno\fP to \fBEILSEQ\fP and returns WEOF.
|
||||
.PP
|
||||
The \fBgetwc\fP() function or macro functions identically to \fBfgetwc\fP().
|
||||
It may be implemented as a macro, and may evaluate its argument
|
||||
|
|
|
@ -27,7 +27,7 @@ fputwc \- write a wide character to a FILE stream
|
|||
The \fBfputwc\fP() function is the wide-character equivalent of the \fBfputc\fP()
|
||||
function. It writes the wide character \fIwc\fP to \fIstream\fP. If
|
||||
\fIferror(stream)\fP becomes true, it returns WEOF. If a wide character
|
||||
conversion error occurs, it sets \fBerrno\fP to \fBEILSEQ\fP and returns WEOF.
|
||||
conversion error occurs, it sets \fIerrno\fP to \fBEILSEQ\fP and returns WEOF.
|
||||
Otherwise it returns \fIwc\fP.
|
||||
.PP
|
||||
The \fBputwc\fP() function or macro functions identically to \fBfputwc\fP().
|
||||
|
|
|
@ -26,7 +26,7 @@ The \fBgetwchar\fP() function is the wide-character equivalent of the
|
|||
\fBgetchar\fP() function. It reads a wide character from \fBstdin\fP and returns
|
||||
it. If the end of stream is reached, or if \fIferror(stdin)\fP becomes
|
||||
true, it returns WEOF. If a wide character conversion error occurs, it sets
|
||||
\fBerrno\fP to \fBEILSEQ\fP and returns WEOF.
|
||||
\fIerrno\fP to \fBEILSEQ\fP and returns WEOF.
|
||||
.PP
|
||||
For a non-locking counterpart, see
|
||||
.BR unlocked_stdio (3).
|
||||
|
|
10
man3/iconv.3
10
man3/iconv.3
|
@ -42,7 +42,7 @@ output bytes, and it updates the conversion state contained in \fIcd\fP.
|
|||
The conversion can stop for four reasons:
|
||||
.PP
|
||||
1. An invalid multibyte sequence is encountered in the input. In this case
|
||||
it sets \fBerrno\fP to \fBEILSEQ\fP and returns (size_t)(\-1). \fI*inbuf\fP
|
||||
it sets \fIerrno\fP to \fBEILSEQ\fP and returns (size_t)(\-1). \fI*inbuf\fP
|
||||
is left pointing to the beginning of the invalid multibyte sequence.
|
||||
.PP
|
||||
2. The input byte sequence has been entirely converted, i.e. \fI*inbytesleft\fP
|
||||
|
@ -50,12 +50,12 @@ has gone down to 0. In this case \fBiconv\fP() returns the number of
|
|||
non-reversible conversions performed during this call.
|
||||
.PP
|
||||
3. An incomplete multibyte sequence is encountered in the input, and the
|
||||
input byte sequence terminates after it. In this case it sets \fBerrno\fP to
|
||||
input byte sequence terminates after it. In this case it sets \fIerrno\fP to
|
||||
\fBEINVAL\fP and returns (size_t)(\-1). \fI*inbuf\fP is left pointing to the
|
||||
beginning of the incomplete multibyte sequence.
|
||||
.PP
|
||||
4. The output buffer has no more room for the next converted character. In
|
||||
this case it sets \fBerrno\fP to \fBE2BIG\fP and returns (size_t)(\-1).
|
||||
this case it sets \fIerrno\fP to \fBE2BIG\fP and returns (size_t)(\-1).
|
||||
.PP
|
||||
A different case is when \fIinbuf\fP is NULL or \fI*inbuf\fP is NULL, but
|
||||
\fIoutbuf\fP is not NULL and \fI*outbuf\fP is not NULL. In this case, the
|
||||
|
@ -63,7 +63,7 @@ A different case is when \fIinbuf\fP is NULL or \fI*inbuf\fP is NULL, but
|
|||
initial state and store a corresponding shift sequence at \fI*outbuf\fP.
|
||||
At most \fI*outbytesleft\fP bytes, starting at \fI*outbuf\fP, will be written.
|
||||
If the output buffer has no more room for this reset sequence, it sets
|
||||
\fBerrno\fP to \fBE2BIG\fP and returns (size_t)(\-1). Otherwise it increments
|
||||
\fIerrno\fP to \fBE2BIG\fP and returns (size_t)(\-1). Otherwise it increments
|
||||
\fI*outbuf\fP and decrements \fI*outbytesleft\fP by the number of bytes
|
||||
written.
|
||||
.PP
|
||||
|
@ -73,7 +73,7 @@ function sets \fIcd\fP's conversion state to the initial state.
|
|||
.SH "RETURN VALUE"
|
||||
The \fBiconv\fP() function returns the number of characters converted in a
|
||||
non-reversible way during this call; reversible conversions are not counted.
|
||||
In case of error, it sets \fBerrno\fP and returns (size_t)(\-1).
|
||||
In case of error, it sets \fIerrno\fP and returns (size_t)(\-1).
|
||||
.SH ERRORS
|
||||
The following errors can occur, among others:
|
||||
.TP
|
||||
|
|
|
@ -39,7 +39,7 @@ state back to the initial state, use \fBiconv\fP() with NULL as \fIinbuf\fP
|
|||
argument.
|
||||
.SH "RETURN VALUE"
|
||||
The \fBiconv_open\fP() function returns a freshly allocated conversion
|
||||
descriptor. In case of error, it sets \fBerrno\fP and returns (iconv_t)(\-1).
|
||||
descriptor. In case of error, it sets \fIerrno\fP and returns (iconv_t)(\-1).
|
||||
.SH ERRORS
|
||||
The following error can occur, among others:
|
||||
.TP
|
||||
|
|
|
@ -35,7 +35,7 @@ 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 \fIerrno\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
|
||||
|
@ -44,7 +44,7 @@ mbrlen function is used instead.
|
|||
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)
|
||||
and sets \fBerrno\fP to \fBEILSEQ\fP, if an invalid multibyte sequence was
|
||||
and sets \fIerrno\fP to \fBEILSEQ\fP, if an invalid multibyte sequence was
|
||||
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"
|
||||
|
|
|
@ -38,7 +38,7 @@ sequences.
|
|||
.PP
|
||||
If the multibyte string starting at \fIs\fP contains an invalid multibyte
|
||||
sequence before the next complete character, \fBmbrtowc\fP() returns
|
||||
\fI(size_t)(\-1)\fP and sets \fBerrno\fP to \fBEILSEQ\fP. In this case,
|
||||
\fI(size_t)(\-1)\fP and sets \fIerrno\fP to \fBEILSEQ\fP. In this case,
|
||||
the effects on \fI*ps\fP are undefined.
|
||||
.PP
|
||||
A different case is when \fIs\fP is not NULL but \fIpwc\fP is NULL. In this
|
||||
|
@ -48,7 +48,7 @@ store the converted wide character in memory.
|
|||
A third case is when \fIs\fP is NULL. In this case, \fIpwc\fP and \fIn\fP are
|
||||
ignored. If the conversion state represented by \fI*ps\fP denotes an
|
||||
incomplete multibyte character conversion, the \fBmbrtowc\fP() function
|
||||
returns \fI(size_t)(\-1)\fP, sets \fBerrno\fP to \fBEILSEQ\fP, and
|
||||
returns \fI(size_t)(\-1)\fP, sets \fIerrno\fP to \fBEILSEQ\fP, and
|
||||
leaves \fI*ps\fP in an undefined state. Otherwise, the \fBmbrtowc\fP() function
|
||||
puts \fI*ps\fP in the initial state and returns 0.
|
||||
.PP
|
||||
|
@ -67,7 +67,7 @@ multibyte sequence starting at \fIs\fP, if a non-L'\\0' wide character
|
|||
was recognized.
|
||||
It returns 0, if a L'\\0' wide character was recognized.
|
||||
It returns (size_t)(\-1)
|
||||
and sets \fBerrno\fP to \fBEILSEQ\fP, if an invalid multibyte sequence was
|
||||
and sets \fIerrno\fP to \fBEILSEQ\fP, if an invalid multibyte sequence was
|
||||
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"
|
||||
|
|
|
@ -37,7 +37,7 @@ conversion can stop for three reasons:
|
|||
.PP
|
||||
1. An invalid multibyte sequence has been encountered. In this case \fI*src\fP
|
||||
is left pointing to the invalid multibyte sequence, (size_t)(\-1) is returned,
|
||||
and \fBerrno\fP is set to \fBEILSEQ\fP.
|
||||
and \fIerrno\fP is set to \fBEILSEQ\fP.
|
||||
.PP
|
||||
2. The \fInms\fP limit forces a stop, or \fIlen\fP non-L'\\0' wide characters
|
||||
have been stored at \fIdest\fP. In this case \fI*src\fP is left pointing to the
|
||||
|
@ -63,7 +63,7 @@ characters at \fIdest\fP.
|
|||
The \fBmbsnrtowcs\fP() function returns the number of wide characters that make
|
||||
up the converted part of the wide character string, not including the
|
||||
terminating null wide character. If an invalid multibyte sequence was
|
||||
encountered, (size_t)(\-1) is returned, and \fBerrno\fP set to \fBEILSEQ\fP.
|
||||
encountered, (size_t)(\-1) is returned, and \fIerrno\fP set to \fBEILSEQ\fP.
|
||||
.SH "CONFORMING TO"
|
||||
This function is a GNU extension.
|
||||
.SH "SEE ALSO"
|
||||
|
|
|
@ -33,7 +33,7 @@ conversion can stop for three reasons:
|
|||
.PP
|
||||
1. An invalid multibyte sequence has been encountered. In this case \fI*src\fP
|
||||
is left pointing to the invalid multibyte sequence, (size_t)(\-1) is returned,
|
||||
and \fBerrno\fP is set to \fBEILSEQ\fP.
|
||||
and \fIerrno\fP is set to \fBEILSEQ\fP.
|
||||
.PP
|
||||
2. \fIlen\fP non-L'\\0' wide characters have been stored at \fIdest\fP. In this
|
||||
case \fI*src\fP is left pointing to the next multibyte sequence to be converted,
|
||||
|
@ -58,7 +58,7 @@ characters at \fIdest\fP.
|
|||
The \fBmbsrtowcs\fP() function returns the number of wide characters that make
|
||||
up the converted part of the wide character string, not including the
|
||||
terminating null wide character. If an invalid multibyte sequence was
|
||||
encountered, (size_t)(\-1) is returned, and \fBerrno\fP set to \fBEILSEQ\fP.
|
||||
encountered, (size_t)(\-1) is returned, and \fIerrno\fP set to \fBEILSEQ\fP.
|
||||
.SH "CONFORMING TO"
|
||||
ISO/ANSI C, UNIX98
|
||||
.SH "SEE ALSO"
|
||||
|
|
|
@ -25,7 +25,7 @@ putwchar \- write a wide character to standard output
|
|||
The \fBputwchar\fP() function is the wide-character equivalent of the
|
||||
\fBputchar\fP() function. It writes the wide character \fIwc\fP to \fBstdout\fP.
|
||||
If \fIferror(stdout)\fP becomes true, it returns WEOF. If a wide character
|
||||
conversion error occurs, it sets \fBerrno\fP to \fBEILSEQ\fP and returns WEOF.
|
||||
conversion error occurs, it sets \fIerrno\fP to \fBEILSEQ\fP and returns WEOF.
|
||||
Otherwise it returns \fIwc\fP.
|
||||
.PP
|
||||
For a non-locking counterpart, see
|
||||
|
|
|
@ -25,7 +25,7 @@ The \fBungetwc\fP() function is the wide-character equivalent of the \fBungetc\f
|
|||
function. It pushes back a wide character onto \fIstream\fP and returns it.
|
||||
.PP
|
||||
If \fIwc\fP is WEOF, it returns WEOF. If \fIwc\fP is an invalid wide character,
|
||||
it sets \fBerrno\fP to \fBEILSEQ\fP and returns WEOF.
|
||||
it sets \fIerrno\fP to \fBEILSEQ\fP and returns WEOF.
|
||||
.PP
|
||||
If \fIwc\fP is a valid wide character, it is pushed back onto the stream
|
||||
and thus becomes available for future wide character read operations.
|
||||
|
|
|
@ -41,12 +41,12 @@ and the function effectively returns wcrtomb(buf,L'\\0',\fIps\fP) where
|
|||
buf is an internal anonymous buffer.
|
||||
.PP
|
||||
In all of the above cases, if \fIps\fP is a NULL pointer, a static anonymous
|
||||
state only known to the wcrtomb function is used instead.
|
||||
state only known to the \fBwcrtomb\fP() function is used instead.
|
||||
.SH "RETURN VALUE"
|
||||
The \fBwcrtomb\fP() function returns the number of bytes that have been or would
|
||||
have been written to the byte array at \fIs\fP. If \fIwc\fP can not be
|
||||
represented as a multibyte sequence (according to the current locale),
|
||||
(size_t)(\-1) is returned, and \fBerrno\fP set to \fBEILSEQ\fP.
|
||||
(size_t)(\-1) is returned, and \fIerrno\fP set to \fBEILSEQ\fP.
|
||||
.SH "CONFORMING TO"
|
||||
ISO/ANSI C, UNIX98
|
||||
.SH "SEE ALSO"
|
||||
|
|
|
@ -37,7 +37,7 @@ by one. The conversion can stop for three reasons:
|
|||
1. A wide character has been encountered that can not be represented as a
|
||||
multibyte sequence (according to the current locale). In this case \fI*src\fP
|
||||
is left pointing to the invalid wide character, (size_t)(\-1) is returned,
|
||||
and \fBerrno\fP is set to \fBEILSEQ\fP.
|
||||
and \fIerrno\fP is set to \fBEILSEQ\fP.
|
||||
.PP
|
||||
2. \fInwc\fP wide characters have been converted without encountering a L'\\0',
|
||||
or the length limit forces a stop. In this case \fI*src\fP is left pointing
|
||||
|
@ -63,7 +63,7 @@ at \fIdest\fP.
|
|||
The \fBwcsnrtombs\fP() function returns the number of bytes that make up the
|
||||
converted part of multibyte sequence, not including the terminating null byte.
|
||||
If a wide character was encountered which could not be converted, (size_t)(\-1)
|
||||
is returned, and \fBerrno\fP set to \fBEILSEQ\fP.
|
||||
is returned, and \fIerrno\fP set to \fBEILSEQ\fP.
|
||||
.SH "CONFORMING TO"
|
||||
This function is a GNU extension.
|
||||
.SH "SEE ALSO"
|
||||
|
|
Loading…
Reference in New Issue