1*bff2a0c3Sschwarze /* $OpenBSD: mandoc_xr.h,v 1.3 2017/07/02 21:17:12 schwarze Exp $ */ 219b6bef7Sschwarze /* 319b6bef7Sschwarze * Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org> 419b6bef7Sschwarze * 519b6bef7Sschwarze * Permission to use, copy, modify, and distribute this software for any 619b6bef7Sschwarze * purpose with or without fee is hereby granted, provided that the above 719b6bef7Sschwarze * copyright notice and this permission notice appear in all copies. 819b6bef7Sschwarze * 919b6bef7Sschwarze * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 1019b6bef7Sschwarze * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1119b6bef7Sschwarze * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 1219b6bef7Sschwarze * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1319b6bef7Sschwarze * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 1419b6bef7Sschwarze * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 1519b6bef7Sschwarze * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1619b6bef7Sschwarze */ 1719b6bef7Sschwarze 1819b6bef7Sschwarze struct mandoc_xr { 1919b6bef7Sschwarze struct mandoc_xr *next; 2019b6bef7Sschwarze char *sec; 2119b6bef7Sschwarze char *name; 2252d11c96Sschwarze int line; /* Or -1 for this page's own names. */ 2319b6bef7Sschwarze int pos; 24*bff2a0c3Sschwarze int count; 2519b6bef7Sschwarze char hashkey[]; 2619b6bef7Sschwarze }; 2719b6bef7Sschwarze 2819b6bef7Sschwarze void mandoc_xr_reset(void); 2952d11c96Sschwarze int mandoc_xr_add(const char *, const char *, int, int); 3019b6bef7Sschwarze struct mandoc_xr *mandoc_xr_get(void); 3119b6bef7Sschwarze void mandoc_xr_free(void); 32