=================================================================== RCS file: /cvs/mandoc/mdoc.7,v retrieving revision 1.231 retrieving revision 1.233 diff -u -p -r1.231 -r1.233 --- mandoc/mdoc.7 2014/07/02 03:48:07 1.231 +++ mandoc/mdoc.7 2014/08/08 01:52:40 1.233 @@ -1,4 +1,4 @@ -.\" $Id: mdoc.7,v 1.231 2014/07/02 03:48:07 schwarze Exp $ +.\" $Id: mdoc.7,v 1.233 2014/08/08 01:52:40 schwarze Exp $ .\" .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons .\" Copyright (c) 2010, 2011, 2013 Ingo Schwarze @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: July 2 2014 $ +.Dd $Mdocdate: August 8 2014 $ .Dt MDOC 7 .Os .Sh NAME @@ -1195,7 +1195,7 @@ Close a block. Does not have any tail arguments. .Ss \&Dd -Document date. +Document date for display in the page footer. This is the mandatory first macro of any .Nm manual. @@ -1224,8 +1224,11 @@ the special string .Dq $\&Mdocdate$ can be given as an argument. .It -A few alternative date formats are accepted as well -and converted to the standard form. +The traditional, purely numeric +.Xr man 7 +format +.Ar year Ns \(en Ns Ar month Ns \(en Ns Ar day +is accepted, too. .It If a date string cannot be parsed, it is used verbatim. .It @@ -1285,30 +1288,26 @@ See also and .Sx \&Do . .Ss \&Dt -Document title. +Document title for display in the page header. This is the mandatory second macro of any .Nm file. Its syntax is as follows: .Bd -ragged -offset indent .Pf \. Sx \&Dt -.Oo -.Ar title -.Oo +.Ar TITLE .Ar section -.Op Ar volume -.Op Ar arch -.Oc -.Oc +.Op Ar volume | arch .Ed .Pp Its arguments are as follows: -.Bl -tag -width Ds -offset Ds -.It Ar title +.Bl -tag -width section -offset 2n +.It Ar TITLE The document's title (name), defaulting to -.Dq UNKNOWN +.Dq UNTITLED if unspecified. -It should be capitalised. +To achieve a uniform appearance of page header lines, +it should by convention be all caps. .It Ar section The manual section. This may be one of @@ -1346,8 +1345,7 @@ or .Cm paper .Pq paper . It should correspond to the manual's filename suffix and defaults to -.Cm 1 -if unspecified. +the empty string if unspecified. .It Ar volume This overrides the volume inferred from .Ar section . @@ -1563,19 +1561,31 @@ Function argument. Its syntax is as follows: .Bd -ragged -offset indent .Pf \. Sx \&Fa -.Op Cm argtype -.Cm argname +.Qo +.Op Ar argtype +.Op Ar argname +.Qc Ar \&... .Ed .Pp -This may be invoked for names with or without the corresponding type. -It is also used to specify the field name of a structure. +Each argument may be a name and a type (recommended for the +.Em SYNOPSIS +section), a name alone (for function invocations), +or a type alone (for function prototypes). +If both a type and a name are given or if the type consists of multiple +words, all words belonging to the same function argument have to be +given in a single argument to the +.Sx \&Fa +macro. +.Pp +This macro is also used to specify the field name of a structure. +.Pp Most often, the .Sx \&Fa macro is used in the .Em SYNOPSIS within .Sx \&Fo -section when documenting multi-line function prototypes. +blocks when documenting multi-line function prototypes. If invoked with multiple arguments, the arguments are separated by a comma. Furthermore, if the following macro is another @@ -1585,7 +1595,7 @@ the last argument will also have a trailing comma. Examples: .Dl \&.Fa \(dqconst char *p\(dq .Dl \&.Fa \(dqint a\(dq \(dqint b\(dq \(dqint c\(dq -.Dl \&.Fa foo +.Dl \&.Fa \(dqchar *\(dq size_t .Pp See also .Sx \&Fo . @@ -1688,7 +1698,7 @@ Invocations usually occur in the following context: .br .Pf \. Sx \&Fo Ar funcname .br -.Pf \. Sx \&Fa Oo Ar argtype Oc Ar argname +.Pf \. Sx \&Fa Qq Ar argtype Ar argname .br \&.\.\. .br @@ -2098,7 +2108,7 @@ Examples: See also .Sx \&Oo . .Ss \&Os -Document operating system version. +Operating system version for display in the page footer. This is the mandatory third macro of any .Nm