version 1.8, 2017/06/06 15:01:04 |
version 1.9, 2017/06/07 17:38:26 |
Line 60 roff_term_pre_br(ROFF_TERM_ARGS) |
|
Line 60 roff_term_pre_br(ROFF_TERM_ARGS) |
|
{ |
{ |
term_newln(p); |
term_newln(p); |
if (p->flags & TERMP_BRIND) { |
if (p->flags & TERMP_BRIND) { |
p->offset = p->rmargin; |
p->tcol->offset = p->tcol->rmargin; |
p->rmargin = p->maxrmargin; |
p->tcol->rmargin = p->maxrmargin; |
p->flags &= ~(TERMP_NOBREAK | TERMP_BRIND); |
p->flags &= ~(TERMP_NOBREAK | TERMP_BRIND); |
} |
} |
} |
} |
Line 73 roff_term_pre_ce(ROFF_TERM_ARGS) |
|
Line 73 roff_term_pre_ce(ROFF_TERM_ARGS) |
|
size_t len, lm; |
size_t len, lm; |
|
|
roff_term_pre_br(p, n); |
roff_term_pre_br(p, n); |
lm = p->offset; |
lm = p->tcol->offset; |
n = n->child->next; |
n = n->child->next; |
while (n != NULL) { |
while (n != NULL) { |
nch = n; |
nch = n; |
Line 87 roff_term_pre_ce(ROFF_TERM_ARGS) |
|
Line 87 roff_term_pre_ce(ROFF_TERM_ARGS) |
|
nch = nch->next; |
nch = nch->next; |
} while (nch != NULL && (n->type != ROFFT_TEXT || |
} while (nch != NULL && (n->type != ROFFT_TEXT || |
(n->flags & NODE_LINE) == 0)); |
(n->flags & NODE_LINE) == 0)); |
p->offset = len >= p->rmargin ? 0 : |
p->tcol->offset = len >= p->tcol->rmargin ? 0 : |
lm + len >= p->rmargin ? p->rmargin - len : |
lm + len >= p->tcol->rmargin ? p->tcol->rmargin - len : |
(lm + p->rmargin - len) / 2; |
(lm + p->tcol->rmargin - len) / 2; |
while (n != nch) { |
while (n != nch) { |
if (n->type == ROFFT_TEXT) |
if (n->type == ROFFT_TEXT) |
term_word(p, n->string); |
term_word(p, n->string); |
Line 100 roff_term_pre_ce(ROFF_TERM_ARGS) |
|
Line 100 roff_term_pre_ce(ROFF_TERM_ARGS) |
|
p->flags |= TERMP_NOSPACE; |
p->flags |= TERMP_NOSPACE; |
term_flushln(p); |
term_flushln(p); |
} |
} |
p->offset = lm; |
p->tcol->offset = lm; |
} |
} |
|
|
static void |
static void |
Line 206 roff_term_pre_ti(ROFF_TERM_ARGS) |
|
Line 206 roff_term_pre_ti(ROFF_TERM_ARGS) |
|
len = term_hspan(p, &su) / 24; |
len = term_hspan(p, &su) / 24; |
|
|
if (sign == 0) { |
if (sign == 0) { |
p->ti = len - p->offset; |
p->ti = len - p->tcol->offset; |
p->offset = len; |
p->tcol->offset = len; |
} else if (sign == 1) { |
} else if (sign == 1) { |
p->ti = len; |
p->ti = len; |
p->offset += len; |
p->tcol->offset += len; |
} else if ((size_t)len < p->offset) { |
} else if ((size_t)len < p->tcol->offset) { |
p->ti = -len; |
p->ti = -len; |
p->offset -= len; |
p->tcol->offset -= len; |
} else { |
} else { |
p->ti = -p->offset; |
p->ti = -p->tcol->offset; |
p->offset = 0; |
p->tcol->offset = 0; |
} |
} |
} |
} |