hydrus logo









Valid XHTML 1.0 Transitional

Apache logo

FreeBSD logo

RootDown Radio

Determine size of data record for specific key

#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 invoked for a key without an associated data record, the results are undefined.

A non-zero return from btrecs indicates an error occurred.