Lines Matching defs:tbl
30 #include "tbl.h"
63 mods(struct tbl_node *tbl, struct tbl_cell *cp,
211 cell(struct tbl_node *tbl, struct tbl_row *rp,
259 } else if (c == TBL_CELL_DOWN && rp == tbl->first_row)
266 mods(tbl, cell_alloc(tbl, rp, c), ln, p, pos);
270 tbl_layout(struct tbl_node *tbl, int ln, const char *p, int pos)
290 tbl->part = TBL_PART_DATA;
297 if (tbl->first_row == NULL) {
298 tbl->first_row = tbl->last_row =
301 if (tbl->first_row->first == NULL) {
304 cell_alloc(tbl, tbl->first_row,
306 if (tbl->opts.lvert < tbl->first_row->vert)
307 tbl->opts.lvert = tbl->first_row->vert;
316 for (rp = tbl->first_row; rp; rp = rp->next) {
317 if (tbl->opts.lvert < rp->vert)
318 tbl->opts.lvert = rp->vert;
320 rp->last->col + 1 == tbl->opts.cols &&
321 tbl->opts.rvert < rp->last->vert)
322 tbl->opts.rvert = rp->last->vert;
330 tbl->last_row = rp;
344 if (tbl->last_row == NULL ||
345 tbl->last_row->first != NULL) {
347 if (tbl->last_row)
348 tbl->last_row->next = rp;
350 tbl->first_row = rp;
351 tbl->last_row = rp;
353 rp = tbl->last_row;
355 cell(tbl, rp, ln, p, &pos);
360 cell_alloc(struct tbl_node *tbl, struct tbl_row *rp, enum tbl_cellt pos)
376 if (tbl->opts.cols <= p->col)
377 tbl->opts.cols = p->col + 1;