diff options
author | Ruslan Ermilov <ru@FreeBSD.org> | 2001-02-01 16:38:02 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@FreeBSD.org> | 2001-02-01 16:38:02 +0000 |
commit | d0353b836e88609b9400851d32e0aa6645ff9be3 (patch) | |
tree | aa7324a24491215cb462cf95382795f1649d10b6 /share/man/man9 | |
parent | 1f56a9494c2616ff6794d652f38eff0f7f95bbb9 (diff) |
mdoc(7) police: split punctuation characters + misc fixes.
Notes
Notes:
svn path=/head/; revision=71895
Diffstat (limited to 'share/man/man9')
-rw-r--r-- | share/man/man9/CONDSPLASSERT.9 | 16 | ||||
-rw-r--r-- | share/man/man9/SPLASSERT.9 | 16 | ||||
-rw-r--r-- | share/man/man9/VOP_ACCESS.9 | 5 | ||||
-rw-r--r-- | share/man/man9/devclass.9 | 2 | ||||
-rw-r--r-- | share/man/man9/device.9 | 2 | ||||
-rw-r--r-- | share/man/man9/ifnet.9 | 32 | ||||
-rw-r--r-- | share/man/man9/mbuf.9 | 5 | ||||
-rw-r--r-- | share/man/man9/mi_switch.9 | 3 | ||||
-rw-r--r-- | share/man/man9/microseq.9 | 2 | ||||
-rw-r--r-- | share/man/man9/panic.9 | 2 | ||||
-rw-r--r-- | share/man/man9/pfil.9 | 2 | ||||
-rw-r--r-- | share/man/man9/rtentry.9 | 88 | ||||
-rw-r--r-- | share/man/man9/sleep.9 | 2 | ||||
-rw-r--r-- | share/man/man9/spl.9 | 10 | ||||
-rw-r--r-- | share/man/man9/style.9 | 68 | ||||
-rw-r--r-- | share/man/man9/sysctl_add_oid.9 | 2 | ||||
-rw-r--r-- | share/man/man9/time.9 | 2 |
17 files changed, 156 insertions, 103 deletions
diff --git a/share/man/man9/CONDSPLASSERT.9 b/share/man/man9/CONDSPLASSERT.9 index 24df1986ee43..7d54128ec908 100644 --- a/share/man/man9/CONDSPLASSERT.9 +++ b/share/man/man9/CONDSPLASSERT.9 @@ -38,29 +38,31 @@ .Cd options INVARIANT_SUPPORT .Fn CONDSPLASSERT condition level "const char *msg" .Sh DESCRIPTION -.Sy This API is deprecated. -.Sy Use mutexes to protect data structures instead. -.Sy See +.Bf -symbolic +This API is deprecated. +Use mutexes to protect data structures instead. +See .Xr mutex 9 -.Sy for more information. +for more information. +.Ef .Pp In a kernel compiled with both "options INVARIANTS" and "options INVARIANT_SUPPORT", the .Fn CONDSPLASSERT macro compares the current spl level of the kernel with the spl -.Ar level +.Fa level specified in the macro .Fn CONDSPLASSERT if the specified condition is met. If the specified -.Ar level +.Fa level is not active .Fn CONDSPLASSERT calls the .Fn KASSERT macro with the -.Ar msg, +.Fa msg , terminating the running system. .Pp In a kernel that does not have both "options INVARIANTS" diff --git a/share/man/man9/SPLASSERT.9 b/share/man/man9/SPLASSERT.9 index 8396db1cfa61..e6a95bf3bdf6 100644 --- a/share/man/man9/SPLASSERT.9 +++ b/share/man/man9/SPLASSERT.9 @@ -39,28 +39,30 @@ .Cd options INVARIANT_SUPPORT .Fn SPLASSERT level "const char *msg" .Sh DESCRIPTION -.Sy This API is deprecated. -.Sy Use mutexes to protect data structures instead. -.Sy See +.Bf -symbolic +This API is deprecated. +Use mutexes to protect data structures instead. +See .Xr mutex 9 -.Sy for more information. +for more information. +.Ef .Pp In a kernel compiled with both "options INVARIANTS" and "options INVARIANT_SUPPORT", the .Fn SPLASSERT macro compares the current spl level of the kernel with the spl -.Ar level +.Fa level specified in the macro .Fn SPLASSERT . If the specified -.Ar level +.Fa level is not active .Fn SPLASSERT calls the .Fn KASSERT macro with the -.Ar msg, +.Fa msg , terminating the running system. .Pp In a kernel that does not have both "options INVARIANTS" diff --git a/share/man/man9/VOP_ACCESS.9 b/share/man/man9/VOP_ACCESS.9 index edf8141e7137..00b308ca9858 100644 --- a/share/man/man9/VOP_ACCESS.9 +++ b/share/man/man9/VOP_ACCESS.9 @@ -60,8 +60,9 @@ The .Fa mode is a mask which can contain .Dv VREAD , -.Dv VWRITE or -.Dv VEXEC. +.Dv VWRITE +or +.Dv VEXEC . .Sh LOCKS The vnode will be locked on entry and should remain locked on return. .Sh RETURN VALUES diff --git a/share/man/man9/devclass.9 b/share/man/man9/devclass.9 index 4f0eec6659af..8539e34eb114 100644 --- a/share/man/man9/devclass.9 +++ b/share/man/man9/devclass.9 @@ -35,7 +35,7 @@ .Nm devclass .Nd object representing a class of devices .Sh SYNOPSIS -.Dv typedef struct devclass *devclass_t; +.Vt typedef struct devclass *devclass_t ; .Sh DESCRIPTION .Pp The diff --git a/share/man/man9/device.9 b/share/man/man9/device.9 index f1e502f43aaa..1cb15248591f 100644 --- a/share/man/man9/device.9 +++ b/share/man/man9/device.9 @@ -35,7 +35,7 @@ .Nm device .Nd an abstract representation of a device .Sh SYNOPSIS -.Dv typedef struct device *device_t; +.Vt typedef struct device *device_t ; .Sh DESCRIPTION .Pp The device object represents a piece of hardware attached to the diff --git a/share/man/man9/ifnet.9 b/share/man/man9/ifnet.9 index 1555538e805d..71c38eef4f3e 100644 --- a/share/man/man9/ifnet.9 +++ b/share/man/man9/ifnet.9 @@ -89,35 +89,35 @@ .\" .Ss "struct ifnet member functions" .Ft int -.Fn (*if_output) "struct ifnet *ifp" "struct mbuf *m" "struct sockaddr *dst" "struct rtentry *rt" +.Fn \*(lp*if_output\*(rp "struct ifnet *ifp" "struct mbuf *m" "struct sockaddr *dst" "struct rtentry *rt" .Ft void -.Fn (*if_start) "struct ifnet *ifp" +.Fn \*(lp*if_start\*(rp "struct ifnet *ifp" .Ft int -.Fn (*if_dont) "struct ifnet *ifp" +.Fn \*(lp*if_dont\*(rp "struct ifnet *ifp" .Ft int -.Fn (*if_ioctl) "struct ifnet *ifp" "int cmd" "caddr_t data" +.Fn \*(lp*if_ioctl\*(rp "struct ifnet *ifp" "int cmd" "caddr_t data" .Ft void -.Fn (*if_watchdog) "struct ifnet *ifp" +.Fn \*(lp*if_watchdog\*(rp "struct ifnet *ifp" .Ft int -.Fn (*if_poll_recv) "struct ifnet *ifp" "int *quotap" +.Fn \*(lp*if_poll_recv\*(rp "struct ifnet *ifp" "int *quotap" .Ft int -.Fn (*if_poll_xmit) "struct ifnet *ifp" "int *quotap" +.Fn \*(lp*if_poll_xmit\*(rp "struct ifnet *ifp" "int *quotap" .Ft void -.Fn (*if_poll_inttrn) "struct ifnet *ifp" +.Fn \*(lp*if_poll_inttrn\*(rp "struct ifnet *ifp" .Ft void -.Fn (*if_poll_slowinput) "struct ifnet *ifp" "struct mbuf *m" +.Fn \*(lp*if_poll_slowinput\*(rp "struct ifnet *ifp" "struct mbuf *m" .Ft void -.Fn (*if_init) "void *if_softc" +.Fn \*(lp*if_init\*(rp "void *if_softc" .Ft int -.Fn (*if_resolvemulti) "struct ifnet *ifp" "struct sockaddr **retsa" "struct sockaddr *addr" +.Fn \*(lp*if_resolvemulti\*(rp "struct ifnet *ifp" "struct sockaddr **retsa" "struct sockaddr *addr" .Ss "struct ifaddr member function" .Ft void -.Fn (*ifa_rtrequest) "int cmd" "struct rtentry *rt" "struct sockaddr *dst" +.Fn \*(lp*ifa_rtrequest\*(rp "int cmd" "struct rtentry *rt" "struct sockaddr *dst" .Ss "Global variables" -.Fd extern struct ifnethead ifnet; -.Fd extern struct ifaddr \&**ifnet_addrs; -.Fd extern int if_index; -.Fd extern int ifqmaxlen; +.Vt extern struct ifnethead ifnet ; +.Vt extern struct ifaddr \&**ifnet_addrs ; +.Vt extern int if_index ; +.Vt extern int ifqmaxlen ; .Sh DATA STRUCTURES The kernel mechanisms for handling network interfaces reside primarily in the diff --git a/share/man/man9/mbuf.9 b/share/man/man9/mbuf.9 index 2374ee1dd27b..89f3d64921a3 100644 --- a/share/man/man9/mbuf.9 +++ b/share/man/man9/mbuf.9 @@ -316,7 +316,7 @@ then if the reference count of the storage is not greater than 1. The .Dv M_RDONLY flag can be set in the mbuf's -.Dv m_flags. +.Dv m_flags . This can be achieved during setup of the external storage, by passing the .Dv M_RDONLY @@ -366,7 +366,8 @@ must be less than or .Dv MHLEN , depending on the -.Dv M_PKTHDR flag setting. +.Dv M_PKTHDR +flag setting. .\" .It Fn m_pullup mbuf len Arrange that the first diff --git a/share/man/man9/mi_switch.9 b/share/man/man9/mi_switch.9 index 3f66664bf677..3482656b8e39 100644 --- a/share/man/man9/mi_switch.9 +++ b/share/man/man9/mi_switch.9 @@ -66,7 +66,8 @@ can be enumerated as follows: .Bl -enum -offset indent .It from within -.Xr sleep 9 , and +.Xr sleep 9 +and .Xr tsleep 9 when the current process voluntarily relinquishes the CPU to wait for some resource to become diff --git a/share/man/man9/microseq.9 b/share/man/man9/microseq.9 index dce4b2eec41e..b92175de6f2e 100644 --- a/share/man/man9/microseq.9 +++ b/share/man/man9/microseq.9 @@ -287,7 +287,7 @@ the parameter to pass to the function call .El .Pp The C function shall be declared as a -.Fd int(*)(void *p, char *ptr) +.Ft int(*)(void *p, char *ptr) . The ptr parameter is the current position in the buffer currently scanned. .Pp Predefined macro: MS_C_CALL(func,param) diff --git a/share/man/man9/panic.9 b/share/man/man9/panic.9 index 3b1ebf97eb5e..2f4c3051b008 100644 --- a/share/man/man9/panic.9 +++ b/share/man/man9/panic.9 @@ -40,7 +40,7 @@ .Sh SYNOPSIS .Fd #include <sys/param.h> .Ft void -.Fn panic "const char *fmt, ..." +.Fn panic "const char *fmt" ... .Sh DESCRIPTION The .Fn panic diff --git a/share/man/man9/pfil.9 b/share/man/man9/pfil.9 index a0e9e826fd2c..05b88234faf4 100644 --- a/share/man/man9/pfil.9 +++ b/share/man/man9/pfil.9 @@ -106,7 +106,7 @@ interface first appeared in The .Nm input and output lists were originally implemented as -.Pa Aq sys/queue.h +.Aq Pa sys/queue.h .Dv LIST structures; however this was changed in diff --git a/share/man/man9/rtentry.9 b/share/man/man9/rtentry.9 index 5c7556098bf0..6b0eb9b9ca44 100644 --- a/share/man/man9/rtentry.9 +++ b/share/man/man9/rtentry.9 @@ -53,7 +53,9 @@ The basic structure a route is defined by .Dq Li struct rtentry , which includes the following fields: .Bl -tag -offset indent -width 6n -.It Li "struct radix_node rt_nodes[2];" +.It Xo +.Vt "struct radix_node rt_nodes[2]" ; +.Xc Glue used by the radix-tree routines. These members also include in their substructure the key (i.e., destination address) and mask used when the route was created. The @@ -64,7 +66,9 @@ macros can be used to extract this information (in the form of a .Dq Li "struct sockaddr *" ) given a .Li "struct rtentry *" . -.It Li "struct sockaddr *rt_gateway;" +.It Xo +.Vt "struct sockaddr *rt_gateway" ; +.Xc The .Dq target of the route, which can either represent a destination in its own @@ -72,7 +76,9 @@ right (some protocols will put a link-layer address here), or some intermediate stop on the way to that destination (if the .Dv RTF_GATEWAY flag is set). -.It Li "long rt_refcnt;" +.It Xo +.Vt "long rt_refcnt" ; +.Xc Route entries are reference-counted; this field indicates the number of external (to the radix tree) references. If the .Dv RTF_UP @@ -80,17 +86,25 @@ flag is not present, the .Fn rtfree function will delete the route from the radix tree when the last reference drops. -.It Li "u_long rt_flags;" +.It Xo +.Vt "u_long rt_flags" ; +.Xc See below. -.It Li "struct ifnet *rt_ifp;" -.It Li "struct ifaddr *rt_ifa;" +.It Xo +.Vt "struct ifnet *rt_ifp" ; +.Xc +.It Xo +.Vt "struct ifaddr *rt_ifa" ; +.Xc These two fields represent the .Dq answer , as it were, to the question posed by a route lookup; that is, they name the interface and interface address to be used in sending a packet to the destination or set of destinations which this route represents. -.It Li "struct sockaddr *rt_genmask;" +.It Xo +.Vt "struct sockaddr *rt_genmask" ; +.Xc When the .Fn rtalloc family of functions performs a cloning operation as requested by the @@ -100,7 +114,9 @@ or flag, this field is used as the mask for the new route which is inserted into the table. If this field is a null pointer, then a host route is generated. -.It Li "caddr_t rt_llinfo;" +.It Xo +.Vt "caddr_t rt_llinfo" ; +.Xc When the .Dv RTF_LLINFO flag is set, this field contains information specific to the link @@ -111,9 +127,13 @@ routine.) Protocols such as .Xr arp 4 use this field to reference per-destination state internal to that protocol. -.It Li "struct rt_metrics rt_rmx;" +.It Xo +.Vt "struct rt_metrics rt_rmx" ; +.Xc See below. -.It Li "struct rtentry *rt_gwroute;" +.It Xo +.Vt "struct rtentry *rt_gwroute" ; +.Xc This member is a reference to a route whose destination is .Li rt_gateway . It is only used for @@ -121,7 +141,9 @@ It is only used for routes. .\" .It Dv "int (*rt_output)();" .\" See below. -.It Dv "struct rtentry *rt_parent;" +.It Xo +.Vt "struct rtentry *rt_parent" ; +.Xc A reference to the route from which this route was cloned, or a null pointer if this route was not generated by cloning. See also the .Dv RTF_WASCLONED @@ -213,21 +235,31 @@ Indicates that the destination is a multicast address. Every route has associated with it a set of metrics, defined by .Li struct rt_metrics : .Bl -tag -offset indent -width 6n -.It Li "u_long rmx_locks;" +.It Xo +.Vt "u_long rmx_locks" ; +.Xc Flag bits indicating which metrics the kernel is not permitted to dynamically modify. -.It Li "u_long rmx_mtu;" +.It Xo +.Vt "u_long rmx_mtu" ; +.Xc MTU for this path. -.It Li "u_long rmx_hopcount;" +.It Xo +.Vt "u_long rmx_hopcount" ; +.Xc Number of intermediate systems on the path to this destination. -.It Li "u_long rmx_expire;" +.It Xo +.Vt "u_long rmx_expire" ; +.Xc The time (a la .Xr time 3 ) at which this route should expire, or zero if it should never expire. It is the responsibility of individual protocol suites to ensure that routes are actually deleted once they expire. -.It Li "u_long rmx_recvpipe;" +.It Xo +.Vt "u_long rmx_recvpipe" ; +.Xc Nominally, the bandwidth-delay product for the path .Em from the destination @@ -235,24 +267,36 @@ the destination this system. In practice, this value is used to set the size of the receive buffer (and thus the window in sliding-window protocols like .Tn TCP ) . -.It Li "u_long rmx_sendpipe;" +.It Xo +.Vt "u_long rmx_sendpipe" ; +.Xc As before, but in the opposite direction. -.It Li "u_long rmx_ssthresh;" +.It Xo +.Vt "u_long rmx_ssthresh" ; +.Xc The slow-start threshold used in .Tn TCP congestion-avoidance. -.It Li "u_long rmx_rtt;" +.It Xo +.Vt "u_long rmx_rtt" ; +.Xc The round-trip time to this destination, in units of .Dv RMX_RTTUNIT per second. -.It Li "u_long rmx_rttvar;" +.It Xo +.Vt "u_long rmx_rttvar" ; +.Xc The average deviation of the round-type time to this destination, in units of .Dv RMX_RTTUNIT per second. -.It Li "u_long rmx_pksent;" +.It Xo +.Vt "u_long rmx_pksent" ; +.Xc A count of packets successfully sent via this route. -.It Li "u_long rmx_filler[4];" +.It Xo +.Vt "u_long rmx_filler[4]" ; +.Xc .\" XXX badly named Empty space available for protocol-specific information. .El diff --git a/share/man/man9/sleep.9 b/share/man/man9/sleep.9 index c4519d8123e5..8a82350cfc64 100644 --- a/share/man/man9/sleep.9 +++ b/share/man/man9/sleep.9 @@ -254,4 +254,4 @@ This man page was written by and .Nm await were designed and written by -.An Matthew Dillon. +.An Matthew Dillon . diff --git a/share/man/man9/spl.9 b/share/man/man9/spl.9 index 9abcabac2510..f7902d40f959 100644 --- a/share/man/man9/spl.9 +++ b/share/man/man9/spl.9 @@ -68,11 +68,13 @@ .Ft void .Fn splx "intrmask_t ipl" .Sh DESCRIPTION -.Sy This API is deprecated. -.Sy Use mutexes to protect data structures instead. -.Sy See +.Bf -symbolic +This API is deprecated. +Use mutexes to protect data structures instead. +See .Xr mutex 9 -.Sy for more information. +for more information. +.Ef .Pp The .Fn spl diff --git a/share/man/man9/style.9 b/share/man/man9/style.9 index fc2135553a64..59f2fbe135eb 100644 --- a/share/man/man9/style.9 +++ b/share/man/man9/style.9 @@ -34,7 +34,7 @@ This file specifies the preferred style for kernel source files in the .Fx source tree. It is also a guide for preferred userland code style. -.Bd -literal -offset 0i +.Bd -literal /* * Style guide for the FreeBSD. Based on KNF (Kernel Normal Form). */ @@ -55,12 +55,12 @@ Kernel include files (i.e. sys/*.h) come first; normally, you'll need <sys/types.h> OR <sys/param.h>, but not both! <sys/types.h> includes <sys/cdefs.h>, and it's okay to depend on that. -.Bd -literal -offset 0i +.Bd -literal #include <sys/types.h> /* Non-local includes in angle brackets. */ .Ed .Pp If it's a network program, put the network include files next. -.Bd -literal -offset 0i +.Bd -literal #include <net/if.h> #include <net/if_dl.h> #include <net/route.h> @@ -70,18 +70,18 @@ If it's a network program, put the network include files next. .Pp Then there's a blank line, followed by the /usr include files. The /usr include files should be sorted! -.Bd -literal -offset 0i +.Bd -literal #include <stdio.h> .Ed .Pp Global pathnames are defined in /usr/include/paths.h. Pathnames local to the program go in pathnames.h in the local directory. -.Bd -literal -offset 0i +.Bd -literal #include <paths.h> .Ed .Pp Then, there's a blank line, and the user include files. -.Bd -literal -offset 0i +.Bd -literal #include "pathnames.h" /* Local includes in double quotes. */ .Ed .Pp @@ -121,7 +121,7 @@ statements. Any final statement-terminating semicolon should be supplied by the macro invocation rather than the macro, to make parsing easier for pretty-printers and editors. -.Bd -literal -offset 0i +.Bd -literal #define MACRO(x, y) do { \e variable = (x) + (y); \e (y) += 2; \e @@ -129,7 +129,7 @@ for pretty-printers and editors. .Ed .Pp Enumeration values are all uppercase. -.Bd -literal -offset 0i +.Bd -literal enum enumtype { ONE, TWO } et; .Ed .Pp @@ -145,7 +145,7 @@ Major structures should be declared at the top of the file in which they are used, or in separate header files if they are used in multiple source files. Use of the structures should be by separate declarations and should be "extern" if they are declared in a header file. -.Bd -literal -offset 0i +.Bd -literal struct foo { struct foo *next; /* List of active foo */ struct mumble amumble; /* Comment for mumble */ @@ -158,7 +158,7 @@ Use .Xr queue 3 macros rather than rolling your own lists, whenever possible. Thus, the previous example would be better written: -.Bd -literal -offset 0i +.Bd -literal #include <sys/queue.h> struct foo { LIST_ENTRY(foo) link; /* Queue macro glue for foo lists */ @@ -176,7 +176,7 @@ tag. Avoid typedefs ending in .Dq Li \&_t , except as specified in Standard C or by .Tn POSIX . -.Bd -literal -offset 0i +.Bd -literal /* Make the structure name match the typedef. */ typedef struct _bar { int level; @@ -209,7 +209,7 @@ to break precedents in the existing code and use the current style guidelines. .Pp The kernel has a name associated with parameter types, e.g., in the kernel use: -.Bd -literal -offset 0i +.Bd -literal void function(int fd); .Ed .Pp @@ -217,18 +217,18 @@ In header files visible to userland applications, prototypes that are visible must use either protected names or no names with the types. It is preferable to use protected names. e.g., use: -.Bd -literal -offset 0i +.Bd -literal void function(int); .Ed .Pp or: -.Bd -literal -offset 0i +.Bd -literal void function(int _fd); .Ed .Pp Prototypes may have an extra space after a tab to enable function names to line up: -.Bd -literal -offset 0i +.Bd -literal static char *function(int _arg, const char *_arg2, struct foo *_arg3, struct bar *_arg4); static void usage(void); @@ -253,7 +253,7 @@ parts of the switch cascade. Elements in a switch statement that cascade should have a FALLTHROUGH comment. Numerical arguments should be checked for accuracy. Code that cannot be reached should have a NOTREACHED comment. -.Bd -literal -offset 0i +.Bd -literal while ((ch = getopt(argc, argv, "abn")) != -1) switch (ch) { /* Indent the switch. */ case 'a': /* Don't indent the case. */ @@ -284,7 +284,7 @@ Space after keywords (if, while, for, return, switch). No braces are used for control statements with zero or only a single statement unless that statement is more than a single line in which case they are permitted. Forever loops are done with for's, not while's. -.Bd -literal -offset 0i +.Bd -literal for (p = buf; *p != '\e0'; ++p) ; /* nothing */ for (;;) @@ -304,7 +304,7 @@ Forever loops are done with for's, not while's. .Pp Parts of a for loop may be left empty. Don't put declarations inside blocks unless the routine is unusually complicated. -.Bd -literal -offset 0i +.Bd -literal for (; cnt < 15; cnt++) { stmt1; stmt2; @@ -313,7 +313,7 @@ inside blocks unless the routine is unusually complicated. .Pp Indentation is an 8 character tab. Second level indents are four spaces. -.Bd -literal -offset 0i +.Bd -literal while (cnt < 20) z = a + really + long + statement + that + needs + two lines + gets + indented + four + spaces + @@ -327,7 +327,7 @@ and do not use spaces in front of tabs. .Pp Closing and opening braces go on the same line as the else. Braces that aren't necessary may be left out. -.Bd -literal -offset 0i +.Bd -literal if (test) stmt; else if (bar) { @@ -347,7 +347,7 @@ or preceding or .Sq \&) characters. -.Bd -literal -offset 0i +.Bd -literal if (error = function(a1, a2)) exit(error); .Ed @@ -356,7 +356,7 @@ Unary operators don't require spaces, binary operators do. Don't use parentheses unless they're required for precedence or unless the statement is confusing without them. Remember that other people may confuse easier than you. Do YOU understand the following? -.Bd -literal -offset 0i +.Bd -literal a = b->c[0] + ~d == (e || f) || g && h ? i : j >> 1; k = !(l & FLAGS); .Ed @@ -364,7 +364,7 @@ confuse easier than you. Do YOU understand the following? Exits should be 0 on success, or according to the predefined values in .Xr sysexits 3 . -.Bd -literal -offset 0i +.Bd -literal exit(EX_OK); /* * Avoid obvious comments such as * "Exit 0 on success." @@ -374,7 +374,7 @@ values in .Pp The function type should be on a line by itself preceding the function. -.Bd -literal -offset 0i +.Bd -literal static char * function(int a1, int a2, float fl, int a4) { @@ -389,7 +389,7 @@ keyword. Be careful to not obfuscate the code by initializing variables in the declarations. Use this feature only thoughtfully. DO NOT use function calls in initializers! -.Bd -literal -offset 0i +.Bd -literal struct foo one, *two; double three; int *four, five; @@ -415,22 +415,22 @@ variadic args and is necessary for other args if the function prototype might not be in scope.) Test pointers against NULL, e.g., use: -.Bd -literal -offset 0i +.Bd -literal (p = f()) == NULL .Ed .Pp not: -.Bd -literal -offset 0i +.Bd -literal !(p = f()) .Ed .Pp Don't use '!' for tests unless it's a boolean, e.g. use -.Bd -literal -offset 0i +.Bd -literal if (*p == '\e0') .Ed .Pp not -.Bd -literal -offset 0i +.Bd -literal if (!*p) .Ed .Pp @@ -442,7 +442,7 @@ Use or .Xr warn 3 , don't roll your own! -.Bd -literal -offset 0i +.Bd -literal if ((four = malloc(sizeof(struct foo))) == NULL) err(1, (char *)NULL); if ((six = (int *)overflow()) == NULL) @@ -452,7 +452,7 @@ don't roll your own! .Ed .Pp Old-style function declarations look like this: -.Bd -literal -offset 0i +.Bd -literal static char * function(a1, a2, fl, a4) int a1, a2; /* Declare ints, too, don't default them. */ @@ -464,7 +464,7 @@ function(a1, a2, fl, a4) Use ANSI function declarations unless you explicitly need K&R compatibility. .Pp Variable numbers of arguments should look like this. -.Bd -literal -offset 0i +.Bd -literal #include <stdarg.h> void @@ -524,11 +524,11 @@ separates either-or options/arguments, and multiple options/arguments which are specified together are placed in a single set of brackets. .Pp -.Bd -ragged -offset 0.3i +.Bd -ragged -offset 4n "usage: f [-aDde] [-b b_arg] [-m m_arg] req1 req2 [opt1 [opt2]]\en" "usage: f [-a | -b] [-c [-dEe] [-n number]]\en" .Ed -.Bd -literal -offset 0i +.Bd -literal (void)fprintf(stderr, "usage: f [-ab]\en"); exit(EX_USAGE); } diff --git a/share/man/man9/sysctl_add_oid.9 b/share/man/man9/sysctl_add_oid.9 index 34acd76fe160..6fa352a06911 100644 --- a/share/man/man9/sysctl_add_oid.9 +++ b/share/man/man9/sysctl_add_oid.9 @@ -367,7 +367,7 @@ any attempt to remove a node that contains any children will result in a .Er ENOTEMPTY error. -.Em "WARNING: use recursive deletion with extreme caution!" +.Em WARNING : "use recursive deletion with extreme caution" ! Normally it should not be needed if contexts are used. Contexts take care of tracking inter-dependencies between users of the tree. diff --git a/share/man/man9/time.9 b/share/man/man9/time.9 index 2f3153c247be..6e0a6bc95d6c 100644 --- a/share/man/man9/time.9 +++ b/share/man/man9/time.9 @@ -111,7 +111,7 @@ function can be used to read the .Va time variable in an atomic manner. There is no equivalent function for accessing -.Va mono_time. +.Va mono_time . The .Va boottime and |