Lines Matching refs:tnf
39 #include "tnf/tnf.h"
68 TNF *tnf; /* TNF handle */
124 #define TAGOFF(tnf, p) ((unsigned)((caddr_t)(p) - (tnf)->data_start))
125 #define TAGHASH(tnf, p) ((TAGOFF(tnf, p) >> TAGTABSHIFT) & TAGTABMASK)
179 #define _GET_UINT32(tnf, ptr) \
180 ((tnf)->file_native ? \
184 #define _GET_INT32(tnf, ptr) \
185 ((tnf_int32_t)_GET_UINT32(tnf, ptr))
187 #define _GET_UINT16(tnf, ptr) \
188 ((tnf)->file_native ? \
192 #define _GET_INT16(tnf, ptr) \
193 ((tnf_int16_t)_GET_UINT16(tnf, ptr))
202 #define _GET_REF32(tnf, ptr) _tnf_get_ref32(tnf, ptr)
203 #define _GET_REF16(tnf, ptr) _tnf_get_ref16(tnf, ptr)
210 #define _GET_BLOCK(tnf, ptr) \
211 ((tnf_ref32_t *)((unsigned)(ptr) & (tnf)->block_mask))
213 #define _GET_BLOCK_INDEX(tnf, bhdr) \
214 (((caddr_t)(bhdr) - (tnf)->data_start) >> (tnf)->block_shift)
216 #define _GET_INDEX_BLOCK(tnf, index) \
217 ((tnf_ref32_t *)((tnf)->data_start + ((index) << (tnf)->block_shift)))
219 #define _GET_BLOCK_GENERATION(tnf, bhdr) \
220 _GET_UINT32(tnf, (caddr_t)bhdr + tnf->block_generation_offset)
222 #define _GET_BLOCK_BYTES_VALID(tnf, bhdr) \
223 (!(bhdr) ? 0 : _GET_UINT16(tnf, (caddr_t)bhdr + \
224 tnf->block_bytes_valid_offset))
256 #define RECORD_DATUM(tnf, rec) \
257 DATUM(_tnf_record_info(tnf, rec), (caddr_t)rec)
259 #define DATUM_TNF(x) DATUM_INFO(x)->tnf
310 #define HAS_PROPERTY(tnf, tag, name) \
311 (_tnf_get_property(tnf, tag, name) != TNF_NULL)