Inserting a key and data

#include "btree.h"

int btins(BTA* btact, char* key, char* data, int dsize);

The btins function inserts a key and data record into a file associated with the btact context pointer. Both key and data are character pointers. Since the data may legitimately contain null (x'00') characters, the length of the data, in bytes, is passed in dsize. dsize must be zero or greater. If the key and data is successfully stored in the B Tree file, btins returns zero.

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