summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/alarm.310
-rw-r--r--lib/libc/gen/arc4random.314
-rw-r--r--lib/libc/gen/clock.32
-rw-r--r--lib/libc/gen/confstr.32
-rw-r--r--lib/libc/gen/ctermid.34
-rw-r--r--lib/libc/gen/daemon.32
-rw-r--r--lib/libc/gen/dllockinit.32
-rw-r--r--lib/libc/gen/dlopen.326
-rw-r--r--lib/libc/gen/fnmatch.310
-rw-r--r--lib/libc/gen/frexp.36
-rw-r--r--lib/libc/gen/fts.36
-rw-r--r--lib/libc/gen/getcap.3116
-rw-r--r--lib/libc/gen/getcwd.38
-rw-r--r--lib/libc/gen/getdiskbyname.34
-rw-r--r--lib/libc/gen/getdomainname.32
-rw-r--r--lib/libc/gen/getfsent.34
-rw-r--r--lib/libc/gen/getgrouplist.32
-rw-r--r--lib/libc/gen/gethostname.32
-rw-r--r--lib/libc/gen/getmntinfo.38
-rw-r--r--lib/libc/gen/getobjformat.32
-rw-r--r--lib/libc/gen/getpwent.32
-rw-r--r--lib/libc/gen/getvfsent.32
-rw-r--r--lib/libc/gen/glob.318
-rw-r--r--lib/libc/gen/initgroups.32
-rw-r--r--lib/libc/gen/isinf.34
-rw-r--r--lib/libc/gen/ldexp.32
-rw-r--r--lib/libc/gen/modf.34
-rw-r--r--lib/libc/gen/msgctl.314
-rw-r--r--lib/libc/gen/msgget.38
-rw-r--r--lib/libc/gen/msgrcv.34
-rw-r--r--lib/libc/gen/msgsnd.36
-rw-r--r--lib/libc/gen/nice.32
-rw-r--r--lib/libc/gen/pause.32
-rw-r--r--lib/libc/gen/pwcache.32
-rw-r--r--lib/libc/gen/raise.32
-rw-r--r--lib/libc/gen/rand48.32
-rw-r--r--lib/libc/gen/scandir.32
-rw-r--r--lib/libc/gen/setjmp.32
-rw-r--r--lib/libc/gen/setmode.316
-rw-r--r--lib/libc/gen/shm_open.34
-rw-r--r--lib/libc/gen/stringlist.32
-rw-r--r--lib/libc/gen/strtofflags.310
-rw-r--r--lib/libc/gen/sysconf.312
-rw-r--r--lib/libc/gen/sysctl.338
-rw-r--r--lib/libc/gen/syslog.32
-rw-r--r--lib/libc/gen/tcsetattr.32
-rw-r--r--lib/libc/gen/times.32
-rw-r--r--lib/libc/gen/ttyname.34
-rw-r--r--lib/libc/gen/tzset.324
-rw-r--r--lib/libc/gen/ualarm.34
-rw-r--r--lib/libc/gen/uname.34
-rw-r--r--lib/libc/gen/usleep.32
-rw-r--r--lib/libc/gen/utime.32
-rw-r--r--lib/libc/gen/valloc.32
-rw-r--r--lib/libc/gen/vis.36
-rw-r--r--lib/libc/locale/ctype.32
-rw-r--r--lib/libc/locale/isalnum.32
-rw-r--r--lib/libc/locale/isalpha.32
-rw-r--r--lib/libc/locale/isascii.32
-rw-r--r--lib/libc/locale/iscntrl.32
-rw-r--r--lib/libc/locale/isdigit.32
-rw-r--r--lib/libc/locale/isgraph.32
-rw-r--r--lib/libc/locale/islower.32
-rw-r--r--lib/libc/locale/isprint.32
-rw-r--r--lib/libc/locale/ispunct.32
-rw-r--r--lib/libc/locale/isspace.32
-rw-r--r--lib/libc/locale/isupper.32
-rw-r--r--lib/libc/locale/isxdigit.32
-rw-r--r--lib/libc/locale/mbrune.32
-rw-r--r--lib/libc/locale/multibyte.34
-rw-r--r--lib/libc/locale/rune.34
-rw-r--r--lib/libc/locale/setlocale.32
-rw-r--r--lib/libc/locale/tolower.32
-rw-r--r--lib/libc/locale/toupper.32
-rw-r--r--lib/libc/locale/utf2.42
-rw-r--r--lib/libc/net/gethostbyname.332
-rw-r--r--lib/libc/net/getnameinfo.33
-rw-r--r--lib/libc/net/if_indextoname.318
-rw-r--r--lib/libc/net/inet6_option_space.339
-rw-r--r--lib/libc/net/inet6_rthdr_space.319
-rw-r--r--lib/libc/net/iso_addr.32
-rw-r--r--lib/libc/net/ns.32
-rw-r--r--lib/libc/net/resolver.33
-rw-r--r--lib/libc/regex/re_format.74
-rw-r--r--lib/libc/rpc/rpc.34
-rw-r--r--lib/libc/stdio/fclose.32
-rw-r--r--lib/libc/stdio/ferror.32
-rw-r--r--lib/libc/stdio/fflush.32
-rw-r--r--lib/libc/stdio/fgets.34
-rw-r--r--lib/libc/stdio/fopen.312
-rw-r--r--lib/libc/stdio/fputs.32
-rw-r--r--lib/libc/stdio/fread.32
-rw-r--r--lib/libc/stdio/fseek.32
-rw-r--r--lib/libc/stdio/getc.32
-rw-r--r--lib/libc/stdio/mktemp.32
-rw-r--r--lib/libc/stdio/printf.34
-rw-r--r--lib/libc/stdio/putc.32
-rw-r--r--lib/libc/stdio/remove.32
-rw-r--r--lib/libc/stdio/scanf.36
-rw-r--r--lib/libc/stdio/setbuf.32
-rw-r--r--lib/libc/stdio/stdio.312
-rw-r--r--lib/libc/stdio/tmpnam.32
-rw-r--r--lib/libc/stdio/ungetc.32
-rw-r--r--lib/libc/stdlib/abs.32
-rw-r--r--lib/libc/stdlib/atexit.32
-rw-r--r--lib/libc/stdlib/atof.32
-rw-r--r--lib/libc/stdlib/atoi.32
-rw-r--r--lib/libc/stdlib/atol.32
-rw-r--r--lib/libc/stdlib/bsearch.32
-rw-r--r--lib/libc/stdlib/div.32
-rw-r--r--lib/libc/stdlib/exit.32
-rw-r--r--lib/libc/stdlib/getenv.34
-rw-r--r--lib/libc/stdlib/labs.32
-rw-r--r--lib/libc/stdlib/ldiv.32
-rw-r--r--lib/libc/stdlib/malloc.36
-rw-r--r--lib/libc/stdlib/memory.32
-rw-r--r--lib/libc/stdlib/qsort.34
-rw-r--r--lib/libc/stdlib/rand.32
-rw-r--r--lib/libc/stdlib/strtod.32
-rw-r--r--lib/libc/stdlib/system.32
-rw-r--r--lib/libc/stdlib/tsearch.32
-rw-r--r--lib/libc/stdtime/ctime.34
-rw-r--r--lib/libc/stdtime/strftime.32
-rw-r--r--lib/libc/string/bstring.34
-rw-r--r--lib/libc/string/memchr.32
-rw-r--r--lib/libc/string/memcmp.32
-rw-r--r--lib/libc/string/memcpy.32
-rw-r--r--lib/libc/string/memmove.32
-rw-r--r--lib/libc/string/memset.32
-rw-r--r--lib/libc/string/strcat.34
-rw-r--r--lib/libc/string/strchr.32
-rw-r--r--lib/libc/string/strcmp.32
-rw-r--r--lib/libc/string/strcoll.32
-rw-r--r--lib/libc/string/strcpy.32
-rw-r--r--lib/libc/string/strcspn.32
-rw-r--r--lib/libc/string/strerror.32
-rw-r--r--lib/libc/string/string.36
-rw-r--r--lib/libc/string/strlen.32
-rw-r--r--lib/libc/string/strpbrk.32
-rw-r--r--lib/libc/string/strrchr.32
-rw-r--r--lib/libc/string/strsep.32
-rw-r--r--lib/libc/string/strspn.32
-rw-r--r--lib/libc/string/strstr.32
-rw-r--r--lib/libc/string/strtok.311
-rw-r--r--lib/libc/string/strxfrm.32
-rw-r--r--lib/libc/sys/aio_cancel.211
-rw-r--r--lib/libc/sys/aio_error.22
-rw-r--r--lib/libc/sys/aio_return.22
-rw-r--r--lib/libc/sys/aio_suspend.22
-rw-r--r--lib/libc/sys/aio_waitcomplete.225
-rw-r--r--lib/libc/sys/brk.24
-rw-r--r--lib/libc/sys/execve.28
-rw-r--r--lib/libc/sys/fcntl.220
-rw-r--r--lib/libc/sys/fhopen.22
-rw-r--r--lib/libc/sys/getdirentries.23
-rw-r--r--lib/libc/sys/getlogin.217
-rw-r--r--lib/libc/sys/getsockopt.23
-rw-r--r--lib/libc/sys/kill.22
-rw-r--r--lib/libc/sys/kldstat.26
-rw-r--r--lib/libc/sys/listen.210
-rw-r--r--lib/libc/sys/lseek.22
-rw-r--r--lib/libc/sys/madvise.22
-rw-r--r--lib/libc/sys/mmap.2139
-rw-r--r--lib/libc/sys/ptrace.244
-rw-r--r--lib/libc/sys/recv.22
-rw-r--r--lib/libc/sys/select.26
-rw-r--r--lib/libc/sys/semget.28
-rw-r--r--lib/libc/sys/sendfile.22
-rw-r--r--lib/libc/sys/setreuid.25
-rw-r--r--lib/libc/sys/shmget.28
-rw-r--r--lib/libc/sys/socket.22
-rw-r--r--lib/libc/xdr/xdr.36
172 files changed, 616 insertions, 520 deletions
diff --git a/lib/libc/gen/alarm.3 b/lib/libc/gen/alarm.3
index 572110b57c84..9f813771f21c 100644
--- a/lib/libc/gen/alarm.3
+++ b/lib/libc/gen/alarm.3
@@ -52,11 +52,11 @@ This interface is made obsolete by setitimer(2).
The
.Fn alarm
function sets a timer to deliver the signal
-.Dv SIGALRM
+.Dv SIGALRM
to the calling process after the specified number of
.Fa seconds .
If an alarm has already been set with
-.Fn alarm
+.Fn alarm
but has not been delivered, another call to
.Fn alarm
will supersede the prior call.
@@ -72,7 +72,7 @@ restriction the maximum number of
allowed is 100000000.
.Sh RETURN VALUES
.Pp
-The return value of
+The return value of
.Fn alarm
is the amount of time left on the timer from a previous call to
.Fn alarm .
@@ -89,10 +89,10 @@ If no alarm is currently set, the return value is 0.
.\" .Sh STANDARDS
.\" The
.\" .Fn alarm
-.\" function conforms to
+.\" function conforms to
.\" .St -p1003.1-90 .
.Sh HISTORY
An
.Fn alarm
-function appeared in
+function appeared in
.At v7 .
diff --git a/lib/libc/gen/arc4random.3 b/lib/libc/gen/arc4random.3
index a3c54b854588..5d3afdb40c27 100644
--- a/lib/libc/gen/arc4random.3
+++ b/lib/libc/gen/arc4random.3
@@ -50,23 +50,23 @@
.Fn arc4random_addrandom "unsigned char *dat" "int datlen"
.Sh DESCRIPTION
The
-.Fn arc4random
+.Fn arc4random
function uses the key stream generator employed by the
arc4 cipher, which uses 8*8 8 bit S-Boxes.
The S-Boxes
-can be in about
+can be in about
.if t 2\u\s71700\s10\d
.if n (2**1700)
states.
.Pp
The
.Fn arc4random_stir
-function reads data from
+function reads data from
.Pa /dev/urandom
and uses it to permute the S-Boxes via
.Fn arc4random_addrandom .
.Pp
-There is no need to call
+There is no need to call
.Fn arc4random_stir
before using
.Fn arc4random ,
@@ -78,12 +78,12 @@ automatically initializes itself.
.Xr random 3 ,
.Xr srandomdev 3
.Sh HISTORY
-.Pa RC4
+.Pa RC4
has been designed by RSA Data Security, Inc.
It was posted anonymously
to the USENET and was confirmed to be equivalent by several sources who
had access to the original cipher.
-Since
+Since
.Pa RC4
-used to be a trade secret, the cipher is now referred to as
+used to be a trade secret, the cipher is now referred to as
.Pa ARC4 .
diff --git a/lib/libc/gen/clock.3 b/lib/libc/gen/clock.3
index 72f2b045a8ff..a3b6c9201d86 100644
--- a/lib/libc/gen/clock.3
+++ b/lib/libc/gen/clock.3
@@ -68,4 +68,4 @@ case the return value is \-1.
The
.Fn clock
function conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/gen/confstr.3 b/lib/libc/gen/confstr.3
index e0cb90822372..8071f8e58aef 100644
--- a/lib/libc/gen/confstr.3
+++ b/lib/libc/gen/confstr.3
@@ -73,7 +73,7 @@ is a non-null pointer, and
.Fa name
has a value, up to
.Fa len
-\- 1 bytes of the value are copied into the buffer
+\- 1 bytes of the value are copied into the buffer
.Fa buf .
The copied value is always null terminated.
.Pp
diff --git a/lib/libc/gen/ctermid.3 b/lib/libc/gen/ctermid.3
index 69632e048489..84c69c03ecc1 100644
--- a/lib/libc/gen/ctermid.3
+++ b/lib/libc/gen/ctermid.3
@@ -73,9 +73,9 @@ provides the same functionality as
.Fn ctermid
except that if
.Ar buf
-is a
+is a
.Dv NULL
-pointer,
+pointer,
.Dv NULL
is returned.
.Pp
diff --git a/lib/libc/gen/daemon.3 b/lib/libc/gen/daemon.3
index c220f22e1ba8..0b90dab8b315 100644
--- a/lib/libc/gen/daemon.3
+++ b/lib/libc/gen/daemon.3
@@ -70,7 +70,7 @@ returns -1 and sets the global variable
.Va errno
to any of the errors specified for the library functions
.Xr fork 2
-and
+and
.Xr setsid 2 .
.Sh SEE ALSO
.Xr fork 2 ,
diff --git a/lib/libc/gen/dllockinit.3 b/lib/libc/gen/dllockinit.3
index 69ed9b71224a..0e97857dcff0 100644
--- a/lib/libc/gen/dllockinit.3
+++ b/lib/libc/gen/dllockinit.3
@@ -99,7 +99,7 @@ and
signals. This is sufficient for many application level threads
packages, which typically use one of these signals to implement
preemption. An application which has registered its own locking
-methods with
+methods with
.Nm
can restore the default locking by calling
.Nm
diff --git a/lib/libc/gen/dlopen.3 b/lib/libc/gen/dlopen.3
index e661252c0a46..f9c10849a522 100644
--- a/lib/libc/gen/dlopen.3
+++ b/lib/libc/gen/dlopen.3
@@ -14,9 +14,9 @@
.\" NO EVENT SHALL SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT,
.\" INCIDENTAL, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
.\" FROM USE OF SUCH SOURCE CODE, REGARDLESS OF THE THEORY OF LIABILITY.
-.\"
+.\"
.\" This source code is provided with no support and without any obligation on
-.\" the part of Sun Microsystems, Inc. to assist in its use, correction,
+.\" the part of Sun Microsystems, Inc. to assist in its use, correction,
.\" modification or enhancement.
.\"
.\" SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
@@ -36,7 +36,7 @@
.Os FreeBSD
.Dt DLOPEN 3
.Sh NAME
-.Nm dlopen, dlsym, dlerror, dlclose
+.Nm dlopen , dlsym , dlerror , dlclose
.Nd programmatic interface to the dynamic linker
.Sh LIBRARY
.Lb libc
@@ -59,10 +59,10 @@ defined by such
objects, and to remove such objects when their use is no longer required.
.Pp
.Fn dlopen
-provides access to the shared object in
+provides access to the shared object in
.Fa path ,
returning a descriptor that can be used for later
-references to the object in calls to
+references to the object in calls to
.Fn dlsym
and
.Fn dlclose .
@@ -78,13 +78,13 @@ if any, is called by the dynamic linker.
If
.Fa path
has already been placed in the address space in a previous call to
-.Fn dlopen ,
-it is not added a second time, although a reference count of
+.Fn dlopen ,
+it is not added a second time, although a reference count of
.Fn dlopen
operations on
.Fa path
is maintained.
-A null pointer supplied for
+A null pointer supplied for
.Fa path
is interpreted as a reference to the main
executable of the process.
@@ -125,7 +125,7 @@ in the same DAG. This is the default, but it may be specified
explicitly with this flag.
.El
.Pp
-If
+If
.Fn dlopen
fails, it returns a null pointer, and sets an error condition which may
be interrogated with
@@ -137,7 +137,7 @@ character string
.Fa symbol ,
as it occurs in the shared object identified by
.Fa handle .
-The symbols exported by objects added to the address space by
+The symbols exported by objects added to the address space by
.Fn dlopen
can be accessed only through calls to
.Fn dlsym .
@@ -242,14 +242,14 @@ Just before removing a shared object in this way, the dynamic linker
calls the object's
.Fn _fini
function, if such a function is defined by the object.
-If
+If
.Fn dlclose
is successful, it returns a value of 0.
Otherwise it returns -1, and sets an error condition that can be
interrogated with
.Fn dlerror .
.Pp
-The object-intrinsic functions
+The object-intrinsic functions
.Fn _init
and
.Fn _fini
@@ -260,7 +260,7 @@ using the
.Fl export-dynamic
option to
.Xr ld 1
-for symbols defined in the executable to become visible to
+for symbols defined in the executable to become visible to
.Fn dlsym .
.Pp
In previous implementations, it was necessary to prepend an underscore
diff --git a/lib/libc/gen/fnmatch.3 b/lib/libc/gen/fnmatch.3
index 0f49e137d2f9..f55e477ebb93 100644
--- a/lib/libc/gen/fnmatch.3
+++ b/lib/libc/gen/fnmatch.3
@@ -112,12 +112,12 @@ if it immediately follows a slash.
Ignore
.Nm /*
rest after successful
-.Fa pattern
+.Fa pattern
matching.
.It Dv FNM_CASEFOLD
-Ignore case distinctions in both the
-.Fa pattern
-and the
+Ignore case distinctions in both the
+.Fa pattern
+and the
.Fa string .
.El
.Sh RETURN VALUES
@@ -141,7 +141,7 @@ function conforms to
.Sh HISTORY
The
.Fn fnmatch
-function first appeared in
+function first appeared in
.Bx 4.4 .
.Sh BUGS
The pattern
diff --git a/lib/libc/gen/frexp.3 b/lib/libc/gen/frexp.3
index 3b71079aed7e..b903182d42e8 100644
--- a/lib/libc/gen/frexp.3
+++ b/lib/libc/gen/frexp.3
@@ -64,7 +64,7 @@ function returns the value
.Em x ,
such that
.Em x
-is a
+is a
.Em double
with magnitude in the interval
.Bq 1/2 , 1
@@ -76,7 +76,7 @@ times 2 raised to the power
.Fa *exp .
If
.Fa value
-is zero, both parts of the result are zero.
+is zero, both parts of the result are zero.
.Sh SEE ALSO
.Xr ldexp 3 ,
.Xr math 3 ,
@@ -85,4 +85,4 @@ is zero, both parts of the result are zero.
The
.Fn frexp
function conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/gen/fts.3 b/lib/libc/gen/fts.3
index 9b977f837f9b..b453ef09bd8e 100644
--- a/lib/libc/gen/fts.3
+++ b/lib/libc/gen/fts.3
@@ -246,7 +246,7 @@ or
.Fn fts_read
functions, with its
.Fa fts_info
-field set to
+field set to
.Dv FTS_DNR ,
.Dv FTS_ERR
or
@@ -341,7 +341,7 @@ are attempted.
The
.Fa fts_name
field is always
-.Dv NUL Ns -terminated.
+.Dv NUL Ns -terminated .
.Sh FTS_OPEN
The
.Fn fts_open
@@ -478,7 +478,7 @@ fields of the
structures may
.Em never
be used in this comparison.
-If the
+If the
.Fa fts_info
field is set to
.Dv FTS_NS
diff --git a/lib/libc/gen/getcap.3 b/lib/libc/gen/getcap.3
index 244d13bec498..2d86caf55079 100644
--- a/lib/libc/gen/getcap.3
+++ b/lib/libc/gen/getcap.3
@@ -36,7 +36,7 @@
.\" $FreeBSD$
.\"
.Dd May 13, 1994
-.Dt GETCAP 3
+.Dt GETCAP 3
.Os
.Sh NAME
.Nm cgetent ,
@@ -75,23 +75,24 @@
.Ft int
.Fn cgetclose "void"
.Sh DESCRIPTION
-.Fn Cgetent
-extracts the capability
+The
+.Fn cgetent
+function extracts the capability
.Fa name
from the database specified by the
.Dv NULL
terminated file array
.Fa db_array
and returns a pointer to a
-.Xr malloc Ns \&'d
+.Xr malloc 3 Ns \&'d
copy of it in
-.Fa buf .
+.Fa buf .
The
.Fn cgetent
-function will first look for files ending in
-.Nm .db
+function will first look for files ending in
+.Pa .db
(see
-.Xr cap_mkdb 1 )
+.Xr cap_mkdb 1 )
before accessing the ASCII file.
.Fa Buf
must be retained through all subsequent calls to
@@ -102,44 +103,44 @@ must be retained through all subsequent calls to
and
.Fn cgetustr ,
but may then be
-.Xr free 3 Ns \&'d.
+.Xr free 3 Ns \&'d .
On success 0 is returned, 1 if the returned
-record contains an unresolved
-.Nm tc
+record contains an unresolved
+.Nm tc
expansion,
\-1 if the requested record couldn't be found,
\-2 if a system error was encountered (couldn't open/read a file, etc.) also
setting
-.Va errno ,
+.Va errno ,
and \-3 if a potential reference loop is detected (see
.Ic tc=
comments below).
.Pp
The
-.Fn cgetset
+.Fn cgetset
function enables the addition of a character buffer containing a single capability
record entry
-to the capability database.
+to the capability database.
Conceptually, the entry is added as the first ``file'' in the database, and
-is therefore searched first on the call to
+is therefore searched first on the call to
.Fn cgetent .
-The entry is passed in
+The entry is passed in
.Fa ent .
-If
-.Fa ent
+If
+.Fa ent
is
.Dv NULL ,
-the current entry is removed from the database.
+the current entry is removed from the database.
A call to
-.Fn cgetset
-must precede the database traversal. It must be called before the
-.Fn cgetent
+.Fn cgetset
+must precede the database traversal. It must be called before the
+.Fn cgetent
call. If a sequential access is being performed (see below), it must be called
before the first sequential access call (
.Fn cgetfirst
or
.Fn cgetnext
-), or be directly preceded by a
+), or be directly preceded by a
.Fn cgetclose
call.
On success 0 is returned and \-1 on failure.
@@ -199,7 +200,7 @@ from the capability record pointed to by
A pointer to a decoded,
.Dv NUL
terminated,
-.Xr malloc Ns \&'d
+.Xr malloc 3 Ns \&'d
copy of the string is returned in the
.Ft char *
pointed to by
@@ -212,55 +213,55 @@ failure).
.Pp
The
.Fn cgetustr
-function is identical to
-.Fn cgetstr
+function is identical to
+.Fn cgetstr
except that it does not expand special characters, but rather returns each
character of the capability string literally.
.Pp
The
.Fn cgetfirst
and
-.Fn cgetnext
+.Fn cgetnext
functions comprise a function group that provides for sequential
access of the
.Dv NULL
pointer terminated array of file names,
.Fa db_array .
The
-.Fn cgetfirst
+.Fn cgetfirst
function returns the first record in the database and resets the access
to the first record.
The
-.Fn cgetnext
+.Fn cgetnext
function returns the next record in the database with respect to the
record returned by the previous
.Fn cgetfirst
or
-.Fn cgetnext
+.Fn cgetnext
call. If there is no such previous call, the first record in the database is
returned.
Each record is returned in a
-.Xr malloc Ns \&'d
-copy pointed to by
-.Fa buf .
+.Xr malloc 3 Ns \&'d
+copy pointed to by
+.Fa buf .
.Ic Tc
expansion is done (see
-.Ic tc=
+.Ic tc=
comments below).
Upon completion of the database 0 is returned, 1 is returned upon successful
-return of record with possibly more remaining (we haven't reached the end of
+return of record with possibly more remaining (we haven't reached the end of
the database yet), 2 is returned if the record contains an unresolved
-.Nm tc
+.Nm tc
expansion, \-1 is returned if an system error occurred, and \-2
-is returned if a potential reference loop is detected (see
+is returned if a potential reference loop is detected (see
.Ic tc=
comments below).
Upon completion of database (0 return) the database is closed.
.Pp
The
-.Fn cgetclose
-function closes the sequential access and frees any memory and file descriptors
-being used. Note that it does not erase the buffer pushed by a call to
+.Fn cgetclose
+function closes the sequential access and frees any memory and file descriptors
+being used. Note that it does not erase the buffer pushed by a call to
.Fn cgetset .
.Sh CAPABILITY DATABASE SYNTAX
Capability databases are normally
@@ -319,7 +320,7 @@ distinguished by their
.Fa types .
The
.Fn cgetcap
-function will return a pointer to a value of a name given the capability
+function will return a pointer to a value of a name given the capability
name and the type of the value.
.Pp
The types `#' and `=' are conventionally used to denote numeric and
@@ -415,21 +416,27 @@ and
.Bl -column "nameXnumber"
.Sm off
.It Em name No \&# Em number Ta numeric
+.Sm on
capability
.Em name
has value
.Em number
+.Sm off
.It Em name No = Em string Ta "string capability"
+.Sm on
.Em name
-has value
+has value
.Em string
+.Sm off
.It Em name No \&#@ Ta "the numeric capability"
+.Sm on
.Em name
does not exist
+.Sm off
.It Em name No \&=@ Ta "the string capability"
+.Sm on
.Em name
does not exist
-.Sm on
.El
.Pp
Numeric capability values may be given in one of three numeric bases.
@@ -473,7 +480,8 @@ are typically used to denote the end of strings; many applications
use `\e\|200' to represent a
.Dv NUL .
.Sh DIAGNOSTICS
-.Fn Cgetent ,
+The
+.Fn cgetent ,
.Fn cgetset ,
.Fn cgetmatch ,
.Fn cgetnum ,
@@ -482,6 +490,7 @@ use `\e\|200' to represent a
.Fn cgetfirst ,
and
.Fn cgetnext
+functions
return a value greater than or equal to 0 on success and a value less
than 0 on failure.
The
@@ -492,15 +501,15 @@ on failure.
.Pp
The
.Fn cgetent ,
-and
+and
.Fn cgetseq
-functions may fail and set
+functions may fail and set
.Va errno
for any of the errors specified for the library functions:
-.Xr fopen 3 ,
+.Xr fopen 3 ,
.Xr fclose 3 ,
.Xr open 2 ,
-and
+and
.Xr close 2 .
.Pp
The
@@ -508,9 +517,10 @@ The
.Fn cgetset ,
.Fn cgetstr ,
and
-.Fn cgetustr
-may fail and set
-.Va errno
+.Fn cgetustr
+functions
+may fail and set
+.Va errno
as follows:
.Bl -tag -width Er
.It Bq Er ENOMEM
@@ -527,6 +537,6 @@ There are no checks for
loops in
.Fn cgetent .
.Pp
-The buffer added to the database by a call to
-.Fn cgetset
+The buffer added to the database by a call to
+.Fn cgetset
is not unique to the database but is rather prepended to any database used.
diff --git a/lib/libc/gen/getcwd.3 b/lib/libc/gen/getcwd.3
index 5f401933a4c5..b81740e419e5 100644
--- a/lib/libc/gen/getcwd.3
+++ b/lib/libc/gen/getcwd.3
@@ -66,7 +66,7 @@ is
.Dv NULL ,
space is allocated as necessary to store the pathname.
This space may later be
-.Xr free 3 Ns 'd.
+.Xr free 3 Ns 'd .
.Pp
The function
.Fn getwd
@@ -89,7 +89,7 @@ These routines have traditionally been used by programs to save the
name of a working directory for the purpose of returning to it.
A much faster and less error-prone method of accomplishing this is to
open the current directory
-.Pq Ql \&.
+.Pq Ql .\&
and use the
.Xr fchdir 2
function to return.
@@ -138,7 +138,7 @@ The
.Fn getcwd
function
conforms to
-.St -ansiC .
+.St -isoC .
The ability to specify a
.Dv NULL
pointer and have
@@ -147,7 +147,7 @@ allocate memory as necessary is an extension.
.Sh HISTORY
The
.Fn getwd
-function appeared in
+function appeared in
.Bx 4.0 .
.Sh BUGS
The
diff --git a/lib/libc/gen/getdiskbyname.3 b/lib/libc/gen/getdiskbyname.3
index 62036f3c2906..b6b86664bf53 100644
--- a/lib/libc/gen/getdiskbyname.3
+++ b/lib/libc/gen/getdiskbyname.3
@@ -53,7 +53,7 @@ takes a disk name (e.g.
and returns a prototype disk label
describing its geometry information and the standard
disk partition tables. All information is obtained from
-the
+the
.Xr disktab 5
file.
.Sh SEE ALSO
@@ -63,5 +63,5 @@ file.
.Sh HISTORY
The
.Fn getdiskbyname
-function appeared in
+function appeared in
.Bx 4.3 .
diff --git a/lib/libc/gen/getdomainname.3 b/lib/libc/gen/getdomainname.3
index a58dc2e9018a..60f1f26edde1 100644
--- a/lib/libc/gen/getdomainname.3
+++ b/lib/libc/gen/getdomainname.3
@@ -54,7 +54,7 @@ previously set by
.Fn setdomainname .
The parameter
.Fa namelen
-specifies the size of the
+specifies the size of the
.Fa name
array. The returned name is null-terminated unless insufficient
space is provided.
diff --git a/lib/libc/gen/getfsent.3 b/lib/libc/gen/getfsent.3
index 75e3596e8629..82d1ef66cf34 100644
--- a/lib/libc/gen/getfsent.3
+++ b/lib/libc/gen/getfsent.3
@@ -137,13 +137,13 @@ returns nothing.
.Sh HISTORY
The
.Fn getfsent
-function appeared in
+function appeared in
.Bx 4.0 ;
the
.Fn endfsent ,
.Fn getfsfile ,
.Fn getfsspec ,
-and
+and
.Fn setfsent
functions appeared in
.Bx 4.3 .
diff --git a/lib/libc/gen/getgrouplist.3 b/lib/libc/gen/getgrouplist.3
index ae5b28a604ef..e9eadde263e2 100644
--- a/lib/libc/gen/getgrouplist.3
+++ b/lib/libc/gen/getgrouplist.3
@@ -58,7 +58,7 @@ the group number from the password file.
.Pp
The resulting group list is returned in the integer array pointed to by
.Fa groups .
-The caller specifies the size of the
+The caller specifies the size of the
.Fa groups
array in the integer pointed to by
.Fa ngroups ;
diff --git a/lib/libc/gen/gethostname.3 b/lib/libc/gen/gethostname.3
index f8ff9747c6ba..8596a2d1c05c 100644
--- a/lib/libc/gen/gethostname.3
+++ b/lib/libc/gen/gethostname.3
@@ -54,7 +54,7 @@ previously set by
.Fn sethostname .
The parameter
.Fa namelen
-specifies the size of the
+specifies the size of the
.Fa name
array. The returned name is null-terminated unless insufficient
space is provided.
diff --git a/lib/libc/gen/getmntinfo.3 b/lib/libc/gen/getmntinfo.3
index 16abf6299d98..01cd55d583d2 100644
--- a/lib/libc/gen/getmntinfo.3
+++ b/lib/libc/gen/getmntinfo.3
@@ -72,19 +72,19 @@ The pointer to the array is stored into
If an error occurs, zero is returned and the external variable
.Va errno
is set to indicate the error.
-Although the pointer
+Although the pointer
.Fa mntbufp
-will be unmodified, any information previously returned by
+will be unmodified, any information previously returned by
.Fn getmntinfo
will be lost.
.Sh ERRORS
The
.Fn getmntinfo
function
-may fail and set errno for any of the errors specified for the library
+may fail and set errno for any of the errors specified for the library
routines
.Xr getfsstat 2
-or
+or
.Xr malloc 3 .
.Sh SEE ALSO
.Xr getfsstat 2 ,
diff --git a/lib/libc/gen/getobjformat.3 b/lib/libc/gen/getobjformat.3
index 7f312fda7aa5..33240c8d4d08 100644
--- a/lib/libc/gen/getobjformat.3
+++ b/lib/libc/gen/getobjformat.3
@@ -124,5 +124,5 @@ If present, specifies the object file format to use. Syntax is
.Sh HISTORY
The
.Fn getobjformat
-function first appeared in
+function first appeared in
.Fx 3.0 .
diff --git a/lib/libc/gen/getpwent.3 b/lib/libc/gen/getpwent.3
index 40842897e0ab..5442555a834d 100644
--- a/lib/libc/gen/getpwent.3
+++ b/lib/libc/gen/getpwent.3
@@ -195,7 +195,7 @@ The
.Fn getpwent ,
.Fn getpwnam ,
.Fn getpwuid ,
-.Fn setpwent,
+.Fn setpwent ,
and
.Fn endpwent
functions appeared in
diff --git a/lib/libc/gen/getvfsent.3 b/lib/libc/gen/getvfsent.3
index 8555ca234403..f70f32fb9c87 100644
--- a/lib/libc/gen/getvfsent.3
+++ b/lib/libc/gen/getvfsent.3
@@ -80,7 +80,7 @@ The
.Fn vfsisloadable
function returns a non-zero value if a later call to
.Fn vfsload name
-is likely to succeed. We say
+is likely to succeed. We say
.Dq likely
because
.Fn vfsisloadable
diff --git a/lib/libc/gen/glob.3 b/lib/libc/gen/glob.3
index 43839944b92f..c643aaad29e1 100644
--- a/lib/libc/gen/glob.3
+++ b/lib/libc/gen/glob.3
@@ -88,7 +88,7 @@ that contains any of the special characters
.Ql * ,
.Ql ?\&
or
-.Ql [ .
+.Ql \&[ .
.Pp
The
.Fn glob
@@ -269,7 +269,7 @@ is
.Pf non- Dv NULL ,
.Fn glob
calls
-.Fa (*errfunc)(path, errno) .
+.Fa \*(lp*errfunc\*(rp Ns ( Fa path , errno ) .
This may be unintuitive: a pattern like
.Ql */Makefile
will try to
@@ -374,7 +374,7 @@ An attempt to allocate memory failed.
The scan was stopped because an error was encountered and either
.Dv GLOB_ERR
was set or
-.Fa (*errfunc)()
+.Fa \*(lp*errfunc\*(rp\*(lp\*(rp
returned non-zero.
.El
.Pp
@@ -409,13 +409,13 @@ function is expected to be
.St -p1003.2
compatible with the exception
that the flags
-.Dv GLOB_ALTDIRFUNC,
-.Dv GLOB_BRACE
-.Dv GLOB_MAGCHAR,
-.Dv GLOB_NOMAGIC,
-.Dv GLOB_QUOTE,
+.Dv GLOB_ALTDIRFUNC ,
+.Dv GLOB_BRACE ,
+.Dv GLOB_MAGCHAR ,
+.Dv GLOB_NOMAGIC ,
+.Dv GLOB_QUOTE ,
and
-.Dv GLOB_TILDE,
+.Dv GLOB_TILDE ,
and the fields
.Fa gl_matchc
and
diff --git a/lib/libc/gen/initgroups.3 b/lib/libc/gen/initgroups.3
index f48548e04fe4..27155fa29a4b 100644
--- a/lib/libc/gen/initgroups.3
+++ b/lib/libc/gen/initgroups.3
@@ -71,7 +71,7 @@ returns \-1 if it was not invoked by the super-user.
.Sh HISTORY
The
.Fn initgroups
-function appeared in
+function appeared in
.Bx 4.2 .
.Sh BUGS
The
diff --git a/lib/libc/gen/isinf.3 b/lib/libc/gen/isinf.3
index ee7558a1a804..3fdc582c0717 100644
--- a/lib/libc/gen/isinf.3
+++ b/lib/libc/gen/isinf.3
@@ -43,9 +43,9 @@
.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
-.Ft int
+.Ft int
.Fn isinf double
-.Ft int
+.Ft int
.Fn isnan double
.Ft int
.Fn isnanf float
diff --git a/lib/libc/gen/ldexp.3 b/lib/libc/gen/ldexp.3
index e340d0fd31fb..e8fe770abc6a 100644
--- a/lib/libc/gen/ldexp.3
+++ b/lib/libc/gen/ldexp.3
@@ -77,4 +77,4 @@ is returned.
The
.Fn ldexp
function conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/gen/modf.3 b/lib/libc/gen/modf.3
index e1a811773709..b60d060fc2ff 100644
--- a/lib/libc/gen/modf.3
+++ b/lib/libc/gen/modf.3
@@ -55,7 +55,7 @@ function breaks the argument
.Fa value
into integral and fractional parts, each of which has the
same sign as the argument.
-It stores the integral part as a
+It stores the integral part as a
.Em double
in the object pointed to by
.Fa iptr .
@@ -72,4 +72,4 @@ function returns the signed fractional part of
The
.Fn modf
function conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/gen/msgctl.3 b/lib/libc/gen/msgctl.3
index eb2e463279ab..56b4f8697415 100644
--- a/lib/libc/gen/msgctl.3
+++ b/lib/libc/gen/msgctl.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: msgctl.2,v 1.1 1995/10/16 23:49:15 jtc Exp $
+.\" $NetBSD: msgctl.2,v 1.1 1995/10/16 23:49:15 jtc Exp $
.\"
.\" Copyright (c) 1995 Frank van der Linden
.\" All rights reserved.
@@ -81,13 +81,9 @@ struct msqid_ds {
.Ed
.Pp
The
-.Bf -literal
-ipc_perm
-.Ef
+.Vt ipc_perm
structure used inside the
-.Bf -literal
-shmid_ds
-.Ef
+.Vt shmid_ds
structure is defined in
.Aq Pa sys/ipc.h
and looks like this:
@@ -126,7 +122,7 @@ The values are taken from the corresponding fields in the structure
pointed to by
.Fa buf .
This operation can only be executed by the super-user, or a process that
-has an effective user id equal to either
+has an effective user id equal to either
.Va msg_perm.cuid
or
.Va msg_perm.uid
@@ -144,7 +140,7 @@ Remove the message queue specified by
.Fa msqid
and destroy the data associated with it.
Only the super-user or a process
-with an effective uid equal to the
+with an effective uid equal to the
.Va msg_perm.cuid
or
.Va msg_perm.uid
diff --git a/lib/libc/gen/msgget.3 b/lib/libc/gen/msgget.3
index 20e740127012..6d221415415e 100644
--- a/lib/libc/gen/msgget.3
+++ b/lib/libc/gen/msgget.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: msgget.2,v 1.1 1995/10/16 23:49:19 jtc Exp $
+.\" $NetBSD: msgget.2,v 1.1 1995/10/16 23:49:19 jtc Exp $
.\"
.\" Copyright (c) 1995 Frank van der Linden
.\" All rights reserved.
@@ -60,7 +60,7 @@ or
does not have a message queue identifier associated with it, and the
.Dv IPC_CREAT
bit is set in
-.Fa msgflg.
+.Fa msgflg .
.Pp
If a new message queue is created, the data structure associated with it (the
.Va msqid_ds
@@ -68,7 +68,7 @@ structure, see
.Xr msgctl 3 )
is initialized as follows:
.Bl -bullet
-.It
+.It
.Va msg_perm.cuid
and
.Va msg_perm.uid
@@ -88,7 +88,7 @@ is set to the lower 9 bits of
.Va msg_lspid ,
.Va msg_lrpid ,
.Va msg_rtime ,
-and
+and
.Va msg_stime
are set to 0.
.It
diff --git a/lib/libc/gen/msgrcv.3 b/lib/libc/gen/msgrcv.3
index 7d00311fdeb5..bf8ccf8c586e 100644
--- a/lib/libc/gen/msgrcv.3
+++ b/lib/libc/gen/msgrcv.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: msgrcv.2,v 1.1 1995/10/16 23:49:20 jtc Exp $
+.\" $NetBSD: msgrcv.2,v 1.1 1995/10/16 23:49:20 jtc Exp $
.\"
.\" Copyright (c) 1995 Frank van der Linden
.\" All rights reserved.
@@ -46,7 +46,7 @@
.Ft int
.Fn msgrcv "int msqid" "void *msgp" "size_t msgsz" "long msgtyp" "int msgflg"
.Sh DESCRIPTION
-The
+The
.Fn msgrcv
function receives a message from the message queue specified in
.Fa msqid ,
diff --git a/lib/libc/gen/msgsnd.3 b/lib/libc/gen/msgsnd.3
index 28c3a425b4ff..1feb94bad9b0 100644
--- a/lib/libc/gen/msgsnd.3
+++ b/lib/libc/gen/msgsnd.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: msgsnd.2,v 1.1 1995/10/16 23:49:24 jtc Exp $
+.\" $NetBSD: msgsnd.2,v 1.1 1995/10/16 23:49:24 jtc Exp $
.\"
.\" Copyright (c) 1995 Frank van der Linden
.\" All rights reserved.
@@ -46,7 +46,7 @@
.Ft int
.Fn msgsnd "int msqid" "void *msgp" "size_t msgsz" "int msgflg"
.Sh DESCRIPTION
-The
+The
.Fn msgsnd
function sends a message to the message queue specified in
.Fa msqid .
@@ -62,7 +62,7 @@ consist of the following members:
.Va mtype
is an integer greater than 0 that can be used for selecting messages (see
.Xr msgrcv 3 ) ,
-.Va mtext
+.Va mtext
is an array of bytes, with a size up to that of the system limit
.Pf ( Dv MSGMAX ) .
.Pp
diff --git a/lib/libc/gen/nice.3 b/lib/libc/gen/nice.3
index d464a4d69633..df1291f78afc 100644
--- a/lib/libc/gen/nice.3
+++ b/lib/libc/gen/nice.3
@@ -68,5 +68,5 @@ Children inherit the priority of their parent processes via
.Sh HISTORY
A
.Fn nice
-syscall appeared in
+syscall appeared in
.At v6 .
diff --git a/lib/libc/gen/pause.3 b/lib/libc/gen/pause.3
index b9d20319f4ef..80d1f9f83e88 100644
--- a/lib/libc/gen/pause.3
+++ b/lib/libc/gen/pause.3
@@ -82,5 +82,5 @@ The call was interrupted.
A
.Fn pause
syscall
-appeared in
+appeared in
.At v6 .
diff --git a/lib/libc/gen/pwcache.3 b/lib/libc/gen/pwcache.3
index 7c20d94fa9ba..00e0295b2bfe 100644
--- a/lib/libc/gen/pwcache.3
+++ b/lib/libc/gen/pwcache.3
@@ -53,7 +53,7 @@ The
function returns the user name associated with the argument
.Fa uid .
The user name is cached so that multiple calls with the same
-.Fa uid
+.Fa uid
do not require additional calls to
.Xr getpwuid 3 .
If there is no user associated with the
diff --git a/lib/libc/gen/raise.3 b/lib/libc/gen/raise.3
index 793759e117e8..2177fa4a0c2e 100644
--- a/lib/libc/gen/raise.3
+++ b/lib/libc/gen/raise.3
@@ -77,4 +77,4 @@ The
.Fn raise
function
conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/gen/rand48.3 b/lib/libc/gen/rand48.3
index d553b1e93220..d42461b87ddc 100644
--- a/lib/libc/gen/rand48.3
+++ b/lib/libc/gen/rand48.3
@@ -30,7 +30,7 @@
.Lb libc
.Sh SYNOPSIS
.Fd #include <stdlib.h>
-.Ft double
+.Ft double
.Fn drand48 void
.Ft double
.Fn erand48 "unsigned short xseed[3]"
diff --git a/lib/libc/gen/scandir.3 b/lib/libc/gen/scandir.3
index db74d3bd8be3..3f6907889874 100644
--- a/lib/libc/gen/scandir.3
+++ b/lib/libc/gen/scandir.3
@@ -105,5 +105,5 @@ The
.Fn scandir
and
.Fn alphasort
-functions appeared in
+functions appeared in
.Bx 4.2 .
diff --git a/lib/libc/gen/setjmp.3 b/lib/libc/gen/setjmp.3
index 54b6c598ece7..1c4800c2d3bb 100644
--- a/lib/libc/gen/setjmp.3
+++ b/lib/libc/gen/setjmp.3
@@ -167,7 +167,7 @@ The
and
.Fn longjmp
functions conform to
-.St -ansiC .
+.St -isoC .
The
.Fn sigsetjmp
and
diff --git a/lib/libc/gen/setmode.3 b/lib/libc/gen/setmode.3
index 2ea5d80a4a09..548f02e95635 100644
--- a/lib/libc/gen/setmode.3
+++ b/lib/libc/gen/setmode.3
@@ -87,16 +87,16 @@ If the mode passed to
is invalid or if memory cannot be allocated for the return value,
.Fn setmode
returns
-.Dv NULL .
+.Dv NULL .
.Pp
-The value returned from
-.Fn setmode
-is obtained from
-.Fn malloc
+The value returned from
+.Fn setmode
+is obtained from
+.Fn malloc
and should be returned to the system with
-.Fn free
-when the program is done with it, generally after a call to
-.Fn getmode .
+.Fn free
+when the program is done with it, generally after a call to
+.Fn getmode .
.Sh ERRORS
The
.Fn setmode
diff --git a/lib/libc/gen/shm_open.3 b/lib/libc/gen/shm_open.3
index 81e85e848d1e..3caec068c6c4 100644
--- a/lib/libc/gen/shm_open.3
+++ b/lib/libc/gen/shm_open.3
@@ -130,7 +130,7 @@ or
on a shared memory object, or on the descriptor returned by
.Fn shm_open ,
is undefined.
-It is also undefined whether the shared memory object itself, or its
+It is also undefined whether the shared memory object itself, or its
contents, persist across reboots.
.Sh RETURN VALUES
If successful,
@@ -177,7 +177,7 @@ The
and
.Fn shm_unlink
functions are believed to conform to
-.St -p1003.1b .
+.St -p1003.1b-93 .
.Sh HISTORY
The
.Fn shm_open
diff --git a/lib/libc/gen/stringlist.3 b/lib/libc/gen/stringlist.3
index e42706b18add..bd5e0705ae92 100644
--- a/lib/libc/gen/stringlist.3
+++ b/lib/libc/gen/stringlist.3
@@ -95,7 +95,7 @@ Returns a pointer to a
.It Fn sl_free
Releases memory occupied by
.Ar sl
-and the
+and the
.Ar sl->sl_str
array.
If
diff --git a/lib/libc/gen/strtofflags.3 b/lib/libc/gen/strtofflags.3
index 10f86c935917..529bd801c5cc 100644
--- a/lib/libc/gen/strtofflags.3
+++ b/lib/libc/gen/strtofflags.3
@@ -57,14 +57,14 @@ If no flags are set a zero length string is returned.
If memory cannot be allocated for the return value,
.Fn fflagstostr
returns
-.Dv NULL .
+.Dv NULL .
.Pp
-The value returned from
+The value returned from
.Fn fflagstostr
-is obtained from
-.Fn malloc
+is obtained from
+.Fn malloc
and should be returned to the system with
-.Fn free
+.Fn free
when the program is done with it.
.Pp
The
diff --git a/lib/libc/gen/sysconf.3 b/lib/libc/gen/sysconf.3
index 4bc1fd970331..559a77192583 100644
--- a/lib/libc/gen/sysconf.3
+++ b/lib/libc/gen/sysconf.3
@@ -88,7 +88,9 @@ Return 1 if job control is available on this system, otherwise \-1.
Returns 1 if saved set-group and saved set-user ID is available,
otherwise \-1.
.It Li _SC_VERSION
-The version of ISO/IEC 9945 (POSIX 1003.1) with which the system
+The version of
+.St -p1003.1
+with which the system
attempts to comply.
.It Li _SC_BC_BASE_MAX
The maximum ibase/obase values in the
@@ -121,7 +123,9 @@ line.
The maximum number of repeated occurrences of a regular expression
permitted when using interval notation.
.It Li _SC_2_VERSION
-The version of POSIX 1003.2 with which the system attempts to comply.
+The version of
+.St -p1003.2
+with which the system attempts to comply.
.It Li _SC_2_C_BIND
Return 1 if the system's C-language development facilities support the
C-Language Bindings Option, otherwise \-1.
@@ -130,7 +134,9 @@ Return 1 if the system supports the C-Language Development Utilities Option,
otherwise \-1.
.It Li _SC_2_CHAR_TERM
Return 1 if the system supports at least one terminal type capable of
-all operations described in POSIX 1003.2, otherwise \-1.
+all operations described in
+.St -p1003.2 ,
+otherwise \-1.
.It Li _SC_2_FORT_DEV
Return 1 if the system supports the FORTRAN Development Utilities Option,
otherwise \-1.
diff --git a/lib/libc/gen/sysctl.3 b/lib/libc/gen/sysctl.3
index d719b06a88a0..01a10b8a124f 100644
--- a/lib/libc/gen/sysctl.3
+++ b/lib/libc/gen/sysctl.3
@@ -32,7 +32,7 @@
.\" @(#)sysctl.3 8.4 (Berkeley) 5/9/95
.\" $FreeBSD$
.\"
-.Dd May 9, 1995
+.Dd January 23, 2001
.Dt SYSCTL 3
.Os
.Sh NAME
@@ -158,7 +158,7 @@ function is also useful for fetching mib prefixes and then adding
a final component.
For example, to fetch process information
for processes with pid's less than 100:
-
+.Pp
.Bd -literal -offset indent -compact
int i, mib[4];
size_t len;
@@ -186,7 +186,7 @@ The next and subsequent levels down are found in the include files
listed here, and described in separate sections below.
.Pp
.Bl -column CTLXMACHDEPXXX "Next level namesXXXXXX" -offset indent
-.It Sy Pa "Name Next level names Description"
+.It Sy "Name Next level names Description"
.It "CTL\_DEBUG sys/sysctl.h Debugging"
.It "CTL\_VFS sys/mount.h Filesystem"
.It "CTL\_HW sys/sysctl.h Generic CPU, I/O"
@@ -272,7 +272,7 @@ is detailed below.
The changeable column shows whether a process with appropriate
privilege may change the value.
.Bl -column "Second level nameXXXXXX" integerXXX -offset indent
-.It Sy Pa "Second level name Type Changeable"
+.It Sy "Second level name Type Changeable"
.It "HW\_MACHINE string no"
.It "HW\_MODEL string no"
.It "HW\_NCPU integer no"
@@ -318,7 +318,7 @@ system vnodes, the open file entries, routing table entries,
virtual memory statistics, load average history, and clock rate
information.
.Bl -column "KERNXMAXFILESPERPROCXXX" "struct clockrateXXX" -offset indent
-.It Sy Pa "Second level name Type Changeable"
+.It Sy "Second level name Type Changeable"
.It "KERN\_ARGMAX integer no"
.It "KERN\_BOOTFILE string yes"
.It "KERN\_BOOTTIME struct timeval no"
@@ -412,7 +412,9 @@ The system revision string.
.It Li KERN_OSTYPE
The system type string.
.It Li KERN_POSIX1
-The version of ISO/IEC 9945 (POSIX 1003.1) with which the system
+The version of
+.St -p1003.1
+with which the system
attempts to comply.
.It Li KERN_PROC
Return the entire process table, or a subset of it.
@@ -422,7 +424,7 @@ structures is returned,
whose size depends on the current number of such objects in the system.
The third and fourth level names are as follows:
.Bl -column "Third level nameXXXXXX" "Fourth level is:XXXXXX" -offset indent
-.It Pa "Third level name Fourth level is:"
+.It "Third level name Fourth level is:"
.It "KERN\_PROC\_ALL None"
.It "KERN\_PROC\_PID A process ID"
.It "KERN\_PROC\_PGRP A process group"
@@ -441,7 +443,7 @@ is detailed below.
The changeable column shows whether a process with appropriate
privilege may change the value.
.Bl -column "GPROFXGMONPARAMXXX" "struct gmonparamXXX" -offset indent
-.It Sy Pa "Third level name Type Changeable"
+.It Sy "Third level name Type Changeable"
.It "GPROF\_STATE integer yes"
.It "GPROF\_COUNT u_short[\|] yes"
.It "GPROF\_FROMS u_short[\|] yes"
@@ -491,7 +493,7 @@ followed by the vnode itself
The set of variables defined is architecture dependent.
The following variables are defined for the i386 architecture.
.Bl -column "CONSOLE_DEVICEXXX" "struct bootinfoXXX" -offset indent
-.It Sy Pa "Second level name Type Changeable"
+.It Sy "Second level name Type Changeable"
.It Li "CPU_CONSDEV dev_t no"
.It Li "CPU_ADJKERNTZ int yes"
.It Li "CPU_DISRTCSET int yes"
@@ -504,7 +506,7 @@ is detailed below.
The changeable column shows whether a process with appropriate
privilege may change the value.
.Bl -column "Second level nameXXXXXX" "routing messagesXXX" -offset indent
-.It Sy Pa "Second level name Type Changeable"
+.It Sy "Second level name Type Changeable"
.It "PF\_ROUTE routing messages no"
.It "PF\_INET IPv4 values yes"
.It "PF\_INET6 IPv6 values yes"
@@ -523,7 +525,7 @@ The fourth level name is an address family, which may be set to 0 to
select all address families.
The fifth and sixth level names are as follows:
.Bl -column "Fifth level nameXXXXXX" "Sixth level is:XXX" -offset indent
-.It Pa "Fifth level name Sixth level is:"
+.It Sy "Fifth level name Sixth level is:"
.It "NET\_RT\_FLAGS rtflags"
.It "NET\_RT\_DUMP None"
.It "NET\_RT\_IFLIST None"
@@ -535,7 +537,7 @@ The third level name is the protocol.
The fourth level name is the variable name.
The currently defined protocols and names are:
.Bl -column ProtocolXX VariableXX TypeXX ChangeableXX
-.It Pa "Protocol Variable Type Changeable"
+.It Sy "Protocol Variable Type Changeable"
.It "icmp bmcastecho integer yes"
.It "icmp maskrepl integer yes"
.It "ip forwarding integer yes"
@@ -586,7 +588,7 @@ is detailed below.
The changeable column shows whether a process with appropriate
privilege may change the value.
.Bl -column "USER_COLL_WEIGHTS_MAXXXX" "integerXXX" -offset indent
-.It Sy Pa "Second level name Type Changeable"
+.It Sy "Second level name Type Changeable"
.It "USER\_BC\_BASE\_MAX integer no"
.It "USER\_BC\_DIM\_MAX integer no"
.It "USER\_BC\_SCALE\_MAX integer no"
@@ -643,7 +645,9 @@ The maximum length in bytes of a text-processing utility's input
line.
.It Li USER_POSIX2_CHAR_TERM
Return 1 if the system supports at least one terminal type capable of
-all operations described in POSIX 1003.2, otherwise 0.
+all operations described in
+.St -p1003.2 ,
+otherwise 0.
.It Li USER_POSIX2_C_BIND
Return 1 if the system's C-language development facilities support the
C-Language Bindings Option, otherwise 0.
@@ -665,7 +669,9 @@ otherwise 0.
Return 1 if the system supports the User Portability Utilities Option,
otherwise 0.
.It Li USER_POSIX2_VERSION
-The version of POSIX 1003.2 with which the system attempts to comply.
+The version of
+.St -p1003.2
+with which the system attempts to comply.
.It Li USER_RE_DUP_MAX
The maximum number of repeated occurrences of a regular expression
permitted when using interval notation.
@@ -682,7 +688,7 @@ is detailed below.
The changeable column shows whether a process with appropriate
privilege may change the value.
.Bl -column "Second level nameXXXXXX" "struct loadavgXXX" -offset indent
-.It Sy Pa "Second level name Type Changeable"
+.It Sy "Second level name Type Changeable"
.It "VM\_LOADAVG struct loadavg no"
.It "VM\_METER struct vmtotal no"
.It "VM\_PAGEOUT\_ALGORITHM integer yes"
diff --git a/lib/libc/gen/syslog.3 b/lib/libc/gen/syslog.3
index 7ee51bb9ba85..e392a8719cd9 100644
--- a/lib/libc/gen/syslog.3
+++ b/lib/libc/gen/syslog.3
@@ -146,7 +146,7 @@ If
cannot pass the message to
.Xr syslogd 8
it will attempt to write the message to the console
-.Pq Dq Pa /dev/console.
+.Pq Dq Pa /dev/console .
.It Dv LOG_NDELAY
Open the connection to
.Xr syslogd 8
diff --git a/lib/libc/gen/tcsetattr.3 b/lib/libc/gen/tcsetattr.3
index d2bf5001f47b..58de728c63b0 100644
--- a/lib/libc/gen/tcsetattr.3
+++ b/lib/libc/gen/tcsetattr.3
@@ -184,7 +184,7 @@ The
.Fn cfmakeraw
function sets the flags stored in the termios structure to a state disabling
all input and output processing, giving a
-.Dq raw I/O path.
+.Dq raw I/O path .
It should be noted that there is no function to reverse this effect.
This is because there are a variety of processing options that could be
re-enabled and the correct method is for an application to snapshot the
diff --git a/lib/libc/gen/times.3 b/lib/libc/gen/times.3
index 12bd83082e30..85a33f7b04e9 100644
--- a/lib/libc/gen/times.3
+++ b/lib/libc/gen/times.3
@@ -42,7 +42,7 @@
.Lb libc
.Sh SYNOPSIS
.Fd #include <sys/times.h>
-.Ft clock_t
+.Ft clock_t
.Fn times "struct tms *tp"
.Sh DESCRIPTION
.Bf -symbolic
diff --git a/lib/libc/gen/ttyname.3 b/lib/libc/gen/ttyname.3
index e09bd6aeeaf1..9141dfc93d31 100644
--- a/lib/libc/gen/ttyname.3
+++ b/lib/libc/gen/ttyname.3
@@ -62,7 +62,7 @@ and named
.Pa /dev/tty Ns Em xx
and for which an entry exists
in the initialization file
-.Pa /etc/ttys.
+.Pa /etc/ttys .
(See
.Xr ttys 5 . )
.Pp
@@ -94,7 +94,7 @@ The
function
returns the null terminated name if the device is found and
.Fn isatty
-is true; otherwise
+is true; otherwise
a
.Dv NULL
pointer is returned.
diff --git a/lib/libc/gen/tzset.3 b/lib/libc/gen/tzset.3
index d763e071c45c..6dca2bca21e1 100644
--- a/lib/libc/gen/tzset.3
+++ b/lib/libc/gen/tzset.3
@@ -115,14 +115,12 @@ When
.Ev TZ
is used directly as a specification of the time conversion information,
it must have the following syntax (spaces inserted for clarity):
-.Bd -filled -offset indent
-.Em std offset Bo
-.Em dst Bo
-.Em offset
-.Bc
+.Bd -ragged -offset indent
+.Em std offset
.Bo
-.No , Em rule
-.Bc
+.Em dst
+.Bq Em offset
+.Bq , Em rule
.Bc
.Ed
.Pp
@@ -156,13 +154,13 @@ Indicates the value one must add to the local time to arrive at
Coordinated Universal Time. The
.Em offset
has the form:
-.Bd -unfilled -offset indent
+.Bd -ragged -offset indent
+.Sm off
.Em hh Bo
-.Pf \&: Em mm
-.Bo
-.Pf \&: Em ss
-.Bc
+.Em : mm
+.Bq Em : ss
.Bc
+.Sm on
.Ed
.Pp
The minutes
@@ -191,7 +189,7 @@ west (which may be indicated by an optional preceding
Indicates when to change to and back from summer time. The
.Em rule
has the form:
-.Bd -filled -offset indent
+.Bd -ragged -offset indent
.Em date/time,date/time
.Ed
.Pp
diff --git a/lib/libc/gen/ualarm.3 b/lib/libc/gen/ualarm.3
index b42021e545cc..1fac904ad53a 100644
--- a/lib/libc/gen/ualarm.3
+++ b/lib/libc/gen/ualarm.3
@@ -42,7 +42,7 @@
.Lb libc
.Sh SYNOPSIS
.Fd #include <unistd.h>
-.Ft u_int
+.Ft u_int
.Fn ualarm "u_int microseconds" "u_int interval"
.Sh DESCRIPTION
.Bf -symbolic
@@ -97,5 +97,5 @@ A microsecond is 0.000001 seconds.
.Sh HISTORY
The
.Fn ualarm
-function appeared in
+function appeared in
.Bx 4.3 .
diff --git a/lib/libc/gen/uname.3 b/lib/libc/gen/uname.3
index 2c72472635ab..0ad18d888554 100644
--- a/lib/libc/gen/uname.3
+++ b/lib/libc/gen/uname.3
@@ -52,9 +52,9 @@ the current system into the structure referenced by
.Fa name .
.Pp
The
-.Li utsname
+.Vt utsname
structure is defined in the
-.Li <sys/utsname.h>
+.Aq Pa sys/utsname.h
header file, and contains the following members:
.Bl -tag -width nodenameXXXX -offset indent
.It sysname
diff --git a/lib/libc/gen/usleep.3 b/lib/libc/gen/usleep.3
index 1d635fd5ad09..b47ea0145fb5 100644
--- a/lib/libc/gen/usleep.3
+++ b/lib/libc/gen/usleep.3
@@ -80,5 +80,5 @@ action was to invoke a signal-catching function.
.Sh HISTORY
The
.Fn usleep
-function appeared in
+function appeared in
.Bx 4.3 .
diff --git a/lib/libc/gen/utime.3 b/lib/libc/gen/utime.3
index bee33bef51eb..e50389824b0c 100644
--- a/lib/libc/gen/utime.3
+++ b/lib/libc/gen/utime.3
@@ -81,7 +81,7 @@ for any of the errors specified for the library function
.Sh HISTORY
A
.Fn utime
-function appeared in
+function appeared in
.At v7 .
.Sh STANDARDS
The
diff --git a/lib/libc/gen/valloc.3 b/lib/libc/gen/valloc.3
index 25ce1317db89..a7af23f1e423 100644
--- a/lib/libc/gen/valloc.3
+++ b/lib/libc/gen/valloc.3
@@ -69,7 +69,7 @@ a null pointer is returned
.Sh HISTORY
The
.Fn valloc
-function appeared in
+function appeared in
.Bx 3.0 .
.Sh BUGS
A
diff --git a/lib/libc/gen/vis.3 b/lib/libc/gen/vis.3
index 3c40d0db222e..4669420c62b3 100644
--- a/lib/libc/gen/vis.3
+++ b/lib/libc/gen/vis.3
@@ -100,7 +100,7 @@ characters from
.Fa src
(this
is useful for encoding a block of data that may contain
-.Dv NUL Ns 's).
+.Dv NUL Ns 's ) .
Both forms
.Dv NUL
terminate
@@ -156,8 +156,8 @@ tab, newline, backspace, bell, and return - in addition
to all graphic characters - unencoded.
.El
.Pp
-There are three forms of encoding.
-All forms use the backslash character
+There are four forms of encoding.
+Most forms use the backslash character
.Ql \e
to introduce a special
sequence; two backslashes are used to represent a real backslash.
diff --git a/lib/libc/locale/ctype.3 b/lib/libc/locale/ctype.3
index f64c19ba627c..5c054685e565 100644
--- a/lib/libc/locale/ctype.3
+++ b/lib/libc/locale/ctype.3
@@ -144,4 +144,4 @@ These functions, except for
and
.Fn toascii ,
conform to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/locale/isalnum.3 b/lib/libc/locale/isalnum.3
index dcf519ecef1f..1d087e214757 100644
--- a/lib/libc/locale/isalnum.3
+++ b/lib/libc/locale/isalnum.3
@@ -98,4 +98,4 @@ returns non-zero if the character tests true.
The
.Fn isalnum
function conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/locale/isalpha.3 b/lib/libc/locale/isalpha.3
index 3007d64a067b..80953cde6858 100644
--- a/lib/libc/locale/isalpha.3
+++ b/lib/libc/locale/isalpha.3
@@ -96,4 +96,4 @@ returns non-zero if the character tests true.
The
.Fn isalpha
function conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/locale/isascii.3 b/lib/libc/locale/isascii.3
index be2bb0883ad1..027f79453933 100644
--- a/lib/libc/locale/isascii.3
+++ b/lib/libc/locale/isascii.3
@@ -58,4 +58,4 @@ between 0 and octal 0177 inclusive.
The
.Fn isascii
function conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/locale/iscntrl.3 b/lib/libc/locale/iscntrl.3
index cf2d15777905..cefacad9bae6 100644
--- a/lib/libc/locale/iscntrl.3
+++ b/lib/libc/locale/iscntrl.3
@@ -86,4 +86,4 @@ returns non-zero if the character tests true.
The
.Fn iscntrl
function conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/locale/isdigit.3 b/lib/libc/locale/isdigit.3
index 7cb89521e361..1a52fa35335e 100644
--- a/lib/libc/locale/isdigit.3
+++ b/lib/libc/locale/isdigit.3
@@ -81,4 +81,4 @@ returns non-zero if the character tests true.
The
.Fn isdigit
function conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/locale/isgraph.3 b/lib/libc/locale/isgraph.3
index 0e5d341b7ffb..e835bfddf5ae 100644
--- a/lib/libc/locale/isgraph.3
+++ b/lib/libc/locale/isgraph.3
@@ -98,4 +98,4 @@ returns non-zero if the character tests true.
The
.Fn isgraph
function conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/locale/islower.3 b/lib/libc/locale/islower.3
index 255dfb45e11b..fc4720dd714d 100644
--- a/lib/libc/locale/islower.3
+++ b/lib/libc/locale/islower.3
@@ -86,4 +86,4 @@ returns non-zero if the character tests true.
The
.Fn islower
function conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/locale/isprint.3 b/lib/libc/locale/isprint.3
index 0a8849f64925..877f21fa8ce2 100644
--- a/lib/libc/locale/isprint.3
+++ b/lib/libc/locale/isprint.3
@@ -98,4 +98,4 @@ returns non-zero if the character tests true.
The
.Fn isprint
function conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/locale/ispunct.3 b/lib/libc/locale/ispunct.3
index e3c8f3f2f8ee..87622b7bab16 100644
--- a/lib/libc/locale/ispunct.3
+++ b/lib/libc/locale/ispunct.3
@@ -89,4 +89,4 @@ returns non-zero if the character tests true.
The
.Fn ispunct
function conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/locale/isspace.3 b/lib/libc/locale/isspace.3
index fbedb53b7869..de962f327104 100644
--- a/lib/libc/locale/isspace.3
+++ b/lib/libc/locale/isspace.3
@@ -81,4 +81,4 @@ returns non-zero if the character tests true.
The
.Fn isspace
function conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/locale/isupper.3 b/lib/libc/locale/isupper.3
index 2d186eb00e89..95b2427ebacd 100644
--- a/lib/libc/locale/isupper.3
+++ b/lib/libc/locale/isupper.3
@@ -86,4 +86,4 @@ returns non-zero if the character tests true.
The
.Fn isupper
function conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/locale/isxdigit.3 b/lib/libc/locale/isxdigit.3
index 3c8c3057eaee..0d79a37c789b 100644
--- a/lib/libc/locale/isxdigit.3
+++ b/lib/libc/locale/isxdigit.3
@@ -84,4 +84,4 @@ returns non-zero if the character tests true.
The
.Fn isxdigit
function conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/locale/mbrune.3 b/lib/libc/locale/mbrune.3
index 1e68ae59eb6d..680b01ecaa4b 100644
--- a/lib/libc/locale/mbrune.3
+++ b/lib/libc/locale/mbrune.3
@@ -98,7 +98,7 @@ The
function locates the first occurrence of the null-terminated string
.Fa pattern
in the null-terminated string
-.Fa string.
+.Fa string .
If
.Fa pattern
is the empty string,
diff --git a/lib/libc/locale/multibyte.3 b/lib/libc/locale/multibyte.3
index cf4093c5ba12..a78a4a226a29 100644
--- a/lib/libc/locale/multibyte.3
+++ b/lib/libc/locale/multibyte.3
@@ -150,7 +150,7 @@ function converts a multibyte character
.Fa mbchar
into a wide character and stores the result
in the object pointed to by
-.Fa wcharp.
+.Fa wcharp .
Up to
.Fa nbytes
bytes are examined.
@@ -239,6 +239,6 @@ The
and
.Fn wctomb
functions conform to
-.St -ansiC .
+.St -isoC .
.Sh BUGS
The current implementation does not support shift states.
diff --git a/lib/libc/locale/rune.3 b/lib/libc/locale/rune.3
index 087ef4ca896e..a9452747dfcb 100644
--- a/lib/libc/locale/rune.3
+++ b/lib/libc/locale/rune.3
@@ -159,7 +159,7 @@ is not
.Dv NULL ,
.Fa *result
will be set to
-.Dv NULL.
+.Dv NULL .
In all cases,
.Fn sputrune
will return the number of bytes which would be needed to store
@@ -266,7 +266,7 @@ These functions first appeared in
The
.Fn setrunelocale
function and the other non-ANSI rune functions were inspired by
-.Nm Plan 9 from Bell Labs
+.Sy "Plan 9 from Bell Labs"
as a much more sane alternative to the ANSI multibyte and
wide character support.
.\"They were conceived at the San Diego 1993 Summer USENIX conference by
diff --git a/lib/libc/locale/setlocale.3 b/lib/libc/locale/setlocale.3
index 2bd565cbc2e2..0a545b8eaa27 100644
--- a/lib/libc/locale/setlocale.3
+++ b/lib/libc/locale/setlocale.3
@@ -303,7 +303,7 @@ The
and
.Fn localeconv
functions conform to
-.St -ansiC .
+.St -isoC .
.Sh HISTORY
The
.Fn setlocale
diff --git a/lib/libc/locale/tolower.3 b/lib/libc/locale/tolower.3
index 9b4a177a3ba1..e879973e4cc6 100644
--- a/lib/libc/locale/tolower.3
+++ b/lib/libc/locale/tolower.3
@@ -89,4 +89,4 @@ one; otherwise the argument is returned unchanged.
The
.Fn tolower
function conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/locale/toupper.3 b/lib/libc/locale/toupper.3
index f32f1a681539..337a2051c7ff 100644
--- a/lib/libc/locale/toupper.3
+++ b/lib/libc/locale/toupper.3
@@ -89,4 +89,4 @@ one; otherwise the argument is returned unchanged.
The
.Fn toupper
function conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/locale/utf2.4 b/lib/libc/locale/utf2.4
index 3734dbab1669..35eb3ad64e1d 100644
--- a/lib/libc/locale/utf2.4
+++ b/lib/libc/locale/utf2.4
@@ -49,7 +49,7 @@ The
.Nm UTF2
encoding is based on a proposed X-Open multibyte
\s-1FSS-UCS-TF\s+1 (File System Safe Universal Character Set Transformation Format) encoding as used in
-.Nm Plan 9 from Bell Labs.
+.Sy "Plan 9 from Bell Labs" .
Although it is capable of representing more than 16 bits,
the current implementation is limited to 16 bits as defined by the
Unicode Standard.
diff --git a/lib/libc/net/gethostbyname.3 b/lib/libc/net/gethostbyname.3
index c7b5e65059fc..caa8baff17f4 100644
--- a/lib/libc/net/gethostbyname.3
+++ b/lib/libc/net/gethostbyname.3
@@ -95,21 +95,25 @@ struct hostent {
.Pp
The members of this structure are:
.Bl -tag -width h_addr_list
-.It Fa h_name
+.It Va h_name
Official name of the host.
-.It Fa h_aliases
-A NULL-terminated array of alternate names for the host.
-.It Fa h_addrtype
+.It Va h_aliases
+A
+.Dv NULL Ns -terminated
+array of alternate names for the host.
+.It Va h_addrtype
The type of address being returned; usually
.Dv AF_INET .
-.It Fa h_length
+.It Va h_length
The length, in bytes, of the address.
-.It Fa h_addr_list
-A NULL-terminated array of network addresses for the host.
+.It Va h_addr_list
+A
+.Dv NULL Ns -terminated
+array of network addresses for the host.
Host addresses are returned in network byte order.
-.It Fa h_addr
+.It Va h_addr
The first address in
-.Fa h_addr_list ;
+.Va h_addr_list ;
this is for backward compatibility.
.El
.Pp
@@ -178,7 +182,9 @@ The
function writes a message to the diagnostic output consisting of the
string parameter
.Fa s ,
-the constant string ": ", and a message corresponding to the value of
+the constant string
+.Qq Li ":\ " ,
+and a message corresponding to the value of
.Va h_errno .
.Pp
The
@@ -210,7 +216,7 @@ can be used to print an error message describing the failure.
If its argument
.Fa string
is
-.Pf non Dv -NULL ,
+.Pf non- Dv NULL ,
it is printed, followed by a colon and a space.
The error message is printed with a trailing newline.
.Pp
@@ -298,7 +304,9 @@ functions appeared in
.Bx 4.2 .
The
.Fn gethostbyname2
-function first appeared in bind-4.9.4.
+function first appeared in
+.Tn BIND
+version 4.9.4.
.Sh BUGS
These functions use static data storage;
if the data is needed for future use, it should be
diff --git a/lib/libc/net/getnameinfo.3 b/lib/libc/net/getnameinfo.3
index 113563ff1dd4..aef357b7ece2 100644
--- a/lib/libc/net/getnameinfo.3
+++ b/lib/libc/net/getnameinfo.3
@@ -298,7 +298,8 @@ The implementation first appeared in WIDE Hydrangea IPv6 protocol stack kit.
.Sh STANDARDS
The
.Fn getaddrinfo
-function is defined IEEE POSIX 1003.1g draft specification,
+function is defined in
+.St -p1003.1g ,
and documented in
.Dq Basic Socket Interface Extensions for IPv6
.Pq RFC2553 .
diff --git a/lib/libc/net/if_indextoname.3 b/lib/libc/net/if_indextoname.3
index a0d4bebd673d..adf82cbc4f5f 100644
--- a/lib/libc/net/if_indextoname.3
+++ b/lib/libc/net/if_indextoname.3
@@ -57,11 +57,9 @@
.Fn if_freenameindex "struct if_nameindex *ptr"
.Sh DESCRIPTION
The functions map interface index to readable interface name
-.Po
-such as
-.Li ``lo0''
-.Pc
-, and vice versa.
+(such as
+.Dq Li lo0 ) ,
+and vice versa.
.Pp
.Fn if_nametoindex
converts readable interface name to interface index
@@ -76,13 +74,11 @@ argument must point to a buffer of at least
.Dv IF_NAMESIZE
bytes into which the interface name corresponding to the specified index is
returned.
-.Po
-.Dv IF_NAMESIZE
+.Dv ( IF_NAMESIZE
is also defined in
-.Li <net/if.h>
+.Aq Pa net/if.h
and its value includes a terminating null byte at the end of the
-interface name.
-.Pc
+interface name.)
This pointer is also the return value of the function.
If there is no interface corresponding to the specified index,
.Dv NULL
@@ -94,7 +90,7 @@ returns an array of
structures.
.Fa if_nametoindex
is also defined in
-.Li <net/if.h> ,
+.Aq Pa net/if.h ,
and is as follows:
.Bd -literal -offset
struct if_nameindex {
diff --git a/lib/libc/net/inet6_option_space.3 b/lib/libc/net/inet6_option_space.3
index e6ff3dd405e8..82365484f0eb 100644
--- a/lib/libc/net/inet6_option_space.3
+++ b/lib/libc/net/inet6_option_space.3
@@ -48,15 +48,16 @@
.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
+.Fd #include <sys/types.h>
.Fd #include <netinet/in.h>
.Ft "int"
-.Fn inet6_options_space "int nbytes"
+.Fn inet6_option_space "int nbytes"
.Ft "int"
.Fn inet6_option_init "void *bp" "struct cmsghdr **cmsgp" "int type"
.Ft "int"
.Fn inet6_option_append "struct cmsghdr *cmsg" "const u_int8_t *typep" "int multx" "int plusy"
.Ft "u_int8_t *"
-.Fn inet6_option_alloc "struct cmsghdr *cmsg" "int datalen" "int multx" "int plusy";
+.Fn inet6_option_alloc "struct cmsghdr *cmsg" "int datalen" "int multx" "int plusy"
.Ft "int"
.Fn inet6_option_next "const struct cmsghdr *cmsg" "u_int8_t **tptrp"
.Ft "int"
@@ -80,17 +81,13 @@ ancillary data, including the
.Li cmsghdr
structure at the beginning,
and any padding at the end
-.Po
-to make its size a multiple of 8 bytes
-.Pc .
+(to make its size a multiple of 8 bytes).
The argument is the size of the structure defining the option,
which must include any pad bytes at the beginning
-.Po
-the value
+(the value
.Li y
in the alignment term
-.Dq Li xn + y
-.Pc ,
+.Dq Li "xn + y" ) ,
the type byte, the length byte, and the option data.
.Pp
Note: If multiple options are stored in a single ancillary data
@@ -180,17 +177,16 @@ before calling this function.
The option type must have a value from
.Li 2
to
-.Li 255 , inclusive.
-.Po
-.Li 0
+.Li 255 ,
+inclusive.
+.Li ( 0
and
.Li 1
are reserved for the
.Li Pad1
and
.Li PadN
-options, respectively.
-.Pc
+options, respectively.)
.Pp
The option data length must have a value between
.Li 0
@@ -248,12 +244,10 @@ initialized by
is the value of the option data length byte for this option.
This value is required as an argument to allow the function to
determine if padding must be appended at the end of the option.
-.Po
-The
+(The
.Fn inet6_option_append
function does not need a data length argument
-since the option data length must already be stored by the caller.
-.Pc
+since the option data length must already be stored by the caller.)
.Pp
.Fa multx
is the value
@@ -288,10 +282,8 @@ and
.Fa *tptrp
points to
the 8-bit option type field
-.Po
-which is followed by the 8-bit option
-data length, followed by the option data
-.Pc .
+(which is followed by the 8-bit option
+data length, followed by the option data).
If no more options remain
to be processed, the return value is
.Li -1
@@ -406,7 +398,8 @@ on an error.
.Pp
.Fn inet6_option_alloc
returns
-.Dv NULL on an error.
+.Dv NULL
+on an error.
.Pp
On errors,
.Fn inet6_option_next
diff --git a/lib/libc/net/inet6_rthdr_space.3 b/lib/libc/net/inet6_rthdr_space.3
index 6d4ee5530d7f..2c3fd9c49f34 100644
--- a/lib/libc/net/inet6_rthdr_space.3
+++ b/lib/libc/net/inet6_rthdr_space.3
@@ -50,6 +50,7 @@
.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
+.Fd #include <sys/types.h>
.Fd #include <netinet/in.h>
.Ft size_t
.Fn inet6_rthdr_space "int type" "int segments"
@@ -211,10 +212,8 @@ When implemented, this should behave as follows.
.Pp
This function takes a Routing header that was received as ancillary
data
-.Po
-pointed to by the first argument,
-.Fa in
-.Pc
+(pointed to by the first argument,
+.Fa in )
and writes a new Routing
header that sends datagrams along the reverse of that route.
Both
@@ -237,10 +236,8 @@ The return value of the function is -1 upon an error.
.Ss inet6_rthdr_getaddr
This function returns a pointer to the IPv6 address specified by
.Fa index
-.Po
-which must have a value between 1 and the value returned by
-.Fn inet6_rthdr_segments
-.Pc
+(which must have a value between 1 and the value returned by
+.Fn inet6_rthdr_segments )
in the Routing header described by
.Fa cmsg .
An
@@ -254,11 +251,9 @@ Upon an error the return value of the function is
.Ss inet6_rthdr_getflags
This function returns the flags value specified by
.Fa index
-.Po
-which must
+(which must
have a value between 0 and the value returned by
-.Fn inet6_rthdr_segments
-.Pc
+.Fn inet6_rthdr_segments )
in the Routing header described by
.Fa cmsg .
For an IPv6 Type 0 Routing header the return value will be either
diff --git a/lib/libc/net/iso_addr.3 b/lib/libc/net/iso_addr.3
index 7a86f631b8f5..5f825c0c93ff 100644
--- a/lib/libc/net/iso_addr.3
+++ b/lib/libc/net/iso_addr.3
@@ -76,7 +76,7 @@ is a sequence of hexadecimal
.Dq digits
(optionally separated by periods),
of the form:
-.Bd -filled -offset indent
+.Bd -ragged -offset indent
<hex digits>.<hex digits>.<hex digits>
.Ed
.Pp
diff --git a/lib/libc/net/ns.3 b/lib/libc/net/ns.3
index 3da412746c9e..0376d9047520 100644
--- a/lib/libc/net/ns.3
+++ b/lib/libc/net/ns.3
@@ -65,7 +65,7 @@ addresses and returns
.Tn ASCII
strings representing the address in a
notation in common use in the Xerox Development Environment:
-.Bd -filled -offset indent
+.Bd -ragged -offset indent
<network number>.<host number>.<port number>
.Ed
.Pp
diff --git a/lib/libc/net/resolver.3 b/lib/libc/net/resolver.3
index dedcde1f17ce..1fb97f568be3 100644
--- a/lib/libc/net/resolver.3
+++ b/lib/libc/net/resolver.3
@@ -305,7 +305,8 @@ as the name is compressed.
If
.Em dnptr
is
-.Dv NULL, names are not compressed.
+.Dv NULL ,
+names are not compressed.
If
.Fa lastdnptr
is
diff --git a/lib/libc/regex/re_format.7 b/lib/libc/regex/re_format.7
index ef28a51b41b2..b6fb9de0cba7 100644
--- a/lib/libc/regex/re_format.7
+++ b/lib/libc/regex/re_format.7
@@ -463,9 +463,7 @@ They are also somewhat vaguely defined
(does
.Ql a\e(\e(b\e)*\e2\e)*d
match
-.Ql abbbd Ns Xo
-?).
-.Xc
+.Ql abbbd ? ) .
Avoid using them.
.Pp
.St -p1003.2
diff --git a/lib/libc/rpc/rpc.3 b/lib/libc/rpc/rpc.3
index 9fedba86c5b9..e2c73cf88de5 100644
--- a/lib/libc/rpc/rpc.3
+++ b/lib/libc/rpc/rpc.3
@@ -1412,7 +1412,9 @@ messages without using the
package.
.Pp
.It Xo
-.Fd struct pmap ;
+.Vt struct pmap ;
+.Xc
+.It Xo
.Ft bool_t
.Fn xdr_pmap "XDR *xdrs" "struct pmap *regs"
.Xc
diff --git a/lib/libc/stdio/fclose.3 b/lib/libc/stdio/fclose.3
index 26ff25dad2a5..04cae30877f1 100644
--- a/lib/libc/stdio/fclose.3
+++ b/lib/libc/stdio/fclose.3
@@ -96,4 +96,4 @@ The
.Fn fclose
function
conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/stdio/ferror.3 b/lib/libc/stdio/ferror.3
index d79686d460e4..9ccad39aa6e3 100644
--- a/lib/libc/stdio/ferror.3
+++ b/lib/libc/stdio/ferror.3
@@ -100,4 +100,4 @@ The functions
and
.Fn ferror
conform to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/stdio/fflush.3 b/lib/libc/stdio/fflush.3
index 57c589f97699..73678a80cf91 100644
--- a/lib/libc/stdio/fflush.3
+++ b/lib/libc/stdio/fflush.3
@@ -110,4 +110,4 @@ The
.Fn fflush
function
conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/stdio/fgets.3 b/lib/libc/stdio/fgets.3
index dda95dc96b95..c10a65757771 100644
--- a/lib/libc/stdio/fgets.3
+++ b/lib/libc/stdio/fgets.3
@@ -143,7 +143,7 @@ The functions
and
.Fn gets
conform to
-.St -ansiC .
+.St -isoC .
.Sh BUGS
Since it is usually impossible to ensure that the next input line
is less than some arbitrary length, and because overflowing the
@@ -156,4 +156,4 @@ The
.Fn gets
function
exists purely to conform to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/stdio/fopen.3 b/lib/libc/stdio/fopen.3
index d44ad41984ea..ffa699d3defb 100644
--- a/lib/libc/stdio/fopen.3
+++ b/lib/libc/stdio/fopen.3
@@ -85,13 +85,17 @@ Open for writing.
The file is created if it does not exist.
The stream is positioned at the end of the file.
Subsequent writes to the file will always end up at the then current
-end of file, irrespective of intervening fseek()s.
+end of file, irrespective of any intervening
+.Xr fseek 3
+or similar.
.It Dq Li a+
Open for reading and writing.
The file is created if it does not exist.
The stream is positioned at the end of the file.
Subsequent writes to the file will always end up at the then current
-end of file, irrespective of intervening fseek()s.
+end of file, irrespective of any intervening
+.Xr fseek 3
+or similar.
.El
.Pp
The
@@ -100,7 +104,7 @@ string can also include the letter ``b'' either as a third character or
as a character between the characters in any of the two-character strings
described above.
This is strictly for compatibility with
-.St -ansiC
+.St -isoC
and has no effect; the ``b'' is ignored.
.Pp
Any created files will have mode
@@ -240,7 +244,7 @@ and
.Fn freopen
functions
conform to
-.St -ansiC .
+.St -isoC .
The
.Fn fdopen
function
diff --git a/lib/libc/stdio/fputs.3 b/lib/libc/stdio/fputs.3
index 34c4ad191ef2..6d2b1f96fb5d 100644
--- a/lib/libc/stdio/fputs.3
+++ b/lib/libc/stdio/fputs.3
@@ -107,4 +107,4 @@ The functions
and
.Fn puts
conform to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/stdio/fread.3 b/lib/libc/stdio/fread.3
index 16e7da3d8d97..2a2d10b7fdff 100644
--- a/lib/libc/stdio/fread.3
+++ b/lib/libc/stdio/fread.3
@@ -106,4 +106,4 @@ The functions
and
.Fn fwrite
conform to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/stdio/fseek.3 b/lib/libc/stdio/fseek.3
index bd09b84222e9..f12e0471d03d 100644
--- a/lib/libc/stdio/fseek.3
+++ b/lib/libc/stdio/fseek.3
@@ -222,7 +222,7 @@ and
.Fn rewind
functions
conform to
-.St -ansiC .
+.St -isoC .
.Pp
The
.Fn fseeko
diff --git a/lib/libc/stdio/getc.3 b/lib/libc/stdio/getc.3
index b6e32efe5c42..bd099abd343c 100644
--- a/lib/libc/stdio/getc.3
+++ b/lib/libc/stdio/getc.3
@@ -121,7 +121,7 @@ and
.Fn getchar
functions
conform to
-.St -ansiC .
+.St -isoC .
.Sh BUGS
Since
.Dv EOF
diff --git a/lib/libc/stdio/mktemp.3 b/lib/libc/stdio/mktemp.3
index 0136fe70df2f..1f79e4f4eb0d 100644
--- a/lib/libc/stdio/mktemp.3
+++ b/lib/libc/stdio/mktemp.3
@@ -173,7 +173,7 @@ passes in a read-only string to
or
.Fn mkdtemp .
This is common with programs that were developed before
-.St -ansiC
+.St -isoC
compilers were common.
For example, calling
.Fn mkstemp
diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3
index 308a1b49cafb..88682c8b40d4 100644
--- a/lib/libc/stdio/printf.3
+++ b/lib/libc/stdio/printf.3
@@ -86,7 +86,7 @@ as described below.
and
.Fn vprintf
write output to
-.Em stdout,
+.Em stdout ,
the standard output stream;
.Fn fprintf
and
@@ -608,7 +608,7 @@ and
.Fn vsprintf
functions
conform to
-.St -ansiC .
+.St -isoC .
.Sh HISTORY
The functions
.Fn asprintf
diff --git a/lib/libc/stdio/putc.3 b/lib/libc/stdio/putc.3
index bb82d582de9a..7f180b42bf04 100644
--- a/lib/libc/stdio/putc.3
+++ b/lib/libc/stdio/putc.3
@@ -123,7 +123,7 @@ The functions
and
.Fn putchar ,
conform to
-.St -ansiC .
+.St -isoC .
A function
.Fn putw
function appeared in
diff --git a/lib/libc/stdio/remove.3 b/lib/libc/stdio/remove.3
index 0ba144a0aed2..6627afa802b6 100644
--- a/lib/libc/stdio/remove.3
+++ b/lib/libc/stdio/remove.3
@@ -87,6 +87,6 @@ or
The
.Fn remove
function conforms to
-.St -ansiC
+.St -isoC
and
.St -xpg4.2 .
diff --git a/lib/libc/stdio/scanf.3 b/lib/libc/stdio/scanf.3
index cae4c04782d0..3f7b1594ab08 100644
--- a/lib/libc/stdio/scanf.3
+++ b/lib/libc/stdio/scanf.3
@@ -247,7 +247,7 @@ the next pointer must be a pointer to
Equivalent to
.Cm lx ;
this violates the
-.St -ansiC ,
+.St -isoC ,
but is backwards compatible with previous
.Ux
systems.
@@ -265,7 +265,7 @@ Equivalent to
Equivalent to
.Cm lf ;
this violates the
-.St -ansiC ,
+.St -isoC ,
but is backwards compatible with previous
.Ux
systems.
@@ -416,7 +416,7 @@ The functions
and
.Fn sscanf
conform to
-.St -ansiC .
+.St -isoC .
.Sh HISTORY
The functions
.Fn vscanf ,
diff --git a/lib/libc/stdio/setbuf.3 b/lib/libc/stdio/setbuf.3
index 7b1b63dc3319..e9fa07972b6f 100644
--- a/lib/libc/stdio/setbuf.3
+++ b/lib/libc/stdio/setbuf.3
@@ -186,7 +186,7 @@ and
.Fn setvbuf
functions
conform to
-.St -ansiC .
+.St -isoC .
.Sh BUGS
The
.Fn setbuffer
diff --git a/lib/libc/stdio/stdio.3 b/lib/libc/stdio/stdio.3
index b4cd7dacf676..10d79ba8d6e7 100644
--- a/lib/libc/stdio/stdio.3
+++ b/lib/libc/stdio/stdio.3
@@ -42,9 +42,9 @@
.Lb libc
.Sh SYNOPSIS
.Fd #include <stdio.h>
-.Fd FILE *stdin;
-.Fd FILE *stdout;
-.Fd FILE *stderr;
+.Vt FILE *stdin ;
+.Vt FILE *stdout ;
+.Vt FILE *stderr ;
.Sh DESCRIPTION
The standard
.Tn I/O
@@ -179,9 +179,9 @@ without first removing their current definitions with
.Dv FOPEN_MAX ,
.Dv L_cuserid ,
.Dv L_ctermid ,
-.Dv L_tmpnam,
+.Dv L_tmpnam ,
.Dv NULL ,
-.Dv P_tmpdir,
+.Dv P_tmpdir ,
.Dv SEEK_CUR ,
.Dv SEEK_END ,
.Dv SEEK_SET ,
@@ -225,7 +225,7 @@ library and system functions, especially
The
.Nm
library conforms to
-.St -ansiC .
+.St -isoC .
.Sh LIST OF FUNCTIONS
.Bl -column "Description"
.It Sy "Function Description"
diff --git a/lib/libc/stdio/tmpnam.3 b/lib/libc/stdio/tmpnam.3
index 3a14e9c24cb0..ed71236223de 100644
--- a/lib/libc/stdio/tmpnam.3
+++ b/lib/libc/stdio/tmpnam.3
@@ -185,7 +185,7 @@ and
.Fn tmpnam
functions
conform to
-.St -ansiC .
+.St -isoC .
.Sh BUGS
These interfaces are provided for System V and
.Tn ANSI
diff --git a/lib/libc/stdio/ungetc.3 b/lib/libc/stdio/ungetc.3
index 2fec98b6b6d3..f3de89d9315d 100644
--- a/lib/libc/stdio/ungetc.3
+++ b/lib/libc/stdio/ungetc.3
@@ -95,4 +95,4 @@ the operation will fail and the stream will remain unchanged.
The
.Fn ungetc
function conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/stdlib/abs.3 b/lib/libc/stdlib/abs.3
index 13ee3206f7e7..d51e7f6255d0 100644
--- a/lib/libc/stdlib/abs.3
+++ b/lib/libc/stdlib/abs.3
@@ -72,6 +72,6 @@ the absolute value.
The
.Fn abs
function conforms to
-.St -ansiC .
+.St -isoC .
.Sh BUGS
The absolute value of the most negative integer remains negative.
diff --git a/lib/libc/stdlib/atexit.3 b/lib/libc/stdlib/atexit.3
index a9a0ab9dc2e0..6c5fd2dc9603 100644
--- a/lib/libc/stdlib/atexit.3
+++ b/lib/libc/stdlib/atexit.3
@@ -77,4 +77,4 @@ The
.Fn atexit
function
conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/stdlib/atof.3 b/lib/libc/stdlib/atof.3
index 64546cf99f21..350b6c33d60f 100644
--- a/lib/libc/stdlib/atof.3
+++ b/lib/libc/stdlib/atof.3
@@ -73,4 +73,4 @@ strtod(nptr, (char **)NULL);
The
.Fn atof
function conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/stdlib/atoi.3 b/lib/libc/stdlib/atoi.3
index dbc3d6130f42..e285b6307403 100644
--- a/lib/libc/stdlib/atoi.3
+++ b/lib/libc/stdlib/atoi.3
@@ -73,4 +73,4 @@ It is equivalent to:
The
.Fn atoi
function conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/stdlib/atol.3 b/lib/libc/stdlib/atol.3
index 06b912cd0721..d0da53458b72 100644
--- a/lib/libc/stdlib/atol.3
+++ b/lib/libc/stdlib/atol.3
@@ -74,4 +74,4 @@ The
.Fn atol
function
conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/stdlib/bsearch.3 b/lib/libc/stdlib/bsearch.3
index 3f645a3e7e16..81007969168c 100644
--- a/lib/libc/stdlib/bsearch.3
+++ b/lib/libc/stdlib/bsearch.3
@@ -90,4 +90,4 @@ If two members compare as equal, which member is matched is unspecified.
The
.Fn bsearch
function conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/stdlib/div.3 b/lib/libc/stdlib/div.3
index acc2cbfed432..ba7f0ac269d2 100644
--- a/lib/libc/stdlib/div.3
+++ b/lib/libc/stdlib/div.3
@@ -67,4 +67,4 @@ The
.Fn div
function
conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/stdlib/exit.3 b/lib/libc/stdlib/exit.3
index abde0eb542fa..4b6dd788b367 100644
--- a/lib/libc/stdlib/exit.3
+++ b/lib/libc/stdlib/exit.3
@@ -95,4 +95,4 @@ The
.Fn exit
function
conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/stdlib/getenv.3 b/lib/libc/stdlib/getenv.3
index 4753dfb6c578..e639b5292af7 100644
--- a/lib/libc/stdlib/getenv.3
+++ b/lib/libc/stdlib/getenv.3
@@ -89,7 +89,7 @@ If the variable
.Ar name
does not exist in the list,
it is inserted with the given
-.Ar value.
+.Ar value .
If the variable does exist, the argument
.Ar overwrite
is tested; if
@@ -140,7 +140,7 @@ failed because they were unable to allocate memory for the environment.
The
.Fn getenv
function conforms to
-.St -ansiC .
+.St -isoC .
.Sh BUGS
Successive calls to
.Fn setenv
diff --git a/lib/libc/stdlib/labs.3 b/lib/libc/stdlib/labs.3
index 2bcb26aba695..76de596dd2da 100644
--- a/lib/libc/stdlib/labs.3
+++ b/lib/libc/stdlib/labs.3
@@ -64,6 +64,6 @@ The
.Fn labs
function
conforms to
-.St -ansiC .
+.St -isoC .
.Sh BUGS
The absolute value of the most negative integer remains negative.
diff --git a/lib/libc/stdlib/ldiv.3 b/lib/libc/stdlib/ldiv.3
index a0b6798e9ac9..f4c791a551c1 100644
--- a/lib/libc/stdlib/ldiv.3
+++ b/lib/libc/stdlib/ldiv.3
@@ -70,4 +70,4 @@ The
.Fn ldiv
function
conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/stdlib/malloc.3 b/lib/libc/stdlib/malloc.3
index 7039a257f80f..a42c8229ce94 100644
--- a/lib/libc/stdlib/malloc.3
+++ b/lib/libc/stdlib/malloc.3
@@ -40,7 +40,7 @@
.Dt MALLOC 3
.Os FreeBSD
.Sh NAME
-.Nm malloc, calloc, realloc, free, reallocf
+.Nm malloc , calloc , realloc , free , reallocf
.Nd general purpose memory allocation functions
.Sh LIBRARY
.Lb libc
@@ -297,7 +297,7 @@ function returns no value.
The major difference between this implementation and other allocation
implementations is that the free pages are not accessed unless allocated,
and are aggressively returned to the kernel for reuse.
-.Bd -filled -offset indent
+.Bd -ragged -offset indent
Most allocation implementations will store a data structure containing a
linked list in the free chunks of memory,
used to tie all the free memory together.
@@ -436,7 +436,7 @@ The
and
.Fn free
functions conform to
-.St -ansiC .
+.St -isoC .
.Sh BUGS
The messages printed in case of problems provide no detail about the
actual values.
diff --git a/lib/libc/stdlib/memory.3 b/lib/libc/stdlib/memory.3
index e8944e179ef8..f9a2bc798c01 100644
--- a/lib/libc/stdlib/memory.3
+++ b/lib/libc/stdlib/memory.3
@@ -70,4 +70,4 @@ individual manual pages.
These functions, with the exception of
.Fn alloca
conform to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/stdlib/qsort.3 b/lib/libc/stdlib/qsort.3
index 15e1690905ac..7c09dac0bf92 100644
--- a/lib/libc/stdlib/qsort.3
+++ b/lib/libc/stdlib/qsort.3
@@ -40,7 +40,7 @@
.Dt QSORT 3
.Os
.Sh NAME
-.Nm qsort, heapsort, mergesort
+.Nm qsort , heapsort , mergesort
.Nd sort functions
.Sh LIBRARY
.Lb libc
@@ -235,4 +235,4 @@ The
.Fn qsort
function
conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/stdlib/rand.3 b/lib/libc/stdlib/rand.3
index 2690aa98d2e3..b47ff67b8809 100644
--- a/lib/libc/stdlib/rand.3
+++ b/lib/libc/stdlib/rand.3
@@ -98,7 +98,7 @@ and
.Fn srand
functions
conform to
-.St -ansiC .
+.St -isoC .
.Pp
The
.Fn rand_r
diff --git a/lib/libc/stdlib/strtod.3 b/lib/libc/stdlib/strtod.3
index 1d86a77f9ea4..58a2160cf750 100644
--- a/lib/libc/stdlib/strtod.3
+++ b/lib/libc/stdlib/strtod.3
@@ -114,7 +114,7 @@ The
.Fn strtod
function
conforms to
-.St -ansiC .
+.St -isoC .
.Sh AUTHORS
The author of this software is
.An David M. Gay .
diff --git a/lib/libc/stdlib/system.3 b/lib/libc/stdlib/system.3
index b849f02f675d..ef9b06f6584d 100644
--- a/lib/libc/stdlib/system.3
+++ b/lib/libc/stdlib/system.3
@@ -97,7 +97,7 @@ The
.Fn system
function
conforms to
-.St -ansiC .
+.St -isoC .
and is expected to be
.St -p1003.2
compatible.
diff --git a/lib/libc/stdlib/tsearch.3 b/lib/libc/stdlib/tsearch.3
index 1df846c696cc..b6d66f89b59b 100644
--- a/lib/libc/stdlib/tsearch.3
+++ b/lib/libc/stdlib/tsearch.3
@@ -31,7 +31,7 @@
.Dt TSEARCH 3
.Os
.Sh NAME
-.Nm tsearch, tfind, tdelete, twalk
+.Nm tsearch , tfind , tdelete , twalk
.Nd manipulate binary search trees
.Sh SYNOPSIS
.Fd #include <search.h>
diff --git a/lib/libc/stdtime/ctime.3 b/lib/libc/stdtime/ctime.3
index 326a2c1dba91..989db255f54e 100644
--- a/lib/libc/stdtime/ctime.3
+++ b/lib/libc/stdtime/ctime.3
@@ -290,7 +290,7 @@ and
functions conform to
.St -isoC ,
and conform to
-.St -p1003.1
+.St -p1003.1-96
provided the selected local timezone does not contain a leap-second table
(see
.Xr zic 8 ) .
@@ -302,7 +302,7 @@ The
and
.Fn localtime_r
functions are expected to conform to
-.St -iso9945-1
+.St -p1003.1-96
(again provided the selected local timezone does not contain a leap-second
table).
.Pp
diff --git a/lib/libc/stdtime/strftime.3 b/lib/libc/stdtime/strftime.3
index d4d4ebff1344..a2e17d9b0b28 100644
--- a/lib/libc/stdtime/strftime.3
+++ b/lib/libc/stdtime/strftime.3
@@ -232,7 +232,7 @@ The
.Fn strftime
function
conforms to
-.St -ansiC
+.St -isoC
with a lot of extensions including
.Ql %C ,
.Ql \&%D ,
diff --git a/lib/libc/string/bstring.3 b/lib/libc/string/bstring.3
index c79eb94a3172..28ec676ec6f6 100644
--- a/lib/libc/string/bstring.3
+++ b/lib/libc/string/bstring.3
@@ -45,7 +45,7 @@
.Nm memchr ,
.Nm memcmp ,
.Nm memcpy ,
-.Nm memmove,
+.Nm memmove ,
.Nm memset
.Nd byte string operations
.Sh LIBRARY
@@ -97,7 +97,7 @@ The functions
and
.Fn memset
conform to
-.St -ansiC .
+.St -isoC .
.Sh HISTORY
The functions
.Fn bzero
diff --git a/lib/libc/string/memchr.3 b/lib/libc/string/memchr.3
index 2da1b839df56..fc56ee67698d 100644
--- a/lib/libc/string/memchr.3
+++ b/lib/libc/string/memchr.3
@@ -79,4 +79,4 @@ The
.Fn memchr
function
conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/string/memcmp.3 b/lib/libc/string/memcmp.3
index 1f38f3ac6705..1bf3c8f3e742 100644
--- a/lib/libc/string/memcmp.3
+++ b/lib/libc/string/memcmp.3
@@ -82,4 +82,4 @@ The
.Fn memcmp
function
conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/string/memcpy.3 b/lib/libc/string/memcpy.3
index 6b8ce3059afc..267b49679ce5 100644
--- a/lib/libc/string/memcpy.3
+++ b/lib/libc/string/memcpy.3
@@ -74,7 +74,7 @@ The
.Fn memcpy
function
conforms to
-.St -ansiC .
+.St -isoC .
.Sh BUGS
In this implementation
.Fn memcpy
diff --git a/lib/libc/string/memmove.3 b/lib/libc/string/memmove.3
index 71626f7890e4..8d14efc68412 100644
--- a/lib/libc/string/memmove.3
+++ b/lib/libc/string/memmove.3
@@ -75,4 +75,4 @@ The
.Fn memmove
function
conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/string/memset.3 b/lib/libc/string/memset.3
index 2a1253ed6f76..baeca31fc26d 100644
--- a/lib/libc/string/memset.3
+++ b/lib/libc/string/memset.3
@@ -70,4 +70,4 @@ The
.Fn memset
function
conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/string/strcat.3 b/lib/libc/string/strcat.3
index 77fd0d275d67..fed597941e68 100644
--- a/lib/libc/string/strcat.3
+++ b/lib/libc/string/strcat.3
@@ -74,7 +74,7 @@ appends not more than
characters from
.Fa append ,
and then adds a terminating
-.Ql \e0.
+.Ql \e0 .
.Sh RETURN VALUES
The
.Fn strcat
@@ -98,4 +98,4 @@ and
.Fn strncat
functions
conform to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/string/strchr.3 b/lib/libc/string/strchr.3
index 86c8bbc43f36..9d8d6eec4541 100644
--- a/lib/libc/string/strchr.3
+++ b/lib/libc/string/strchr.3
@@ -85,4 +85,4 @@ The
.Fn strchr
function
conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/string/strcmp.3 b/lib/libc/string/strcmp.3
index 22fe3d0370e5..60d99c480762 100644
--- a/lib/libc/string/strcmp.3
+++ b/lib/libc/string/strcmp.3
@@ -94,4 +94,4 @@ and
.Fn strncmp
functions
conform to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/string/strcoll.3 b/lib/libc/string/strcoll.3
index b6d5c75ca182..40cb2f5569f3 100644
--- a/lib/libc/string/strcoll.3
+++ b/lib/libc/string/strcoll.3
@@ -72,4 +72,4 @@ The
.Fn strcoll
function
conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/string/strcpy.3 b/lib/libc/string/strcpy.3
index 4c9212a6c9e8..cb38dce6b8fe 100644
--- a/lib/libc/string/strcpy.3
+++ b/lib/libc/string/strcpy.3
@@ -122,4 +122,4 @@ and
.Fn strncpy
functions
conform to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/string/strcspn.3 b/lib/libc/string/strcspn.3
index 1a222a320614..c3eff53b8efe 100644
--- a/lib/libc/string/strcspn.3
+++ b/lib/libc/string/strcspn.3
@@ -82,4 +82,4 @@ The
.Fn strcspn
function
conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/string/strerror.3 b/lib/libc/string/strerror.3
index 762f89d35ee6..1799c1c6a8b2 100644
--- a/lib/libc/string/strerror.3
+++ b/lib/libc/string/strerror.3
@@ -95,7 +95,7 @@ If
.Fa errnum
is not a recognized error number,
the error message string will contain
-.Dq Li "Unknown error:\0
+.Dq Li "Unknown error:\ "
followed by the error number in decimal.
.Pp
The message strings can be accessed directly using the external
diff --git a/lib/libc/string/string.3 b/lib/libc/string/string.3
index 8a83a3732cb8..6a3457c12b9b 100644
--- a/lib/libc/string/string.3
+++ b/lib/libc/string/string.3
@@ -44,14 +44,14 @@
.Nm strrchr ,
.Nm strcmp ,
.Nm strncmp ,
-.Nm strcasecmp,
+.Nm strcasecmp ,
.Nm strncasecmp ,
.Nm strcpy ,
.Nm strncpy ,
.Nm strerror ,
.Nm strlen ,
.Nm strpbrk ,
-.Nm strsep,
+.Nm strsep ,
.Nm strspn ,
.Nm strcspn ,
.Nm strstr ,
@@ -155,4 +155,4 @@ and
.Fn strtok
functions
conform to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/string/strlen.3 b/lib/libc/string/strlen.3
index 31e8ae171def..07b8f6129b52 100644
--- a/lib/libc/string/strlen.3
+++ b/lib/libc/string/strlen.3
@@ -70,4 +70,4 @@ The
.Fn strlen
function
conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/string/strpbrk.3 b/lib/libc/string/strpbrk.3
index b9a3e5227b65..b7fa71005480 100644
--- a/lib/libc/string/strpbrk.3
+++ b/lib/libc/string/strpbrk.3
@@ -77,4 +77,4 @@ The
.Fn strpbrk
function
conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/string/strrchr.3 b/lib/libc/string/strrchr.3
index d2d8c9eae9c6..4d5ec0352354 100644
--- a/lib/libc/string/strrchr.3
+++ b/lib/libc/string/strrchr.3
@@ -88,4 +88,4 @@ The
.Fn strrchr
function
conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/string/strsep.3 b/lib/libc/string/strsep.3
index bc945f7a6cf9..e0fe12402aab 100644
--- a/lib/libc/string/strsep.3
+++ b/lib/libc/string/strsep.3
@@ -111,7 +111,7 @@ function.
While the
.Fn strtok
function should be preferred for portability reasons (it conforms to
-.St -ansiC )
+.St -isoC )
it is unable to handle empty fields, i.e. detect fields delimited by
two adjacent delimiter characters, or to be used for more than a single
string at a time.
diff --git a/lib/libc/string/strspn.3 b/lib/libc/string/strspn.3
index 41d70ce5f8cf..07e4158c43f8 100644
--- a/lib/libc/string/strspn.3
+++ b/lib/libc/string/strspn.3
@@ -77,4 +77,4 @@ The
.Fn strspn
function
conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/string/strstr.3 b/lib/libc/string/strstr.3
index f6b20caa3d0b..c29ddf14536e 100644
--- a/lib/libc/string/strstr.3
+++ b/lib/libc/string/strstr.3
@@ -86,4 +86,4 @@ The
.Fn strstr
function
conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/string/strtok.3 b/lib/libc/string/strtok.3
index cc8c1d2f6240..297c982ec6c2 100644
--- a/lib/libc/string/strtok.3
+++ b/lib/libc/string/strtok.3
@@ -54,7 +54,7 @@
.Dt STRTOK 3
.Os FreeBSD
.Sh NAME
-.Nm strtok, strtok_r
+.Nm strtok , strtok_r
.Nd string tokens
.Sh LIBRARY
.Lb libc
@@ -87,6 +87,9 @@ The separator string,
.Fa sep ,
must be supplied each time, and may change between calls.
.Pp
+The implementation will behave as if no library function calls
+.Fn strtok .
+.Pp
The
.Fn strtok_r
function is a reentrant version of
@@ -147,7 +150,7 @@ The
.Fn strtok
function
conforms to
-.St -ansiC .
+.St -isoC .
.Sh BUGS
The System V
.Fn strtok ,
@@ -162,7 +165,9 @@ Since this implementation always alters the next starting point,
such a sequence of calls would always return
.Dv NULL .
.Sh AUTHORS
-.An Wes Peters, Softweyr LLC: Aq wes@softweyr.com
+.An Wes Peters ,
+Softweyr LLC:
+.Aq wes@softweyr.com
.Pp
Based on the
.Fx 3.0
diff --git a/lib/libc/string/strxfrm.3 b/lib/libc/string/strxfrm.3
index 5e496587289e..617cf7c19c22 100644
--- a/lib/libc/string/strxfrm.3
+++ b/lib/libc/string/strxfrm.3
@@ -96,4 +96,4 @@ The
.Fn strxfrm
function
conforms to
-.St -ansiC .
+.St -isoC .
diff --git a/lib/libc/sys/aio_cancel.2 b/lib/libc/sys/aio_cancel.2
index dc55c84085c3..320e36f4c87c 100644
--- a/lib/libc/sys/aio_cancel.2
+++ b/lib/libc/sys/aio_cancel.2
@@ -46,13 +46,14 @@ If
.Fa iocb
is specified, only that specific asynchronous I/O request is cancelled.
.Pp
-Normal asynchronous notification occurs for cancelled requests. Requests
-complete with an error result of
+Normal asynchronous notification occurs for cancelled requests.
+Requests complete with an error result of
.Er ECANCELED .
.Sh RESTRICTIONS
The
.Fn aio_cancel
-function does not cancel asynchronous I/O requests for raw disk devices. The
+function does not cancel asynchronous I/O requests for raw disk devices.
+The
.Fn aio_cancel
function will always return
.Dv AIO_NOTCANCELED
@@ -76,7 +77,7 @@ All of the requests meeting the criteria have finished.
.Xr aio_read 2 ,
.Xr aio_return 2 ,
.Xr aio_suspend 2 ,
-.Xr aio_write 2 .
+.Xr aio_write 2
.Sh ERRORS
An error return from
.Fn aio_cancel
@@ -97,7 +98,7 @@ The
.Fn aio_cancel
function first appeared in
.Fx 3.0 .
-The first functional implemenation of
+The first functional implementation of
.Fn aio_cancel
appeared in
.Fx 4.0 .
diff --git a/lib/libc/sys/aio_error.2 b/lib/libc/sys/aio_error.2
index a204d474c6db..e27c973da812 100644
--- a/lib/libc/sys/aio_error.2
+++ b/lib/libc/sys/aio_error.2
@@ -78,7 +78,7 @@ does not reference an outstanding asynchronous I/O request.
.Xr aio_write 2 ,
.Xr fsync 2 ,
.Xr read 2 ,
-.Xr write 2 .
+.Xr write 2
.Sh STANDARDS
.Fn aio_error
is expected to conform to the
diff --git a/lib/libc/sys/aio_return.2 b/lib/libc/sys/aio_return.2
index a6bca22dfb7f..3477288bccee 100644
--- a/lib/libc/sys/aio_return.2
+++ b/lib/libc/sys/aio_return.2
@@ -71,7 +71,7 @@ to indicate the error condition.
.Xr aio_write 2 ,
.Xr fsync 2 ,
.Xr read 2 ,
-.Xr write 2 .
+.Xr write 2
.Sh ERRORS
The
.Fn aio_return
diff --git a/lib/libc/sys/aio_suspend.2 b/lib/libc/sys/aio_suspend.2
index 8d36c34879a6..333ad82e861b 100644
--- a/lib/libc/sys/aio_suspend.2
+++ b/lib/libc/sys/aio_suspend.2
@@ -72,7 +72,7 @@ to indicate the error, as enumerated below.
.Xr aio_error 2 ,
.Xr aio_read 2 ,
.Xr aio_suspend 2 ,
-.Xr aio_write 2 .
+.Xr aio_write 2
.Sh ERRORS
The
.Fn aio_suspend
diff --git a/lib/libc/sys/aio_waitcomplete.2 b/lib/libc/sys/aio_waitcomplete.2
index ccc91d6954c2..c554673a3e2c 100644
--- a/lib/libc/sys/aio_waitcomplete.2
+++ b/lib/libc/sys/aio_waitcomplete.2
@@ -35,27 +35,30 @@
.Sh SYNOPSIS
.Fd #include <aio.h>
.Ft int
-.Fn aio_waitcomplete "struct aiocb **iocbp, struct timeval *timeout"
+.Fn aio_waitcomplete "struct aiocb **iocbp" "struct timespec *timeout"
.Sh DESCRIPTION
The
.Fn aio_waitcomplete
-function waits for completion of an asynchronous I/O request. Upon completion,
+function waits for completion of an asynchronous I/O request.
+Upon completion,
.Fn aio_waitcomplete
returns the result of the function and sets
.Fa iocbp
-to point to the structure associated with the original request. If an
-asynchronous I/O request is completed before
+to point to the structure associated with the original request.
+If an asynchronous I/O request is completed before
.Fn aio_waitcomplete
is called, it returns immediately with the completed request.
.Pp
If
.Fa timeout
is a non-NULL pointer, it specifies a maximum interval to wait for a
-asynchronous I/O request to complete. If
+asynchronous I/O request to complete.
+If
.Fa timeout
is a NULL pointer,
.Fn aio_waitcomplete
-waits indefinitely. To effect a poll, the
+waits indefinitely.
+To effect a poll, the
.Fa timeout
argument should be non-NULL, pointing to a zero-valued timeval structure.
.Pp
@@ -70,8 +73,8 @@ should not be called for the control block returned in
.Sh RETURN VALUES
If an asynchronous I/O request has completed,
.Fa iocbp
-is set to point to the control block passed with the original request, and
-the status is returned as described in
+is set to point to the control block passed with the original request,
+and the status is returned as described in
.Xr read 2 ,
.Xr write 2 ,
or
@@ -82,8 +85,8 @@ returns
.Dv -1 ,
sets iocbp to
.Dv NULL
-and
-.Dv errno
+and sets
+.Va errno
to indicate the error condition.
.Sh ERRORS
The
@@ -114,7 +117,7 @@ completed.
.Xr aio_write 2 ,
.Xr fsync 2 ,
.Xr read 2 ,
-.Xr write 2 .
+.Xr write 2
.Sh STANDARDS
The
.Fn aio_waitcomplete
diff --git a/lib/libc/sys/brk.2 b/lib/libc/sys/brk.2
index 09072a4e1565..7f40e3417a27 100644
--- a/lib/libc/sys/brk.2
+++ b/lib/libc/sys/brk.2
@@ -99,11 +99,11 @@ beyond the
value returned from a call to
.Xr getrlimit 2 ,
e.g.\&
-.Dq etext + rlp\(->rlim_max.
+.Dq Va etext No + Va rlp\->rlim_max .
(See
.Xr end 3
for the definition of
-.Em etext ) .
+.Va etext ) .
.Sh RETURN VALUES
.Fn Brk
returns 0 if successful;
diff --git a/lib/libc/sys/execve.2 b/lib/libc/sys/execve.2
index 113e83be2b68..ccc4d663b667 100644
--- a/lib/libc/sys/execve.2
+++ b/lib/libc/sys/execve.2
@@ -58,11 +58,13 @@ An executable object file consists of an identifying header,
followed by pages of data representing the initial program (text)
and initialized data pages. Additional pages may be specified
by the header to be initialized with zero data; see
+.Xr elf 5
+and
.Xr a.out 5 .
.Pp
An interpreter file begins with a line of the form:
.Pp
-.Bd -filled -offset indent -compact
+.Bd -ragged -offset indent -compact
.Sy \&#!
.Em interpreter
.Bq Em arg
@@ -103,7 +105,7 @@ The argument
is also a pointer to a null-terminated array of
character pointers to null-terminated strings.
A pointer to this array is normally stored in the global variable
-.Va environ.
+.Va environ .
These strings pass information to the
new process that is not directly an argument to the command (see
.Xr environ 7 ) .
@@ -280,6 +282,8 @@ of a super-user as well.
.Xr execl 3 ,
.Xr exit 3 ,
.Xr sysctl 3 ,
+.Xr a.out 5 ,
+.Xr elf 5 ,
.Xr environ 7 ,
.Xr mount 8
.Sh HISTORY
diff --git a/lib/libc/sys/fcntl.2 b/lib/libc/sys/fcntl.2
index 49522c77c414..0b2ec8924d02 100644
--- a/lib/libc/sys/fcntl.2
+++ b/lib/libc/sys/fcntl.2
@@ -193,11 +193,11 @@ taken as a pointer to a
(see above).
.Dv F_SETLK
is used to establish shared (or read) locks
-.Dv (F_RDLCK)
+.Pq Dv F_RDLCK
or exclusive (or write) locks,
-.Dv (F_WRLCK) ,
+.Pq Dv F_WRLCK ,
as well as remove either type of lock
-.Dv (F_UNLCK) .
+.Pq Dv F_UNLCK .
If a shared or exclusive lock cannot be set,
.Fn fcntl
returns immediately with
@@ -392,11 +392,11 @@ The argument
is
.Dv F_SETLK ,
the type of lock
-.Fa (l_type)
+.Pq Fa l_type
is a shared lock
-.Dv (F_RDLCK)
+.Pq Dv F_RDLCK
or exclusive lock
-.Dv (F_WRLCK) ,
+.Pq Dv F_WRLCK ,
and the segment of a file to be locked is already
exclusive-locked by another process;
or the type is an exclusive lock and some portion of the
@@ -413,9 +413,9 @@ is
or
.Dv F_SETLKW ,
the type of lock
-.Fa (l_type)
+.Pq Fa l_type
is a shared lock
-.Dv (F_RDLCK) ,
+.Pq Dv F_RDLCK ,
and
.Fa fildes
is not a valid file descriptor open for reading.
@@ -427,9 +427,9 @@ is
or
.Dv F_SETLKW ,
the type of lock
-.Fa (l_type)
+.Pq Fa l_type
is an exclusive lock
-.Dv (F_WRLCK) ,
+.Pq Dv F_WRLCK ,
and
.Fa fildes
is not a valid file descriptor open for writing.
diff --git a/lib/libc/sys/fhopen.2 b/lib/libc/sys/fhopen.2
index 75af67f32357..dbe10a79275a 100644
--- a/lib/libc/sys/fhopen.2
+++ b/lib/libc/sys/fhopen.2
@@ -54,7 +54,7 @@
.Fn fhstatfs "const fhandle_t *fhp" "struct statfs *buf"
.Sh DESCRIPTION
These functions provide a means to access a file given the file handle
-.Fa fhp.
+.Fa fhp .
As this method bypasses directory access restrictions, these calls are
restricted to the superuser.
.Pp
diff --git a/lib/libc/sys/getdirentries.2 b/lib/libc/sys/getdirentries.2
index 4dab8a65f871..f883fec4cfe1 100644
--- a/lib/libc/sys/getdirentries.2
+++ b/lib/libc/sys/getdirentries.2
@@ -137,7 +137,8 @@ Alternatively, the current position pointer may be set and retrieved by
The current position pointer should only be set to a value returned by
.Xr lseek 2 ,
a value returned in the location pointed to by
-.Fa basep ( Ns Fn getdirentries
+.Fa basep
+.Pf ( Fn getdirentries
only)
or zero.
.Sh IMPLEMENTATION NOTES
diff --git a/lib/libc/sys/getlogin.2 b/lib/libc/sys/getlogin.2
index 023ea1d6de0b..c52bb2e2e1e1 100644
--- a/lib/libc/sys/getlogin.2
+++ b/lib/libc/sys/getlogin.2
@@ -86,8 +86,8 @@ is normally used only when a new session is being created on behalf
of the named user
(for example, at login time, or when a remote shell is invoked).
.Pp
-.Em NOTE:
-There is only one `login name' per `session .
+.Em NOTE :
+There is only one login name per session.
.Pp
It is
.Em CRITICALLY
@@ -107,9 +107,9 @@ which is an ideal way of detaching from a controlling terminal and
forking into the background.
.Pp
In particular, doing a
-.Fn ioctl ttyfd TIOCNOTTY ...
+.Fn ioctl ttyfd TIOCNOTTY ...\&
or
-.Fn setpgrp ...
+.Fn setpgrp ...\&
is
.Em NOT
sufficient.
@@ -190,12 +190,13 @@ function first appeared in
.Bx 4.4 .
The return value of
.Fn getlogin_r
-was changed from earlier versions of FreeBSD to be conformant with
-.St -iso9945-1 .
+was changed from earlier versions of
+.Fx
+to be conformant with
+.St -p1003.1-96 .
.Sh STANDARDS
.Fn getlogin
and
.Fn getlogin_r
conform to
-.St -iso9945-1 .
-
+.St -p1003.1-96 .
diff --git a/lib/libc/sys/getsockopt.2 b/lib/libc/sys/getsockopt.2
index dd6ae3a4a763..deb70b96d93c 100644
--- a/lib/libc/sys/getsockopt.2
+++ b/lib/libc/sys/getsockopt.2
@@ -191,7 +191,8 @@ are queued on socket and a
.Xr close 2
is performed.
If the socket promises reliable delivery of data and
-.Dv SO_LINGER is set,
+.Dv SO_LINGER
+is set,
the system will block the process on the
.Xr close 2
attempt until it is able to transmit the data or until it decides it
diff --git a/lib/libc/sys/kill.2 b/lib/libc/sys/kill.2
index 8ce5c71949d3..5a7c05cb355e 100644
--- a/lib/libc/sys/kill.2
+++ b/lib/libc/sys/kill.2
@@ -75,7 +75,7 @@ to any descendant of the current process.
.It \&If Fa pid No \&is greater than zero :
.Fa Sig
is sent to the process whose ID is equal to
-.Fa pid.
+.Fa pid .
.It \&If Fa pid No \&is zero :
.Fa Sig
is sent to all processes whose group ID is equal
diff --git a/lib/libc/sys/kldstat.2 b/lib/libc/sys/kldstat.2
index 988841120c2d..1187f6951bc8 100644
--- a/lib/libc/sys/kldstat.2
+++ b/lib/libc/sys/kldstat.2
@@ -79,8 +79,12 @@ The load address of the kld file.
The size of the file.
.El
.Sh RETURN VALUES
+The function
.Fn kldstat
-seems to always return 0.
+returns 0 on success.
+It returns -1 on failure, and sets
+.Va errno
+to indicate the error.
.Sh ERRORS
The information for the file referred to by
.Fa fileid
diff --git a/lib/libc/sys/listen.2 b/lib/libc/sys/listen.2
index 11f8fd2db65d..3a98629bf13a 100644
--- a/lib/libc/sys/listen.2
+++ b/lib/libc/sys/listen.2
@@ -60,7 +60,7 @@ The
call applies only to sockets of type
.Dv SOCK_STREAM
or
-.Dv SOCK_SEQPACKET.
+.Dv SOCK_SEQPACKET .
.Pp
The
.Fa backlog
@@ -76,15 +76,15 @@ the request may be ignored so that retries may succeed.
The
.Xr sysctl 3
MIB variable
-.Dq Li kern.ipc.somaxconn
+.Dq Va kern.ipc.somaxconn
specifies a hard limit on
.Fa backlog ;
-if a value greater than
-.Li kern.ipc.somaxconn
+if a value greater than
+.Va kern.ipc.somaxconn
or less than zero is specified,
.Fa backlog
is silently forced to
-.Li kern.ipc.somaxconn .
+.Va kern.ipc.somaxconn .
.Sh IMPLEMENTATION NOTES
.Pp
In the non-threaded library
diff --git a/lib/libc/sys/lseek.2 b/lib/libc/sys/lseek.2
index 5ca26cbb135c..5cc0f222240b 100644
--- a/lib/libc/sys/lseek.2
+++ b/lib/libc/sys/lseek.2
@@ -53,7 +53,7 @@ to the
argument
.Fa offset
according to the directive
-.Fa whence.
+.Fa whence .
The argument
.Fa fildes
must be an open
diff --git a/lib/libc/sys/madvise.2 b/lib/libc/sys/madvise.2
index 0fffc5665cad..4886d0225c49 100644
--- a/lib/libc/sys/madvise.2
+++ b/lib/libc/sys/madvise.2
@@ -154,7 +154,7 @@ arguments is not valid.
.Xr mincore 2 ,
.Xr mprotect 2 ,
.Xr msync 2 ,
-.Xr munmap 2 .
+.Xr munmap 2
.Sh HISTORY
The
.Fn madvise
diff --git a/lib/libc/sys/mmap.2 b/lib/libc/sys/mmap.2
index 53c4dac7f6d7..2c2c5799a512 100644
--- a/lib/libc/sys/mmap.2
+++ b/lib/libc/sys/mmap.2
@@ -37,14 +37,14 @@
.Os BSD 4
.Sh NAME
.Nm mmap
-.Nd map files or devices into memory
+.Nd allocate memory, or map files or devices into memory
.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
.Fd #include <sys/types.h>
.Fd #include <sys/mman.h>
.Ft void *
-.Fn mmap "void * addr" "size_t len" "int prot" "int flags" "int fd" "off_t offset"
+.Fn mmap "void *addr" "size_t len" "int prot" "int flags" "int fd" "off_t offset"
.Sh DESCRIPTION
The
.Fn mmap
@@ -81,13 +81,15 @@ argument by
.Em or Ns 'ing
the following values:
.Pp
-.Bl -tag -width MAP_FIXEDX
-.It Dv PROT_EXEC
-Pages may be executed.
+.Bl -tag -width PROT_WRITE -compact
+.It Dv PROT_NONE
+Pages may not be accessed.
.It Dv PROT_READ
Pages may be read.
.It Dv PROT_WRITE
Pages may be written.
+.It Dv PROT_EXEC
+Pages may be executed.
.El
.Pp
The
@@ -100,8 +102,7 @@ Sharing, mapping type and options are specified in the
argument by
.Em or Ns 'ing
the following values:
-.Pp
-.Bl -tag -width MAP_FIXEDX
+.Bl -tag -width MAP_HASSEMAPHORE
.It Dv MAP_ANON
Map anonymous memory not associated with any specific file.
The file descriptor used for creating
@@ -118,7 +119,9 @@ specified.
If the specified address cannot be used,
.Fn mmap
will fail.
-If MAP_FIXED is specified,
+If
+.Dv MAP_FIXED
+is specified,
.Fa addr
must be a multiple of the pagesize.
Use of this option is discouraged.
@@ -129,32 +132,8 @@ handling may be necessary.
Permit regions to be inherited across
.Xr execve 2
system calls.
-.It Dv MAP_PRIVATE
-Modifications are private.
-.It Dv MAP_SHARED
-Modifications are shared.
-.It Dv MAP_STACK
-This option is only available if your system has been compiled with
-VM_STACK defined when compiling the kernel.
-This is the default for
-i386 only.
-Consider adding -DVM_STACK to COPTFLAGS in your /etc/make.conf
-to enable this option for other architechures.
-MAP_STACK implies
-MAP_ANON, and
-.Fa offset
-of 0.
-.Fa fd
-must be -1 and
-.Fa prot
-must include at least PROT_READ and PROT_WRITE. This option creates
-a memory region that grows to at most
-.Fa len
-bytes in size, starting from the stack top and growing down. The
-stack top is the starting address returned by the call, plus
-.Fa len
-bytes. The bottom of the stack at maximum growth is the starting
-address returned by the call.
+.It Dv MAP_NOCORE
+Region is not included in a core file.
.It Dv MAP_NOSYNC
Causes data dirtied via this VM map to be flushed to physical media
only when necessary (usually by the pager) rather then gratuitously.
@@ -165,10 +144,43 @@ this option any VM pages you dirty may be flushed to disk every so often
(every 30-60 seconds usually) which can create performance problems if you
do not need that to occur (such as when you are using shared file-backed
mmap regions for IPC purposes). Note that VM/filesystem coherency is
-maintained whether you use MAP_NOSYNC or not. This option is not portable
-across UNIX platforms (yet), though some may implement the same behavior
+maintained whether you use
+.Dv MAP_NOSYNC
+or not. This option is not portable
+across
+.Ux
+platforms (yet), though some may implement the same behavior
by default.
.Pp
+.Em WARNING !
+Extending a file with
+.Xr ftruncate 2 ,
+thus creating a big hole, and then filling the hole by modifying a shared
+.Fn mmap
+can lead to severe file fragmentation.
+In order to avoid such fragmentation you should always pre-allocate the
+file's backing store by
+.Fn write Ns ing
+zero's into the newly extended area prior to modifying the area via your
+.Fn mmap .
+The fragmentation problem is especially sensitive to
+.Dv MAP_NOSYNC
+pages, because pages may be flushed to disk in a totally random order.
+.Pp
+The same applies when using
+.Dv MAP_NOSYNC
+to implement a file-based shared memory store.
+It is recommended that you create the backing store by
+.Fn write Ns ing
+zero's to the backing file rather then
+.Fn ftruncate Ns ing
+it.
+You can test file fragmentation by observing the KB/t (kilobytes per
+transfer) results from an
+.Dq Li iostat 1
+while reading a large file sequentially, e.g. using
+.Dq Li dd if=filename of=/dev/null bs=32k .
+.Pp
The
.Xr fsync 2
function will flush all dirty data and metadata associated with a file,
@@ -184,8 +196,44 @@ system call is obsolete since
implements a coherent filesystem buffer cache. However, it may be
used to associate dirty VM pages with filesystem buffers and thus cause
them to be flushed to physical media sooner rather then later.
-.It Dv MAP_NOCORE
-Region is not included in a core file.
+.It Dv MAP_PRIVATE
+Modifications are private.
+.It Dv MAP_SHARED
+Modifications are shared.
+.It Dv MAP_STACK
+This option is only available if your system has been compiled with
+.Dv VM_STACK
+defined when compiling the kernel.
+This is the default for
+i386 only.
+Consider adding
+.Li -DVM_STACK
+to
+.Va COPTFLAGS
+in your
+.Pa /etc/make.conf
+to enable this option for other architechures.
+.Dv MAP_STACK
+implies
+.Dv MAP_ANON ,
+and
+.Fa offset
+of 0.
+.Fa fd
+must be -1 and
+.Fa prot
+must include at least
+.Dv PROT_READ
+and
+.Dv PROT_WRITE .
+This option creates
+a memory region that grows to at most
+.Fa len
+bytes in size, starting from the stack top and growing down. The
+stack top is the starting address returned by the call, plus
+.Fa len
+bytes. The bottom of the stack at maximum growth is the starting
+address returned by the call.
.El
.Pp
The
@@ -205,7 +253,9 @@ should be done.
Upon successful completion,
.Fn mmap
returns a pointer to the mapped region.
-Otherwise, a value of MAP_FAILED is returned and
+Otherwise, a value of
+.Dv MAP_FAILED
+is returned and
.Va errno
is set to indicate the error.
.Sh ERRORS
@@ -255,17 +305,22 @@ has not been specified and
did not reference a regular or character special file.
.It Bq Er EINVAL
.Fa Offset
-was not page-aligned. (See BUGS below.)
+was not page-aligned.
+(See
+.Sx BUGS
+below.)
.It Bq Er ENOMEM
.Dv MAP_FIXED
was specified and the
.Fa addr
parameter wasn't available, or the system has reached the per-process mmap
-limit specified in the vm.max_proc_mmap sysctl.
+limit specified in the
+.Va vm.max_proc_mmap
+sysctl.
.Dv MAP_ANON
was specified and insufficient memory was available.
.El
-.Sh "SEE ALSO"
+.Sh SEE ALSO
.Xr madvise 2 ,
.Xr mincore 2 ,
.Xr mlock 2 ,
diff --git a/lib/libc/sys/ptrace.2 b/lib/libc/sys/ptrace.2
index 708f9ac44058..c91b2d1a5cee 100644
--- a/lib/libc/sys/ptrace.2
+++ b/lib/libc/sys/ptrace.2
@@ -54,9 +54,7 @@ that the process expects to be traced by its parent. All the other
arguments are ignored. (If the parent process does not expect to trace
the child, it will probably be rather confused by the results; once the
traced process stops, it cannot be made to continue except via
-.Eo \&
-.Fn ptrace
-.Ec \&.)
+.Fn ptrace . )
When a process has used this request and calls
.Xr execve 2
or any of the routines built on it
@@ -69,7 +67,7 @@ Also, any setuid or setgid bits on the executable being executed will
be ignored.
.It Dv PT_READ_I , Dv PT_READ_D
These requests read a single
-.Li int
+.Vt int
of data from the traced process' address space. Traditionally,
.Fn ptrace
has allowed for machines with distinct address spaces for instruction
@@ -99,12 +97,12 @@ except that they write rather than read. The
argument supplies the value to be written.
.It Dv PT_READ_U
This request reads an
-.Li int
+.Vt int
from the traced process' user structure. The
.Fa addr
argument specifies the location of the int relative to the base of the
user structure; it will usually be an integer value cast to
-.Li caddr_t
+.Vt caddr_t
either explicitly or via the presence of a prototype for
.Eo \&
.Fn ptrace
@@ -115,14 +113,14 @@ and
.Dv PT_READ_D ,
.Fa addr
must be aligned on an
-.Li int
+.Vt int
boundary. The value read is returned as the return value from
.Eo \&
.Fn ptrace
.Ec .
.It Dv PT_WRITE_U
This request writes an
-.Li int
+.Vt int
into the traced process' user structure.
.Fa addr
specifies the offset, just as for
@@ -138,7 +136,9 @@ The traced process continues execution.
.Fa addr
is an address specifying the place where execution is to be resumed (a
new value for the program counter), or
-.Li (caddr_t)1
+.Po
+.Vt caddr_t
+.Pc Ns 1
to indicate that execution is to pick up where it left off.
.Fa data
provides a signal number to be delivered to the traced process as it
@@ -180,7 +180,9 @@ are:
.Bl -tag -width 12n
.It Dv PT_GETREGS
This request reads the traced process' machine registers into the
-.Dq Li "struct reg"
+.Do
+.Vt "struct reg"
+.Dc
(defined in
.Aq Pa machine/reg.h )
pointed to by
@@ -189,7 +191,9 @@ pointed to by
This request is the converse of
.Dv PT_GETREGS ;
it loads the traced process' machine registers from the
-.Dq Li "struct reg"
+.Do
+.Vt "struct reg"
+.Dc
(defined in
.Aq Pa machine/reg.h )
pointed to by
@@ -197,7 +201,9 @@ pointed to by
.It Dv PT_GETFPREGS
This request reads the traced process' floating-point registers into
the
-.Dq Li "struct fpreg"
+.Do
+.Vt "struct fpreg"
+.Dc
(defined in
.Aq Pa machine/reg.h )
pointed to by
@@ -206,7 +212,9 @@ pointed to by
This request is the converse of
.Dv PT_GETFPREGS ;
it loads the traced process' floating-point registers from the
-.Dq Li "struct fpreg"
+.Do
+.Vt "struct fpreg"
+.Dc
(defined in
.Aq Pa machine/reg.h )
pointed to by
@@ -214,7 +222,9 @@ pointed to by
.It Dv PT_GETDBREGS
This request reads the traced process' debug registers into
the
-.Dq Li "struct dbreg"
+.Do
+.Vt "struct dbreg"
+.Dc
(defined in
.Aq Pa machine/reg.h )
pointed to by
@@ -223,7 +233,9 @@ pointed to by
This request is the converse of
.Dv PT_GETDBREGS ;
it loads the traced process' debug registers from the
-.Dq Li "struct dbreg"
+.Do
+.Vt "struct dbreg"
+.Dc
(defined in
.Aq Pa machine/reg.h )
pointed to by
@@ -265,7 +277,7 @@ to
or
.Dv PT_WRITE_U
was not
-.Li int Ns \&-aligned.
+.Vt int Ns \-aligned .
.It
The signal number (in
.Fa data )
diff --git a/lib/libc/sys/recv.2 b/lib/libc/sys/recv.2
index 88d7a4a3e2de..1c543fd9475f 100644
--- a/lib/libc/sys/recv.2
+++ b/lib/libc/sys/recv.2
@@ -210,7 +210,7 @@ Process credentials can also be passed as ancillary data for
domain sockets using a
.Fa cmsg_type
of
-.Dv SCM_CREDS.
+.Dv SCM_CREDS .
In this case,
.Fa cmsg_data
should be a structure of type
diff --git a/lib/libc/sys/select.2 b/lib/libc/sys/select.2
index 70d679b607d4..16e6be2111e0 100644
--- a/lib/libc/sys/select.2
+++ b/lib/libc/sys/select.2
@@ -186,10 +186,8 @@ reasons,
.Fn select
will always examine the first 256 descriptors.
.Sh BUGS
-.Fn select
-should probably return the time remaining from the original timeout,
-if any, by modifying the time value in place.
-This may be implemented in future versions of the system.
+.St -susv2
+allows systems to modify the original timeout in place.
Thus, it is unwise to assume that the timeout value will be unmodified
by the
.Fn select
diff --git a/lib/libc/sys/semget.2 b/lib/libc/sys/semget.2
index cdcd9644801a..dc22c0ac272f 100644
--- a/lib/libc/sys/semget.2
+++ b/lib/libc/sys/semget.2
@@ -84,13 +84,13 @@ parameter:
Read access for user.
.It Dv SEM_A
Alter access for user.
-.It Dv (SEM_R>>3)
+.It Dv ( SEM_R>>3 )
Read access for group.
-.It Dv (SEM_A>>3)
+.It Dv ( SEM_A>>3 )
Alter access for group.
-.It Dv (SEM_R>>6)
+.It Dv ( SEM_R>>6 )
Read access for other.
-.It Dv (SEM_A>>6)
+.It Dv ( SEM_A>>6 )
Alter access for other.
.El
.Pp
diff --git a/lib/libc/sys/sendfile.2 b/lib/libc/sys/sendfile.2
index 5619891c36ce..e9d17b862dc2 100644
--- a/lib/libc/sys/sendfile.2
+++ b/lib/libc/sys/sendfile.2
@@ -69,7 +69,7 @@ struct sf_hdtr {
The
.Fa headers
and
-.Fa tailers
+.Fa trailers
pointers, if non-NULL, point to arrays of struct iovec structures.
See the
.Fn writev
diff --git a/lib/libc/sys/setreuid.2 b/lib/libc/sys/setreuid.2
index e2309257dc0d..f50b94c6e69b 100644
--- a/lib/libc/sys/setreuid.2
+++ b/lib/libc/sys/setreuid.2
@@ -70,10 +70,7 @@ the standard
.Fn setuid
function is preferred.
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned. Otherwise,
-a value of -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std setreuid
.Sh ERRORS
.Bl -tag -width Er
.It Bq Er EPERM
diff --git a/lib/libc/sys/shmget.2 b/lib/libc/sys/shmget.2
index 88d3b4a4f582..05bc68cf66fe 100644
--- a/lib/libc/sys/shmget.2
+++ b/lib/libc/sys/shmget.2
@@ -82,13 +82,13 @@ parameter:
Read access for user.
.It Dv SHM_W
Write access for user.
-.It Dv (SHM_R>>3)
+.It Dv ( SHM_R>>3 )
Read access for group.
-.It Dv (SHM_W>>3)
+.It Dv ( SHM_W>>3 )
Write access for group.
-.It Dv (SHM_R>>6)
+.It Dv ( SHM_R>>6 )
Read access for other.
-.It Dv (SHM_W>>6)
+.It Dv ( SHM_W>>6 )
Write access for other.
.El
.\"
diff --git a/lib/libc/sys/socket.2 b/lib/libc/sys/socket.2
index 1cf4616b627e..7049bc102a7c 100644
--- a/lib/libc/sys/socket.2
+++ b/lib/libc/sys/socket.2
@@ -168,7 +168,7 @@ and
calls.
(Some protocol families, such as the Internet family,
support the notion of an
-.Dq implied connect,
+.Dq implied connect ,
which permits data to be sent piggybacked onto a connect operation by
using the
.Xr sendto 2
diff --git a/lib/libc/xdr/xdr.3 b/lib/libc/xdr/xdr.3
index 0b933bc3bb10..49266e5026c3 100644
--- a/lib/libc/xdr/xdr.3
+++ b/lib/libc/xdr/xdr.3
@@ -496,15 +496,15 @@ A filter primitive that translates between C
integers and their external representations.
This routine returns one if it succeeds, zero otherwise.
.Pp
-.Fd #ifdef _STDIO_H_
-.Fd /* XDR using stdio library */
+.It Li "#ifdef _STDIO_H_"
+.It Li "/* XDR using stdio library */"
.It Xo
.Ft void
.Xc
.It Xo
.Fn xdrstdio_create "XDR *xdrs" "FILE *file" "enum xdr_op op"
.Xc
-.Fd #endif
+.It Li "#endif"
.Pp
This routine initializes the
.Tn XDR