diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-01-04 13:14:26 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-01-04 13:14:26 +0000 |
commit | de12a3c94d73528ca77a6d4a2924953c96d34df0 (patch) | |
tree | 6fd9ab1ba79b0367e8e4e242d1f7125cd37c19b5 /term.c | |
parent | b6b883b7b599dbe343a853c4f09d0d994f8ce23e (diff) | |
download | mandoc-de12a3c94d73528ca77a6d4a2924953c96d34df0.tar.gz |
Fix spacing for tables to use term_len(). Also make term.c properly
recode ASCII_HYPHEN and ASCII_NBRSP before passing back for widths.
Diffstat (limited to 'term.c')
-rw-r--r-- | term.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -677,6 +677,12 @@ term_strlen(const struct termp *p, const char *cp) if (rhs) for (i = 0; i < rsz; i++) sz += (*p->width)(p, *rhs++); + } else if (ASCII_NBRSP == *cp) { + sz += (*p->width)(p, ' '); + cp++; + } else if (ASCII_HYPH == *cp) { + sz += (*p->width)(p, '-'); + cp++; } else sz += (*p->width)(p, *cp++); |