xref: /freebsd/contrib/mandoc/tbl_parse.h (revision 2e3f49888ec8851bafb22011533217487764fdb0)
1 /*	$Id: tbl_parse.h,v 1.2 2018/12/14 06:33:14 schwarze Exp $ */
2 /*
3  * Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
4  * Copyright (c) 2011, 2017 Ingo Schwarze <schwarze@openbsd.org>
5  *
6  * Permission to use, copy, modify, and distribute this software for any
7  * purpose with or without fee is hereby granted, provided that the above
8  * copyright notice and this permission notice appear in all copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES
11  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
13  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17  *
18  * External interface of the tbl(7) parser.
19  * For use in the roff(7) and tbl(7) parsers only.
20  */
21 
22 struct tbl_node;
23 struct tbl_span;
24 
25 struct tbl_node	*tbl_alloc(int, int, struct tbl_node *);
26 int		 tbl_end(struct tbl_node *, int);
27 void		 tbl_free(struct tbl_node *);
28 void		 tbl_read(struct tbl_node *, int, const char *, int);
29 void		 tbl_restart(int, int, struct tbl_node *);
30 struct tbl_span	*tbl_span(struct tbl_node *);
31