* mdocml: improve documentation of .Fa, .Va, and .Vt; inspired by a
@ 2014-10-20 17:59 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2014-10-20 17:59 UTC (permalink / raw)
To: source
Log Message:
-----------
improve documentation of .Fa, .Va, and .Vt;
inspired by a discussion with matthew@
Modified Files:
--------------
mdocml:
mdoc.7
Revision Data
-------------
Index: mdoc.7
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc.7,v
retrieving revision 1.238
retrieving revision 1.239
diff -Lmdoc.7 -Lmdoc.7 -u -p -r1.238 -r1.239
--- mdoc.7
+++ mdoc.7
@@ -1570,7 +1570,7 @@ arguments are treated as separate utilit
See also
.Sx \&Rv .
.Ss \&Fa
-Function argument.
+Function argument or parameter.
Its syntax is as follows:
.Bd -ragged -offset indent
.Pf \. Sx \&Fa
@@ -2704,8 +2704,17 @@ A variable name.
Examples:
.Dl \&.Va foo
.Dl \&.Va const char *bar ;
+.Pp
+For function arguments and parameters, use
+.Sx \&Fa
+instead.
+For declarations of global variables in the
+.Em SYNOPSIS
+section, use
+.Sx \&Vt .
.Ss \&Vt
A variable type.
+.Pp
This is also used for indicating global variables in the
.Em SYNOPSIS
section, in which case a variable name is also specified.
@@ -2720,18 +2729,21 @@ In the former case, this macro starts a
and a blank line is inserted in front if there is a preceding
function definition or include directive.
.Pp
-Note that this should not be confused with
-.Sx \&Ft ,
-which is used for function return types.
-.Pp
Examples:
.Dl \&.Vt unsigned char
.Dl \&.Vt extern const char * const sys_signame[] \&;
.Pp
+For parameters in function prototypes, use
+.Sx \&Fa
+instead, for function return types
+.Sx \&Ft ,
+and for variable names outside the
+.Em SYNOPSIS
+section
+.Sx \&Va ,
+even when including a type with the name.
See also
-.Sx MANUAL STRUCTURE
-and
-.Sx \&Va .
+.Sx MANUAL STRUCTURE .
.Ss \&Xc
Close a scope opened by
.Sx \&Xo .
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-10-20 17:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-20 17:59 mdocml: improve documentation of .Fa, .Va, and .Vt; inspired by a schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).