40#define F_SET(p, f) (p)->flags |= (f)
41#define F_CLR(p, f) (p)->flags &= ~(f)
42#define F_ISSET(p, f) ((p)->flags & (f))
46#define mpool_open __mpool_open
47#define mpool_filter __mpool_filter
48#define mpool_new __mpool_new
49#define mpool_get __mpool_get
50#define mpool_put __mpool_put
51#define mpool_sync __mpool_sync
52#define mpool_close __mpool_close
54#define DEFMINKEYPAGE (2)
80#define P_BINTERNAL 0x01
82#define P_OVERFLOW 0x04
83#define P_RINTERNAL 0x08
86#define P_PRESERVE 0x20
96 (sizeof(pgno_t) + sizeof(pgno_t) + sizeof(pgno_t) + \
97 sizeof(u_int32_t) + sizeof(indx_t) + sizeof(indx_t))
98#define NEXTINDEX(p) (((p)->lower - BTDATAOFF) / sizeof(indx_t))
116#define LALIGN(n) (((n) + sizeof(pgno_t) - 1) & ~(sizeof(pgno_t) - 1))
117#define NOVFLSIZE (sizeof(pgno_t) + sizeof(u_int32_t))
131#define P_BIGDATA 0x01
138#define GETBINTERNAL(pg, indx) \
139 ((BINTERNAL *)((char *)(pg) + (pg)->linp[indx]))
142#define NBINTERNAL(len) \
143 LALIGN(sizeof(u_int32_t) + sizeof(pgno_t) + sizeof(u_char) + (len))
146#define WR_BINTERNAL(p, size, pgno, flags) { \
147 *(u_int32_t *)p = size; \
148 p += sizeof(u_int32_t); \
149 *(pgno_t *)p = pgno; \
150 p += sizeof(pgno_t); \
151 *(u_char *)p = flags; \
152 p += sizeof(u_char); \
165#define GETRINTERNAL(pg, indx) \
166 ((RINTERNAL *)((char *)(pg) + (pg)->linp[indx]))
170 LALIGN(sizeof(recno_t) + sizeof(pgno_t))
173#define WR_RINTERNAL(p, nrecs, pgno) { \
174 *(recno_t *)p = nrecs; \
175 p += sizeof(recno_t); \
176 *(pgno_t *)p = pgno; \
188#define GETBLEAF(pg, indx) \
189 ((BLEAF *)((char *)(pg) + (pg)->linp[indx]))
192#define NBLEAF(p) NBLEAFDBT((p)->ksize, (p)->dsize)
195#define NBLEAFDBT(ksize, dsize) \
196 LALIGN(sizeof(u_int32_t) + sizeof(u_int32_t) + sizeof(u_char) + \
200#define WR_BLEAF(p, key, data, flags) { \
201 *(u_int32_t *)p = key->size; \
202 p += sizeof(u_int32_t); \
203 *(u_int32_t *)p = data->size; \
204 p += sizeof(u_int32_t); \
205 *(u_char *)p = flags; \
206 p += sizeof(u_char); \
207 memmove(p, key->data, key->size); \
209 memmove(p, data->data, data->size); \
220#define GETRLEAF(pg, indx) \
221 ((RLEAF *)((char *)(pg) + (pg)->linp[indx]))
224#define NRLEAF(p) NRLEAFDBT((p)->dsize)
227#define NRLEAFDBT(dsize) \
228 LALIGN(sizeof(u_int32_t) + sizeof(u_char) + (dsize))
231#define WR_RLEAF(p, data, flags) { \
232 *(u_int32_t *)p = data->size; \
233 p += sizeof(u_int32_t); \
234 *(u_char *)p = flags; \
235 p += sizeof(u_char); \
236 memmove(p, data->data, data->size); \
288#define CURS_ACQUIRE 0x01
289#define CURS_AFTER 0x02
290#define CURS_BEFORE 0x04
291#define CURS_INIT 0x08
307#define SAVEMETA (B_NODUPS | R_RECNO)
322#define BT_PUSH(t, p, i) { \
323 t->bt_sp->pgno = p; \
324 t->bt_sp->index = i; \
327#define BT_POP(t) (t->bt_sp == t->bt_stack ? NULL : --t->bt_sp)
328#define BT_CLR(t) (t->bt_sp = t->bt_stack)
368#define B_INMEM 0x00001
369#define B_METADIRTY 0x00002
370#define B_MODIFIED 0x00004
371#define B_NEEDSWAP 0x00008
372#define B_RDONLY 0x00010
374#define B_NODUPS 0x00020
375#define R_RECNO 0x00080
377#define R_CLOSEFP 0x00040
379#define R_FIXLEN 0x00200
380#define R_MEMMAPPED 0x00400
381#define R_INMEM 0x00800
382#define R_MODIFIED 0x01000
383#define R_RDONLY 0x02000
385#define B_DB_LOCK 0x04000
386#define B_DB_SHMEM 0x08000
387#define B_DB_TXN 0x10000
struct _binternal BINTERNAL
struct _rinternal RINTERNAL
int bt_cmp __P((const DBT *, const DBT *))
size_t bt_pfx __P((const DBT *, const DBT *))
int bt_irec __P((struct _btree *, recno_t))
enum _btree::@506 bt_order