Print this page
Latest round of fixes per RM and AL.  Fix bugs found in man.c.

@@ -15,11 +15,11 @@
 .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
 .\" Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org>
 .\" Copyright 2012 Nexenta Systems, Inc. All rights reserved.
 .\" Copyright 2014 Garrett D'Amore <garrett@dmaore.org>
 .\"
-.Dd Jul 16, 2014
+.Dd Jul 19, 2014
 .Dt MDOC 5
 .Os
 .Sh NAME
 .Nm mdoc
 .Nd semantic markup language for formatting manual pages

@@ -138,34 +138,32 @@
 utility processes files ...
 \&.\e\(dq .Sh IMPLEMENTATION NOTES
 \&.\e\(dq .Sh RETURN VALUES
 \&.\e\(dq For sections 2, 3, & 9 only.
 \&.\e\(dq .Sh ENVIRONMENT
-\&.\e\(dq For sections 1, 1M, 5, & 6 only.
+\&.\e\(dq For sections 1, 1M, and 5.
 \&.\e\(dq .Sh FILES
 \&.\e\(dq .Sh EXIT STATUS
-\&.\e\(dq For sections 1, 1M, & 6 only.
+\&.\e\(dq For sections 1, 1M, and 5.
 \&.\e\(dq .Sh EXAMPLES
 \&.\e\(dq .Sh DIAGNOSTICS
-\&.\e\(dq For sections 1, 1M, 5, 6, & 7 only.
 \&.\e\(dq .Sh ERRORS
 \&.\e\(dq For sections 2, 3, & 9 only.
 \&.\e\(dq .Sh ARCHITECTURE
 \&.\e\(dq .Sh CODE SET INDEPENDENCE
 \&.\e\(dq For sections 1, 1M, & 3 only.
 \&.\e\(dq .Sh INTERFACE STABILITY
 \&.\e\(dq .Sh MT-LEVEL
 \&.\e\(dq For sections 2 & 3 only.
+\&.\e\(dq .Sh SECURITY
 \&.\e\(dq .Sh SEE ALSO
 \&.\e\(dq .Xr foobar 1
 \&.\e\(dq .Sh STANDARDS
 \&.\e\(dq .Sh HISTORY
 \&.\e\(dq .Sh AUTHORS
 \&.\e\(dq .Sh CAVEATS
 \&.\e\(dq .Sh BUGS
-\&.\e\(dq .Sh SECURITY CONSIDERATIONS
-\&.\e\(dq Not used in OpenBSD.
 .Ed
 .Pp
 The sections in an
 .Nm
 document are conventionally ordered as they appear above.

@@ -207,11 +205,11 @@
 .Sx \&Lb .
 .It Em SYNOPSIS
 Documents the utility invocation syntax, function call syntax, or device
 configuration.
 .Pp
-For the first, utilities (sections 1, 1M, and 6), this is
+For the first, utilities (sections 1 and 1M), this is
 generally structured as follows:
 .Bd -literal -offset indent
 \&.Nm bar
 \&.Op Fl v
 \&.Op Fl o Ar file

@@ -222,11 +220,11 @@
 \&.Op Ar
 .Ed
 .Pp
 Commands should be ordered alphabetically.
 .Pp
-For the second, function calls (sections 2, 3, 9):
+For the second, function calls (sections 2, 3, 7I, 7P, 9):
 .Bd -literal -offset indent
 \&.In header.h
 \&.Vt extern const char *global;
 \&.Ft "char *"
 \&.Fn foo "const char *src"

@@ -240,14 +238,13 @@
 .Sx \&Fn ,
 and
 .Sx \&Fo
 macros should follow C header-file conventions.
 .Pp
-And for the third, configurations (section 7):
+And for the third, configurations (section 7D):
 .Bd -literal -offset indent
-\&.Cd \(dqit* at isa? port 0x2e\(dq
-\&.Cd \(dqit* at isa? port 0x4e\(dq
+\&.Pa /dev/device_node
 .Ed
 .Pp
 Manuals not in these sections generally don't need a
 .Em SYNOPSIS .
 .Pp

@@ -350,11 +347,11 @@
 .Pp
 See
 .Sx \&Pa .
 .It Em EXIT STATUS
 This section documents the
-command exit status for section 1, 6, and 8 utilities.
+command exit status for sections 1 and 1M.
 Historically, this information was described in
 .Em DIAGNOSTICS ,
 a practise that is now discouraged.
 .Pp
 See

@@ -362,16 +359,17 @@
 .It Em EXAMPLES
 Example usages.
 This often contains snippets of well-formed, well-tested invocations.
 Make sure that examples work properly!
 .It Em DIAGNOSTICS
-Documents error conditions.
-This is most useful in section 4 manuals.
-Historically, this section was used in place of
+Documents error and diagnostic messages displayed to the user or
+sent to logs. Note that exit
+status and return values should be documented in the
 .Em EXIT STATUS
-for manuals in sections 1, 6, and 8; however, this practise is
-discouraged.
+and
+.Em RETURN VALUES
+sections.
 .Pp
 See
 .Sx \&Bl
 .Fl diag .
 .It Em ERRORS

@@ -489,10 +487,12 @@
 .It Nm MT-Safe with Exections
 As for
 .Nm MT-Safe
 but with specific exceptions noted.
 .El
+.It Em SECURITY
+Documents any security precautions that operators should consider.
 .It Em SEE ALSO
 References other manuals with related topics.
 This section should exist for most manuals.
 Cross-references should conventionally be ordered first by section, then
 alphabetically.

@@ -526,12 +526,10 @@
 Common misuses and misunderstandings should be explained
 in this section.
 .It Em BUGS
 Known bugs, limitations, and work-arounds should be described
 in this section.
-.It Em SECURITY CONSIDERATIONS
-Documents any security precautions that operators should consider.
 .El
 .Sh MACRO OVERVIEW
 This overview is sorted such that macros of similar purpose are listed
 together, to help find the best macro for any given purpose.
 Deprecated macros are not included in the overview, but can be found below

@@ -1243,14 +1241,13 @@
 .Sx \&Nx ,
 .Sx \&Ox ,
 and
 .Sx \&Ux .
 .Ss \&Cd
-Kernel configuration declaration.
-This denotes strings accepted by
-.Xr config 8 .
-It is most often used in section 4 manual pages.
+Kernel configuration declaration.  It is found in pages for
+.Bx
+and not used here.
 .Pp
 Examples:
 .Dl \&.Cd device le0 at scode?
 .Pp
 .Em Remarks :

@@ -1547,11 +1544,11 @@
 .Sx \&Dv
 for general constants.
 .Ss \&Ex
 Insert a standard sentence regarding command exit values of 0 on success
 and >0 on failure.
-This is most often used in section 1, 6, and 8 manual pages.
+This is most often used in section 1 and 1M manual pages.
 Its syntax is as follows:
 .Pp
 .D1 Pf \. Sx \&Ex Fl std Op Ar utility ...
 .Pp
 If

@@ -1963,12 +1960,12 @@
 arguments and will display macros verbatim.
 .Pp
 See also
 .Sx \&Nm .
 .Ss \&Nm
-The name of the manual page, or \(em in particular in section 1, 6,
-and 8 pages \(em of an additional command or feature documented in
+The name of the manual page, or \(em in particular in section 1
+and 1M pages \(em of an additional command or feature documented in
 the manual page.
 When first invoked, the
 .Sx \&Nm
 macro expects a single argument, the name of the manual page.
 Usually, the first invocation happens in the

@@ -2081,11 +2078,11 @@
 .Ss \&Op
 Optional part of a command line.
 Prints the argument(s) in brackets.
 This is most often used in the
 .Em SYNOPSIS
-section of section 1 and 8 manual pages.
+section of section 1 and 1M manual pages.
 .Pp
 Examples:
 .Dl \&.Op \&Fl a \&Ar b
 .Dl \&.Op \&Ar a | b
 .Pp

@@ -3200,11 +3197,10 @@
 in groff-1.17.
 The standalone implementation that is part of the
 .Xr mandoc 1
 utility written by Kristaps Dzonsons appeared in
 .Ox 4.6 .
-in July, 2014.
 .Sh AUTHORS
 The
 .Nm
 reference was written by
 .An Kristaps Dzonsons ,