diff options
author | 2011-02-09 09:18:15 +0000 | |
---|---|---|
committer | 2011-02-09 09:18:15 +0000 | |
commit | dfc3c322d2d9553a0f7c08a28a772b13beec5e7f (patch) | |
tree | 9f45d0bb1130a5791c96e9accdc1069bd14bc4d3 /main.c | |
parent | 7e1515051811beb532cd49dfdf82f778dde90e81 (diff) | |
download | mandoc-dfc3c322d2d9553a0f7c08a28a772b13beec5e7f.tar.gz mandoc-dfc3c322d2d9553a0f7c08a28a772b13beec5e7f.tar.zst mandoc-dfc3c322d2d9553a0f7c08a28a772b13beec5e7f.zip |
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.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.144 2011/02/09 09:05:52 kristaps Exp $ */ +/* $Id: main.c,v 1.145 2011/02/09 09:18:15 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -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, |