version 1.29, 2014/10/13 23:31:46 |
version 1.32, 2014/12/24 15:38:55 |
Line 91 term_tbl(struct termp *tp, const struct tbl_span *sp) |
|
Line 91 term_tbl(struct termp *tp, const struct tbl_span *sp) |
|
tp->tbl.slen = term_tbl_strlen; |
tp->tbl.slen = term_tbl_strlen; |
tp->tbl.arg = tp; |
tp->tbl.arg = tp; |
|
|
tblcalc(&tp->tbl, sp); |
tblcalc(&tp->tbl, sp, rmargin - tp->offset); |
} |
} |
|
|
/* Horizontal frame at the start of boxed tables. */ |
/* Horizontal frame at the start of boxed tables. */ |
Line 107 term_tbl(struct termp *tp, const struct tbl_span *sp) |
|
Line 107 term_tbl(struct termp *tp, const struct tbl_span *sp) |
|
/* Vertical frame at the start of each row. */ |
/* Vertical frame at the start of each row. */ |
|
|
if ((TBL_OPT_BOX | TBL_OPT_DBOX) & sp->opts->opts || |
if ((TBL_OPT_BOX | TBL_OPT_DBOX) & sp->opts->opts || |
sp->head->vert) |
(sp->head != NULL && sp->head->vert)) |
term_word(tp, TBL_SPAN_HORIZ == sp->pos || |
term_word(tp, TBL_SPAN_HORIZ == sp->pos || |
TBL_SPAN_DHORIZ == sp->pos ? "+" : "|"); |
TBL_SPAN_DHORIZ == sp->pos ? "+" : "|"); |
|
|
Line 417 tbl_number(struct termp *tp, const struct tbl_opts *op |
|
Line 417 tbl_number(struct termp *tp, const struct tbl_opts *op |
|
} else |
} else |
d = sz + psz; |
d = sz + psz; |
|
|
padl = col->decimal - d; |
if (col->decimal > d && col->width > sz) { |
|
padl = col->decimal - d; |
tbl_char(tp, ASCII_NBRSP, padl); |
if (padl + sz > col->width) |
|
padl = col->width - sz; |
|
tbl_char(tp, ASCII_NBRSP, padl); |
|
} else |
|
padl = 0; |
tbl_word(tp, dp); |
tbl_word(tp, dp); |
if (col->width > sz + padl) |
if (col->width > sz + padl) |
tbl_char(tp, ASCII_NBRSP, col->width - sz - padl); |
tbl_char(tp, ASCII_NBRSP, col->width - sz - padl); |