summaryrefslogtreecommitdiffstats
path: root/man_term.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
commit9e6e3b6be0e9ffe29cf4876ce0b7ded2c3c386b9 (patch)
tree1a2bb3465096bc77a000c55dc5753148f39484ad /man_term.c
parentdd569c39747096c781c1cbec49b48a85ba29f23d (diff)
downloadmandoc-9e6e3b6be0e9ffe29cf4876ce0b7ded2c3c386b9.tar.gz
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 'man_term.c')
-rw-r--r--man_term.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/man_term.c b/man_term.c
index f8a5fe1f..4fdd8a2b 100644
--- a/man_term.c
+++ b/man_term.c
@@ -48,7 +48,7 @@ struct mtermp {
#define DECL_ARGS struct termp *p, \
struct mtermp *mt, \
- struct man_node *n, \
+ struct roff_node *n, \
const struct man_meta *meta
struct termact {
@@ -63,7 +63,7 @@ static void print_man_node(DECL_ARGS);
static void print_man_head(struct termp *, const void *);
static void print_man_foot(struct termp *, const void *);
static void print_bvspace(struct termp *,
- const struct man_node *, int);
+ const struct roff_node *, int);
static int pre_B(DECL_ARGS);
static int pre_HP(DECL_ARGS);
@@ -140,7 +140,7 @@ terminal_man(void *arg, const struct man *man)
{
struct termp *p;
const struct man_meta *meta;
- struct man_node *n;
+ struct roff_node *n;
struct mtermp mt;
p = (struct termp *)arg;
@@ -191,7 +191,7 @@ terminal_man(void *arg, const struct man *man)
* first, print it.
*/
static void
-print_bvspace(struct termp *p, const struct man_node *n, int pardist)
+print_bvspace(struct termp *p, const struct roff_node *n, int pardist)
{
int i;
@@ -280,7 +280,7 @@ static int
pre_alternate(DECL_ARGS)
{
enum termfont font[2];
- struct man_node *nn;
+ struct roff_node *nn;
int savelit, i;
switch (n->tok) {
@@ -488,7 +488,7 @@ static int
pre_HP(DECL_ARGS)
{
struct roffsu su;
- const struct man_node *nn;
+ const struct roff_node *nn;
int len;
switch (n->type) {
@@ -562,7 +562,7 @@ static int
pre_IP(DECL_ARGS)
{
struct roffsu su;
- const struct man_node *nn;
+ const struct roff_node *nn;
int len, savelit;
switch (n->type) {
@@ -643,7 +643,7 @@ static int
pre_TP(DECL_ARGS)
{
struct roffsu su;
- struct man_node *nn;
+ struct roff_node *nn;
int len, savelit;
switch (n->type) {