diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2011-01-16 01:11:51 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2011-01-16 01:11:51 +0000 |
commit | 57acadac999e4338490c1732cad3c069449eca78 (patch) | |
tree | 9c8cfd2a39027f644805494496b8baace7424400 /usr.bin/mandoc/tree.c | |
parent | 0a01ea2cc3d637b3da77799fb14097bf9cdb6fa8 (diff) |
Various tbl improvements from kristaps@:
* horizontal lines do not consume layout lines
* skip excessive data cells
* prepare rendering of spanned cells
* support vertical spans
Diffstat (limited to 'usr.bin/mandoc/tree.c')
-rw-r--r-- | usr.bin/mandoc/tree.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.bin/mandoc/tree.c b/usr.bin/mandoc/tree.c index 959b0a5b744..5ad54dd2cb0 100644 --- a/usr.bin/mandoc/tree.c +++ b/usr.bin/mandoc/tree.c @@ -1,4 +1,4 @@ -/* $Id: tree.c,v 1.11 2011/01/04 22:28:17 schwarze Exp $ */ +/* $Id: tree.c,v 1.12 2011/01/16 01:11:50 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -278,7 +278,12 @@ print_span(const struct tbl_span *sp, int indent) default: break; } - printf("[%s%s]", dp->string, dp->layout ? "" : "*"); + printf("[\"%s\"", dp->string ? dp->string : ""); + if (dp->spans) + printf("(%d)", dp->spans); + if (NULL == dp->layout) + putchar('*'); + putchar(']'); if (dp->next) putchar(' '); } |