aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_html.c
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 /mdoc_html.c
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 'mdoc_html.c')
-rw-r--r--mdoc_html.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index c1f0ba74..654a37bb 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.227 2015/04/02 21:36:50 schwarze Exp $ */
+/* $Id: mdoc_html.c,v 1.228 2015/04/02 22:48:17 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -36,7 +36,7 @@
#define INDENT 5
#define MDOC_ARGS const struct mdoc_meta *meta, \
- struct mdoc_node *n, \
+ struct roff_node *n, \
struct html *h
#ifndef MIN
@@ -53,7 +53,7 @@ static void print_mdoc_head(MDOC_ARGS);
static void print_mdoc_node(MDOC_ARGS);
static void print_mdoc_nodelist(MDOC_ARGS);
static void synopsis_pre(struct html *,
- const struct mdoc_node *);
+ const struct roff_node *);
static void a2width(const char *, struct roffsu *);
@@ -293,7 +293,7 @@ a2width(const char *p, struct roffsu *su)
* See the same function in mdoc_term.c for documentation.
*/
static void
-synopsis_pre(struct html *h, const struct mdoc_node *n)
+synopsis_pre(struct html *h, const struct roff_node *n)
{
if (NULL == n->prev || ! (MDOC_SYNPRETTY & n->flags))
@@ -822,7 +822,7 @@ mdoc_it_pre(MDOC_ARGS)
struct roffsu su;
enum mdoc_list type;
struct htmlpair tag[2];
- const struct mdoc_node *bl;
+ const struct roff_node *bl;
bl = n->parent;
while (bl && MDOC_Bl != bl->tok)
@@ -1126,7 +1126,7 @@ mdoc_bd_pre(MDOC_ARGS)
{
struct htmlpair tag[2];
int comp, sv;
- struct mdoc_node *nn;
+ struct roff_node *nn;
struct roffsu su;
if (n->type == ROFFT_HEAD)
@@ -1312,7 +1312,7 @@ mdoc_er_pre(MDOC_ARGS)
static int
mdoc_fa_pre(MDOC_ARGS)
{
- const struct mdoc_node *nn;
+ const struct roff_node *nn;
struct htmlpair tag;
struct tag *t;