1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-18 02:19:39 +00:00

mdoc(7) police: "The .Fn function".

This commit is contained in:
Ruslan Ermilov 2002-12-18 10:13:54 +00:00
parent b92cc9b878
commit 95f4226b27
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=108030
33 changed files with 141 additions and 35 deletions

View File

@ -78,7 +78,9 @@ The path component to be returned was larger than
.Dv MAXPATHLEN .
.El
.Sh WARNINGS
The
.Fn basename
function
returns a pointer to internal static storage space that will be overwritten
by subsequent calls.
.Sh SEE ALSO

View File

@ -68,7 +68,9 @@ file
.Aq Pa stdio.h )
bytes long.
.Pp
The
.Fn ctermid_r
function
provides the same functionality as
.Fn ctermid
except that if

View File

@ -78,7 +78,7 @@ in a human-readable format.
.Sh HISTORY
The
.Fn devname
function call appeared in
function appeared in
.Bx 4.4 .
.Sh BUGS
The

View File

@ -95,7 +95,9 @@ upon reaching the end of the directory or detecting an invalid
.Fn seekdir
operation.
.Pp
The
.Fn readdir_r
function
provides the same functionality as
.Fn readdir ,
but the caller must provide a directory
@ -108,7 +110,9 @@ upon reaching the end of the directory
.Fa result
is set to
.Dv NULL .
The
.Fn readdir_r
function
returns 0 on success or an error number to indicate failure.
.Pp
The

View File

@ -78,7 +78,9 @@ The path component to be returned was larger than
.Dv MAXPATHLEN .
.El
.Sh WARNINGS
The
.Fn dirname
function
returns a pointer to internal static storage space that will be overwritten
by subsequent calls (each function has its own separate storage).
.Pp

View File

@ -38,7 +38,9 @@
.Ft int
.Fn dladdr "const void *addr" "Dl_info *info"
.Sh DESCRIPTION
.Nm
The
.Fn dladdr
function
queries the dynamic linker for information about the shared object
containing the address
.Fa addr .
@ -67,13 +69,15 @@ The value of the symbol returned in
.Li dli_sname .
.El
.Pp
.Nm
The
.Fn dladdr
function
is available only in dynamically linked programs.
.Sh ERRORS
If a mapped shared object containing
.Fa addr
cannot be found,
.Nm
.Fn dladdr
returns 0.
In that case, a message detailing the failure can be retrieved by
calling
@ -85,7 +89,7 @@ On success, a non-zero value is returned.
.Xr dlopen 3
.Sh HISTORY
The
.Nm
.Fn dladdr
function first appeared in the Solaris operating system.
.Sh BUGS
This implementation is bug-compatible with the Solaris

View File

@ -45,7 +45,7 @@ In current releases it still exists, but only as a stub which does nothing.
.Ef
.Pp
Threads packages can call
.Nm
.Fn dllockinit
at initialization time to register locking functions for the dynamic
linker to use. This enables the dynamic linker to prevent multiple
threads from entering its critical sections simultaneously.
@ -58,7 +58,7 @@ dynamic linker will pass it to the
function when creating the locks it needs. When the dynamic linker
is permanently finished using the locking functions (e.g., if the
program makes a subsequent call to
.Nm
.Fn dllockinit
to register new locking functions) it will call
.Fa context_destroy
to destroy the context.
@ -89,7 +89,7 @@ parameter specifies a function to destroy the context. It may be
if the context does not need to be destroyed.
.Pp
Until
.Nm
.Fn dllockinit
is called, the dynamic linker protects its critical sections using
a default locking mechanism which works by blocking the
.Dv SIGVTALRM ,
@ -100,9 +100,9 @@ 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
.Nm
.Fn dllockinit
can restore the default locking by calling
.Nm
.Fn dllockinit
with all arguments
.Dv NULL .
.Sh SEE ALSO
@ -110,6 +110,6 @@ with all arguments
.Xr signal 3
.Sh HISTORY
The
.Nm
.Fn dllockinit
function first appeared in
.Fx 4.0 .

View File

