summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-02-09 09:18:15 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-02-09 09:18:15 +0000
commit75f227792a0d34031aeeaec473483f07aa7c793c (patch)
tree4e0793668e9010ae4476bc9d1838485b6350b00b /main.c
parent31585348ea96dc3d531dd9a8fdbea4ad5ce4b927 (diff)
downloadmandoc-75f227792a0d34031aeeaec473483f07aa7c793c.tar.gz
Allow -man to process EQN as well. Also fix a segfault in missing case
statements in the post-handler for EQN in -mdoc and -man.
Diffstat (limited to 'main.c')
-rw-r--r--main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/main.c b/main.c
index 8ef19e68..308b4f72 100644
--- a/main.c
+++ b/main.c
@@ -866,8 +866,11 @@ rerun:
} else if (ROFF_EQN == rr) {
assert(curp->man || curp->mdoc);
assert(roff_eqn(curp->roff));
- if (curp->mdoc)
- mdoc_addeqn(curp->mdoc, roff_eqn(curp->roff));
+ rc = curp->mdoc ?
+ mdoc_addeqn(curp->mdoc,
+ roff_eqn(curp->roff)) :
+ man_addeqn(curp->man,
+ roff_eqn(curp->roff));
} else if (curp->man || curp->mdoc) {
rc = curp->man ?
man_parseln(curp->man,