aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandoc_parse.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2019-11-09 14:39:49 +0000
committerIngo Schwarze <schwarze@openbsd.org>2019-11-09 14:39:49 +0000
commit156b76737c1c71b31afaca9b589a8636adca8d05 (patch)
tree8c9f889565d440cdc278114eb1a5012acb6e7dd8 /mandoc_parse.h
parent625e2eb1b35f1dfdffd4fba3c45ce820e5c8c863 (diff)
downloadmandoc-156b76737c1c71b31afaca9b589a8636adca8d05.tar.gz
mandoc-156b76737c1c71b31afaca9b589a8636adca8d05.tar.zst
mandoc-156b76737c1c71b31afaca9b589a8636adca8d05.zip
In the past, generating comment nodes stopped at the .TH or .Dd
macro, which is usually close to the beginning of the file, right after the Copyright header comments. But espie@ found horrible input files in the textproc/fstrcmp port that generate lots of parse nodes before even getting to the header macro. In some formatters, comment nodes after some kinds of real content triggered assertions. So make sure generation of comment nodes stops once real content is encountered.
Diffstat (limited to 'mandoc_parse.h')
-rw-r--r--mandoc_parse.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/mandoc_parse.h b/mandoc_parse.h
index 61341f0d..b8b29dd9 100644
--- a/mandoc_parse.h
+++ b/mandoc_parse.h
@@ -1,4 +1,4 @@
-/* $Id: mandoc_parse.h,v 1.4 2018/12/30 00:49:55 schwarze Exp $ */
+/* $Id: mandoc_parse.h,v 1.5 2019/11/09 14:39:49 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014,2015,2016,2017,2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -29,6 +29,7 @@
#define MPARSE_UTF8 (1 << 4) /* accept UTF-8 input */
#define MPARSE_LATIN1 (1 << 5) /* accept ISO-LATIN-1 input */
#define MPARSE_VALIDATE (1 << 6) /* call validation functions */
+#define MPARSE_COMMENT (1 << 7) /* save comments in the tree */
struct roff_meta;