@ -60,7 +60,9 @@ program's address space, to obtain the address bindings of symbols
defined by such
objects, and to remove such objects when their use is no longer required.
.Pp
The
.Fn dlopen
function
provides access to the shared object in
.Fa path ,
returning a descriptor that can be used for later
@ -141,7 +143,9 @@ fails, it returns a null pointer, and sets an error condition which may
be interrogated with
.Fn dlerror .
.Pp
The
.Fn dlsym
function
returns the address binding of the symbol described in the null-terminated
character string
.Fa symbol ,
@ -225,17 +229,23 @@ interface, below, should be used, since
.Fn getpid
is a function and not a data object.)
.Pp
The
.Fn dlsym
function
returns a null pointer if the symbol cannot be found, and sets an error
condition which may be queried with
.Fn dlerror .
.Pp
The
.Fn dlfunc
function
implements all of the behavior of
.Fn dlsym ,
but has a return type which can be cast to a function pointer without
triggering compiler diagnostics.
.Fn ( dlsym
(The
.Fn dlsym
function
returns a data pointer; in the C standard, conversions between
data and function pointer types are undefined.
Some compilers and
@ -246,7 +256,9 @@ The precise return type of
is unspecified; applications must cast it to an appropriate function pointer
type.
.Pp
The
.Fn dlerror
function
returns a null-terminated character string describing the last error that
occurred during a call to
.Fn dlopen ,
@ -266,7 +278,9 @@ to
where the second call follows the first immediately, the second call
will always return a null pointer.
.Pp
The
.Fn dlclose
function
deletes a reference to the shared object referenced by
.Fa handle .
If the reference count drops to 0, the object is removed from the
@ -306,12 +320,16 @@ still the case when using the (obsolete)
.Fl aout
option to the C language compiler.
.Sh ERRORS
The
.Fn dlopen ,
.Fn dlsym ,
and
.Fn dlfunc
functions
return a null pointer in the event of errors.
The
.Fn dlclose
function
returns 0 on success, or -1 if an error occurred.
Whenever an error has been detected, a message detailing it can be
retrieved via a call to

View File

@ -203,11 +203,13 @@ will be set to indicate the error.
The shell.
.El
.Sh ERRORS
.Fn Execl ,
The
.Fn execl ,
.Fn execle ,
.Fn execlp
and
.Fn execvp
functions
may fail and set
.Va errno
for any of the errors specified for the library functions
@ -215,9 +217,11 @@ for any of the errors specified for the library functions
and
.Xr malloc 3 .
.Pp
.Fn Exect
The
.Fn exect
and
.Fn execv
functions
may fail and set
.Va errno
for any of the errors specified for the library function
@ -286,11 +290,13 @@ and the unusual error
The behaviour was changed to match the behaviour of
.Xr sh 1 .
.Sh STANDARDS
.Fn Execl ,
The
.Fn execl ,
.Fn execv ,
.Fn execle ,
.Fn execlp
and
.Fn execvp
functions
conform to
.St -p1003.1-88 .

View File

@ -110,7 +110,7 @@ leading
if it immediately follows a slash.
.It Dv FNM_LEADING_DIR
Ignore
.Nm /*
.Dq Li /*
rest after successful
.Fa pattern
matching.

View File

@ -68,5 +68,5 @@ is returned instead of the real boot file.
.Sh HISTORY
The
.Fn getbootfile
function call appeared in
function appeared in
.Fx 2.0 .

View File

@ -48,7 +48,9 @@
.Ft int
.Fn setdomainname "const char *name" "int namelen"
.Sh DESCRIPTION
.Fn Getdomainname
The
.Fn getdomainname
function
returns the standard domain name for the current processor, as
previously set by
.Fn setdomainname .
@ -59,7 +61,9 @@ specifies the size of the
array. The returned name is null-terminated unless insufficient
space is provided.
.Pp
.Fn Setdomainname
The
.Fn setdomainname
function
sets the domain name of the host machine to be
.Fa name ,
which has length
@ -94,5 +98,5 @@ characters, currently 256.
.Sh HISTORY
The
.Fn getdomainname
function call appeared in
function appeared in
.Bx 4.2 .

View File

@ -196,7 +196,9 @@ and
.Fn setgrent
are fairly useless in a networked environment and should be
avoided, if possible.
The
.Fn getgrent
function
makes no attempt to suppress duplicate information if multiple
sources are specified in
.Xr nsswitch.conf 5 .

View File

@ -48,7 +48,9 @@
.Ft int
.Fn sethostname "const char *name" "int namelen"
.Sh DESCRIPTION
.Fn Gethostname
The
.Fn gethostname
function
returns the standard host name for the current processor, as
previously set by
.Fn sethostname .
@ -59,7 +61,9 @@ specifies the size of the
array. The returned name is null-terminated unless insufficient
space is provided.
.Pp
.Fn Sethostname
The
.Fn sethostname
function
sets the name of the host machine to be
.Fa name ,
which has length
@ -95,5 +99,5 @@ This includes the trailing
.Sh HISTORY
The
.Fn gethostname
function call appeared in
function appeared in
.Bx 4.2 .

View File

@ -85,7 +85,9 @@ If
is called with a different netgroup than the previous call, an implicit
.Fn endnetgrent
is implied.
.Fn Setnetgrent
The
.Fn setnetgrent
function
also sets the offset to the first member of the netgroup.
.Pp
The function

View File

@ -37,7 +37,9 @@
.Ft int
.Fn getobjformat "char *buf" "size_t bufsize" "int *argcp" "char **argv"
.Sh DESCRIPTION
The
.Fn getobjformat
function
queries several sources to determine the preferred object file
format, and copies its name into a buffer provided by the caller.
.Pp

View File

@ -45,7 +45,9 @@
.Ft int
.Fn getpagesize void
.Sh DESCRIPTION
.Fn Getpagesize
The
.Fn getpagesize
function
returns the number of bytes in a page.
Page granularity is the granularity of many of the memory
management calls.
@ -59,5 +61,5 @@ hardware page size.
.Sh HISTORY
The
.Fn getpagesze
function call appeared in
function appeared in
.Bx 4.2 .

View File

@ -95,7 +95,9 @@ socket option.
.Sh RETURN VALUES
.Rv -std getpeereid
.Sh ERRORS
The
.Fn getpeereid
function
fails if:
.Bl -tag -width Er
.It Bq Er EBADF

View File

@ -212,7 +212,9 @@ and
.Fn setpwent
are fairly useless in a networked environment and should be
avoided, if possible.
The
.Fn getpwent
function
makes no attempt to suppress duplicate information if multiple
sources are specified in
.Xr nsswitch.conf 5 .

View File

@ -114,10 +114,14 @@ loaded, or non-zero otherwise. It should only be called in the
following circumstances:
.Bl -enum
.It
The
.Fn getvfsbyname
function
has been called and returned a non-zero value.
.It
The
.Fn vfsisloadable
function
has been called and returned a non-zero value.
.El
.Pp

View File

@ -171,6 +171,7 @@ locked region is unlocked would cause a deadlock and fails with an
.Er EDEADLK
error.
.Pp
The
.Fn lockf ,
.Xr fcntl 2
and
@ -182,7 +183,9 @@ Blocking on a section is interrupted by any signal.
.Rv -std lockf
In the case of a failure, existing locks are not changed.
.Sh ERRORS
The
.Fn lockf
function
will fail if:
.Bl -tag -width Er
.It Bq Er EAGAIN

View File

@ -54,7 +54,9 @@
.Ft int
.Fn swapcontext "ucontext_t *oucp" "const ucontext_t *ucp"
.Sh DESCRIPTION
The
.Fn makecontext
function
modifies the user thread context pointed to by
.Fa ucp ,
which must have previously been initialized by a call to
@ -83,7 +85,9 @@ otherwise,
.Fn setcontext "ucp->uc_link"
is implicitly invoked.
.Pp
The
.Fn swapcontext
function
saves the current thread context in
.Fa "*oucp"
and makes
@ -97,7 +101,9 @@ otherwise \-1 is returned and the global variable
.Va errno
is set appropriately.
.Sh ERRORS
The
.Fn swapcontext
function
will fail if:
.Bl -tag -width Er
.It Bq Er ENOMEM

View File

@ -168,7 +168,9 @@ or
.Sh RETURN VALUES
.Rv -std msgctl
.Sh ERRORS
The
.Fn msgctl
function
will fail if:
.Bl -tag -width Er
.It Bq Er EPERM

View File

@ -46,7 +46,9 @@
.Ft int
.Fn msgget "key_t key" "int msgflg"
.Sh DESCRIPTION
The
.Fn msgget
function
returns the message queue identifier associated with
.Fa key .
A message queue identifier is a unique integer greater than zero.

View File

@ -159,7 +159,9 @@ Otherwise, -1 is returned, and
.Va errno
set to indicate the error.
.Sh ERRORS
The
.Fn msgrcv
function
will fail if:
.Bl -tag -width Er
.It Bq Er EINVAL

View File

@ -123,7 +123,9 @@ is set to the current time.
.Sh RETURN VALUES
.Rv -std msgsnd
.Sh ERRORS
The
.Fn msgsnd
function
will fail if:
.Bl -tag -width Er
.It Bq Er EINVAL

View File

@ -117,11 +117,11 @@ function conforms to
.St -p1003.1-2001 .
.Sh HISTORY
The
.Nm
.Fn pselect
function first appeared in
.Fx 5.0 .
.Sh AUTHORS
The
.Nm
.Fn pselect
function and this manual page were written by
.An Garrett Wollman Aq wollman@FreeBSD.org .

View File

@ -65,33 +65,41 @@ r(n) is called the seed of the random number generator.
For all the six generator routines described next, the first
computational step is to perform a single iteration of the algorithm.
.Pp
The
.Fn drand48
and
.Fn erand48
functions
return values of type double.
The full 48 bits of r(n+1) are
loaded into the mantissa of the returned value, with the exponent set
such that the values produced lie in the interval [0.0, 1.0).
.Pp
The
.Fn lrand48
and
.Fn nrand48
functions
return values of type long in the range
[0, 2**31-1]. The high-order (31) bits of
r(n+1) are loaded into the lower bits of the returned value, with
the topmost (sign) bit set to zero.
.Pp
The
.Fn mrand48
and
.Fn jrand48
functions
return values of type long in the range
[-2**31, 2**31-1]. The high-order (32) bits of
r(n+1) are loaded into the returned value.
.Pp
The
.Fn drand48 ,
.Fn lrand48 ,
and
.Fn mrand48
functions
use an internal buffer to store r(n). For these functions
the initial value of r(0) = 0x1234abcd330e = 20017429951246.
.Pp
@ -106,7 +114,9 @@ holds the least significant bits.
.Pp
All functions share the same multiplicand and addend.
.Pp
The
.Fn srand48
function
is used to initialize the internal buffer r(n) of
.Fn drand48 ,
.Fn lrand48 ,
@ -117,7 +127,9 @@ of r(n), with the lower 16 bits of r(n) arbitrarily being set to 0x330e.
Additionally, the constant multiplicand and addend of the algorithm are
reset to the default values given above.
.Pp
The
.Fn seed48
function
also initializes the internal buffer r(n) of
.Fn drand48 ,
.Fn lrand48 ,
@ -128,7 +140,9 @@ where the zeroth member specifies the lowest bits.
Again,
the constant multiplicand and addend of the algorithm are
reset to the default values given above.
The
.Fn seed48
function
returns a pointer to an array of 3 shorts which contains the old seed.
This array is statically allocated, thus its contents are lost after
each new call to

View File

@ -60,7 +60,9 @@ are read into the provided buffer
Any additional
characters and the terminating newline (or return) character are discarded.
.Pp
The
.Fn readpassphrase
function
takes the following optional
.Fa flags :
.Pp
@ -137,7 +139,9 @@ if (compare(transform(passbuf), epass) != 0)
memset(passbuf, 0, sizeof(passbuf));
.Ed
.Sh SIGNALS
The
.Fn readpassphrase
function
will catch the following signals:
.Pp
.Bl -tag -compact

View File

@ -38,7 +38,9 @@
.Ft int
.Fn rfork_thread "int flags" "void *stack" "int (*func)(void *arg)" "void *arg"
.Sh DESCRIPTION
The
.Fn rfork_thread
function
is a helper function for
.Xr rfork 2 .
It arranges for a new process to be created and the child process will
@ -73,5 +75,5 @@ for error return codes.
.Sh HISTORY
The
.Fn rfork_thread
function call first appeared in
function first appeared in
.Fx 4.3 .

View File

@ -65,7 +65,9 @@ setproctitle("talking to %s", inet_ntoa(addr));
.Xr kvm_getargv 3 ,
.Xr printf 3
.Sh STANDARDS
The
.Fn setproctitle
function
is implicitly non-standard. Other methods of causing the
.Xr ps 1
command line to change, including copying over the argv[0] string are
@ -86,7 +88,9 @@ including
and
.Bsx .
.Sh HISTORY
The
.Fn setproctitle
function
first appeared in
.Fx 2.2 .
Other operating systems have

View File

@ -50,7 +50,7 @@
or in
.Fx Ns 's
equivalent but easier to read typedef'd version:
.Ft typedef "void \*(lp*sig_t\*(rp \*(lpint\*(rp"
.Ft typedef "void \*(lp*sig_t\*(rp \*(lpint\*(rp" ;
.Ft sig_t
.Fn signal "int sig" "sig_t func"
.Sh DESCRIPTION
@ -211,7 +211,9 @@ Otherwise, SIG_ERR is returned and the global variable
.Va errno
is set to indicate the error.
.Sh ERRORS
.Fn Signal
The
.Fn signal
function
will fail and no action will take place if one of the
following occur:
.Bl -tag -width Er

View File

@ -233,18 +233,19 @@ Each time it runs,
gets the list of debugging variables from the kernel and
displays their current values.
The system defines twenty
.Ns ( Va struct ctldebug )
.Pq Vt "struct ctldebug"
variables named
.Nm debug0
.Va debug0
through
.Nm debug19 .
.Va debug19 .
They are declared as separate variables so that they can be
individually initialized at the location of their associated variable.
The loader prevents multiple use of the same variable by issuing errors
if a variable is initialized in more than one place.
For example, to export the variable
.Nm dospecialcheck
.Va dospecialcheck
as a debugging variable, the following declaration would be used:
.Pp
.Bd -literal -offset indent -compact
int dospecialcheck = 1;
struct ctldebug debug5 = { "dospecialcheck", &dospecialcheck };