summaryrefslogtreecommitdiffstats
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
commit819bd5dd19d9092c954577c8f97cf66eda73ed2e (patch)
tree7d50c7dd28b6bd80957a35892f273e44950901ed /mandoc_parse.h
parente09d59cf42439508d8f8215526891a754c5e4ebd (diff)
downloadmandoc-819bd5dd19d9092c954577c8f97cf66eda73ed2e.tar.gz
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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/mandoc_parse.h b/mandoc_parse.h
index ce55ce16..3f73a223 100644
--- a/mandoc_parse.h
+++ b/mandoc_parse.h
@@ -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;