From 8a1e7c36cb8b9ca64c677d1ff9d786c9e46fd7b0 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Thu, 2 Apr 2015 22:48:17 +0000 Subject: 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. --- demandoc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'demandoc.c') diff --git a/demandoc.c b/demandoc.c index 6403191e..8cfe5777 100644 --- a/demandoc.c +++ b/demandoc.c @@ -1,4 +1,4 @@ -/* $Id: demandoc.c,v 1.16 2015/04/02 21:36:49 schwarze Exp $ */ +/* $Id: demandoc.c,v 1.17 2015/04/02 22:48:17 schwarze Exp $ */ /* * Copyright (c) 2011 Kristaps Dzonsons * @@ -32,9 +32,9 @@ #include "mandoc.h" static void pline(int, int *, int *, int); -static void pman(const struct man_node *, int *, int *, int); +static void pman(const struct roff_node *, int *, int *, int); static void pmandoc(struct mparse *, int, const char *, int); -static void pmdoc(const struct mdoc_node *, int *, int *, int); +static void pmdoc(const struct roff_node *, int *, int *, int); static void pstring(const char *, int, int *, int); static void usage(void); @@ -234,7 +234,7 @@ pline(int line, int *linep, int *col, int list) } static void -pmdoc(const struct mdoc_node *p, int *line, int *col, int list) +pmdoc(const struct roff_node *p, int *line, int *col, int list) { for ( ; p; p = p->next) { @@ -248,7 +248,7 @@ pmdoc(const struct mdoc_node *p, int *line, int *col, int list) } static void -pman(const struct man_node *p, int *line, int *col, int list) +pman(const struct roff_node *p, int *line, int *col, int list) { for ( ; p; p = p->next) { -- cgit v1.2.3-56-ge451