diff options
author | ru <ru@FreeBSD.org> | 2002-12-04 15:47:41 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2002-12-04 15:47:41 +0000 |
commit | 4e841ec498ecaf9abe161a8389a4caad8e92186f (patch) | |
tree | 967f2834a76a3c5003ca4c2e805545a1ddff9fb0 /lib/libc | |
parent | c052a718831f40e0a6e558fe7c6f9ea9c99865b6 (diff) | |
download | FreeBSD-src-4e841ec498ecaf9abe161a8389a4caad8e92186f.zip FreeBSD-src-4e841ec498ecaf9abe161a8389a4caad8e92186f.tar.gz |
mdoc(7) police: overhaul.
Approved by: re
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/check_utility_compat.3 | 24 | ||||
-rw-r--r-- | lib/libc/gen/fmtmsg.3 | 60 | ||||
-rw-r--r-- | lib/libc/gen/getcontext.3 | 30 | ||||
-rw-r--r-- | lib/libc/gen/makecontext.3 | 21 | ||||
-rw-r--r-- | lib/libc/gen/pselect.3 | 15 | ||||
-rw-r--r-- | lib/libc/gen/statvfs.3 | 30 | ||||
-rw-r--r-- | lib/libc/gen/ucontext.3 | 53 | ||||
-rw-r--r-- | lib/libc/gen/ulimit.3 | 8 |
8 files changed, 132 insertions, 109 deletions
diff --git a/lib/libc/gen/check_utility_compat.3 b/lib/libc/gen/check_utility_compat.3 index c84c5dd..53e5aa8 100644 --- a/lib/libc/gen/check_utility_compat.3 +++ b/lib/libc/gen/check_utility_compat.3 @@ -12,7 +12,7 @@ .\" no representations about the suitability of this software for any .\" purpose. It is provided "as is" without express or implied .\" warranty. -.\" +.\" .\" THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS .\" ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE, .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF @@ -29,9 +29,9 @@ .\" $FreeBSD$ .\" .Dd October 27, 2002 -.Dt CHECK_UTILITY_COMPAT 3 .Os -.Sh MAME +.Dt CHECK_UTILITY_COMPAT 3 +.Sh NAME .Nm check_utility_compat .Nd "determine whether a utility should be compatible" .Sh LIBRARY @@ -42,28 +42,28 @@ .Fn check_utility_compat "const char *utility" .Sh DESCRIPTION The -.Nm +.Fn check_utility_compat function checks whether .Fa utility should behave in a traditional -.Pq Fx 4.7 -compatible +.Pq Fx 4.7 Ns -compatible manner, or in accordance with .St -p1003.1-2001 . The configuration is given as a comma-separated list of utility names; if the list is present but empty, all supported utilities assume their most compatible mode. The -.Nm +.Fn check_utility_compat function first checks for an environment variable named .Ev _COMPAT_FreeBSD_4 . If that environment variable does not exist, then -.Nm +.Fn check_utility_compat will attempt to read the contents of a symbolic link named .Pa /etc/compat-FreeBSD-4-util . If no configuration is found, compatibility mode is disabled. .Sh RETURN VALUES The -.Nm +.Fn check_utility_compat function returns zero if .Fa utility should implement strict @@ -72,18 +72,18 @@ behavior, and nonzero otherwise. .Sh ERRORS No errors are detected. .Sh FILES -.Bl -tag -offset indent -width Pa +.Bl -tag -width ".Pa /etc/compat-FreeBSD-4-util" .It Pa /etc/compat-FreeBSD-4-util If present, a symbolic link whose expansion gives system-wide default settings for the -.Nm +.Fn check_utility_compat function. .El .Sh HISTORY The -.Nm +.Fn check_utility_compat function first appeared in .Fx 5.0 . -.Sh AUTHOR +.Sh AUTHORS This manual page was written by .An Garrett Wollman Aq wollman@FreeBSD.org . diff --git a/lib/libc/gen/fmtmsg.3 b/lib/libc/gen/fmtmsg.3 index 28fee2e..8ecd8aa 100644 --- a/lib/libc/gen/fmtmsg.3 +++ b/lib/libc/gen/fmtmsg.3 @@ -36,12 +36,15 @@ .Sh SYNOPSIS .In fmtmsg.h .Ft int -.Fn fmtmsg "long classification" "const char *label" "int severity" "const char *text" "const char *action" "const char *tag" +.Fo fmtmsg +.Fa "long classification" "const char *label" "int severity" +.Fa "const char *text" "const char *action" "const char *tag" +.Fc .Sh DESCRIPTION The .Fn fmtmsg function displays a detailed diagnostic message, based on -the supplied augments, to +the supplied arguments, to .Em stderr and/or the system console. .Pp @@ -56,18 +59,17 @@ The Output classification group is an exception since both and .Dv MM_CONSOLE may be specified. -.Pp -Output -.Bl -tag -offset indent -width MM_CONSOLE +.Bl -tag -width indent +.It Output +.Bl -tag -width ".Dv MM_CONSOLE" .It Dv MM_PRINT Output should take place on .Em stderr . .It Dv MM_CONSOLE Output should take place on the system console. .El -.Pp -Source of Condition (Major) -.Bl -tag -offset indent -width MM_CONSOLE +.It "Source of Condition (Major)" +.Bl -tag -width ".Dv MM_CONSOLE" .It Dv MM_HARD The source of the condition is hardware related. .It Dv MM_SOFT @@ -75,9 +77,8 @@ The source of the condition is software related. .It Dv MM_FIRM The source of the condition is firmware related. .El -.Pp -Source of Condition (Minor) -.Bl -tag -offset indent -width MM_CONSOLE +.It "Source of Condition (Minor)" +.Bl -tag -width ".Dv MM_CONSOLE" .It Dv MM_APPL The condition was detected at the application level. .It Dv MM_UTIL @@ -85,14 +86,14 @@ The condition was detected at the utility level. .It Dv MM_OPSYS The condition was detected at the operating system level. .El -.Pp -Status -.Bl -tag -offset indent -width MM_CONSOLE +.It Status +.Bl -tag -width ".Dv MM_CONSOLE" .It Dv MM_RECOVER The application can recover from the condition. .It Dv MM_NRECOV The application is unable to recover from the condition. .El +.El .Pp Alternatively, the .Dv MM_NULLMC @@ -102,7 +103,7 @@ The .Fa label argument indicates the source of the message. It is made up of two fields separated by a colon -.Pq \&: . +.Pq Ql \&: . The first field can be up to 10 bytes, and the second field can be up to 14 bytes. The @@ -113,7 +114,7 @@ The .Fa severity argument identifies the importance of the condition. One of the following manifest constants should be used for this argument. -.Bl -tag -offset indent -width MM_WARNING +.Bl -tag -offset indent -width ".Dv MM_WARNING" .It Dv MM_HALT The application has confronted a serious fault and is halting. .It Dv MM_ERROR @@ -141,8 +142,8 @@ argument details how the error-recovery process should begin. Upon output, .Fn fmtmsg will prefix -.Qq TO FIX: -to the begin of the +.Qq Li "TO FIX:" +to the beginning of the .Fa action argument. The @@ -156,7 +157,7 @@ This usually includes the .Fa label and a unique identifying number. An example tag is -.Qq BSD:ls:168 . +.Qq Li BSD:ls:168 . The .Dv MM_NULLTAG manifest constant may be used to specify no tag. @@ -178,24 +179,27 @@ to indicate output to and the system console failed. .Sh ENVIRONMENT The -.Va MSGVERB -.Pq message verbosity +.Ev MSGVERB +(message verbosity) environment variable specifies which arguments to .Fn fmtmsg will be output to .Em stderr , and in which order. -.Va MSGVERB +.Ev MSGVERB should be a colon -.Pq \&: +.Pq Ql \&: separated list of identifiers. -Valid identifiers include: label, severity, text, action, and tag. +Valid identifiers include: +.Li label , severity , text , action , +and +.Li tag . If invalid identifiers are specified or incorrectly separated, the default message verbosity and ordering will be used. The default ordering is equivalent to a -.Va MSGVERB +.Ev MSGVERB with a value of -.Qq label:severity:text:action:tag . +.Qq Li label:severity:text:action:tag . .Sh EXAMPLES The code: .Bd -literal -offset indent @@ -213,9 +217,9 @@ to .Em stderr . .Pp The same code, with -.Va MSGVERB +.Ev MSGVERB set to -.Qq "text:severity:action:tag" , +.Qq Li "text:severity:action:tag" , produces: .Bd -literal -offset indent illegal option -- z: ERROR diff --git a/lib/libc/gen/getcontext.3 b/lib/libc/gen/getcontext.3 index de1e4a4..789b232 100644 --- a/lib/libc/gen/getcontext.3 +++ b/lib/libc/gen/getcontext.3 @@ -1,11 +1,11 @@ .\" Copyright (c) 2002 Packet Design, LLC. .\" All rights reserved. -.\" +.\" .\" Subject to the following obligations and disclaimer of warranty, .\" use and redistribution of this software, in source or object code .\" forms, with or without modifications are expressly permitted by .\" Packet Design; provided, however, that: -.\" +.\" .\" (i) Any and all reproductions of the source or object code .\" must include the copyright notice above and the following .\" disclaimer of warranties; and @@ -13,7 +13,7 @@ .\" Packet Design trademarks, including the mark "PACKET DESIGN" .\" on advertising, endorsements, or otherwise except as such .\" appears in the above copyright notice or in the software. -.\" +.\" .\" THIS SOFTWARE IS BEING PROVIDED BY PACKET DESIGN "AS IS", AND .\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, PACKET DESIGN MAKES NO .\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING @@ -35,12 +35,11 @@ .\" .\" $FreeBSD$ .\" -.Dd Sep 10, 2002 +.Dd September 10, 2002 .Dt GETCONTEXT 3 .Os .Sh NAME -.Nm getcontext -.Nm setcontext +.Nm getcontext , setcontext .Nd get and set user thread context .Sh LIBRARY .Lb libc @@ -51,24 +50,28 @@ .Ft int .Fn setcontext "const ucontext_t *ucp" .Sh DESCRIPTION +The .Fn getcontext +function saves the current thread's execution context in the structure pointed to by -.Fa "ucp" . +.Fa ucp . This saved context may then later be restored by calling .Fn setcontext . .Pp +The .Fn setcontext +function makes a previously saved thread context the current thread context, i.e., the current context is lost and .Fn setcontext does not return. Instead, execution continues in the context specified by -.Fa "ucp" , +.Fa ucp , which must have been previously initialized by a call to .Fn setcontext , -.Fn makecontext , +.Xr makecontext 3 , or by being passed as an argument to a signal handler (see -.Xr sigaction 2) . +.Xr sigaction 2 ) . .Pp If .Fa ucp @@ -81,9 +84,9 @@ call had just returned (again). If .Fa ucp was initialized by -.Fn makecontext , +.Xr makecontext 3 , execution continues with the invocation of the function specified to -.Fn makecontext . +.Xr makecontext 3 . When that function returns, .Fa "ucp->uc_link" determines what happens next: @@ -100,13 +103,12 @@ If .Fa ucp was initialized by the invocation of a signal handler, execution continues at the point the thread was interrupted by the signal. -.Ed .Sh RETURN VALUES If successful, .Fn getcontext returns zero and .Fn setcontext -does not return; otherwise -1 is returned. +does not return; otherwise \-1 is returned. .Sh ERRORS No errors are defined for .Fn getcontext diff --git a/lib/libc/gen/makecontext.3 b/lib/libc/gen/makecontext.3 index 05159bc..ff56cbb 100644 --- a/lib/libc/gen/makecontext.3 +++ b/lib/libc/gen/makecontext.3 @@ -1,11 +1,11 @@ .\" Copyright (c) 2002 Packet Design, LLC. .\" All rights reserved. -.\" +.\" .\" Subject to the following obligations and disclaimer of warranty, .\" use and redistribution of this software, in source or object code .\" forms, with or without modifications are expressly permitted by .\" Packet Design; provided, however, that: -.\" +.\" .\" (i) Any and all reproductions of the source or object code .\" must include the copyright notice above and the following .\" disclaimer of warranties; and @@ -13,7 +13,7 @@ .\" Packet Design trademarks, including the mark "PACKET DESIGN" .\" on advertising, endorsements, or otherwise except as such .\" appears in the above copyright notice or in the software. -.\" +.\" .\" THIS SOFTWARE IS BEING PROVIDED BY PACKET DESIGN "AS IS", AND .\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, PACKET DESIGN MAKES NO .\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING @@ -35,19 +35,22 @@ .\" .\" $FreeBSD$ .\" -.Dd Sep 10, 2002 +.Dd September 10, 2002 .Dt MAKECONTEXT 3 .Os .Sh NAME -.Nm makecontext -.Nm swapcontext +.Nm makecontext , swapcontext .Nd modify and exchange user thread contexts .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In ucontext.h .Ft void -.Fn makecontext "ucontext_t *ucp" "void (*func)()" "int argc" "..." +.Fo makecontext +.Fa "ucontext_t *ucp" +.Fa "void \*[lp]*func\*[rp]\*[lp]void\*[rp]" +.Fa "int argc" ... +.Fc .Ft int .Fn swapcontext "ucontext_t *oucp" "const ucontext_t *ucp" .Sh DESCRIPTION @@ -55,7 +58,7 @@ modifies the user thread context pointed to by .Fa ucp , which must have previously been initialized by a call to -.Fn getcontext +.Xr getcontext 3 and had a stack allocated for it. The context is modified so that it will continue execution by invoking .Fn func @@ -90,7 +93,7 @@ the currently active context. If successful, .Fn swapcontext returns zero; -otherwise -1 is returned and +otherwise \-1 is returned and the global variable .Va errno is set appropriately. .Sh ERRORS diff --git a/lib/libc/gen/pselect.3 b/lib/libc/gen/pselect.3 index d09524c..27c0b02 100644 --- a/lib/libc/gen/pselect.3 +++ b/lib/libc/gen/pselect.3 @@ -12,7 +12,7 @@ .\" no representations about the suitability of this software for any .\" purpose. It is provided "as is" without express or implied .\" warranty. -.\" +.\" .\" THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS .\" ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE, .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF @@ -39,7 +39,14 @@ .Sh SYNOPSIS .In sys/select.h .Ft int -.Fn pselect "int nfds" "fd_set * restrict readfds" "fd_set * restrict writefds" "fd_set * restrict exceptfds" "const struct timespec * restrict timeout" "const sigset_t * restrict newsigmask" +.Fo pselect +.Fa "int nfds" +.Fa "fd_set * restrict readfds" +.Fa "fd_set * restrict writefds" +.Fa "fd_set * restrict exceptfds" +.Fa "const struct timespec * restrict timeout" +.Fa "const sigset_t * restrict newsigmask" +.Fc .Sh DESCRIPTION The .Fn pselect @@ -48,9 +55,7 @@ function was introduced by as a slightly stronger version of .Xr select 2 . The -.Fa nfds , -.Fa readfds , -.Fa writefds , +.Fa nfds , readfds , writefds , and .Fa exceptfds arguments are all identical to the analogous arguments of diff --git a/lib/libc/gen/statvfs.3 b/lib/libc/gen/statvfs.3 index d15b160..8544595 100644 --- a/lib/libc/gen/statvfs.3 +++ b/lib/libc/gen/statvfs.3 @@ -12,7 +12,7 @@ .\" no representations about the suitability of this software for any .\" purpose. It is provided "as is" without express or implied .\" warranty. -.\" +.\" .\" THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS .\" ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE, .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF @@ -59,7 +59,7 @@ file on the filesystem in which they are interested. The .Vt statvfs structure contains the following members: -.Bl -tag -offset indent -width "f_namemax" +.Bl -tag -offset indent -width ".Va f_namemax" .It Va f_namemax The maximum length in bytes of a file name on this filesystem. Applications should use @@ -87,18 +87,16 @@ Flags describing mount options for this filesystem; see below. In addition, there are three members of type .Vt fsfilcnt_t , which represent counts of file serial numbers -.Pq Em i.e. , No inodes ; -these are named -.Va f_files , -.Va f_favail , +.Em ( i.e. , +inodes); these are named +.Va f_files , f_favail , and .Va f_ffree , and represent the number of file serial numbers which exist in total, are available to unprivileged processes, and are available to privileged processes, respectively. Likewise, the members -.Va f_blocks , -.Va f_bavail , +.Va f_blocks , f_bavail , and .Va f_bfree (all of type @@ -108,7 +106,7 @@ represent the respective allocation-block counts. There are two flags defined for the .Va f_flag member: -.Bl -tag -offset indent -width "ST_NOSUID" +.Bl -tag -offset indent -width ".Dv ST_NOSUID" .It Dv ST_RDONLY The filesystem is mounted read-only. .It Dv ST_NOSUID @@ -141,7 +139,7 @@ and functions may fail for any of the reasons documented for .Xr statfs 2 or -.Xr fstatfs 2 +.Xr fstatfs 2 and .Xr pathconf 3 or @@ -175,11 +173,15 @@ is provided by the underlying filesystem, subject to the limitations of the specified data types. .Sh HISTORY The -.Nm -function first appeared in +.Fn statvfs +and +.Fn fstatvfs +functions first appeared in .Fx 5.0 . .Sh AUTHORS The -.Nm -function and this manual page were written by +.Fn statvfs +and +.Fn fstatvfs +functions and this manual page were written by .An Garrett Wollman Aq wollman@FreeBSD.org . diff --git a/lib/libc/gen/ucontext.3 b/lib/libc/gen/ucontext.3 index f4fe86f..0f167f2 100644 --- a/lib/libc/gen/ucontext.3 +++ b/lib/libc/gen/ucontext.3 @@ -1,11 +1,11 @@ .\" Copyright (c) 2002 Packet Design, LLC. .\" All rights reserved. -.\" +.\" .\" Subject to the following obligations and disclaimer of warranty, .\" use and redistribution of this software, in source or object code .\" forms, with or without modifications are expressly permitted by .\" Packet Design; provided, however, that: -.\" +.\" .\" (i) Any and all reproductions of the source or object code .\" must include the copyright notice above and the following .\" disclaimer of warranties; and @@ -13,7 +13,7 @@ .\" Packet Design trademarks, including the mark "PACKET DESIGN" .\" on advertising, endorsements, or otherwise except as such .\" appears in the above copyright notice or in the software. -.\" +.\" .\" THIS SOFTWARE IS BEING PROVIDED BY PACKET DESIGN "AS IS", AND .\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, PACKET DESIGN MAKES NO .\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Sep 10, 2002 +.Dd September 10, 2002 .Dt UCONTEXT 3 .Os .Sh NAME @@ -56,42 +56,51 @@ blocked signals. The .Vt ucontext_t structure contains at least these fields: -.Bl -tag -compact -offset 3n -width "mcontext_t uc_mcontext" .Pp -.It "ucontext_t *uc_link" -Context to assume when this one returns -.It "sigset_t uc_sigmask" -Signals being blocked -.It "stack_t uc_stack" -Stack area -.It "mcontext_t uc_mcontext" -Saved registers +.Bl -tag -width ".Va mcontext_t\ \ uc_mcontext" -offset 3n -compact +.It Va "ucontext_t *uc_link" +context to assume when this one returns +.It Va "sigset_t uc_sigmask" +signals being blocked +.It Va "stack_t uc_stack" +stack area +.It Va "mcontext_t uc_mcontext" +saved registers .El .Pp The -.Fa uc_link +.Va uc_link field points to the context to resume when this context's entry point function returns. If -.Fa uc_link +.Va uc_link is equal to .Dv NULL , then the process exits when this context returns. .Pp The -.Fa uc_mcontext +.Va uc_mcontext field is machine-dependent and should be treated as opaque by portable applications. .Pp The following functions are defined to manipulate .Vt ucontext_t structures: -.Bd -literal -offset xxx -int getcontext(ucontext_t *); -int setcontext(const ucontext_t *); -void makecontext(ucontext_t *, void (*)(void), int, ...); -int swapcontext(ucontext_t *, const ucontext_t *); -.Ed +.Pp +.Bl -item -offset 3n -compact +.It +.Ft int +.Fn getcontext "ucontext_t *" ; +.It +.Ft int +.Fn setcontext "const ucontext_t *" ; +.It +.Ft void +.Fn makecontext "ucontext_t *" "void \*[lp]*\*[rp]\*[lp]void\*[rp]" int ... ; +.It +.Ft int +.Fn swapcontext "ucontext_t *" "const ucontext_t *" ; +.El .Sh SEE ALSO .Xr sigaltstack 2 , .Xr getcontext 3 , diff --git a/lib/libc/gen/ulimit.3 b/lib/libc/gen/ulimit.3 index 5451b4b..537d437 100644 --- a/lib/libc/gen/ulimit.3 +++ b/lib/libc/gen/ulimit.3 @@ -41,14 +41,12 @@ The function will get and set process limits. Currently this is limited to the maximum file size. The -.Va cmd +.Fa cmd parameter is one of the following: -.Pp -.Bl -tag -offset -width UL_GETSIZE +.Bl -tag -width ".Dv UL_GETSIZE" .It Dv UL_GETSIZE will return the maximum file size in units of 512 blocks of the current process. -.Pp .It Dv UL_SETSIZE will attempt to set the maximum file size of the current process and its children with the second argument expressed as a long. @@ -57,7 +55,7 @@ process and its children with the second argument expressed as a long. Upon successful completion, .Fn ulimit returns the value requested; -otherwise the value -1 is returned and +otherwise the value \-1 is returned and the global variable .Ar errno is set to indicate the error. .Sh ERRORS |