* Copyright (c) 1990 The Regents of the University of California.
* %sccs.include.redist.c%
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid
[] = "@(#)rec_utils.c 5.3 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
* __REC_RET -- Build return data as a result of search or scan.
* d: LEAF to be returned to the user.
* data: user's data structure
* RET_SUCCESS, RET_ERROR.
rl
= GETRLEAF(e
->page
, e
->index
);
if (rl
->flags
& P_BIGDATA
) {
if (__ovfl_get(t
, rl
->bytes
,
&data
->size
, &t
->bt_dbuf
, &t
->bt_dbufsz
))
/* Use +1 in case the first record retrieved is 0 length. */
if (rl
->dsize
+ 1 > t
->bt_dbufsz
) {
if ((p
= realloc(t
->bt_dbuf
, rl
->dsize
+ 1)) == NULL
)
t
->bt_dbufsz
= rl
->dsize
+ 1;
bcopy(rl
->bytes
, t
->bt_dbuf
, t
->bt_dbufsz
);