Lines Matching refs:tbl
37 tbl_read(struct tbl_node *tbl, int ln, const char *p, int pos) in tbl_read() argument
48 if (tbl->part == TBL_PART_OPTS) { in tbl_read()
49 tbl->part = TBL_PART_LAYOUT; in tbl_read()
69 tbl_option(tbl, ln, p, &pos); in tbl_read()
77 switch (tbl->part) { in tbl_read()
79 tbl_layout(tbl, ln, p, pos); in tbl_read()
82 tbl_cdata(tbl, ln, p, pos); in tbl_read()
85 tbl_data(tbl, ln, p, pos); in tbl_read()
93 struct tbl_node *tbl; in tbl_alloc() local
95 tbl = mandoc_calloc(1, sizeof(*tbl)); in tbl_alloc()
97 last_tbl->next = tbl; in tbl_alloc()
98 tbl->line = line; in tbl_alloc()
99 tbl->pos = pos; in tbl_alloc()
100 tbl->part = TBL_PART_OPTS; in tbl_alloc()
101 tbl->opts.tab = '\t'; in tbl_alloc()
102 tbl->opts.decimal = '.'; in tbl_alloc()
103 return tbl; in tbl_alloc()
107 tbl_free(struct tbl_node *tbl) in tbl_free() argument
115 while (tbl != NULL) { in tbl_free()
116 while ((rp = tbl->first_row) != NULL) { in tbl_free()
117 tbl->first_row = rp->next; in tbl_free()
126 while ((sp = tbl->first_span) != NULL) { in tbl_free()
127 tbl->first_span = sp->next; in tbl_free()
136 old_tbl = tbl; in tbl_free()
137 tbl = tbl->next; in tbl_free()
143 tbl_restart(int line, int pos, struct tbl_node *tbl) in tbl_restart() argument
145 if (tbl->part == TBL_PART_CDATA) in tbl_restart()
148 tbl->part = TBL_PART_LAYOUT; in tbl_restart()
149 tbl->line = line; in tbl_restart()
150 tbl->pos = pos; in tbl_restart()
154 tbl_span(struct tbl_node *tbl) in tbl_span() argument
158 span = tbl->current_span ? tbl->current_span->next in tbl_span()
159 : tbl->first_span; in tbl_span()
161 tbl->current_span = span; in tbl_span()
166 tbl_end(struct tbl_node *tbl, int still_open) in tbl_end() argument
171 mandoc_msg(MANDOCERR_BLK_NOEND, tbl->line, tbl->pos, "TS"); in tbl_end()
172 else if (tbl->part == TBL_PART_CDATA) in tbl_end()
173 mandoc_msg(MANDOCERR_TBLDATA_BLK, tbl->line, tbl->pos, "TE"); in tbl_end()
175 sp = tbl->first_span; in tbl_end()
179 mandoc_msg(MANDOCERR_TBLDATA_NONE, tbl->line, tbl->pos, NULL); in tbl_end()