aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-12-12 21:54:35 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-12-12 21:54:35 +0000
commitabe535d017ebcf70bf575e3048cb4ea11f75a600 (patch)
tree89012c9ae6f95bc0cf1e3a34387ff22ae072d23b
parentfbcda63a2f8d075778d869bf8b5e39be061e27bb (diff)
downloadmandoc-abe535d017ebcf70bf575e3048cb4ea11f75a600.tar.gz
mandoc-abe535d017ebcf70bf575e3048cb4ea11f75a600.tar.zst
mandoc-abe535d017ebcf70bf575e3048cb4ea11f75a600.zip
Cleanup, no functional change:
No need to expose the tbl(7) syntax tree data structures everywhere. Move them to their own include file, "tbl.h", and improve comments.
-rw-r--r--Makefile9
-rw-r--r--eqn.c3
-rw-r--r--mandoc.h109
-rw-r--r--mandoc_headers.350
-rw-r--r--out.c3
-rw-r--r--roff.c5
-rw-r--r--tbl.35
-rw-r--r--tbl.c5
-rw-r--r--tbl.h122
-rw-r--r--tbl_data.c5
-rw-r--r--tbl_html.c4
-rw-r--r--tbl_layout.c5
-rw-r--r--tbl_opts.c3
-rw-r--r--tbl_term.c3
-rw-r--r--tree.c3
15 files changed, 194 insertions, 140 deletions
diff --git a/Makefile b/Makefile
index e5661c42..a9ca0d34 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.520 2018/08/09 17:28:23 schwarze Exp $
+# $Id: Makefile,v 1.521 2018/12/12 21:54:35 schwarze Exp $
#
# Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
# Copyright (c) 2011, 2013-2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -202,6 +202,7 @@ DISTFILES = INSTALL \
tag.h \
tbl.3 \
tbl.7 \
+ tbl.h \
term.h \
$(SRCS) \
$(TESTSRCS)
@@ -351,7 +352,8 @@ WWW_INCS = man.h.html \
mandoc_aux.h.html \
mansearch.h.html \
mdoc.h.html \
- roff.h.html
+ roff.h.html \
+ tbl.h.html
# === USER CONFIGURATION ===============================================
@@ -422,7 +424,7 @@ lib-install: libmandoc.a
mkdir -p $(DESTDIR)$(INCLUDEDIR)
mkdir -p $(DESTDIR)$(MANDIR)/man3
$(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR)
- $(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h roff.h \
+ $(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h roff.h tbl.h \
$(DESTDIR)$(INCLUDEDIR)
$(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \
mansearch.3 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3
@@ -482,6 +484,7 @@ uninstall:
rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_aux.h
rm -f $(DESTDIR)$(INCLUDEDIR)/mdoc.h
rm -f $(DESTDIR)$(INCLUDEDIR)/roff.h
+ rm -f $(DESTDIR)$(INCLUDEDIR)/tbl.h
[ ! -e $(DESTDIR)$(INCLUDEDIR) ] || rmdir $(DESTDIR)$(INCLUDEDIR)
regress: all
diff --git a/eqn.c b/eqn.c
index 01601a71..d31ef5f8 100644
--- a/eqn.c
+++ b/eqn.c
@@ -1,4 +1,4 @@
-/* $Id: eqn.c,v 1.78 2017/07/15 16:26:17 schwarze Exp $ */
+/* $Id: eqn.c,v 1.79 2018/12/12 21:54:35 schwarze Exp $ */
/*
* Copyright (c) 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -30,6 +30,7 @@
#include "mandoc_aux.h"
#include "mandoc.h"
#include "roff.h"
+#include "tbl.h"
#include "libmandoc.h"
#include "libroff.h"
diff --git a/mandoc.h b/mandoc.h
index 081d8f8d..5e3a42a9 100644
--- a/mandoc.h
+++ b/mandoc.h
@@ -1,7 +1,7 @@
-/* $Id: mandoc.h,v 1.255 2018/11/25 19:24:20 schwarze Exp $ */
+/* $Id: mandoc.h,v 1.256 2018/12/12 21:54:35 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2010-2018 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2010, 2012-2018 Ingo Schwarze <schwarze@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -241,111 +241,6 @@ enum mandocerr {
MANDOCERR_MAX
};
-struct tbl_opts {
- char tab; /* cell-separator */
- char decimal; /* decimal point */
- int opts;
-#define TBL_OPT_CENTRE (1 << 0)
-#define TBL_OPT_EXPAND (1 << 1)
-#define TBL_OPT_BOX (1 << 2)
-#define TBL_OPT_DBOX (1 << 3)
-#define TBL_OPT_ALLBOX (1 << 4)
-#define TBL_OPT_NOKEEP (1 << 5)
-#define TBL_OPT_NOSPACE (1 << 6)
-#define TBL_OPT_NOWARN (1 << 7)
- int cols; /* number of columns */
- int lvert; /* width of left vertical line */
- int rvert; /* width of right vertical line */
-};
-
-enum tbl_cellt {
- TBL_CELL_CENTRE, /* c, C */
- TBL_CELL_RIGHT, /* r, R */
- TBL_CELL_LEFT, /* l, L */
- TBL_CELL_NUMBER, /* n, N */
- TBL_CELL_SPAN, /* s, S */
- TBL_CELL_LONG, /* a, A */
- TBL_CELL_DOWN, /* ^ */
- TBL_CELL_HORIZ, /* _, - */
- TBL_CELL_DHORIZ, /* = */
- TBL_CELL_MAX
-};
-
-/*
- * A cell in a layout row.
- */
-struct tbl_cell {
- struct tbl_cell *next;
- char *wstr; /* min width represented as a string */
- size_t width; /* minimum column width */
- size_t spacing; /* to the right of the column */
- int vert; /* width of subsequent vertical line */
- int col; /* column number, starting from 0 */
- int flags;
-#define TBL_CELL_TALIGN (1 << 0) /* t, T */
-#define TBL_CELL_BALIGN (1 << 1) /* d, D */
-#define TBL_CELL_BOLD (1 << 2) /* fB, B, b */
-#define TBL_CELL_ITALIC (1 << 3) /* fI, I, i */
-#define TBL_CELL_EQUAL (1 << 4) /* e, E */
-#define TBL_CELL_UP (1 << 5) /* u, U */
-#define TBL_CELL_WIGN (1 << 6) /* z, Z */
-#define TBL_CELL_WMAX (1 << 7) /* x, X */
- enum tbl_cellt pos;
-};
-
-/*
- * A layout row.
- */
-struct tbl_row {
- struct tbl_row *next;
- struct tbl_cell *first;
- struct tbl_cell *last;
- int vert; /* width of left vertical line */
-};
-
-enum tbl_datt {
- TBL_DATA_NONE, /* has no data */
- TBL_DATA_DATA, /* consists of data/string */
- TBL_DATA_HORIZ, /* horizontal line */
- TBL_DATA_DHORIZ, /* double-horizontal line */
- TBL_DATA_NHORIZ, /* squeezed horizontal line */
- TBL_DATA_NDHORIZ /* squeezed double-horizontal line */
-};
-
-/*
- * A cell within a row of data. The "string" field contains the actual
- * string value that's in the cell. The rest is layout.
- */
-struct tbl_dat {
- struct tbl_cell *layout; /* layout cell */
- struct tbl_dat *next;
- char *string; /* data (NULL if not TBL_DATA_DATA) */
- int hspans; /* how many horizontal spans follow */
- int vspans; /* how many vertical spans follow */
- int block; /* T{ text block T} */
- enum tbl_datt pos;
-};
-
-enum tbl_spant {
- TBL_SPAN_DATA, /* span consists of data */
- TBL_SPAN_HORIZ, /* span is horizontal line */
- TBL_SPAN_DHORIZ /* span is double horizontal line */
-};
-
-/*
- * A row of data in a table.
- */
-struct tbl_span {
- struct tbl_opts *opts;
- struct tbl_row *layout; /* layout row */
- struct tbl_dat *first;
- struct tbl_dat *last;
- struct tbl_span *prev;
- struct tbl_span *next;
- int line; /* parse line */
- enum tbl_spant pos;
-};
-
enum eqn_boxt {
EQN_TEXT, /* text (number, variable, whatever) */
EQN_SUBEXPR, /* nested `eqn' subexpression */
diff --git a/mandoc_headers.3 b/mandoc_headers.3
index a70e66c4..e2c8f5a7 100644
--- a/mandoc_headers.3
+++ b/mandoc_headers.3
@@ -1,4 +1,4 @@
-.Dd $Mdocdate: August 24 2018 $
+.Dd $Mdocdate: December 12 2018 $
.Dt MANDOC_HEADERS 3
.Os
.Sh NAME
@@ -25,13 +25,13 @@ separate from each other:
.Pp
.Bl -dash -offset indent -compact
.It
-.Xr mdoc 7
+.Xr roff 7
parser
.It
-.Xr man 7
+.Xr mdoc 7
parser
.It
-.Xr roff 7
+.Xr man 7
parser
.It
.Xr tbl 7
@@ -45,6 +45,8 @@ terminal formatters
HTML formatters
.It
search tools
+.It
+main programs
.El
.Pp
Note that mere usage of an opaque struct type does
@@ -56,14 +58,18 @@ any other mandoc header.
These headers should be included before any other mandoc headers.
.Bl -tag -width Ds
.It Qq Pa mandoc_aux.h
+Memory allocation utility functions; can be used everywhere.
+.Pp
Requires
.In sys/types.h
for
.Vt size_t .
.Pp
-Provides the utility functions documented in
+Provides the functions documented in
.Xr mandoc_malloc 3 .
.It Qq Pa mandoc_ohash.h
+Hashing utility functions; can be used everywhere.
+.Pp
Requires
.In stddef.h
for
@@ -78,6 +84,9 @@ Includes
and provides
.Fn mandoc_ohash_init .
.It Qq Pa mandoc.h
+Error handling utilities and top level parser interface;
+can be used everywhere.
+.Pp
Requires
.In sys/types.h
for
@@ -88,18 +97,10 @@ Provides
.Vt enum mandocerr ,
.Vt enum mandoclevel ,
.Vt enum mandoc_os ,
-.Vt enum tbl_cellt ,
-.Vt enum tbl_datt ,
-.Vt enum tbl_spant ,
.Vt enum eqn_boxt ,
.Vt enum eqn_fontt ,
.Vt enum eqn_pilet ,
.Vt enum eqn_post ,
-.Vt struct tbl_opts ,
-.Vt struct tbl_cell ,
-.Vt struct tbl_row ,
-.Vt struct tbl_dat ,
-.Vt struct tbl_span ,
.Vt struct eqn_box ,
the function prototype typedef
.Fn mandocmsg ,
@@ -122,7 +123,30 @@ Uses the type
from
.Pa roff.h
as an opaque type for function prototypes.
+.It Qq Pa tbl.h
+Data structures for the
+.Xr tbl 7
+parse tree; can be used everywhere.
+.Pp
+Requires
+.In sys/types.h
+for
+.Vt size_t .
+.Pp
+Provides
+.Vt enum tbl_cellt ,
+.Vt enum tbl_datt ,
+.Vt enum tbl_spant ,
+.Vt struct tbl_opts ,
+.Vt struct tbl_cell ,
+.Vt struct tbl_row ,
+.Vt struct tbl_dat ,
+and
+.Vt struct tbl_span .
.It Qq Pa mandoc_xr.h
+Cross reference validation; intended for use in the main program
+and in parsers, but not in formatters.
+.Pp
Provides
.Vt struct mandoc_xr
and the functions
diff --git a/out.c b/out.c
index d496e86e..9ab25627 100644
--- a/out.c
+++ b/out.c
@@ -1,4 +1,4 @@
-/* $Id: out.c,v 1.75 2018/11/29 01:55:02 schwarze Exp $ */
+/* $Id: out.c,v 1.76 2018/12/12 21:54:35 schwarze Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011,2014,2015,2017,2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -28,6 +28,7 @@
#include "mandoc_aux.h"
#include "mandoc.h"
+#include "tbl.h"
#include "out.h"
struct tbl_colgroup {
diff --git a/roff.c b/roff.c
index 6f54a9a8..496e214f 100644
--- a/roff.c
+++ b/roff.c
@@ -1,4 +1,4 @@
-/* $Id: roff.c,v 1.344 2018/12/04 02:53:51 schwarze Exp $ */
+/* $Id: roff.c,v 1.345 2018/12/12 21:54:35 schwarze Exp $ */
/*
* Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -28,10 +28,11 @@
#include <stdlib.h>
#include <string.h>
-#include "mandoc.h"
#include "mandoc_aux.h"
#include "mandoc_ohash.h"
+#include "mandoc.h"
#include "roff.h"
+#include "tbl.h"
#include "libmandoc.h"
#include "roff_int.h"
#include "libroff.h"
diff --git a/tbl.3 b/tbl.3
index 71714e91..10e18fc6 100644
--- a/tbl.3
+++ b/tbl.3
@@ -1,4 +1,4 @@
-.\" $Id: tbl.3,v 1.3 2018/08/24 23:12:34 schwarze Exp $
+.\" $Id: tbl.3,v 1.4 2018/12/12 21:54:35 schwarze Exp $
.\"
.\" Copyright (c) 2013 Ingo Schwarze <schwarze@openbsd.org>
.\"
@@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: August 24 2018 $
+.Dd $Mdocdate: December 12 2018 $
.Dt TBL 3
.Os
.Sh NAME
@@ -27,6 +27,7 @@
.Nd roff table parser library for mandoc
.Sh SYNOPSIS
.In mandoc.h
+.In tbl.h
.In libmandoc.h
.In libroff.h
.Ft struct tbl_node *
diff --git a/tbl.c b/tbl.c
index 3fb8e52a..b09e34df 100644
--- a/tbl.c
+++ b/tbl.c
@@ -1,4 +1,4 @@
-/* $Id: tbl.c,v 1.42 2017/07/08 17:52:50 schwarze Exp $ */
+/* $Id: tbl.c,v 1.43 2018/12/12 21:54:35 schwarze Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -25,8 +25,9 @@
#include <string.h>
#include <time.h>
-#include "mandoc.h"
#include "mandoc_aux.h"
+#include "mandoc.h"
+#include "tbl.h"
#include "libmandoc.h"
#include "libroff.h"
diff --git a/tbl.h b/tbl.h
new file mode 100644
index 00000000..365ae929
--- /dev/null
+++ b/tbl.h
@@ -0,0 +1,122 @@
+/* $Id: tbl.h,v 1.1 2018/12/12 21:54:35 schwarze Exp $ */
+/*
+ * Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
+ * Copyright (c) 2014, 2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+struct tbl_opts {
+ int opts;
+#define TBL_OPT_ALLBOX (1 << 0) /* Option "allbox". */
+#define TBL_OPT_BOX (1 << 1) /* Option "box". */
+#define TBL_OPT_CENTRE (1 << 2) /* Option "center". */
+#define TBL_OPT_DBOX (1 << 3) /* Option "doublebox". */
+#define TBL_OPT_EXPAND (1 << 4) /* Option "expand". */
+#define TBL_OPT_NOKEEP (1 << 5) /* Option "nokeep". */
+#define TBL_OPT_NOSPACE (1 << 6) /* Option "nospaces". */
+#define TBL_OPT_NOWARN (1 << 7) /* Option "nowarn". */
+ int cols; /* Number of columns. */
+ int lvert; /* Width of left vertical line. */
+ int rvert; /* Width of right vertical line. */
+ char tab; /* Option "tab": cell separator. */
+ char decimal; /* Option "decimalpoint". */
+};
+
+enum tbl_cellt {
+ TBL_CELL_CENTRE, /* c, C */
+ TBL_CELL_RIGHT, /* r, R */
+ TBL_CELL_LEFT, /* l, L */
+ TBL_CELL_NUMBER, /* n, N */
+ TBL_CELL_SPAN, /* s, S */
+ TBL_CELL_LONG, /* a, A */
+ TBL_CELL_DOWN, /* ^ */
+ TBL_CELL_HORIZ, /* _, - */
+ TBL_CELL_DHORIZ, /* = */
+ TBL_CELL_MAX
+};
+
+/*
+ * A cell in a layout row.
+ */
+struct tbl_cell {
+ struct tbl_cell *next; /* Layout cell to the right. */
+ char *wstr; /* Min width represented as a string. */
+ size_t width; /* Minimum column width. */
+ size_t spacing; /* To the right of the column. */
+ int vert; /* Width of subsequent vertical line. */
+ int col; /* Column number, starting from 0. */
+ int flags;
+#define TBL_CELL_BOLD (1 << 0) /* b, B, fB */
+#define TBL_CELL_ITALIC (1 << 1) /* i, I, fI */
+#define TBL_CELL_TALIGN (1 << 2) /* t, T */
+#define TBL_CELL_UP (1 << 3) /* u, U */
+#define TBL_CELL_BALIGN (1 << 4) /* d, D */
+#define TBL_CELL_WIGN (1 << 5) /* z, Z */
+#define TBL_CELL_EQUAL (1 << 6) /* e, E */
+#define TBL_CELL_WMAX (1 << 7) /* x, X */
+ enum tbl_cellt pos;
+};
+
+/*
+ * A layout row.
+ */
+struct tbl_row {
+ struct tbl_row *next; /* Layout row below. */
+ struct tbl_cell *first; /* Leftmost layout cell. */
+ struct tbl_cell *last; /* Rightmost layout cell. */
+ int vert; /* Width of left vertical line. */
+};
+
+enum tbl_datt {
+ TBL_DATA_NONE, /* Uninitialized row. */
+ TBL_DATA_DATA, /* Contains data rather than a line. */
+ TBL_DATA_HORIZ, /* _: connecting horizontal line. */
+ TBL_DATA_DHORIZ, /* =: connecting double horizontal line. */
+ TBL_DATA_NHORIZ, /* \_: isolated horizontal line. */
+ TBL_DATA_NDHORIZ /* \=: isolated double horizontal line. */
+};
+
+/*
+ * A cell within a row of data. The "string" field contains the
+ * actual string value that's in the cell. The rest is layout.
+ */
+struct tbl_dat {
+ struct tbl_dat *next; /* Data cell to the right. */
+ struct tbl_cell *layout; /* Associated layout cell. */
+ char *string; /* Data, or NULL if not TBL_DATA_DATA. */
+ int hspans; /* How many horizontal spans follow. */
+ int vspans; /* How many vertical spans follow. */
+ int block; /* T{ text block T} */
+ enum tbl_datt pos;
+};
+
+enum tbl_spant {
+ TBL_SPAN_DATA, /* Contains data rather than a line. */
+ TBL_SPAN_HORIZ, /* _: horizontal line. */
+ TBL_SPAN_DHORIZ /* =: double horizontal line. */
+};
+
+/*
+ * A row of data in a table.
+ */
+struct tbl_span {
+ struct tbl_opts *opts; /* Options for the table as a whole. */
+ struct tbl_span *prev; /* Data row above. */
+ struct tbl_span *next; /* Data row below. */
+ struct tbl_row *layout; /* Associated layout row. */
+ struct tbl_dat *first; /* Leftmost data cell. */
+ struct tbl_dat *last; /* Rightmost data cell. */
+ int line; /* Input file line number. */
+ enum tbl_spant pos;
+};
diff --git a/tbl_data.c b/tbl_data.c
index 577da6a1..9047fd87 100644
--- a/tbl_data.c
+++ b/tbl_data.c
@@ -1,4 +1,4 @@
-/* $Id: tbl_data.c,v 1.47 2018/11/25 21:17:34 schwarze Exp $ */
+/* $Id: tbl_data.c,v 1.48 2018/12/12 21:54:35 schwarze Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -25,8 +25,9 @@
#include <string.h>
#include <time.h>
-#include "mandoc.h"
#include "mandoc_aux.h"
+#include "mandoc.h"
+#include "tbl.h"
#include "libmandoc.h"
#include "libroff.h"
diff --git a/tbl_html.c b/tbl_html.c
index 56fdcfb0..d516be9e 100644
--- a/tbl_html.c
+++ b/tbl_html.c
@@ -1,4 +1,4 @@
-/* $Id: tbl_html.c,v 1.29 2018/11/26 21:06:02 schwarze Exp $ */
+/* $Id: tbl_html.c,v 1.30 2018/12/12 21:54:35 schwarze Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -24,7 +24,7 @@
#include <stdlib.h>
#include <string.h>
-#include "mandoc.h"
+#include "tbl.h"
#include "out.h"
#include "html.h"
diff --git a/tbl_layout.c b/tbl_layout.c
index 42fc0e82..e0573ec1 100644
--- a/tbl_layout.c
+++ b/tbl_layout.c
@@ -1,4 +1,4 @@
-/* $Id: tbl_layout.c,v 1.44 2017/06/27 18:25:02 schwarze Exp $ */
+/* $Id: tbl_layout.c,v 1.45 2018/12/12 21:54:35 schwarze Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2012, 2014, 2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -25,8 +25,9 @@
#include <string.h>
#include <time.h>
-#include "mandoc.h"
#include "mandoc_aux.h"
+#include "mandoc.h"
+#include "tbl.h"
#include "libmandoc.h"
#include "libroff.h"
diff --git a/tbl_opts.c b/tbl_opts.c
index f2f5942a..6f184ffe 100644
--- a/tbl_opts.c
+++ b/tbl_opts.c
@@ -1,4 +1,4 @@
-/* $Id: tbl_opts.c,v 1.21 2015/09/26 00:54:04 schwarze Exp $ */
+/* $Id: tbl_opts.c,v 1.22 2018/12/12 21:54:35 schwarze Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -25,6 +25,7 @@
#include <string.h>
#include "mandoc.h"
+#include "tbl.h"
#include "libmandoc.h"
#include "libroff.h"
diff --git a/tbl_term.c b/tbl_term.c
index 3bf48933..9e533bfc 100644
--- a/tbl_term.c
+++ b/tbl_term.c
@@ -1,4 +1,4 @@
-/* $Id: tbl_term.c,v 1.65 2018/11/29 23:08:13 schwarze Exp $ */
+/* $Id: tbl_term.c,v 1.66 2018/12/12 21:54:35 schwarze Exp $ */
/*
* Copyright (c) 2009, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011-2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -26,6 +26,7 @@
#include <string.h>
#include "mandoc.h"
+#include "tbl.h"
#include "out.h"
#include "term.h"
diff --git a/tree.c b/tree.c
index f78767ce..63f594f5 100644
--- a/tree.c
+++ b/tree.c
@@ -1,4 +1,4 @@
-/* $Id: tree.c,v 1.80 2018/11/25 19:24:20 schwarze Exp $ */
+/* $Id: tree.c,v 1.81 2018/12/12 21:54:35 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013,2014,2015,2017,2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -29,6 +29,7 @@
#include "roff.h"
#include "mdoc.h"
#include "man.h"
+#include "tbl.h"
#include "main.h"
static void print_box(const struct eqn_box *, int);