fcntl.2, ioctl_tty.2, kcmp.2, prctl.2, semop.2, swapon.2, atof.3, atoi.3, bsearch.3, cfree.3, ctime.3, drand48.3, errno.3: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2017-08-17 13:41:27 +02:00
parent 47f743f12e
commit ba39b288ab
13 changed files with 62 additions and 46 deletions

View File

@ -1196,8 +1196,8 @@ The events to be notified are specified in
.IR arg , .IR arg ,
which is a bit mask specified by ORing together zero or more of which is a bit mask specified by ORing together zero or more of
the following bits: the following bits:
.PP
.RS .RS
.sp
.PD 0 .PD 0
.TP 12 .TP 12
.B DN_ACCESS .B DN_ACCESS

View File

@ -517,7 +517,7 @@ This command was removed in Linux 2.5.67.
.\" .\"
.\" .SS Serial info .\" .SS Serial info
.\" .BR "#include <linux/serial.h>" .\" .BR "#include <linux/serial.h>"
.\" .sp .\" .PP
.\" .TP .\" .TP
.\" .BI "TIOCGSERIAL struct serial_struct *" argp .\" .BI "TIOCGSERIAL struct serial_struct *" argp
.\" Get serial info. .\" Get serial info.

View File

@ -173,9 +173,9 @@ The argument
.I idx2 .I idx2
is a pointer to a structure where the target file is described. is a pointer to a structure where the target file is described.
This structure has the form: This structure has the form:
.PP
.in +4n .in +4n
.nf .nf
.sp
struct kcmp_epoll_slot { struct kcmp_epoll_slot {
__u32 efd; __u32 efd;
__u32 tfd; __u32 tfd;
@ -183,6 +183,7 @@ struct kcmp_epoll_slot {
}; };
.fi .fi
.in .in
.PP
Within this structure, Within this structure,
.I efd .I efd
is an epoll file descriptor returned from is an epoll file descriptor returned from

View File

@ -1575,9 +1575,13 @@ IRIX has a
system call (also introduced in Linux 2.1.44 system call (also introduced in Linux 2.1.44
as irix_prctl on the MIPS architecture), as irix_prctl on the MIPS architecture),
with prototype with prototype
.sp .PP
.in +4n
.EX
.BI "ptrdiff_t prctl(int " option ", int " arg2 ", int " arg3 ); .BI "ptrdiff_t prctl(int " option ", int " arg2 ", int " arg3 );
.sp .EE
.in
.PP
and options to get the maximum number of processes per user, and options to get the maximum number of processes per user,
get the maximum number of processors the calling process can use, get the maximum number of processors the calling process can use,
find out whether a specified process is currently blocked, find out whether a specified process is currently blocked,

View File

@ -86,9 +86,9 @@ containing the following members:
unsigned short sem_num; /* semaphore number */ unsigned short sem_num; /* semaphore number */
short sem_op; /* semaphore operation */ short sem_op; /* semaphore operation */
short sem_flg; /* operation flags */ short sem_flg; /* operation flags */
.sp
.in -4n .in -4n
.fi .fi
.PP
Flags recognized in Flags recognized in
.I sem_flg .I sem_flg
are are

View File

@ -67,10 +67,12 @@ argument, the new swap area will have a higher priority than default.
The priority is encoded within The priority is encoded within
.I swapflags .I swapflags
as: as:
.br .PP
.sp .in +4n
.I " (prio << SWAP_FLAG_PRIO_SHIFT) & SWAP_FLAG_PRIO_MASK" .EX
.br .I "(prio << SWAP_FLAG_PRIO_SHIFT) & SWAP_FLAG_PRIO_MASK"
.EE
.in
.PP .PP
If the If the
.B SWAP_FLAG_DISCARD .B SWAP_FLAG_DISCARD

View File

@ -44,11 +44,13 @@ function converts the initial portion of the string
pointed to by \fInptr\fP to pointed to by \fInptr\fP to
.IR double . .IR double .
The behavior is the same as The behavior is the same as
.sp .PP
.in +4n .in +4n
.EX
strtod(nptr, NULL); strtod(nptr, NULL);
.EE
.in .in
.sp .PP
except that except that
.BR atof () .BR atof ()
does not detect errors. does not detect errors.

View File

@ -63,11 +63,13 @@ function converts the initial portion of the string
pointed to by \fInptr\fP to pointed to by \fInptr\fP to
.IR int . .IR int .
The behavior is the same as The behavior is the same as
.sp .PP
.in +4n .in +4n
.EX
strtol(nptr, NULL, 10); strtol(nptr, NULL, 10);
.EE
.in .in
.sp .PP
except that except that
.BR atoi () .BR atoi ()
does not detect errors. does not detect errors.

View File

@ -94,8 +94,8 @@ The example below first sorts an array of structures using
.BR qsort (3), .BR qsort (3),
then retrieves desired elements using then retrieves desired elements using
.BR bsearch (). .BR bsearch ().
.sp .PP
.nf .EX
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -137,7 +137,7 @@ main(int argc, char **argv)
} }
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
} }
.fi .EE
.\" this example referred to in qsort.3 .\" this example referred to in qsort.3
.SH SEE ALSO .SH SEE ALSO
.BR hsearch (3), .BR hsearch (3),

View File

@ -77,11 +77,13 @@ apparently as an analog to
.BR calloc (3). .BR calloc (3).
.LP .LP
If you need it while porting something, add If you need it while porting something, add
.sp .PP
.in +4n .in +4n
.EX
#define cfree(p, n, s) free((p)) #define cfree(p, n, s) free((p))
.EE
.in .in
.sp .PP
to your file. to your file.
.LP .LP
A frequently asked question is "Can I use A frequently asked question is "Can I use

View File

@ -95,9 +95,9 @@ separated into year, month, day, and so on.
.PP .PP
Broken-down time is stored Broken-down time is stored
in the structure \fItm\fP, which is defined in \fI<time.h>\fP as follows: in the structure \fItm\fP, which is defined in \fI<time.h>\fP as follows:
.sp .PP
.in +4n .in +4n
.nf .EX
struct tm { struct tm {
int tm_sec; /* Seconds (0-60) */ int tm_sec; /* Seconds (0-60) */
int tm_min; /* Minutes (0-59) */ int tm_min; /* Minutes (0-59) */
@ -109,7 +109,7 @@ struct tm {
int tm_yday; /* Day in the year (0-365, 1 Jan = 0) */ int tm_yday; /* Day in the year (0-365, 1 Jan = 0) */
int tm_isdst; /* Daylight saving time */ int tm_isdst; /* Daylight saving time */
}; };
.fi .EE
.in .in
.PP .PP
The members of the \fItm\fP structure are: The members of the \fItm\fP structure are:
@ -152,11 +152,14 @@ is equivalent to
.BI asctime(localtime( t )) \fR. .BI asctime(localtime( t )) \fR.
It converts the calendar time \fIt\fP into a It converts the calendar time \fIt\fP into a
null-terminated string of the form null-terminated string of the form
.sp .PP
.in +4n
.EX
.RS .RS
"Wed Jun 30 21:49:08 1993\\n" "Wed Jun 30 21:49:08 1993\\n"
.RE .EE
.sp ,in
.PP
The abbreviations for the days of the week are "Sun", "Mon", "Tue", "Wed", The abbreviations for the days of the week are "Sun", "Mon", "Tue", "Wed",
"Thu", "Fri", and "Sat". "Thu", "Fri", and "Sat".
The abbreviations for the months are "Jan", The abbreviations for the months are "Jan",
@ -408,14 +411,14 @@ In many implementations, including glibc, a 0 in
is interpreted as meaning the last day of the preceding month. is interpreted as meaning the last day of the preceding month.
.LP .LP
The glibc version of \fIstruct tm\fP has additional fields The glibc version of \fIstruct tm\fP has additional fields
.PP
.in +4n
.EX
.sp .sp
.RS
.nf
long tm_gmtoff; /* Seconds east of UTC */
const char *tm_zone; /* Timezone abbreviation */ const char *tm_zone; /* Timezone abbreviation */
.fi .EE
.RE .in
.sp .PP
defined when defined when
.B _BSD_SOURCE .B _BSD_SOURCE
was set before including was set before including

View File

@ -122,13 +122,13 @@ an initialization function to be called first.
All the functions work by generating a sequence of 48-bit integers, All the functions work by generating a sequence of 48-bit integers,
.IR Xi , .IR Xi ,
according to the linear congruential formula: according to the linear congruential formula:
.sp .PP
.nf .in +4n
.RS .EX
.B Xn+1 = (aXn + c) mod m, where n >= 0 .B Xn+1 = (aXn + c) mod m, where n >= 0
.RE .EE
.fi .in
.sp .PP
The parameter The parameter
.I m .I m
= 2^48, hence 48-bit integer arithmetic is performed. = 2^48, hence 48-bit integer arithmetic is performed.
@ -139,14 +139,14 @@ is called,
and and
.I c .I c
are given by: are given by:
.sp .PP
.nf .in +4n
.RS .EX
.B a = 0x5DEECE66D .B a = 0x5DEECE66D
.B c = 0xB .B c = 0xB
.RE .EE
.fi .in
.sp .PP
The value returned by any of the functions The value returned by any of the functions
.BR drand48 (), .BR drand48 (),
.BR erand48 (), .BR erand48 (),

View File

@ -405,7 +405,7 @@ No such device or address (POSIX.1).
.TP .TP
.B EOPNOTSUPP .B EOPNOTSUPP
Operation not supported on socket (POSIX.1). Operation not supported on socket (POSIX.1).
.sp .IP
.RB ( ENOTSUP .RB ( ENOTSUP
and and
.B EOPNOTSUPP .B EOPNOTSUPP
@ -466,7 +466,7 @@ No such process (POSIX.1).
.TP .TP
.B ESTALE .B ESTALE
Stale file handle (POSIX.1). Stale file handle (POSIX.1).
.sp .IP
This error can occur for NFS and for other filesystems. This error can occur for NFS and for other filesystems.
.TP .TP
.B ESTRPIPE .B ESTRPIPE
@ -475,7 +475,7 @@ Streams pipe error.
.B ETIME .B ETIME
Timer expired. Timer expired.
(POSIX.1 (XSI STREAMS option)) (POSIX.1 (XSI STREAMS option))
.sp .IP
(POSIX.1 says "STREAM (POSIX.1 says "STREAM
.BR ioctl (2) .BR ioctl (2)
timeout") timeout")