aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit8a1e7c36cb8b9ca64c677d1ff9d786c9e46fd7b0 (patch)
tree8875174fa99d2fb62fe97ec308a53905416a4e4f /man_term.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 'man_term.c')
-rw-r--r--man_term.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/man_term.c b/man_term.c
index 416824ed..cd1a2099 100644
--- a/man_term.c
+++ b/man_term.c
@@ -1,4 +1,4 @@
-/* $Id: man_term.c,v 1.171 2015/04/02 21:36:50 schwarze Exp $ */
+/* $Id: man_term.c,v 1.172 2015/04/02 22:48:17 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -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) {