Lines Matching refs:xr
41 struct mandoc_xr *xr; in mandoc_xr_clear() local
46 for (xr = ohash_first(xr_hash, &slot); xr != NULL; in mandoc_xr_clear()
47 xr = ohash_next(xr_hash, &slot)) in mandoc_xr_clear()
48 free(xr); in mandoc_xr_clear()
67 struct mandoc_xr *xr, *oxr; in mandoc_xr_add() local
80 xr = mandoc_malloc(sizeof(*xr) + tsz); in mandoc_xr_add()
81 xr->next = NULL; in mandoc_xr_add()
82 xr->sec = xr->hashkey; in mandoc_xr_add()
83 xr->name = xr->hashkey + ssz; in mandoc_xr_add()
84 xr->line = line; in mandoc_xr_add()
85 xr->pos = pos; in mandoc_xr_add()
86 xr->count = 1; in mandoc_xr_add()
87 memcpy(xr->sec, sec, ssz); in mandoc_xr_add()
88 memcpy(xr->name, name, nsz); in mandoc_xr_add()
90 pend = xr->hashkey + tsz; in mandoc_xr_add()
91 hv = ohash_interval(xr->hashkey, &pend); in mandoc_xr_add()
92 slot = ohash_lookup_memory(xr_hash, xr->hashkey, tsz, hv); in mandoc_xr_add()
94 ohash_insert(xr_hash, slot, xr); in mandoc_xr_add()
96 xr_first = xr; in mandoc_xr_add()
98 xr_last->next = xr; in mandoc_xr_add()
99 xr_last = xr; in mandoc_xr_add()
104 ret = (oxr->line == -1) ^ (xr->line == -1); in mandoc_xr_add()
105 if (xr->line == -1) in mandoc_xr_add()
107 free(xr); in mandoc_xr_add()