aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit8a1e7c36cb8b9ca64c677d1ff9d786c9e46fd7b0 (patch)
tree8875174fa99d2fb62fe97ec308a53905416a4e4f /mandoc_headers.3
parent483afc5a7a52b601da9e854d5645cd4b0a140184 (diff)
downloadmandoc-8a1e7c36cb8b9ca64c677d1ff9d786c9e46fd7b0.tar.gz
mandoc-8a1e7c36cb8b9ca64c677d1ff9d786c9e46fd7b0.tar.zst
mandoc-8a1e7c36cb8b9ca64c677d1ff9d786c9e46fd7b0.zip
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 ,