summaryrefslogtreecommitdiffstats
path: root/read.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-04-19 14:00:19 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-04-19 14:00:19 +0000
commiteed5e7f1fb85805f1b324c5a4501ed30467ae2a0 (patch)
tree78f09c634d1cfc1b83be85f07be7ee909cbd6d30 /read.c
parent344327def21ee64357a9cdf57c5352f1c5575708 (diff)
downloadmandoc-eed5e7f1fb85805f1b324c5a4501ed30467ae2a0.tar.gz
Decouple the token code for "no request or macro" from the individual
high-level parsers to allow further unification of functions that only need to recognize this code, but that don't care about different high-level macrosets beyond that.
Diffstat (limited to 'read.c')
-rw-r--r--read.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/read.c b/read.c
index 89f8aec3..002f34d8 100644
--- a/read.c
+++ b/read.c
@@ -293,17 +293,17 @@ choose_parser(struct mparse *curp)
curp->man = roff_man_alloc(curp->roff, curp, curp->defos,
curp->options & MPARSE_QUICK ? 1 : 0);
curp->man->macroset = MACROSET_MAN;
- curp->man->first->tok = MDOC_MAX;
+ curp->man->first->tok = TOKEN_NONE;
}
if (format == MPARSE_MDOC) {
mdoc_hash_init();
curp->man->macroset = MACROSET_MDOC;
- curp->man->first->tok = MDOC_MAX;
+ curp->man->first->tok = TOKEN_NONE;
} else {
man_hash_init();
curp->man->macroset = MACROSET_MAN;
- curp->man->first->tok = MAN_MAX;
+ curp->man->first->tok = TOKEN_NONE;
}
}
@@ -893,12 +893,11 @@ mparse_alloc(int options, enum mandoclevel wlevel, mandocmsg mmsg,
if (curp->options & MPARSE_MDOC) {
mdoc_hash_init();
curp->man->macroset = MACROSET_MDOC;
- curp->man->first->tok = MDOC_MAX;
} else if (curp->options & MPARSE_MAN) {
man_hash_init();
curp->man->macroset = MACROSET_MAN;
- curp->man->first->tok = MAN_MAX;
}
+ curp->man->first->tok = TOKEN_NONE;
return(curp);
}