summaryrefslogtreecommitdiffstats
path: root/mandoc_headers.3
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-04-02 22:48:17 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-04-02 22:48:17 +0000
commit9e6e3b6be0e9ffe29cf4876ce0b7ded2c3c386b9 (patch)
tree1a2bb3465096bc77a000c55dc5753148f39484ad /mandoc_headers.3
parentdd569c39747096c781c1cbec49b48a85ba29f23d (diff)
downloadmandoc-9e6e3b6be0e9ffe29cf4876ce0b7ded2c3c386b9.tar.gz
Second step towards parser unification:
Replace struct mdoc_node and struct man_node by a unified struct roff_node. To be able to use the tok member for both mdoc(7) and man(7) without defining all the macros in roff.h, sacrifice a tiny bit of type safety and make tok an int rather than an enum. Almost mechanical, no functional change. Written on the Eurostar from Bruxelles to London on the way to p2k15.
Diffstat (limited to 'mandoc_headers.3')
-rw-r--r--mandoc_headers.331
1 files changed, 17 insertions, 14 deletions
diff --git a/mandoc_headers.3 b/mandoc_headers.3
index 52ac2890..d3400876 100644
--- a/mandoc_headers.3
+++ b/mandoc_headers.3
@@ -118,7 +118,19 @@ from
as opaque types for function prototypes.
.It Qq Pa roff.h
Provides
-.Vt enum roff_type .
+.Vt enum mdoc_endbody ,
+.Vt enum roff_sec ,
+.Vt enum roff_type ,
+and
+.Vt struct roff_node .
+.Pp
+Uses pointers to the types
+.Vt struct mdoc_arg
+and
+.Vt union mdoc_data
+from
+.Qq Pa mdoc.h
+as opaque struct members.
.El
.Pp
The following two require
@@ -137,10 +149,7 @@ for
.Vt enum roff_type .
.Pp
Provides
-.Vt enum mdoct ,
.Vt enum mdocargt ,
-.Vt enum mdoc_sec ,
-.Vt enum mdoc_endbody ,
.Vt enum mdoc_disp ,
.Vt enum mdoc_list ,
.Vt enum mdoc_auth ,
@@ -153,7 +162,6 @@ Provides
.Vt struct mdoc_an ,
.Vt struct mdoc_bf ,
.Vt struct mdoc_rs ,
-.Vt struct mdoc_node ,
and the functions
.Fn mdoc_*
described in
@@ -181,9 +189,7 @@ for
.Vt enum roff_type .
.Pp
Provides
-.Vt enum mant ,
-.Vt struct man_meta ,
-.Vt struct man_node ,
+.Vt struct man_meta
and the functions
.Fn man_*
described in
@@ -259,8 +265,7 @@ as opaque types for function prototypes.
Requires
.Qq Pa mdoc.h
for
-.Vt enum mdoct ,
-.Vt enum mdoc_* ,
+.Vt enum mdoc_*
and
.Vt struct mdoc_* .
.Pp
@@ -290,11 +295,9 @@ or
.Pa libroff.h .
.It Qq Pa libman.h
Requires
-.Qq Pa man.h
+.Qq Pa roff.h
for
-.Vt enum mant
-and
-.Vt struct man_node.
+.Vt struct roff_node.
.Pp
Provides
.Vt enum man_next ,