From 7355c805552e6fc47e10d976711b6169f0f3c0e0 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Thu, 2 Apr 2015 23:48:19 +0000 Subject: Third step towards parser unification: Replace struct mdoc_meta and struct man_meta by a unified struct roff_meta. Written of the train from London to Exeter on the way to p2k15. --- mandocdb.c | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'mandocdb.c') diff --git a/mandocdb.c b/mandocdb.c index d75d79cb..d17d4215 100644 --- a/mandocdb.c +++ b/mandocdb.c @@ -130,7 +130,7 @@ enum stmt { STMT__MAX }; -typedef int (*mdoc_fp)(struct mpage *, const struct mdoc_meta *, +typedef int (*mdoc_fp)(struct mpage *, const struct roff_meta *, const struct roff_node *); struct mdoc_handler { @@ -156,28 +156,28 @@ static void mpages_free(void); static void mpages_merge(struct mparse *); static void names_check(void); static void parse_cat(struct mpage *, int); -static void parse_man(struct mpage *, const struct man_meta *, +static void parse_man(struct mpage *, const struct roff_meta *, const struct roff_node *); -static void parse_mdoc(struct mpage *, const struct mdoc_meta *, +static void parse_mdoc(struct mpage *, const struct roff_meta *, const struct roff_node *); -static int parse_mdoc_body(struct mpage *, const struct mdoc_meta *, +static int parse_mdoc_body(struct mpage *, const struct roff_meta *, const struct roff_node *); -static int parse_mdoc_head(struct mpage *, const struct mdoc_meta *, +static int parse_mdoc_head(struct mpage *, const struct roff_meta *, const struct roff_node *); -static int parse_mdoc_Fd(struct mpage *, const struct mdoc_meta *, +static int parse_mdoc_Fd(struct mpage *, const struct roff_meta *, const struct roff_node *); static void parse_mdoc_fname(struct mpage *, const struct roff_node *); -static int parse_mdoc_Fn(struct mpage *, const struct mdoc_meta *, +static int parse_mdoc_Fn(struct mpage *, const struct roff_meta *, const struct roff_node *); -static int parse_mdoc_Fo(struct mpage *, const struct mdoc_meta *, +static int parse_mdoc_Fo(struct mpage *, const struct roff_meta *, const struct roff_node *); -static int parse_mdoc_Nd(struct mpage *, const struct mdoc_meta *, +static int parse_mdoc_Nd(struct mpage *, const struct roff_meta *, const struct roff_node *); -static int parse_mdoc_Nm(struct mpage *, const struct mdoc_meta *, +static int parse_mdoc_Nm(struct mpage *, const struct roff_meta *, const struct roff_node *); -static int parse_mdoc_Sh(struct mpage *, const struct mdoc_meta *, +static int parse_mdoc_Sh(struct mpage *, const struct roff_meta *, const struct roff_node *); -static int parse_mdoc_Xr(struct mpage *, const struct mdoc_meta *, +static int parse_mdoc_Xr(struct mpage *, const struct roff_meta *, const struct roff_node *); static void putkey(const struct mpage *, char *, uint64_t); static void putkeys(const struct mpage *, char *, size_t, uint64_t); @@ -1443,7 +1443,7 @@ putmdockey(const struct mpage *mpage, } static void -parse_man(struct mpage *mpage, const struct man_meta *meta, +parse_man(struct mpage *mpage, const struct roff_meta *meta, const struct roff_node *n) { const struct roff_node *head, *body; @@ -1569,7 +1569,7 @@ parse_man(struct mpage *mpage, const struct man_meta *meta, } static void -parse_mdoc(struct mpage *mpage, const struct mdoc_meta *meta, +parse_mdoc(struct mpage *mpage, const struct roff_meta *meta, const struct roff_node *n) { @@ -1602,7 +1602,7 @@ parse_mdoc(struct mpage *mpage, const struct mdoc_meta *meta, } static int -parse_mdoc_Fd(struct mpage *mpage, const struct mdoc_meta *meta, +parse_mdoc_Fd(struct mpage *mpage, const struct roff_meta *meta, const struct roff_node *n) { char *start, *end; @@ -1667,7 +1667,7 @@ parse_mdoc_fname(struct mpage *mpage, const struct roff_node *n) } static int -parse_mdoc_Fn(struct mpage *mpage, const struct mdoc_meta *meta, +parse_mdoc_Fn(struct mpage *mpage, const struct roff_meta *meta, const struct roff_node *n) { @@ -1684,7 +1684,7 @@ parse_mdoc_Fn(struct mpage *mpage, const struct mdoc_meta *meta, } static int -parse_mdoc_Fo(struct mpage *mpage, const struct mdoc_meta *meta, +parse_mdoc_Fo(struct mpage *mpage, const struct roff_meta *meta, const struct roff_node *n) { @@ -1698,7 +1698,7 @@ parse_mdoc_Fo(struct mpage *mpage, const struct mdoc_meta *meta, } static int -parse_mdoc_Xr(struct mpage *mpage, const struct mdoc_meta *meta, +parse_mdoc_Xr(struct mpage *mpage, const struct roff_meta *meta, const struct roff_node *n) { char *cp; @@ -1718,7 +1718,7 @@ parse_mdoc_Xr(struct mpage *mpage, const struct mdoc_meta *meta, } static int -parse_mdoc_Nd(struct mpage *mpage, const struct mdoc_meta *meta, +parse_mdoc_Nd(struct mpage *mpage, const struct roff_meta *meta, const struct roff_node *n) { @@ -1728,7 +1728,7 @@ parse_mdoc_Nd(struct mpage *mpage, const struct mdoc_meta *meta, } static int -parse_mdoc_Nm(struct mpage *mpage, const struct mdoc_meta *meta, +parse_mdoc_Nm(struct mpage *mpage, const struct roff_meta *meta, const struct roff_node *n) { @@ -1750,7 +1750,7 @@ parse_mdoc_Nm(struct mpage *mpage, const struct mdoc_meta *meta, } static int -parse_mdoc_Sh(struct mpage *mpage, const struct mdoc_meta *meta, +parse_mdoc_Sh(struct mpage *mpage, const struct roff_meta *meta, const struct roff_node *n) { @@ -1758,7 +1758,7 @@ parse_mdoc_Sh(struct mpage *mpage, const struct mdoc_meta *meta, } static int -parse_mdoc_head(struct mpage *mpage, const struct mdoc_meta *meta, +parse_mdoc_head(struct mpage *mpage, const struct roff_meta *meta, const struct roff_node *n) { @@ -1766,7 +1766,7 @@ parse_mdoc_head(struct mpage *mpage, const struct mdoc_meta *meta, } static int -parse_mdoc_body(struct mpage *mpage, const struct mdoc_meta *meta, +parse_mdoc_body(struct mpage *mpage, const struct roff_meta *meta, const struct roff_node *n) { -- cgit