diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-06-14 18:23:37 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-06-14 18:23:37 +0000 |
commit | 43258921bb262c2ae6d7a3e9569c376feb72c95b (patch) | |
tree | 123c8bccd055e9a7f8749411d8b8a87ef5e30706 /term.c | |
parent | d687586337f23b878d3678fc908d2c30b540a058 (diff) | |
download | mandoc-43258921bb262c2ae6d7a3e9569c376feb72c95b.tar.gz mandoc-43258921bb262c2ae6d7a3e9569c376feb72c95b.tar.zst mandoc-43258921bb262c2ae6d7a3e9569c376feb72c95b.zip |
let \l use the right fill character
Diffstat (limited to 'term.c')
-rw-r--r-- | term.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,4 +1,4 @@ -/* $Id: term.c,v 1.271 2017/06/14 17:51:15 schwarze Exp $ */ +/* $Id: term.c,v 1.272 2017/06/14 18:23:37 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2017 Ingo Schwarze <schwarze@openbsd.org> @@ -547,7 +547,7 @@ term_word(struct termp *p, const char *word) } continue; case ESCAPE_HLINE: - if ((seq = a2roffsu(seq, &su, SCALE_EM)) == NULL) + if ((cp = a2roffsu(seq, &su, SCALE_EM)) == NULL) continue; uc = term_hen(p, &su); if (uc <= 0) { @@ -556,10 +556,10 @@ term_word(struct termp *p, const char *word) lsz = p->tcol->rmargin - p->tcol->offset; } else lsz = uc; - if (*seq == '\0') + if (*cp == seq[-1]) uc = -1; - else if (*seq == '\\') { - seq++; + else if (*cp == '\\') { + seq = cp + 1; esc = mandoc_escape(&seq, &cp, &sz); switch (esc) { case ESCAPE_UNICODE: @@ -576,7 +576,7 @@ term_word(struct termp *p, const char *word) break; } } else - uc = *seq; + uc = *cp; if (uc < 0x20 || (uc > 0x7E && uc < 0xA0)) uc = '_'; if (p->enc == TERMENC_ASCII) { |