global edit s/ -1/ \\-1/g

This commit is contained in:
Michael Kerrisk 2005-06-15 14:10:23 +00:00
parent f59a3f1941
commit 8729177b44
19 changed files with 24 additions and 24 deletions

View File

@ -50,7 +50,7 @@ When successful,
returns a positive integer identifying the descriptor. returns a positive integer identifying the descriptor.
When an error occurs, When an error occurs,
.BR epoll_create (2) .BR epoll_create (2)
returns -1 and returns \-1 and
.I errno .I errno
is set appropriately. is set appropriately.
.SH ERRORS .SH ERRORS

View File

@ -806,7 +806,7 @@ to be negative. (And if it is, the interval described by the lock
covers bytes covers bytes
.IR l_start + l_len .IR l_start + l_len
up to and including up to and including
.IR l_start -1.) .IR l_start \-1.)
This is supported by Linux since Linux 2.4.21 and 2.5.49. This is supported by Linux since Linux 2.4.21 and 2.5.49.
Several systems have more fields in Several systems have more fields in
@ -822,7 +822,7 @@ A limitation of the Linux system call conventions on some
architectures (notably x86) means that if a (negative) architectures (notably x86) means that if a (negative)
process group ID to be returned by process group ID to be returned by
.B F_GETOWN .B F_GETOWN
falls in the range -1 to -4095, then the return value is wrongly falls in the range \-1 to \-4095, then the return value is wrongly
interpreted by glibc as an error in the system call; interpreted by glibc as an error in the system call;
.\" glibc source: sysdeps/unix/sysv/linux/i386/sysdep.h .\" glibc source: sysdeps/unix/sysv/linux/i386/sysdep.h
that is, the return value of that is, the return value of

View File

@ -55,7 +55,7 @@ larger files (typically up to 2^44 bytes).
.SH "RETURN VALUE" .SH "RETURN VALUE"
On success, On success,
.B mmap2 .B mmap2
returns a pointer to the mapped area. On error -1 is returned returns a pointer to the mapped area. On error \-1 is returned
and and
.I errno .I errno
is set appropriately. is set appropriately.

View File

@ -49,10 +49,10 @@ You pass it a bus/devfn pair and get a physical address for either the memory of
.SH "RETURN VALUE" .SH "RETURN VALUE"
.TP .TP
.BR pciconfig_read .BR pciconfig_read
On success zero is returned. On error, -1 is returned and errno is set appropriately. On success zero is returned. On error, \-1 is returned and errno is set appropriately.
.TP .TP
.BR pciconfig_write .BR pciconfig_write
On success zero is returned. On error, -1 is returned and errno is set appropriately. On success zero is returned. On error, \-1 is returned and errno is set appropriately.
.TP .TP
.BR pciconfig_iobase .BR pciconfig_iobase
Returns information on locations of various I/O regions in physical memory according to the Returns information on locations of various I/O regions in physical memory according to the

View File

@ -620,7 +620,7 @@ local network.
.TP .TP
\fB7.\fP \fB7.\fP
The functions \fBread()\fP, \fBrecv()\fP, \fBwrite()\fP, and The functions \fBread()\fP, \fBrecv()\fP, \fBwrite()\fP, and
\fBsend()\fP as well as the \fBselect()\fP call can return -1 with an \fBsend()\fP as well as the \fBselect()\fP call can return \-1 with an
errno of \fBEINTR\fP or \fBEAGAIN\fP (\fBEWOULDBLOCK\fP) which are not errno of \fBEINTR\fP or \fBEAGAIN\fP (\fBEWOULDBLOCK\fP) which are not
errors. These results must be properly managed (not done properly errors. These results must be properly managed (not done properly
above). If your program is not going to receive any signals then above). If your program is not going to receive any signals then

View File

@ -308,7 +308,7 @@ If successful
and and
.BR semtimedop () .BR semtimedop ()
return 0; return 0;
otherwise they return -1 otherwise they return \-1
with with
.I errno .I errno
indicating the error. indicating the error.

View File

