summaryrefslogtreecommitdiffstats
path: root/term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-01-04 13:14:26 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-01-04 13:14:26 +0000
commitde12a3c94d73528ca77a6d4a2924953c96d34df0 (patch)
tree6fd9ab1ba79b0367e8e4e242d1f7125cd37c19b5 /term.c
parentb6b883b7b599dbe343a853c4f09d0d994f8ce23e (diff)
downloadmandoc-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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/term.c b/term.c
index e8ba8fb7..5d18a69d 100644
--- a/term.c
+++ b/term.c
@@ -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++);