diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-05-17 13:11:40 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-05-17 13:11:40 +0000 |
commit | 79f16537cd09bc054f9d18169708d63030803d98 (patch) | |
tree | 4767fd0ec31d8980a9ff3f3827c3c87bd065e10c /tbl_layout.c | |
parent | a2bdf1f864112905d51fe6770a86ecd3823ce2c9 (diff) | |
download | mandoc-79f16537cd09bc054f9d18169708d63030803d98.tar.gz mandoc-79f16537cd09bc054f9d18169708d63030803d98.tar.zst mandoc-79f16537cd09bc054f9d18169708d63030803d98.zip |
In tbl layouts, we puked if a space didn't followed a vertical bar
(found by Yuri Pankov). This was due to looking for modifiers for the
vertical bar. This has been fixed, along with other special-key layout
types.
Diffstat (limited to 'tbl_layout.c')
-rw-r--r-- | tbl_layout.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/tbl_layout.c b/tbl_layout.c index 936685c1..0aa18dcb 100644 --- a/tbl_layout.c +++ b/tbl_layout.c @@ -1,4 +1,4 @@ -/* $Id: tbl_layout.c,v 1.19 2011/04/07 01:08:42 joerg Exp $ */ +/* $Id: tbl_layout.c,v 1.20 2011/05/17 13:11:40 kristaps Exp $ */ /* * Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -72,6 +72,23 @@ mods(struct tbl_node *tbl, struct tbl_cell *cp, char buf[5]; int i; + /* Not all types accept modifiers. */ + + switch (cp->pos) { + case (TBL_CELL_DOWN): + /* FALLTHROUGH */ + case (TBL_CELL_HORIZ): + /* FALLTHROUGH */ + case (TBL_CELL_DHORIZ): + /* FALLTHROUGH */ + case (TBL_CELL_VERT): + /* FALLTHROUGH */ + case (TBL_CELL_DVERT): + return(1); + default: + break; + } + mod: /* * XXX: since, at least for now, modifiers are non-conflicting |