aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/main.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-08-23 19:33:27 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-08-23 19:33:27 +0000
commit562feda136881753a6d27350397fddcabed5f805 (patch)
treed3f7e0febc857b60794f5ccc3a613666e6a31e39 /main.c
parentc56c17992552256b55134ead16c3e16164fd2e67 (diff)
downloadmandoc-562feda136881753a6d27350397fddcabed5f805.tar.gz
mandoc-562feda136881753a6d27350397fddcabed5f805.tar.zst
mandoc-562feda136881753a6d27350397fddcabed5f805.zip
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.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/main.c b/main.c
index 9061014a..cad22750 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.307 2018/08/09 17:30:36 schwarze Exp $ */
+/* $Id: main.c,v 1.308 2018/08/23 19:33:27 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2012, 2014-2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -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: