summaryrefslogtreecommitdiffstats
path: root/mdoc_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-04-02 23:48:19 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-04-02 23:48:19 +0000
commit7355c805552e6fc47e10d976711b6169f0f3c0e0 (patch)
tree8ad95f5fc9d0dbda235694991290ea83f7484abe /mdoc_term.c
parent9e6e3b6be0e9ffe29cf4876ce0b7ded2c3c386b9 (diff)
downloadmandoc-7355c805552e6fc47e10d976711b6169f0f3c0e0.tar.gz
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.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index aa4aec31..55598c4f 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -43,7 +43,7 @@ struct termpair {
#define DECL_ARGS struct termp *p, \
struct termpair *pair, \
- const struct mdoc_meta *meta, \
+ const struct roff_meta *meta, \
struct roff_node *n
struct termact {
@@ -58,8 +58,8 @@ static void print_bvspace(struct termp *,
const struct roff_node *);
static void print_mdoc_node(DECL_ARGS);
static void print_mdoc_nodelist(DECL_ARGS);
-static void print_mdoc_head(struct termp *, const void *);
-static void print_mdoc_foot(struct termp *, const void *);
+static void print_mdoc_head(struct termp *, const struct roff_meta *);
+static void print_mdoc_foot(struct termp *, const struct roff_meta *);
static void synopsis_pre(struct termp *,
const struct roff_node *);
@@ -253,7 +253,7 @@ static const struct termact termacts[MDOC_MAX] = {
void
terminal_mdoc(void *arg, const struct mdoc *mdoc)
{
- const struct mdoc_meta *meta;
+ const struct roff_meta *meta;
struct roff_node *n;
struct termp *p;
@@ -407,13 +407,10 @@ print_mdoc_node(DECL_ARGS)
}
static void
-print_mdoc_foot(struct termp *p, const void *arg)
+print_mdoc_foot(struct termp *p, const struct roff_meta *meta)
{
- const struct mdoc_meta *meta;
size_t sz;
- meta = (const struct mdoc_meta *)arg;
-
term_fontrepl(p, TERMFONT_NONE);
/*
@@ -459,14 +456,11 @@ print_mdoc_foot(struct termp *p, const void *arg)
}
static void
-print_mdoc_head(struct termp *p, const void *arg)
+print_mdoc_head(struct termp *p, const struct roff_meta *meta)
{
- const struct mdoc_meta *meta;
char *volume, *title;
size_t vollen, titlen;
- meta = (const struct mdoc_meta *)arg;
-
/*
* The header is strange. It has three components, which are
* really two with the first duplicated. It goes like this: