Lines Matching refs:tbl

35 tbl_read(struct tbl_node *tbl, int ln, const char *p, int pos)  in tbl_read()  argument
46 if (tbl->part == TBL_PART_OPTS) { in tbl_read()
47 tbl->part = TBL_PART_LAYOUT; in tbl_read()
67 tbl_option(tbl, ln, p, &pos); in tbl_read()
75 switch (tbl->part) { in tbl_read()
77 tbl_layout(tbl, ln, p, pos); in tbl_read()
80 return(tbl_cdata(tbl, ln, p, pos) ? ROFF_TBL : ROFF_IGN); in tbl_read()
85 tbl_data(tbl, ln, p, pos); in tbl_read()
92 struct tbl_node *tbl; in tbl_alloc() local
94 tbl = mandoc_calloc(1, sizeof(*tbl)); in tbl_alloc()
95 tbl->line = line; in tbl_alloc()
96 tbl->pos = pos; in tbl_alloc()
97 tbl->parse = parse; in tbl_alloc()
98 tbl->part = TBL_PART_OPTS; in tbl_alloc()
99 tbl->opts.tab = '\t'; in tbl_alloc()
100 tbl->opts.decimal = '.'; in tbl_alloc()
101 return(tbl); in tbl_alloc()
105 tbl_free(struct tbl_node *tbl) in tbl_free() argument
112 while ((rp = tbl->first_row) != NULL) { in tbl_free()
113 tbl->first_row = rp->next; in tbl_free()
122 while ((sp = tbl->first_span) != NULL) { in tbl_free()
123 tbl->first_span = sp->next; in tbl_free()
133 free(tbl); in tbl_free()
137 tbl_restart(int line, int pos, struct tbl_node *tbl) in tbl_restart() argument
139 if (tbl->part == TBL_PART_CDATA) in tbl_restart()
140 mandoc_msg(MANDOCERR_TBLDATA_BLK, tbl->parse, in tbl_restart()
143 tbl->part = TBL_PART_LAYOUT; in tbl_restart()
144 tbl->line = line; in tbl_restart()
145 tbl->pos = pos; in tbl_restart()
149 tbl_span(struct tbl_node *tbl) in tbl_span() argument
153 assert(tbl); in tbl_span()
154 span = tbl->current_span ? tbl->current_span->next in tbl_span()
155 : tbl->first_span; in tbl_span()
157 tbl->current_span = span; in tbl_span()
164 struct tbl_node *tbl; in tbl_end() local
167 tbl = *tblp; in tbl_end()
170 if (tbl->part == TBL_PART_CDATA) in tbl_end()
171 mandoc_msg(MANDOCERR_TBLDATA_BLK, tbl->parse, in tbl_end()
172 tbl->line, tbl->pos, "TE"); in tbl_end()
174 sp = tbl->first_span; in tbl_end()
178 mandoc_msg(MANDOCERR_TBLDATA_NONE, tbl->parse, in tbl_end()
179 tbl->line, tbl->pos, NULL); in tbl_end()