Lines Matching defs:tbl
1 /* $Id: tbl.c,v 1.26 2011/07/25 15:37:00 kristaps Exp $ */
33 tbl_read(struct tbl_node *tbl, int ln, const char *p, int offs)
48 if (TBL_PART_OPTS == tbl->part && len)
50 tbl->part = TBL_PART_LAYOUT;
54 switch (tbl->part) {
56 return(tbl_option(tbl, ln, p) ? ROFF_IGN : ROFF_ERR);
58 return(tbl_layout(tbl, ln, p) ? ROFF_IGN : ROFF_ERR);
60 return(tbl_cdata(tbl, ln, p) ? ROFF_TBL : ROFF_IGN);
69 return(tbl_data(tbl, ln, p) ? ROFF_TBL : ROFF_IGN);
128 tbl_restart(int line, int pos, struct tbl_node *tbl)
130 if (TBL_PART_CDATA == tbl->part)
131 mandoc_msg(MANDOCERR_TBLBLOCK, tbl->parse,
132 tbl->line, tbl->pos, NULL);
134 tbl->part = TBL_PART_LAYOUT;
135 tbl->line = line;
136 tbl->pos = pos;
138 if (NULL == tbl->first_span || NULL == tbl->first_span->first)
139 mandoc_msg(MANDOCERR_TBLNODATA, tbl->parse,
140 tbl->line, tbl->pos, NULL);
144 tbl_span(struct tbl_node *tbl)
148 assert(tbl);
149 span = tbl->current_span ? tbl->current_span->next
150 : tbl->first_span;
152 tbl->current_span = span;
159 struct tbl_node *tbl;
161 tbl = *tblp;
164 if (NULL == tbl->first_span || NULL == tbl->first_span->first)
165 mandoc_msg(MANDOCERR_TBLNODATA, tbl->parse,
166 tbl->line, tbl->pos, NULL);
168 if (tbl->last_span)
169 tbl->last_span->flags |= TBL_SPAN_LAST;
171 if (TBL_PART_CDATA == tbl->part)
172 mandoc_msg(MANDOCERR_TBLBLOCK, tbl->parse,
173 tbl->line, tbl->pos, NULL);