summaryrefslogtreecommitdiffstats
path: root/term_tab.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-06-17 14:55:30 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-06-17 14:55:30 +0000
commitb22a929d117e71834f587cea03908a8196c8c4d0 (patch)
tree3221477a6d56ed4336a554f82a23f0bb3a68221c /term_tab.c
parent8b829c3fb9f3b6e04849fd535eeb826b618e533a (diff)
downloadmandoc-b22a929d117e71834f587cea03908a8196c8c4d0.tar.gz
tables leak tab settings to subsequent text
Diffstat (limited to 'term_tab.c')
-rw-r--r--term_tab.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/term_tab.c b/term_tab.c
index 2acfd46a..5251a842 100644
--- a/term_tab.c
+++ b/term_tab.c
@@ -88,6 +88,21 @@ term_tab_set(const struct termp *p, const char *arg)
tl->n++;
}
+/*
+ * Simplified version without a parser,
+ * never incremental, never periodic, for use by tbl(7).
+ */
+void
+term_tab_iset(size_t inc)
+{
+ if (tabs.a.n >= tabs.a.s) {
+ tabs.a.s += 8;
+ tabs.a.t = mandoc_reallocarray(tabs.a.t, tabs.a.s,
+ sizeof(*tabs.a.t));
+ }
+ tabs.a.t[tabs.a.n++] = inc;
+}
+
size_t
term_tab_next(size_t prev)
{