summaryrefslogtreecommitdiff
path: root/share/man/man3
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>1998-11-25 04:33:46 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>1998-11-25 04:33:46 +0000
commit9baa9119493335c80ca32188459fe1929c86194f (patch)
tree287fd141913ade8f9c225503ae2424ea8448ebbb /share/man/man3
parent79ddf2564e94d41fa10ea72aa2139b5c36a89ec9 (diff)
share/man/man3 man page repairs
Diffstat (limited to 'share/man/man3')
-rw-r--r--share/man/man3/assert.32
-rw-r--r--share/man/man3/bitstring.334
-rw-r--r--share/man/man3/dlfcn.36
-rw-r--r--share/man/man3/intro.316
-rw-r--r--share/man/man3/queue.3154
-rw-r--r--share/man/man3/stdarg.315
6 files changed, 117 insertions, 110 deletions
diff --git a/share/man/man3/assert.3 b/share/man/man3/assert.3
index e09cfc8587a..672ac75df0a 100644
--- a/share/man/man3/assert.3
+++ b/share/man/man3/assert.3
@@ -91,6 +91,6 @@ macro conforms to
.St -ansiC .
.Sh HISTORY
An
-.Nm assert
+.Fn assert
macro appeared in
.At v6 .
diff --git a/share/man/man3/bitstring.3 b/share/man/man3/bitstring.3
index 696c1a25339..ccd2db6d100 100644
--- a/share/man/man3/bitstring.3
+++ b/share/man/man3/bitstring.3
@@ -54,8 +54,8 @@
.Fd #include <bitstring.h>
.Ft bitstr_t *
.Fn bit_alloc "int nbits"
-.Fn bit_decl "bit_str name" "int nbits"
.Fn bit_clear "bit_str name" "int bit"
+.Fn bit_decl "bit_str name" "int nbits"
.Fn bit_ffc "bit_str name" "int nbits" "int *value"
.Fn bit_ffs "bit_str name" "int nbits" "int *value"
.Fn bit_nclear "bit_str name" "int start" "int stop"
@@ -66,46 +66,46 @@
.Sh DESCRIPTION
These macros operate on strings of bits.
.Pp
-The macro
+The
.Fn bit_alloc
-returns a pointer of type
-.Dq Fa "bitstr_t *"
+macro returns a pointer of type
+.Fa "bitstr_t *"
to sufficient space to store
.Fa nbits
bits, or
.Dv NULL
if no space is available.
.Pp
-The macro
+The
.Fn bit_decl
-allocates sufficient space to store
+macro allocates sufficient space to store
.Fa nbits
bits on the stack.
.Pp
-The macro
+The
.Fn bitstr_size
-returns the number of elements of type
+macro returns the number of elements of type
.Fa bitstr_t
necessary to store
.Fa nbits
bits.
This is useful for copying bit strings.
.Pp
-The macros
+The
.Fn bit_clear
and
.Fn bit_set
-clear or set the zero-based numbered bit
+macros clear or set the zero-based numbered bit
.Fa bit ,
in the bit string
.Ar name .
.Pp
The
-.Fn bit_nset
-and
.Fn bit_nclear
+and
+.Fn bit_nset
macros
-set or clear the zero-based numbered bits from
+clear or set the zero-based numbered bits from
.Fa start
to
.Fa stop
@@ -134,9 +134,9 @@ If no bits are set, the location referenced by
.Fa value
is set to \-1.
.Pp
-The macro
+The
.Fn bit_ffc
-stores in the location referenced by
+macro stores in the location referenced by
.Fa value
the zero-based number of the first bit not set in the array of
.Fa nbits
@@ -177,7 +177,5 @@ make_lpr_available()
.Sh SEE ALSO
.Xr malloc 3
.Sh HISTORY
-The
-.Nm bitstring
-functions first appeared in
+The bit-string functions first appeared in
.Bx 4.4 .
diff --git a/share/man/man3/dlfcn.3 b/share/man/man3/dlfcn.3
index ef4bce965eb..0c68130f416 100644
--- a/share/man/man3/dlfcn.3
+++ b/share/man/man3/dlfcn.3
@@ -53,11 +53,11 @@
.Sh DESCRIPTION
These functions provide an interface to the run-time linker
.Xr ld.so .
-They allow new shared objects to be loaded into the process's address space
+They allow new shared objects to be loaded into a process's address space
under program control.
The
.Fn dlopen
-function takes a name of a shared object as the first argument. The
+function takes a name of a shared object as its first argument. The
shared object is mapped into the address space, relocated and its external
references are resolved in the same way as is done with the implicitly loaded
shared libraries at program startup. The argument can either be an absolute
@@ -70,7 +70,7 @@ pathname or it can be of the form
in which case the same library search rules apply that are used for
.Dq intrinsic
shared library searches.
-The second argument has currently no effect, but should be set to
+The second argument currently has no effect, but should be set to
.Dv DL_LAZY
for future compatibility.
.Fn dlopen
diff --git a/share/man/man3/intro.3 b/share/man/man3/intro.3
index e2d60546e5f..e82a5ab6310 100644
--- a/share/man/man3/intro.3
+++ b/share/man/man3/intro.3
@@ -141,22 +141,22 @@ The library for
.Sh FILES
.Bl -tag -width /usr/lib/libm_p.a -compact
.It Pa /usr/lib/libc.a
-the C library
+C library
.It Pa /usr/lib/libm.a
-the math library
+math library
.It Pa /usr/lib/libc_p.a
-the C library compiled for profiling
+C library compiled for profiling
.It Pa /usr/lib/libm_p.a
-the math library compiled for profiling
+math library compiled for profiling
.El
.Sh SEE ALSO
-.Xr stdio 3 ,
-.Xr math 3 ,
-.Xr intro 2 ,
.Xr cc 1 ,
.Xr ld 1 ,
.Xr nm 1 ,
-.Xr pthreads 3
+.Xr intro 2 ,
+.Xr math 3 ,
+.Xr pthreads 3 ,
+.Xr stdio 3
.\" .Sh LIST OF FUNCTIONS
.\" .Bl -column "strncasecmpxxx" "system"
.\" .Sy Name Description
diff --git a/share/man/man3/queue.3 b/share/man/man3/queue.3
index b089c00761f..17866ba68ef 100644
--- a/share/man/man3/queue.3
+++ b/share/man/man3/queue.3
@@ -93,11 +93,12 @@
These macros define and operate on three types of data structures:
lists, tail queues, and circular queues.
All three structures support the following functionality:
+.Pp
.Bl -enum -compact -offset indent
.It
Insertion of a new entry at the head of the list.
.It
-Insertion of a new entry before or after any element in the list.
+Insertion of a new entry before or after any list element.
.It
Removal of any entry in the list.
.It
@@ -108,11 +109,13 @@ Lists are the simplest of the three data structures and support
only the above functionality.
.Pp
Tail queues add the following functionality:
-.Bl -enum -compact -offset indent
+.Bl -enum -offset indent
.It
-Entries can be added at the end of a list.
+Entries can be added to the end of a list.
.El
+.Pp
However:
+.Pp
.Bl -enum -compact -offset indent
.It
All list insertions and removals, except insertion before another element, must
@@ -125,13 +128,16 @@ than lists.
.El
.Pp
Circular queues add the following functionality:
+.Pp
.Bl -enum -compact -offset indent
.It
-Entries can be added at the end of a list.
+Entries can be added to the end of a list.
.It
They may be traversed backwards, from tail to head.
.El
+.Pp
However:
+.Pp
.Bl -enum -compact -offset indent
.It
All list insertions and removals must specify the head of the list.
@@ -158,15 +164,15 @@ The argument
.Fa HEADNAME
is the name of a user defined structure that must be declared
using the macros
-.Li LIST_HEAD ,
-.Li TAILQ_HEAD ,
+.Fn LIST_HEAD ,
+.Fn TAILQ_HEAD ,
or
-.Li CIRCLEQ_HEAD .
+.Fn CIRCLEQ_HEAD .
See the examples below for further explanation of how these
macros are used.
.Sh LISTS
A list is headed by a structure defined by the
-.Nm LIST_HEAD
+.Fn LIST_HEAD
macro.
This structure contains a single pointer to the first element
on the list.
@@ -197,39 +203,39 @@ and
.Li headp
are user selectable.)
.Pp
-The macro
-.Nm LIST_ENTRY
-declares a structure that connects the elements in
+The
+.Fn LIST_ENTRY
+macro declares a structure that connects the elements in
the list.
.Pp
-The macro
-.Nm LIST_INIT
-initializes the list referenced by
+The
+.Fn LIST_INIT
+macro initializes the list referenced by
.Fa head .
.Pp
-The macro
-.Nm LIST_INSERT_HEAD
-inserts the new element
+The
+.Fn LIST_INSERT_HEAD
+macro inserts the new element
.Fa elm
at the head of the list.
.Pp
-The macro
-.Nm LIST_INSERT_AFTER
-inserts the new element
+The
+.Fn LIST_INSERT_AFTER
+macro inserts the new element
.Fa elm
after the element
.Fa listelm .
.Pp
-The macro
-.Nm LIST_INSERT_BEFORE
-inserts the new element
+The
+.Fn LIST_INSERT_BEFORE
+macro inserts the new element
.Fa elm
before the element
.Fa listelm .
.Pp
-The macro
-.Nm LIST_REMOVE
-removes the element
+The
+.Fn LIST_REMOVE
+macro removes the element
.Fa elm
from the list.
.Sh LIST EXAMPLE
@@ -261,7 +267,7 @@ while (head.lh_first != NULL) /* Delete. */
.Ed
.Sh TAIL QUEUES
A tail queue is headed by a structure defined by the
-.Nm TAILQ_HEAD
+.Fn TAILQ_HEAD
macro.
This structure contains a pair of pointers,
one to the first element in the tail queue and the other to
@@ -279,9 +285,9 @@ TAILQ_HEAD(HEADNAME, TYPE) head;
.Ed
.sp
where
-.Li HEADNAME
+.Fa HEADNAME
is the name of the structure to be defined, and
-.Li TYPE
+.Fa TYPE
is the type of the elements to be linked into the tail queue.
A pointer to the head of the tail queue can later be declared as:
.Bd -literal -offset indent
@@ -294,45 +300,45 @@ and
.Li headp
are user selectable.)
.Pp
-The macro
-.Nm TAILQ_ENTRY
-declares a structure that connects the elements in
+The
+.Fn TAILQ_ENTRY
+macro declares a structure that connects the elements in
the tail queue.
.Pp
-The macro
-.Nm TAILQ_INIT
-initializes the tail queue referenced by
+The
+.Fn TAILQ_INIT
+macro initializes the tail queue referenced by
.Fa head .
.Pp
-The macro
-.Nm TAILQ_INSERT_HEAD
-inserts the new element
+The
+.Fn TAILQ_INSERT_HEAD
+macro inserts the new element
.Fa elm
at the head of the tail queue.
.Pp
-The macro
-.Nm TAILQ_INSERT_TAIL
-inserts the new element
+The
+.Fn TAILQ_INSERT_TAIL
+macro inserts the new element
.Fa elm
at the end of the tail queue.
.Pp
-The macro
-.Nm TAILQ_INSERT_AFTER
-inserts the new element
+The
+.Fn TAILQ_INSERT_AFTER
+macro inserts the new element
.Fa elm
after the element
.Fa listelm .
.Pp
-The macro
-.Nm TAILQ_INSERT_BEFORE
-inserts the new element
+The
+.Fn TAILQ_INSERT_BEFORE
+macro inserts the new element
.Fa elm
before the element
.Fa listelm .
.Pp
-The macro
-.Nm TAILQ_REMOVE
-removes the element
+The
+.Fn TAILQ_REMOVE
+macro removes the element
.Fa elm
from the tail queue.
.Sh TAIL QUEUE EXAMPLE
@@ -367,7 +373,7 @@ while (head.tqh_first != NULL)
.Ed
.Sh CIRCULAR QUEUES
A circular queue is headed by a structure defined by the
-.Nm CIRCLEQ_HEAD
+.Fn CIRCLEQ_HEAD
macro.
This structure contains a pair of pointers,
one to the first element in the circular queue and the other to the
@@ -385,9 +391,9 @@ CIRCLEQ_HEAD(HEADNAME, TYPE) head;
.Ed
.sp
where
-.Li HEADNAME
+.Fa HEADNAME
is the name of the structure to be defined, and
-.Li TYPE
+.Fa TYPE
is the type of the elements to be linked into the circular queue.
A pointer to the head of the circular queue can later be declared as:
.Bd -literal -offset indent
@@ -400,45 +406,45 @@ and
.Li headp
are user selectable.)
.Pp
-The macro
-.Nm CIRCLEQ_ENTRY
-declares a structure that connects the elements in
+The
+.Fn CIRCLEQ_ENTRY
+macro declares a structure that connects the elements in
the circular queue.
.Pp
-The macro
-.Nm CIRCLEQ_INIT
-initializes the circular queue referenced by
+The
+.Fn CIRCLEQ_INIT
+macro initializes the circular queue referenced by
.Fa head .
.Pp
-The macro
-.Nm CIRCLEQ_INSERT_HEAD
-inserts the new element
+The
+.Fn CIRCLEQ_INSERT_HEAD
+macro inserts the new element
.Fa elm
at the head of the circular queue.
.Pp
-The macro
-.Nm CIRCLEQ_INSERT_TAIL
-inserts the new element
+The
+.Fn CIRCLEQ_INSERT_TAIL
+macro inserts the new element
.Fa elm
at the end of the circular queue.
.Pp
-The macro
-.Nm CIRCLEQ_INSERT_AFTER
-inserts the new element
+The
+.Fn CIRCLEQ_INSERT_AFTER
+macro inserts the new element
.Fa elm
after the element
.Fa listelm .
.Pp
-The macro
-.Nm CIRCLEQ_INSERT_BEFORE
-inserts the new element
+The
+.Fn CIRCLEQ_INSERT_BEFORE
+macro inserts the new element
.Fa elm
before the element
.Fa listelm .
.Pp
-The macro
-.Nm CIRCLEQ_REMOVE
-removes the element
+The
+.Fn CIRCLEQ_REMOVE
+macro removes the element
.Fa elm
from the circular queue.
.Sh CIRCULAR QUEUE EXAMPLE
diff --git a/share/man/man3/stdarg.3 b/share/man/man3/stdarg.3
index a0582655dd1..7e31ef36758 100644
--- a/share/man/man3/stdarg.3
+++ b/share/man/man3/stdarg.3
@@ -41,7 +41,9 @@
.Dt STDARG 3
.Os
.Sh NAME
-.Nm stdarg
+.Nm va_start ,
+.Nm va_arg ,
+.Nm va_end
.Nd variable argument lists
.Sh SYNOPSIS
.Fd #include <stdarg.h>
@@ -83,12 +85,12 @@ and must be called first.
The parameter
.Fa last
is the name of the last parameter before the variable argument list,
-i.e. the last parameter of which the calling function knows the type.
+i.e., the last parameter of which the calling function knows the type.
.Pp
Because the address of this parameter is used in the
.Fn va_start
-macro, it should not be declared as a register variable, or as a
-function or an array type.
+macro, it should not be declared as a register variable, nor as a
+function, nor an array type.
.Pp
The
.Fn va_start
@@ -113,7 +115,8 @@ The parameter
.Fa type
is a type name specified so that the type of a pointer to an
object that has the specified type can be obtained simply by
-adding a *
+adding a
+.Dq \&*
to
.Fa type .
.Pp
@@ -143,7 +146,7 @@ The
macro returns no value.
.Sh EXAMPLES
The function
-.Em foo
+.Fn foo
takes a string of format characters and prints out the argument
associated with each format character based on the type.
.Bd -literal -offset indent