Formatting fixes

This commit is contained in:
Michael Kerrisk 2006-02-09 20:29:51 +00:00
parent 9ff08aad91
commit dcec8eb551
14 changed files with 26 additions and 26 deletions

View File

@ -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 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 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()) 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 essential so that signals can be processed in the main loop of the
program, otherwise \fBselect\fP() would block indefinitely. Now, somewhere program, otherwise \fBselect\fP() would block indefinitely. Now, somewhere
in the main loop will be a conditional to check the global flag. So we 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 empty (but may not be on some systems). However the return value will
definitely be zero. 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 set appropriately. In the case of an error, the returned sets and
the timeout struct contents are undefined and should not be used. the timeout struct contents are undefined and should not be used.
\fBpselect\fP() however never modifies \fIntimeout\fP. \fBpselect\fP() however never modifies \fIntimeout\fP.

View File

@ -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 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, 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 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 .PP
The \fBgetwc\fP() function or macro functions identically to \fBfgetwc\fP(). The \fBgetwc\fP() function or macro functions identically to \fBfgetwc\fP().
It may be implemented as a macro, and may evaluate its argument It may be implemented as a macro, and may evaluate its argument

View File

@ -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() 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 function. It writes the wide character \fIwc\fP to \fIstream\fP. If
\fIferror(stream)\fP becomes true, it returns WEOF. If a wide character \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. Otherwise it returns \fIwc\fP.
.PP .PP
The \fBputwc\fP() function or macro functions identically to \fBfputwc\fP(). The \fBputwc\fP() function or macro functions identically to \fBfputwc\fP().

View File

@ -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 \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 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 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 .PP
For a non-locking counterpart, see For a non-locking counterpart, see
.BR unlocked_stdio (3). .BR unlocked_stdio (3).

View File

@ -42,7 +42,7 @@ output bytes, and it updates the conversion state contained in \fIcd\fP.
The conversion can stop for four reasons: The conversion can stop for four reasons:
.PP .PP
1. An invalid multibyte sequence is encountered in the input. In this case 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. is left pointing to the beginning of the invalid multibyte sequence.
.PP .PP
2. The input byte sequence has been entirely converted, i.e. \fI*inbytesleft\fP 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. non-reversible conversions performed during this call.
.PP .PP
3. An incomplete multibyte sequence is encountered in the input, and the 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 \fBEINVAL\fP and returns (size_t)(\-1). \fI*inbuf\fP is left pointing to the
beginning of the incomplete multibyte sequence. beginning of the incomplete multibyte sequence.
.PP .PP
4. The output buffer has no more room for the next converted character. In 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 .PP
A different case is when \fIinbuf\fP is NULL or \fI*inbuf\fP is NULL, but 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 \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. 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. 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 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 \fI*outbuf\fP and decrements \fI*outbytesleft\fP by the number of bytes
written. written.
.PP .PP
@ -73,7 +73,7 @@ function sets \fIcd\fP's conversion state to the initial state.
.SH "RETURN VALUE" .SH "RETURN VALUE"
The \fBiconv\fP() function returns the number of characters converted in a The \fBiconv\fP() function returns the number of characters converted in a
non-reversible way during this call; reversible conversions are not counted. 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 .SH ERRORS
The following errors can occur, among others: The following errors can occur, among others:
.TP .TP

View File

@ -39,7 +39,7 @@ state back to the initial state, use \fBiconv\fP() with NULL as \fIinbuf\fP
argument. argument.
.SH "RETURN VALUE" .SH "RETURN VALUE"
The \fBiconv_open\fP() function returns a freshly allocated conversion 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 .SH ERRORS
The following error can occur, among others: The following error can occur, among others:
.TP .TP

View File

@ -35,7 +35,7 @@ sequences.
.PP .PP
If the multibyte string starting at \fIs\fP contains an invalid multibyte If the multibyte string starting at \fIs\fP contains an invalid multibyte
sequence before the next complete character, \fBmbrlen\fP() returns 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. the effects on \fI*ps\fP are undefined.
.PP .PP
If \fIps\fP is a NULL pointer, a static anonymous state only known to the 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 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. 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) 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 encountered. It returns (size_t)(\-2) if it couldn't parse a complete multibyte
character, meaning that \fIn\fP should be increased. character, meaning that \fIn\fP should be increased.
.SH "CONFORMING TO" .SH "CONFORMING TO"

View File

