diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2018-08-23 19:33:27 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2018-08-23 19:33:27 +0000 |
commit | 0278f391fed9ab1da96a2f7737b052872f5ced71 (patch) | |
tree | 3209d60689cc3f76bea249571de0e84eb7269ef8 /main.c | |
parent | a99c9a30e9f41eb3ce553ac0b2ac6ff963ebe49d (diff) | |
download | mandoc-0278f391fed9ab1da96a2f7737b052872f5ced71.tar.gz |
The upcoming .while request will have to re-execute roff(7) lines
parsed earlier, so they will have to be saved for reuse - but the
read.c preparser does not know yet whether a line contains a .while
request before passing it to the roff parser. To cope with that,
save all parsed lines for now. Even shortens the code by 20 lines.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -486,12 +486,6 @@ main(int argc, char *argv[]) curp.mp = mparse_alloc(options, curp.mmin, mmsg, curp.os_e, curp.os_s); - /* - * Conditionally start up the lookaside buffer before parsing. - */ - if (OUTT_MAN == curp.outtype) - mparse_keep(curp.mp); - if (argc < 1) { if (use_pager) tag_files = tag_init(); @@ -878,7 +872,7 @@ parse(struct curparse *curp, int fd, const char *file) tree_man(curp->outdata, man); break; case OUTT_MAN: - man_man(curp->outdata, man); + mparse_copy(curp->mp); break; case OUTT_PDF: case OUTT_ASCII: |