aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit0e017743181b76a26d2758234eb98fc736acc722 (patch)
tree7ba171af8115765e30ae82c5cb2744c4f99fbf0b /read.c
parent8b443f186e2557df92e04f3b82a2ce9d2011cb7e (diff)
downloadmandoc-0e017743181b76a26d2758234eb98fc736acc722.tar.gz
mandoc-0e017743181b76a26d2758234eb98fc736acc722.tar.zst
mandoc-0e017743181b76a26d2758234eb98fc736acc722.zip
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.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/read.c b/read.c
index 6ca9232a..b4b71b5d 100644
--- a/read.c
+++ b/read.c
@@ -1,4 +1,4 @@
-/* $Id: read.c,v 1.137 2015/04/18 17:28:36 schwarze Exp $ */
+/* $Id: read.c,v 1.138 2015/04/19 14:00:20 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -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);
}