summaryrefslogtreecommitdiffstats
path: root/mdoc.7
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-11-02 20:39:49 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-11-02 20:39:49 +0000
commit4e09fa36015fba013594685f37f978a43561fee6 (patch)
treedf6950fcbecb42225be95e987c21cc1d7a002063 /mdoc.7
parent7060543d3ac7d6f6e1d6b536c216cb625a399ae8 (diff)
downloadmandoc-4e09fa36015fba013594685f37f978a43561fee6.tar.gz
While answering a question asked by espie@, i noticed that .Fd is not
completely obsolete, but still somewhat useful for listing preprocessor directives, in particular in the SYNOPSIS.
Diffstat (limited to 'mdoc.7')
-rw-r--r--mdoc.735
1 files changed, 28 insertions, 7 deletions
diff --git a/mdoc.7 b/mdoc.7
index ea393888..e2a9306d 100644
--- a/mdoc.7
+++ b/mdoc.7
@@ -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:
@@ -1407,9 +1408,12 @@ 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
.Dx
@@ -1570,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.