From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (schwarze@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id s9KHxQNj030622 for ; Mon, 20 Oct 2014 13:59:26 -0400 (EDT) Received: (from schwarze@localhost) by krisdoz.my.domain (8.14.5/8.14.3/Submit) id s9KHxKiI021258; Mon, 20 Oct 2014 13:59:20 -0400 (EDT) Date: Mon, 20 Oct 2014 13:59:20 -0400 (EDT) Message-Id: <201410201759.s9KHxKiI021258@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: improve documentation of .Fa, .Va, and .Vt; inspired by a X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 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