xref: /netbsd-src/external/bsd/mdocml/dist/mandoc_xr.h (revision c9bcef0391a5afc0280459d5c16c26ace267c496)
1*c9bcef03Schristos /*	Id: mandoc_xr.h,v 1.3 2017/07/02 21:18:29 schwarze Exp  */
2*c9bcef03Schristos /*
3*c9bcef03Schristos  * Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
4*c9bcef03Schristos  *
5*c9bcef03Schristos  * Permission to use, copy, modify, and distribute this software for any
6*c9bcef03Schristos  * purpose with or without fee is hereby granted, provided that the above
7*c9bcef03Schristos  * copyright notice and this permission notice appear in all copies.
8*c9bcef03Schristos  *
9*c9bcef03Schristos  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10*c9bcef03Schristos  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11*c9bcef03Schristos  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12*c9bcef03Schristos  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13*c9bcef03Schristos  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14*c9bcef03Schristos  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15*c9bcef03Schristos  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16*c9bcef03Schristos  */
17*c9bcef03Schristos 
18*c9bcef03Schristos struct	mandoc_xr {
19*c9bcef03Schristos 	struct mandoc_xr *next;
20*c9bcef03Schristos 	char		 *sec;
21*c9bcef03Schristos 	char		 *name;
22*c9bcef03Schristos 	int		  line;  /* Or -1 for this page's own names. */
23*c9bcef03Schristos 	int		  pos;
24*c9bcef03Schristos 	int		  count;
25*c9bcef03Schristos 	char		  hashkey[];
26*c9bcef03Schristos };
27*c9bcef03Schristos 
28*c9bcef03Schristos void		  mandoc_xr_reset(void);
29*c9bcef03Schristos int		  mandoc_xr_add(const char *, const char *, int, int);
30*c9bcef03Schristos struct mandoc_xr *mandoc_xr_get(void);
31*c9bcef03Schristos void		  mandoc_xr_free(void);
32