=================================================================== RCS file: /cvs/mandoc/mdoc.7,v retrieving revision 1.215 retrieving revision 1.225 diff -u -p -r1.215 -r1.225 --- mandoc/mdoc.7 2012/06/20 22:06:30 1.215 +++ mandoc/mdoc.7 2014/01/20 00:51:43 1.225 @@ -1,7 +1,7 @@ -.\" $Id: mdoc.7,v 1.215 2012/06/20 22:06:30 schwarze Exp $ +.\" $Id: mdoc.7,v 1.225 2014/01/20 00:51:43 schwarze Exp $ .\" .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons -.\" Copyright (c) 2010, 2011 Ingo Schwarze +.\" Copyright (c) 2010, 2011, 2013 Ingo Schwarze .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above @@ -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: June 20 2012 $ +.Dd $Mdocdate: January 20 2014 $ .Dt MDOC 7 .Os .Sh NAME @@ -477,6 +477,7 @@ in the alphabetical .Bl -column "Brq, Bro, Brc" description .It Sx \&Lb Ta function library (one argument) .It Sx \&In Ta include file (one argument) +.It Sx \&Fd Ta other preprocessor directive (>0 arguments) .It Sx \&Ft Ta function type (>0 arguments) .It Sx \&Fo , \&Fc Ta function block: Ar funcname .It Sx \&Fn Ta function name: @@ -657,7 +658,7 @@ for all other author listings. .Pp Examples: .Dl \&.An -nosplit -.Dl \&.An Kristaps Dzonsons \&Aq kristaps@bsd.lv +.Dl \&.An Kristaps Dzonsons \&Aq \&Mt kristaps@bsd.lv .Ss \&Ao Begin a block enclosed by angle brackets. Does not have any head arguments. @@ -711,7 +712,9 @@ for fixed strings to be passed verbatim as arguments, or .Sx \&Cm . .Ss \&At -Formats an AT&T version. +Formats an +.At +version. Accepts one optional argument: .Pp .Bl -tag -width "v[1-7] | 32vX" -offset indent -compact @@ -1089,7 +1092,9 @@ Examples: See also .Sx \&Bro . .Ss \&Bsx -Format the BSD/OS version provided as an argument, or a default value if +Format the +.Bsx +version provided as an argument, or a default value if no argument is provided. .Pp Examples: @@ -1109,7 +1114,9 @@ and Prints .Dq is currently in beta test. .Ss \&Bx -Format the BSD version provided as an argument, or a default value if no +Format the +.Bx +version provided as an argument, or a default value if no argument is provided. .Pp Examples: @@ -1298,70 +1305,70 @@ It should be capitalised. .It Ar section The manual section. This may be one of -.Ar 1 +.Cm 1 .Pq utilities , -.Ar 2 +.Cm 2 .Pq system calls , -.Ar 3 +.Cm 3 .Pq libraries , -.Ar 3p +.Cm 3p .Pq Perl libraries , -.Ar 4 +.Cm 4 .Pq devices , -.Ar 5 +.Cm 5 .Pq file formats , -.Ar 6 +.Cm 6 .Pq games , -.Ar 7 +.Cm 7 .Pq miscellaneous , -.Ar 8 +.Cm 8 .Pq system utilities , -.Ar 9 +.Cm 9 .Pq kernel functions , -.Ar X11 +.Cm X11 .Pq X Window System , -.Ar X11R6 +.Cm X11R6 .Pq X Window System , -.Ar unass +.Cm unass .Pq unassociated , -.Ar local +.Cm local .Pq local system , -.Ar draft +.Cm draft .Pq draft manual , or -.Ar paper +.Cm paper .Pq paper . It should correspond to the manual's filename suffix and defaults to -.Dq 1 +.Cm 1 if unspecified. .It Ar volume This overrides the volume inferred from .Ar section . This field is optional, and if specified, must be one of -.Ar USD +.Cm USD .Pq users' supplementary documents , -.Ar PS1 +.Cm PS1 .Pq programmers' supplementary documents , -.Ar AMD +.Cm AMD .Pq administrators' supplementary documents , -.Ar SMM +.Cm SMM .Pq system managers' manuals , -.Ar URM +.Cm URM .Pq users' reference manuals , -.Ar PRM +.Cm PRM .Pq programmers' reference manuals , -.Ar KM +.Cm KM .Pq kernel manuals , -.Ar IND +.Cm IND .Pq master index , -.Ar MMI +.Cm MMI .Pq master index , -.Ar LOCAL +.Cm LOCAL .Pq local manuals , -.Ar LOC +.Cm LOC .Pq local manuals , or -.Ar CON +.Cm CON .Pq contributed manuals . .It Ar arch This specifies the machine architecture a manual page applies to, @@ -1401,11 +1408,16 @@ See also .Sx \&Er and .Sx \&Ev -for special-purpose constants and +for special-purpose constants, .Sx \&Va -for variable symbols. +for variable symbols, and +.Sx \&Fd +for listing preprocessor variable definitions in the +.Em SYNOPSIS . .Ss \&Dx -Format the DragonFly BSD version provided as an argument, or a default +Format the +.Dx +version provided as an argument, or a default value if no argument is provided. .Pp Examples: @@ -1562,15 +1574,32 @@ See also End a function context started by .Sx \&Fo . .Ss \&Fd -Historically used to document include files. -This usage has been deprecated in favour of +Preprocessor directive, in particular for listing it in the +.Em SYNOPSIS . +Historically, it was also used to document include files. +The latter usage has been deprecated in favour of .Sx \&In . -Do not use this macro. .Pp +Its syntax is as follows: +.Bd -ragged -offset indent +.Pf \. Sx \&Fd +.Li # Ns Ar directive +.Op Ar argument ... +.Ed +.Pp +Examples: +.Dl \&.Fd #define sa_handler __sigaction_u.__sa_handler +.Dl \&.Fd #define SIO_MAXNFDS +.Dl \&.Fd #ifdef FS_DEBUG +.Dl \&.Ft void +.Dl \&.Fn dbg_open \(dqconst char *\(dq +.Dl \&.Fd #endif +.Pp See also -.Sx MANUAL STRUCTURE +.Sx MANUAL STRUCTURE , +.Sx \&In , and -.Sx \&In . +.Sx \&Dv . .Ss \&Fl Command-line flag or option. Used when listing arguments to command-line utilities. @@ -1851,7 +1880,7 @@ section as described in .Pp Examples: .Dl \&.Lb libz -.Dl \&.Lb mdoc +.Dl \&.Lb libmandoc .Ss \&Li Denotes text that should be in a .Li literal @@ -1902,6 +1931,7 @@ Its syntax is as follows: .Pp Examples: .Dl \&.Mt discuss@manpages.bsd.lv +.Dl \&.An Kristaps Dzonsons \&Aq \&Mt kristaps@bsd.lv .Ss \&Nd A one line description of the manual's content. This may only be invoked in the @@ -2083,7 +2113,7 @@ This macro is obsolete and not implemented in .Xr mandoc 1 . .Pp Historical -.Xr mdoc 7 +.Nm packages described it as .Dq "old function type (FORTRAN)" . .Ss \&Ox @@ -2339,6 +2369,8 @@ The following standards are recognised: .St -p1003.1-2004 .It \-p1003.1-2008 .St -p1003.1-2008 +.It \-p1003.1-2013 +.St -p1003.1-2013 .It \-p1003.1 .St -p1003.1 .It \-p1003.1b @@ -2347,20 +2379,26 @@ The following standards are recognised: .St -p1003.1b-93 .It \-p1003.1c-95 .St -p1003.1c-95 +.It \-p1003.1d-99 +.St -p1003.1d-99 .It \-p1003.1g-2000 .St -p1003.1g-2000 .It \-p1003.1i-95 .St -p1003.1i-95 +.It \-p1003.1j-2000 +.St -p1003.1j-2000 +.It \-p1003.1q-2000 +.St -p1003.1q-2000 +.It \-p1003.2 +.St -p1003.2 .It \-p1003.2-92 .St -p1003.2-92 .It \-p1003.2a-92 .St -p1003.2a-92 -.It \-p1387.2-95 -.St -p1387.2-95 -.It \-p1003.2 -.St -p1003.2 .It \-p1387.2 .St -p1387.2 +.It \-p1387.2-95 +.St -p1387.2-95 .It \-isoC .St -isoC .It \-isoC-90 @@ -2407,6 +2445,8 @@ The following standards are recognised: .St -xbd5 .It \-xcu5 .St -xcu5 +.It \-xsh4.2 +.St -xsh4.2 .It \-xsh5 .St -xsh5 .It \-xns5 @@ -2467,7 +2507,9 @@ Examples: Prints out .Dq currently under development. .Ss \&Ux -Format the UNIX name. +Format the +.Ux +name. Accepts no argument. .Pp Examples: @@ -2532,20 +2574,14 @@ Link to another manual .Pq Qq cross-reference . Its syntax is as follows: .Pp -.D1 Pf \. Sx \&Xr Ar name section +.D1 Pf \. Sx \&Xr Ar name Op section .Pp -The +Cross reference the .Ar name and .Ar section -are the name and section of the linked manual. -If -.Ar section -is followed by non-punctuation, an -.Sx \&Ns -is inserted into the token stream. -This behaviour is for compatibility with -GNU troff. +number of another man page; +omitting the section number is rarely useful. .Pp Examples: .Dl \&.Xr mandoc 1 @@ -2964,7 +3000,7 @@ Manually switching the font using the .Ql \ef font escape sequences is never required. .Sh COMPATIBILITY -This section documents compatibility between mandoc and other other +This section documents compatibility between mandoc and other troff implementations, at this time limited to GNU troff .Pq Qq groff . The term @@ -3109,9 +3145,9 @@ The following features are unimplemented in mandoc: .Fl file Ar file . .It .Sx \&Bd -.Fl offset Ar center +.Fl offset Cm center and -.Fl offset Ar right . +.Fl offset Cm right . Groff does not implement centred and flush-right rendering either, but produces large indentations. .It @@ -3168,5 +3204,4 @@ utility written by Kristaps Dzonsons appeared in The .Nm reference was written by -.An Kristaps Dzonsons , -.Mt kristaps@bsd.lv . +.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv .