This commit is contained in:
Michael Kerrisk 2007-07-09 20:07:44 +00:00
parent c47291a73f
commit a9b4ebbc8f
8 changed files with 40 additions and 14 deletions

View File

@ -164,7 +164,9 @@ SVr4, 4.3BSD, POSIX.1-2001.
.\" SVr4 documents additional error
.\" conditions EDEADLK, ENOLCK, ENOLNK, ENOSR, ENXIO, or ERANGE.
Under SVr4 a write may be interrupted and return EINTR at any point,
Under SVr4 a write may be interrupted and return
.B EINTR
at any point,
not just before any data is written.
.SH NOTES
A successful return from

View File

@ -50,7 +50,8 @@ and
can occur.
If \fIx\fP is NaN, then NaN is returned and
.I errno
may be set to EDOM.
may be set to
.BR EDOM .
.SH "CONFORMING TO"
The
.BR ceil ()
@ -59,7 +60,9 @@ The other functions are from C99.
.SH NOTES
SUSv2 and POSIX.1-2001 contain text about overflow (which might set
.I errno
to ERANGE, or raise an exception).
to
.BR ERANGE ,
or raise an exception).
In practice, the result cannot overflow on any current machine,
so this error-handling stuff is just nonsense.
(More precisely, overflow can happen only when the maximum value

View File

@ -100,7 +100,9 @@ The SunOS version of
returns 1 on success and 0 on failure.
In case of error,
.I errno
is set to EINVAL: the value of
is set to
.BR EINVAL :
the value of
.I ptr
was not a pointer to a block previously allocated by
one of the routines in the

View File

@ -44,14 +44,19 @@ The
.BR infnan ()
function returns a suitable value for infinity and
"not-a-number" (NaN) results.
The value of \fIerror\fP can be ERANGE
The value of \fIerror\fP can be
.B ERANGE
to represent infinity or anything else to represent NaN.
\fIerrno\fP
is also set.
.SH "RETURN VALUE"
If \fIerror\fP is ERANGE (Infinity), HUGE_VAL is returned.
If \fIerror\fP is
.B ERANGE
(Infinity),
.B HUGE_VAL
is returned.
.PP
If \fIerror\fP is \-ERANGE (\-Infinity), \-HUGE_VAL is returned.
If \fIerror\fP is \-\fBERANGE\fP (\-Infinity), \-\fBHUGE_VAL\fP is returned.
.PP
If \fIerror\fP is anything else, NAN is returned.
.SH ERRORS

View File

@ -46,7 +46,9 @@ Link with \fI-lm\fP.
The
.BR sqrt ()
function returns the non-negative square root of \fIx\fP.
It fails and sets \fIerrno\fP to EDOM, if \fIx\fP is negative.
It fails and sets \fIerrno\fP to
.BR EDOM ,
if \fIx\fP is negative.
.SH ERRORS
.TP
.B EDOM

View File

@ -103,11 +103,16 @@ conversion represented as an unsigned value,
unless the original (non-negated) value would overflow; in
the latter case,
.BR strtoul ()
returns ULONG_MAX and sets the global
variable \fIerrno\fP to ERANGE.
returns
.B ULONG_MAX
and sets the global variable \fIerrno\fP to
.BR ERANGE .
Precisely the same holds for
.BR strtoull ()
(with ULLONG_MAX instead of ULONG_MAX).
(with
.B ULLONG_MAX
instead of
.BR ULONG_MAX ).
.SH ERRORS
.TP
.B EINVAL
@ -129,7 +134,10 @@ to C99 and POSIX.1-2001.
.SH NOTES
Since
.BR strtoul ()
can legitimately return 0 or LONG_MAX (LLONG_MAX for
can legitimately return 0 or
.B LONG_MAX
.RB ( LLONG_MAX
for
.BR strtoull ())
on both success and failure, the calling program should set
.I errno

View File

@ -30,7 +30,9 @@ full \- always full device
File \fI/dev/full\fP has major device number 1
and minor device number 7.
.LP
Writes to the \fI/dev/full\fP device will fail with an ENOSPC error.
Writes to the \fI/dev/full\fP device will fail with an
.B ENOSPC
error.
This can be used to test how a program handles disk-full errors.
Reads from the \fI/dev/full\fP device will return \\0 characters.

View File

@ -239,7 +239,9 @@ The definitions below are from
This request takes an argument of type
.IR "(struct mtop *)" .
Not all drives support all operations.
The driver returns an EIO error if the drive rejects an operation.
The driver returns an
.B EIO
error if the drive rejects an operation.
.PP
.nf
/* Structure for \s-1MTIOCTOP\s+1 \- mag tape op command: */