diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-07-08 17:52:49 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-07-08 17:52:49 +0000 |
commit | 093b704b943e58cc16bd6065cc571372f7059b56 (patch) | |
tree | b258d28e058a17b345ca4067b1922e772bf9b217 /read.c | |
parent | a7d3439bd1214fd20650366b5177cb87d787982d (diff) | |
download | mandoc-093b704b943e58cc16bd6065cc571372f7059b56.tar.gz |
Simplify by creating struct roff_node syntax tree nodes for tbl(7)
right from roff_parseln() rather than delegating to read.c,
similar to what i just did for eqn(7).
The interface function roff_span() becomes obsolete and is deleted,
the former interface function roff_addtbl() becomes static,
the interface functions tbl_read() and tbl_cdata() become void,
and minus twelve linus of code.
No functional change.
Diffstat (limited to 'read.c')
-rw-r--r-- | read.c | 15 |
1 files changed, 1 insertions, 14 deletions
@@ -42,7 +42,6 @@ #include "mdoc.h" #include "man.h" #include "libmandoc.h" -#include "roff_int.h" #define REPARSE_LIMIT 1000 @@ -343,7 +342,6 @@ choose_parser(struct mparse *curp) static int mparse_buf_r(struct mparse *curp, struct buf blk, size_t i, int start) { - const struct tbl_span *span; struct buf ln; const char *save_file; char *cp; @@ -534,18 +532,7 @@ rerun: if (curp->man->macroset == MACROSET_NONE) choose_parser(curp); - /* - * Lastly, push down into the parsers themselves. - * If libroff returns ROFF_TBL, then add it to the - * 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. - */ - - if (rr == ROFF_TBL) - while ((span = roff_span(curp->roff)) != NULL) - roff_addtbl(curp->man, span); - else if ((curp->man->macroset == MACROSET_MDOC ? + 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) break; |