diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2015-01-27 05:20:31 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2015-01-27 05:20:31 +0000 |
commit | 9a5cd112466f00bfaaa3257295f65a3b699231d9 (patch) | |
tree | 86f7bd9fb5104210c4081d0b30ebe1cb9a96da1e /usr.bin/mandoc/mandoc.h | |
parent | 85dc18a2aeca1dcdd4571ef48ff16e7addb76fb5 (diff) |
Multiple parser and formatter fixes for line drawing in tbl(7).
* Allow mixing vertical line bars with the layout options
of the preceding layout cell.
* Correctly combine box options with layout lines.
* Correctly print vertical lines in data rows, with the right spacing.
* Correctly print cross markers and left and right ends of
horizontal lines even if vertical lines differ above and below.
* Avoid the bogus error message "no table data cells"
when a table data section starts with a horizontal line.
No increase in code size.
Diffstat (limited to 'usr.bin/mandoc/mandoc.h')
-rw-r--r-- | usr.bin/mandoc/mandoc.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.bin/mandoc/mandoc.h b/usr.bin/mandoc/mandoc.h index 53f93f202c4..06b25f0e480 100644 --- a/usr.bin/mandoc/mandoc.h +++ b/usr.bin/mandoc/mandoc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mandoc.h,v 1.131 2015/01/26 18:41:45 schwarze Exp $ */ +/* $OpenBSD: mandoc.h,v 1.132 2015/01/27 05:20:30 schwarze Exp $ */ /* * Copyright (c) 2010, 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org> @@ -206,6 +206,8 @@ struct tbl_opts { #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 */ }; /* @@ -215,7 +217,6 @@ struct tbl_opts { */ struct tbl_head { int ident; /* 0 <= unique id < cols */ - int vert; /* width of preceding vertical line */ struct tbl_head *next; struct tbl_head *prev; }; @@ -238,7 +239,7 @@ enum tbl_cellt { */ struct tbl_cell { struct tbl_cell *next; - int vert; /* width of preceding vertical line */ + int vert; /* width of subsequent vertical line */ enum tbl_cellt pos; size_t spacing; int flags; @@ -260,7 +261,7 @@ struct tbl_row { struct tbl_row *next; struct tbl_cell *first; struct tbl_cell *last; - int vert; /* trailing vertical line */ + int vert; /* width of left vertical line */ }; enum tbl_datt { @@ -299,12 +300,13 @@ struct tbl_span { 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 */ int flags; #define TBL_SPAN_FIRST (1 << 0) #define TBL_SPAN_LAST (1 << 1) enum tbl_spant pos; - struct tbl_span *next; }; enum eqn_boxt { |