version 1.248, 2015/04/29 18:35:00 |
version 1.251, 2015/09/26 00:54:04 |
Line 78 term_end(struct termp *p) |
|
Line 78 term_end(struct termp *p) |
|
* the next column. However, if less than p->trailspace blanks, |
* the next column. However, if less than p->trailspace blanks, |
* which can be 0, 1, or 2, remain to the right margin, the line |
* which can be 0, 1, or 2, remain to the right margin, the line |
* will be broken. |
* will be broken. |
|
* - TERMP_BRTRSP: Consider trailing whitespace significant |
|
* when deciding whether the chunk fits or not. |
* - TERMP_BRIND: If the chunk does not fit and the output line has |
* - TERMP_BRIND: If the chunk does not fit and the output line has |
* to be broken, start the next line at the right margin instead |
* to be broken, start the next line at the right margin instead |
* of at the offset. Used together with TERMP_NOBREAK for the tags |
* of at the offset. Used together with TERMP_NOBREAK for the tags |
Line 291 term_flushln(struct termp *p) |
|
Line 293 term_flushln(struct termp *p) |
|
} else if (TERMP_DANGLE & p->flags) |
} else if (TERMP_DANGLE & p->flags) |
return; |
return; |
|
|
|
/* Trailing whitespace is significant in some columns. */ |
|
if (vis && vbl && (TERMP_BRTRSP & p->flags)) |
|
vis += vbl; |
|
|
/* If the column was overrun, break the line. */ |
/* If the column was overrun, break the line. */ |
if (maxvis < vis + p->trailspace * (*p->width)(p, ' ')) { |
if (maxvis < vis + p->trailspace * (*p->width)(p, ' ')) { |
(*p->endline)(p); |
(*p->endline)(p); |
Line 499 term_word(struct termp *p, const char *word) |
|
Line 505 term_word(struct termp *p, const char *word) |
|
p->flags |= TERMP_BACKBEFORE; |
p->flags |= TERMP_BACKBEFORE; |
} |
} |
} |
} |
|
/* Trim trailing backspace/blank pair. */ |
|
if (p->col > 2 && p->buf[p->col - 1] == ' ') |
|
p->col -= 2; |
continue; |
continue; |
default: |
default: |
continue; |
continue; |
Line 561 encode1(struct termp *p, int c) |
|
Line 570 encode1(struct termp *p, int c) |
|
p->fontq[p->fonti] : TERMFONT_NONE; |
p->fontq[p->fonti] : TERMFONT_NONE; |
|
|
if (p->flags & TERMP_BACKBEFORE) { |
if (p->flags & TERMP_BACKBEFORE) { |
p->buf[p->col++] = 8; |
if (p->buf[p->col - 1] == ' ') |
|
p->col--; |
|
else |
|
p->buf[p->col++] = 8; |
p->flags &= ~TERMP_BACKBEFORE; |
p->flags &= ~TERMP_BACKBEFORE; |
} |
} |
if (TERMFONT_UNDER == f || TERMFONT_BI == f) { |
if (TERMFONT_UNDER == f || TERMFONT_BI == f) { |
Line 808 term_vspan(const struct termp *p, const struct roffsu |
|
Line 820 term_vspan(const struct termp *p, const struct roffsu |
|
break; |
break; |
default: |
default: |
abort(); |
abort(); |
/* NOTREACHED */ |
|
} |
} |
ri = r > 0.0 ? r + 0.4995 : r - 0.4995; |
ri = r > 0.0 ? r + 0.4995 : r - 0.4995; |
return(ri < 66 ? ri : 1); |
return(ri < 66 ? ri : 1); |