@ -38,7 +38,7 @@ sequences.
.PP .PP
If the multibyte string starting at \fIs\fP contains an invalid multibyte If the multibyte string starting at \fIs\fP contains an invalid multibyte
sequence before the next complete character, \fBmbrtowc\fP() returns 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. the effects on \fI*ps\fP are undefined.
.PP .PP
A different case is when \fIs\fP is not NULL but \fIpwc\fP is NULL. In this 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 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 ignored. If the conversion state represented by \fI*ps\fP denotes an
incomplete multibyte character conversion, the \fBmbrtowc\fP() function 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 leaves \fI*ps\fP in an undefined state. Otherwise, the \fBmbrtowc\fP() function
puts \fI*ps\fP in the initial state and returns 0. puts \fI*ps\fP in the initial state and returns 0.
.PP .PP
@ -67,7 +67,7 @@ multibyte sequence starting at \fIs\fP, if a non-L'\\0' wide character
was recognized. was recognized.
It returns 0, if a L'\\0' wide character was recognized. It returns 0, if a L'\\0' wide character was recognized.
It returns (size_t)(\-1) 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 encountered. It returns (size_t)(\-2) if it couldn't parse a complete multibyte
character, meaning that \fIn\fP should be increased. character, meaning that \fIn\fP should be increased.
.SH "CONFORMING TO" .SH "CONFORMING TO"

View File

@ -37,7 +37,7 @@ conversion can stop for three reasons:
.PP .PP
1. An invalid multibyte sequence has been encountered. In this case \fI*src\fP 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, 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 .PP
2. The \fInms\fP limit forces a stop, or \fIlen\fP non-L'\\0' wide characters 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 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 The \fBmbsnrtowcs\fP() function returns the number of wide characters that make
up the converted part of the wide character string, not including the up the converted part of the wide character string, not including the
terminating null wide character. If an invalid multibyte sequence was 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" .SH "CONFORMING TO"
This function is a GNU extension. This function is a GNU extension.
.SH "SEE ALSO" .SH "SEE ALSO"

View File

@ -33,7 +33,7 @@ conversion can stop for three reasons:
.PP .PP
1. An invalid multibyte sequence has been encountered. In this case \fI*src\fP 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, 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 .PP
2. \fIlen\fP non-L'\\0' wide characters have been stored at \fIdest\fP. In this 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, 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 The \fBmbsrtowcs\fP() function returns the number of wide characters that make
up the converted part of the wide character string, not including the up the converted part of the wide character string, not including the
terminating null wide character. If an invalid multibyte sequence was 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" .SH "CONFORMING TO"
ISO/ANSI C, UNIX98 ISO/ANSI C, UNIX98
.SH "SEE ALSO" .SH "SEE ALSO"

View File

@ -25,7 +25,7 @@ putwchar \- write a wide character to standard output
The \fBputwchar\fP() function is the wide-character equivalent of the The \fBputwchar\fP() function is the wide-character equivalent of the
\fBputchar\fP() function. It writes the wide character \fIwc\fP to \fBstdout\fP. \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 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. Otherwise it returns \fIwc\fP.
.PP .PP
For a non-locking counterpart, see For a non-locking counterpart, see

View File

@ -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. function. It pushes back a wide character onto \fIstream\fP and returns it.
.PP .PP
If \fIwc\fP is WEOF, it returns WEOF. If \fIwc\fP is an invalid wide character, 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 .PP
If \fIwc\fP is a valid wide character, it is pushed back onto the stream 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. and thus becomes available for future wide character read operations.

View File

@ -41,12 +41,12 @@ and the function effectively returns wcrtomb(buf,L'\\0',\fIps\fP) where
buf is an internal anonymous buffer. buf is an internal anonymous buffer.
.PP .PP
In all of the above cases, if \fIps\fP is a NULL pointer, a static anonymous 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" .SH "RETURN VALUE"
The \fBwcrtomb\fP() function returns the number of bytes that have been or would 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 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), 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" .SH "CONFORMING TO"
ISO/ANSI C, UNIX98 ISO/ANSI C, UNIX98
.SH "SEE ALSO" .SH "SEE ALSO"

View File

@ -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 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 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, 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 .PP
2. \fInwc\fP wide characters have been converted without encountering a L'\\0', 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 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 The \fBwcsnrtombs\fP() function returns the number of bytes that make up the
converted part of multibyte sequence, not including the terminating null byte. 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) 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" .SH "CONFORMING TO"
This function is a GNU extension. This function is a GNU extension.
.SH "SEE ALSO" .SH "SEE ALSO"