aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roff.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2020-02-27 01:43:52 +0000
committerIngo Schwarze <schwarze@openbsd.org>2020-02-27 01:43:52 +0000
commit88750dda2da444fce307d20d33700d72e7c49c7f (patch)
tree140fdcb1a59ea5418ca8046a300e844dadd832d6 /roff.h
parent4e9a246966125ec03e481374634f3448a906235b (diff)
downloadmandoc-88750dda2da444fce307d20d33700d72e7c49c7f.tar.gz
mandoc-88750dda2da444fce307d20d33700d72e7c49c7f.tar.zst
mandoc-88750dda2da444fce307d20d33700d72e7c49c7f.zip
Introduce the concept of nodes that are semantically transparent:
they are skipped when looking for previous or following high-level macros. Examples include roff(7) .ft, .ll, and .ta, mdoc(7) .Sm and .Tg, and man(7) .DT and .PD. Use this concept for a variety of improved decisions in various validators and formatters. While here, * remove a few const qualifiers on struct arguments that caused trouble; * get rid of some more Yoda notation in the vicinity; * and apply some other stylistic improvements in the vicinity. I found this class of issues while considering .Tg patches from kn@.
Diffstat (limited to 'roff.h')
-rw-r--r--roff.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/roff.h b/roff.h
index 736b9e0f..2cf8aeae 100644
--- a/roff.h
+++ b/roff.h
@@ -1,4 +1,4 @@
-/* $Id: roff.h,v 1.70 2020/01/19 18:02:00 schwarze Exp $ */
+/* $Id: roff.h,v 1.71 2020/02/27 01:43:52 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013-2015, 2017-2020 Ingo Schwarze <schwarze@openbsd.org>
@@ -549,5 +549,9 @@ struct roff_meta {
extern const char *const *roff_name;
-int arch_valid(const char *, enum mandoc_os);
-void deroff(char **, const struct roff_node *);
+int arch_valid(const char *, enum mandoc_os);
+void deroff(char **, const struct roff_node *);
+struct roff_node *roff_node_child(struct roff_node *);
+struct roff_node *roff_node_next(struct roff_node *);
+struct roff_node *roff_node_prev(struct roff_node *);
+int roff_node_transparent(struct roff_node *);