* Copyright (c) 1990 The Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* %sccs.include.redist.c%
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid
[] = "@(#)bt_conv.c 5.5 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
static void kdswap
__P((PAGE
*));
* __BT_BPGIN, __BT_BPGOUT --
* Convert host-specific number layout to/from the host-independent
if (((BTREE
*)t
)->bt_lorder
== BYTE_ORDER
)
if (((BTREE
*)t
)->bt_lorder
== BYTE_ORDER
)
* KDSWAP -- Actually swap the bytes on the page.
* Everywhere else in the code, the pgno_t and index_t types are
* opaque. These routines know what they really are.
register char *p
; /* Really void, thanks ANSI! */
switch (h
->flags
& P_TYPE
) {
for (i
= 0; i
< top
; i
++) {
p
= (char *)GETBINTERNAL(h
, i
);
if (*(u_char
*)p
& P_BIGKEY
) {
for (i
= 0; i
< top
; i
++) {
p
= (char *)GETBLEAF(h
, i
);
if (flags
& (P_BIGKEY
| P_BIGDATA
)) {