@ -57,7 +57,7 @@ Symbolic constants for system calls can be found in the header file
.Sh RETURN VALUES .Sh RETURN VALUES
The return value is defined by the system call being invoked. The return value is defined by the system call being invoked.
In general, a 0 return value indicates success. In general, a 0 return value indicates success.
A -1 return value indicates an error, A \-1 return value indicates an error,
and an error code is stored in and an error code is stored in
.Va errno . .Va errno .
.Sh BUGS .Sh BUGS
@ -69,4 +69,4 @@ The
.Fn syscall .Fn syscall
function call appeared in function call appeared in
.Bx 4.0 . .Bx 4.0 .
.\" dummy comment without newline .\" dummy comment without newline

View File

@ -98,7 +98,7 @@ The HP version of struct ustat has an additional field
.I f_blksize .I f_blksize
that is unknown elsewhere. HP warns: that is unknown elsewhere. HP warns:
For some file systems, the number of free inodes does not change. For some file systems, the number of free inodes does not change.
Such file systems will return -1 in the field Such file systems will return \-1 in the field
.IR f_tinode . .IR f_tinode .
.\" Some software tries to use this in order to test whether the .\" Some software tries to use this in order to test whether the
.\" underlying filesystem is NFS. .\" underlying filesystem is NFS.

View File

@ -22,7 +22,7 @@ elsewhere on some systems that use GNU Libc.
.SH "RETURN VALUE" .SH "RETURN VALUE"
.B getpt() .B getpt()
returns an open file descriptor upon successful completion. Otherwise, it returns an open file descriptor upon successful completion. Otherwise, it
returns -1 and sets returns \-1 and sets
.I errno .I errno
to indicate the error. to indicate the error.
.SH CONFORMING TO .SH CONFORMING TO

View File

