=================================================================== RCS file: /cvs/mandoc/mdoc.7,v retrieving revision 1.212 retrieving revision 1.226 diff -u -p -r1.212 -r1.226 --- mandoc/mdoc.7 2011/09/27 21:49:23 1.212 +++ mandoc/mdoc.7 2014/01/24 22:54:33 1.226 @@ -1,7 +1,7 @@ -.\" $Id: mdoc.7,v 1.212 2011/09/27 21:49:23 schwarze Exp $ +.\" $Id: mdoc.7,v 1.226 2014/01/24 22:54:33 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: September 27 2011 $ +.Dd $Mdocdate: January 24 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 @@ -820,8 +823,8 @@ The most popular is the imaginary macro which resolves to .Sy 6n . .It -A width using the syntax described in -.Sx Scaling Widths . +A scaling width as described in +.Xr roff 7 . .It An arbitrary string, which indents by the length of this string. .El @@ -926,8 +929,8 @@ The .Fl width and .Fl offset -arguments accept -.Sx Scaling Widths +arguments accept scaling widths as described in +.Xr roff 7 or use the length of the given string. The .Fl offset @@ -956,9 +959,9 @@ A columnated list. The .Fl width argument has no effect; instead, each argument specifies the width -of one column, using either the -.Sx Scaling Widths -syntax or the string length of the argument. +of one column, using either the scaling width syntax described in +.Xr roff 7 +or the string length of the argument. If the first line of the body of a .Fl column list is not an @@ -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: @@ -1282,7 +1289,8 @@ Its syntax is as follows: .Ar title .Oo .Ar section -.Op Ar volume | arch +.Op Ar volume +.Op Ar arch .Oc .Oc .Ed @@ -1297,108 +1305,85 @@ 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 a specific relevant architecture. -If -.Ar volume -is not provided, it may be used in its place, else it may be used -subsequent that. -It, too, is optional. -It must be one of -.Ar alpha , -.Ar amd64 , -.Ar amiga , -.Ar arc , -.Ar arm , -.Ar armish , -.Ar aviion , -.Ar hp300 , -.Ar hppa , -.Ar hppa64 , -.Ar i386 , -.Ar landisk , -.Ar loongson , -.Ar luna88k , -.Ar mac68k , -.Ar macppc , -.Ar mips64 , -.Ar mvme68k , -.Ar mvme88k , -.Ar mvmeppc , -.Ar pmax , -.Ar sgi , -.Ar socppc , -.Ar sparc , -.Ar sparc64 , -.Ar sun3 , -.Ar vax , +This specifies the machine architecture a manual page applies to, +where relevant, for example +.Cm alpha , +.Cm amd64 , +.Cm i386 , or -.Ar zaurus . +.Cm sparc64 . +The list of supported architectures varies by operating system. +For the full list of all architectures recognized by +.Xr mandoc 1 , +see the file +.Pa arch.in +in the source distribution. .El .Pp Examples: @@ -1423,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: @@ -1584,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. @@ -1873,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 @@ -1924,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 @@ -2105,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 @@ -2346,104 +2354,244 @@ and .Sx \&Sx . .Ss \&St Replace an abbreviation for a standard with the full form. -The following standards are recognised: +The following standards are recognised. +Where multiple lines are given without a blank line in between, +they all refer to the same standard, and using the first form +is recommended. +.Bl -tag -width 1n +.It C language standards .Pp -.Bl -tag -width "-p1003.1g-2000X" -compact -.It \-p1003.1-88 -.St -p1003.1-88 -.It \-p1003.1-90 -.St -p1003.1-90 -.It \-p1003.1-96 -.St -p1003.1-96 -.It \-p1003.1-2001 -.St -p1003.1-2001 -.It \-p1003.1-2004 -.St -p1003.1-2004 -.It \-p1003.1-2008 -.St -p1003.1-2008 -.It \-p1003.1 -.St -p1003.1 -.It \-p1003.1b -.St -p1003.1b -.It \-p1003.1b-93 -.St -p1003.1b-93 -.It \-p1003.1c-95 -.St -p1003.1c-95 -.It \-p1003.1g-2000 -.St -p1003.1g-2000 -.It \-p1003.1i-95 -.St -p1003.1i-95 -.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 +.Bl -tag -width "-p1003.1g-2000" -compact +.It \-ansiC +.St -ansiC +.It \-ansiC-89 +.St -ansiC-89 .It \-isoC .St -isoC .It \-isoC-90 .St -isoC-90 +.br +The original C standard. +.Pp .It \-isoC-amd1 .St -isoC-amd1 +.Pp .It \-isoC-tcor1 .St -isoC-tcor1 +.Pp .It \-isoC-tcor2 .St -isoC-tcor2 +.Pp .It \-isoC-99 .St -isoC-99 +.It \-ansiC-99 +.St -ansiC-99 +.br +The second major version of the C language standard. +.Pp +.It \-isoC-2011 +.St -isoC-2011 +.br +The third major version of the C language standard. +.El +.It POSIX.1 before the Single UNIX Specification +.Pp +.Bl -tag -width "-p1003.1g-2000" -compact +.It \-p1003.1-88 +.St -p1003.1-88 +.It \-p1003.1 +.St -p1003.1 +.br +The original POSIX standard, based on ANSI C. +.Pp +.It \-p1003.1-90 +.St -p1003.1-90 .It \-iso9945-1-90 .St -iso9945-1-90 +.br +The first update of POSIX.1. +.Pp +.It \-p1003.1b-93 +.St -p1003.1b-93 +.It \-p1003.1b +.St -p1003.1b +.br +Real-time extensions. +.Pp +.It \-p1003.1c-95 +.St -p1003.1c-95 +.br +POSIX thread interfaces. +.Pp +.It \-p1003.1i-95 +.St -p1003.1i-95 +.br +Technical Corrigendum. +.Pp +.It \-p1003.1-96 +.St -p1003.1-96 .It \-iso9945-1-96 .St -iso9945-1-96 -.It \-iso9945-2-93 -.St -iso9945-2-93 -.It \-ansiC -.St -ansiC -.It \-ansiC-89 -.St -ansiC-89 -.It \-ansiC-99 -.St -ansiC-99 -.It \-ieee754 -.St -ieee754 -.It \-iso8802-3 -.St -iso8802-3 -.It \-iso8601 -.St -iso8601 -.It \-ieee1275-94 -.St -ieee1275-94 +.br +Includes POSIX.1-1990, 1b, 1c, and 1i. +.El +.It X/Open Portability Guide version 4 and related standards +.Pp +.Bl -tag -width "-p1003.1g-2000" -compact .It \-xpg3 .St -xpg3 +.br +An XPG4 precursor, published in 1989. +.Pp +.It \-p1003.2 +.St -p1003.2 +.It \-p1003.2-92 +.St -p1003.2-92 +.It \-iso9945-2-93 +.St -iso9945-2-93 +.br +An XCU4 precursor. +.Pp +.It \-p1003.2a-92 +.St -p1003.2a-92 +.br +Updates to POSIX.2. +.Pp .It \-xpg4 .St -xpg4 +.br +Based on POSIX.1 and POSIX.2, published in 1992. +.El +.It Single UNIX Specification version 1 and related standards +.Pp +.Bl -tag -width "-p1003.1g-2000" -compact .It \-xpg4.2 .St -xpg4.2 +.br +This standard was published in 1994 and is also called SUSv1. +It was used as the basis for UNIX 95 certification. +The following three refer to parts of it. +.Pp +.It \-xsh4.2 +.St -xsh4.2 +.Pp +.It \-xcurses4.2 +.St -xcurses4.2 +.Pp +.It \-p1003.1g-2000 +.St -p1003.1g-2000 +.br +Networking APIs, including sockets. +.Pp .It \-xpg4.3 .St -xpg4.3 +.Pp +.It \-svid4 +.St -svid4 , +.br +Published in 1995. +.El +.It Single UNIX Specification version 2 and related standards +.Pp +.Bl -tag -width "-p1003.1g-2000" -compact +.It \-susv2 +.St -susv2 +This Standard was published in 1997 +and is also called X/Open Portability Guide version 5. +It was used as the basis for UNIX 98 certification. +The following refer to parts of it. +.Pp .It \-xbd5 .St -xbd5 -.It \-xcu5 -.St -xcu5 +.Pp .It \-xsh5 .St -xsh5 +.Pp +.It \-xcu5 +.St -xcu5 +.Pp .It \-xns5 .St -xns5 -.It \-xns5.2 -.St -xns5.2 .It \-xns5.2d2.0 .St -xns5.2d2.0 -.It \-xcurses4.2 -.St -xcurses4.2 -.It \-susv2 -.St -susv2 +.It \-xns5.2 +.St -xns5.2 +.Pp +.It \-p1387.2 +.St -p1387.2 +.It \-p1387.2-95 +.St -p1387.2-95 +.br +POSIX software administration. +.El +.It Single UNIX Specification version 3 and related standards +.Pp +.Bl -tag -width "-p1003.1g-2000X" -compact +.It \-p1003.1d-99 +.St -p1003.1d-99 +.br +Additional real-time extensions. +.Pp +.It \-p1003.1j-2000 +.St -p1003.1j-2000 +.br +Advanced real-time extensions. +.Pp +.It \-p1003.1q-2000 +.St -p1003.1q-2000 +.br +Amendment 7: Tracing [C Language]. +.Pp +.It \-p1003.1-2001 +.St -p1003.1-2001 .It \-susv3 .St -susv3 -.It \-svid4 -.St -svid4 +.br +This standard is based on C99, SUSv2, POSIX.1-1996, 1d, and 1j. +It is also called X/Open Portability Guide version 6. +It is used as the basis for UNIX 03 certification. +.Pp +.It \-p1003.1-2004 +.St -p1003.1-2004 +.br +The second and last Technical Corrigendum. .El +.It Single UNIX Specification version 4 +.Pp +.Bl -tag -width "-p1003.1g-2000" -compact +.It \-p1003.1-2008 +.St -p1003.1-2008 +.br +This standard is also called SUSv4 and +X/Open Portability Guide version 7. +.Pp +.It \-p1003.1-2013 +.St -p1003.1-2013 +.br +This is the first Technical Corrigendum. +.El +.It Other standards +.Pp +.Bl -tag -width "-p1003.1g-2000" -compact +.It \-ieee754 +.St -ieee754 +.br +Floating-point arithmetic. +.Pp +.It \-iso8601 +.St -iso8601 +.br +Representation of dates and times, published in 1988. +.Pp +.It \-iso8802-3 +.St -iso8802-3 +.br +Ethernet local area networks. +.Pp +.It \-ieee1275-94 +.St -ieee1275-94 +.El +.El .Ss \&Sx Reference a section or subsection in the same manual page. The referenced section or subsection name must be identical to the @@ -2487,7 +2635,9 @@ Examples: Prints out .Dq currently under development. .Ss \&Ux -Format the UNIX name. +Format the +.Ux +name. Accepts no argument. .Pp Examples: @@ -2552,20 +2702,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 @@ -2589,8 +2733,8 @@ Its syntax is as follows: .Pp The .Ar height -argument must be formatted as described in -.Sx Scaling Widths . +argument is a scaling width as described in +.Xr roff 7 . If unspecified, .Sx \&sp asserts a single vertical space. @@ -2984,7 +3128,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 @@ -3129,9 +3273,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 @@ -3188,5 +3332,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 .