#include "btree.h"
int btrecs(
BTA* btact, char* key, int* rsize)
;
The btrecs
function returns the number of
bytes occupied by the data record of a key in the file
associated with the btact
context
pointer. The key
parameter is a
character pointer, identifying the key to query. The number
of bytes occupied by the data record is returned in
rsize
. If the key is located and the
data size of the record returned successfully,
btrecs
returns zero.
If btrecs
is called with a
key
value of NULL, the size operation
will act against the current key, as selected by
btsel
, btseln
or
btselp
operations. This capability is
designed to allow the determination of the size of the data
record of a duplicate key, presumably based on other,
application managed, attributes.
If btrecs
is invoked for a
key without an associated data record,
the results are undefined.
A non-zero return from btrecs
indicates an error occurred.