@ -180,7 +180,7 @@ struct spwd {
Routines return NULL if no more entries are available or if an Routines return NULL if no more entries are available or if an
error occurs during processing. error occurs during processing.
Routines which have \fBint\fR as the return value return 0 for Routines which have \fBint\fR as the return value return 0 for
success and -1 for failure. success and \-1 for failure.
.LP .LP
For the non-reentrant functions, the return value may point to static area, For the non-reentrant functions, the return value may point to static area,
and may be overwritten by subsequent calls to these functions. and may be overwritten by subsequent calls to these functions.

View File

@ -108,7 +108,7 @@ If a call to
.BR login_tty() , .BR login_tty() ,
or or
.B forkpty() .B forkpty()
is not successful, -1 is returned and is not successful, \-1 is returned and
.I errno .I errno
is set to indicate the error. Otherwise, is set to indicate the error. Otherwise,
.BR openpty() , .BR openpty() ,

View File

@ -56,7 +56,7 @@ On success,
.BR ptsname () .BR ptsname ()
returns a non-negative file descriptor which is the lowest returns a non-negative file descriptor which is the lowest
numbered unused descriptor. numbered unused descriptor.
On failure, -1 is returned, and On failure, \-1 is returned, and
.I errno .I errno
is set to indicate the error. is set to indicate the error.
.SH ERRORS .SH ERRORS

View File

@ -81,7 +81,7 @@ This function is specified in POSIX 1003.1-2001.
.BR ptsname_r () .BR ptsname_r ()
is a Linux extension. is a Linux extension.
A version of this function is documented on Tru64 and HP-UX, but A version of this function is documented on Tru64 and HP-UX, but
on those implementations, -1 is returned on error, with on those implementations, \-1 is returned on error, with
.I errno .I errno
set to indicate the error. set to indicate the error.
Avoid using this function in portable programs. Avoid using this function in portable programs.

View File

@ -171,7 +171,7 @@ elements.
These are filled in by These are filled in by
.BR regexec .BR regexec
with substring match addresses. Any unused structure elements with substring match addresses. Any unused structure elements
will contain the value -1. will contain the value \-1.
The The
.B regmatch_t .B regmatch_t
@ -195,7 +195,7 @@ is defined in
Each Each
.I rm_so .I rm_so
element that is not -1 indicates the start offset of the next largest element that is not \-1 indicates the start offset of the next largest
substring match within the string. The relative substring match within the string. The relative
.I rm_eo .I rm_eo
element indicates the end offset of the match. element indicates the end offset of the match.

View File

@ -31,7 +31,7 @@ Otherwise, the tcp/time socket (port 37) is used.
.SH "RETURN VALUE" .SH "RETURN VALUE"
On success, 0 is returned, and the obtained 32-bit time value is stored in On success, 0 is returned, and the obtained 32-bit time value is stored in
.IR timep->tv_sec . .IR timep->tv_sec .
In case of error -1 is returned, and In case of error \-1 is returned, and
.I errno .I errno
is set appropriately. is set appropriately.
.SH ERRORS .SH ERRORS

View File

@ -42,13 +42,13 @@ increment the integer. Afterwards, check if it has in fact changed from 0 to 1,
there were no waiters and the operation is done. This is the non-contended case which is fast and there were no waiters and the operation is done. This is the non-contended case which is fast and
should be common. should be common.
.PP .PP
In the contended case, the atomic increment changed the counter from -1 (or some other negative number). If this is detected, In the contended case, the atomic increment changed the counter from \-1 (or some other negative number). If this is detected,
there are waiters. Userspace should now set the counter to 1 and instruct the kernel to wake up any there are waiters. Userspace should now set the counter to 1 and instruct the kernel to wake up any
waiters using the FUTEX_WAKE operation. waiters using the FUTEX_WAKE operation.
.PP .PP
Waiting on a futex, to 'down' it, is the reverse operation. Atomically decrement the counter and Waiting on a futex, to 'down' it, is the reverse operation. Atomically decrement the counter and
check if it changed to 0, in which case the operation is done and the futex was uncontended. In all check if it changed to 0, in which case the operation is done and the futex was uncontended. In all
other circumstances, the process should set the counter to -1 and request that the kernel wait for other circumstances, the process should set the counter to \-1 and request that the kernel wait for
another process to up the futex. This is done using the FUTEX_WAIT operation. another process to up the futex. This is done using the FUTEX_WAIT operation.
.PP .PP
The futex system call can optionally be passed a timeout specifying how long the kernel should The futex system call can optionally be passed a timeout specifying how long the kernel should

View File

@ -292,7 +292,7 @@ The standard nice value, plus fifteen. The value is never negative in
the kernel. the kernel.
.TP .TP
\fInice\fP %ld \fInice\fP %ld
The nice value ranges from 19 (nicest) to -19 (not nice to others). The nice value ranges from 19 (nicest) to \-19 (not nice to others).
.TP .TP
.\" .TP .\" .TP
.\" \fIcounter\fP %ld .\" \fIcounter\fP %ld

View File

@ -840,7 +840,7 @@ pcd.driveN=prt,pro,uni,mod,slv,dly
pcd.nice=nice pcd.nice=nice
.LP .LP
where `port' is the base address, `pro' is the protocol number, `uni' where `port' is the base address, `pro' is the protocol number, `uni'
is the unit selector (for chained devices), `mod' is the mode (or -1 is the unit selector (for chained devices), `mod' is the mode (or \-1
to choose the best automatically), `slv' is 1 if it should be a slave, to choose the best automatically), `slv' is 1 if it should be a slave,
and `dly' is a small integer for slowing down port accesses. The and `dly' is a small integer for slowing down port accesses. The
`nice' parameter controls the driver's use of idle CPU time, at the `nice' parameter controls the driver's use of idle CPU time, at the

View File

@ -238,7 +238,7 @@ The parameter is a struct timeval.
If an input or output function blocks for this period of time, and If an input or output function blocks for this period of time, and
data has been sent or received, the return value of that function data has been sent or received, the return value of that function
will be the amount of data transferred; if no data has been transferred will be the amount of data transferred; if no data has been transferred
and the timeout has been reached then -1 is returned with and the timeout has been reached then \-1 is returned with
.I errno .I errno
set to EAGAIN or EWOULDBLOCK set to EAGAIN or EWOULDBLOCK
.\" in fact to EAGAIN .\" in fact to EAGAIN