diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-01-30 04:11:50 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-01-30 04:11:50 +0000 |
commit | 71fa4361c47e9ed2f3c6521e9273fabb41aadc20 (patch) | |
tree | ac472a0b2793a26633a7405d837eaa7fa648ea74 /mandoc.h | |
parent | 8ea5dc6d40c942157256ddd510bd3fa16cb44303 (diff) | |
download | mandoc-71fa4361c47e9ed2f3c6521e9273fabb41aadc20.tar.gz mandoc-71fa4361c47e9ed2f3c6521e9273fabb41aadc20.tar.zst mandoc-71fa4361c47e9ed2f3c6521e9273fabb41aadc20.zip |
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.h | 16 |
1 files changed, 2 insertions, 14 deletions
@@ -1,4 +1,4 @@ -/* $Id: mandoc.h,v 1.192 2015/01/28 21:11:53 schwarze Exp $ */ +/* $Id: mandoc.h,v 1.193 2015/01/30 04:11:50 schwarze Exp $ */ /* * Copyright (c) 2010, 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org> @@ -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; |