summaryrefslogtreecommitdiffstats
path: root/mandoc.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-01-30 04:11:50 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-01-30 04:11:50 +0000
commit37b1fa2022515dadb78d40e740849dfc6bd68996 (patch)
tree12ce733b8e92a238d28dd6d17b90b0e65aae6690 /mandoc.h
parentbba48934f08def48237c6f8c8f3f11d6e6d61944 (diff)
downloadmandoc-37b1fa2022515dadb78d40e740849dfc6bd68996.tar.gz
Abolish struct tbl_head and replace it by an "int col" member in
struct tbl_cell. No functional change, minus 40 lines of code.
Diffstat (limited to 'mandoc.h')
-rw-r--r--mandoc.h14
1 files changed, 1 insertions, 13 deletions
diff --git a/mandoc.h b/mandoc.h
index bf0a1ad1..2267f1d8 100644
--- a/mandoc.h
+++ b/mandoc.h
@@ -204,17 +204,6 @@ struct tbl_opts {
int rvert; /* width of right vertical line */
};
-/*
- * The head of a table specifies all of its columns. When formatting a
- * tbl_span, iterate over these and plug in data from the tbl_span when
- * appropriate, using tbl_cell as a guide to placement.
- */
-struct tbl_head {
- int ident; /* 0 <= unique id < cols */
- struct tbl_head *next;
- struct tbl_head *prev;
-};
-
enum tbl_cellt {
TBL_CELL_CENTRE, /* c, C */
TBL_CELL_RIGHT, /* r, R */
@@ -236,6 +225,7 @@ struct tbl_cell {
int vert; /* width of subsequent vertical line */
enum tbl_cellt pos;
size_t spacing;
+ 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 */
@@ -245,7 +235,6 @@ struct tbl_cell {
#define TBL_CELL_UP (1 << 5) /* u, U */
#define TBL_CELL_WIGN (1 << 6) /* z, Z */
#define TBL_CELL_WMAX (1 << 7) /* x, X */
- struct tbl_head *head;
};
/*
@@ -290,7 +279,6 @@ enum tbl_spant {
*/
struct tbl_span {
struct tbl_opts *opts;
- struct tbl_head *head;
struct tbl_row *layout; /* layout row */
struct tbl_dat *first;
struct tbl_dat *last;