aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/read.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-07-08 14:51:04 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-07-08 14:51:04 +0000
commitcf63fca8357771e9f99c05319bf7ae1d9325cbd8 (patch)
tree283184101587a0e648dd5fcc99c2e2c91519bf49 /read.c
parent9ef0c733fd442e250894494f24d6a17d1db58500 (diff)
downloadmandoc-cf63fca8357771e9f99c05319bf7ae1d9325cbd8.tar.gz
mandoc-cf63fca8357771e9f99c05319bf7ae1d9325cbd8.tar.zst
mandoc-cf63fca8357771e9f99c05319bf7ae1d9325cbd8.zip
1. Eliminate struct eqn, instead use the existing members
of struct roff_node which is allocated for each equation anyway. 2. Do not keep a list of equation parsers, one parser is enough. Minus fifty lines of code, no functional change.
Diffstat (limited to 'read.c')
-rw-r--r--read.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/read.c b/read.c
index c35c7ed7..2b3abde1 100644
--- a/read.c
+++ b/read.c
@@ -1,4 +1,4 @@
-/* $Id: read.c,v 1.189 2017/07/06 22:59:48 schwarze Exp $ */
+/* $Id: read.c,v 1.190 2017/07/08 14:51:04 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -540,14 +540,11 @@ rerun:
* currently open parse. Since we only get here if
* there does exist data (see tbl_data.c), we're
* guaranteed that something's been allocated.
- * Do the same for ROFF_EQN.
*/
if (rr == ROFF_TBL)
while ((span = roff_span(curp->roff)) != NULL)
roff_addtbl(curp->man, span);
- else if (rr == ROFF_EQN)
- roff_addeqn(curp->man, roff_eqn(curp->roff));
else if ((curp->man->macroset == MACROSET_MDOC ?
mdoc_parseln(curp->man, curp->line, ln.buf, of) :
man_parseln(curp->man, curp->line, ln.buf, of)) == 2)