23 irowinsert (
const int ihandle,
char *pcrow_buffer, off_t trownumber)
27 struct keydesc *pskptr;
29 int ikeynumber, iresult;
30 unsigned char ckeyvalue[VB_MAX_KEYLEN];
38 for (ikeynumber = 0; ikeynumber < psvbptr->
inkeys; ikeynumber++) {
40 if (pskptr->k_nparts == 0) {
44 iresult =
ivbkeysearch (ihandle, ISGREAT, ikeynumber, 0, ckeyvalue, (off_t)0);
45 tdupnumber[ikeynumber] = 0;
46 if (iresult >= 0 && !
ivbkeyload (ihandle, ikeynumber, ISPREV, 0, &pskey)
47 && !memcmp (pskey->
ckey, ckeyvalue, (
size_t)pskptr->k_len)) {
49 if (pskptr->k_flags & ISDUPS) {
50 tdupnumber[ikeynumber] = pskey->
tdupnumber + 1;
55 iresult =
ivbkeysearch (ihandle, ISGTEQ, ikeynumber, 0, ckeyvalue,
56 tdupnumber[ikeynumber]);
60 for (ikeynumber = 0; ikeynumber < psvbptr->
inkeys; ikeynumber++) {
61 if (psvbptr->
pskeydesc[ikeynumber]->k_nparts == 0) {
66 trownumber, tdupnumber[ikeynumber],
NULL);
85 ivbwriterow (
const int ihandle,
char *pcrow,
const off_t trownumber)
98 iresult =
irowinsert (ihandle, pcrow, trownumber);
102 iresult =
ivbdatawrite (ihandle, (
void *)pcrow, 0, trownumber);
140 if (trownumber == -1) {
144 iresult =
ivbwriterow (ihandle, pcrow, trownumber);
160 int iresult, isaveerror;
174 if (trownumber == -1) {
178 iresult =
ivbwriterow (ihandle, pcrow, trownumber);
int iswrcurr(const int ihandle, char *pcrow)
int ivbdatafree(const int ihandle, const off_t trownumber)
int ivbkeysearch(const int ihandle, const int imode, const int ikeynumber, int ilength, unsigned char *pckeyvalue, off_t tdupnumber)
int ivbdatawrite(const int ihandle, char *pcbuffer, int ideletedrow, const off_t trownumber)
int ivbenter(const int ihandle, const unsigned int imodifying, const unsigned int ispecial)
int ivbwriterow(const int ihandle, char *pcrow, const off_t trownumber)
int ivbkeyload(const int ihandle, const int ikeynumber, const int imode, const int isetcurr, struct VBKEY **ppskey)
int ivbtransinsert(const int ihandle, const off_t trownumber, int irowlength, char *pcrow)
int iswrite(const int ihandle, char *pcrow)
off_t tvbdataallocate(const int ihandle)
EC ARGUMENT EC EC BOUND EC BOUND EC BOUND EC BOUND TABLE EC DATA EC DATA EC DATA PTR NULL
int ivbdatalock(const int ihandle, const int imode, const off_t trownumber)
void vvbmakekey(const struct keydesc *pskeydesc, char *pcrow_buffer, unsigned char *pckeyvalue)
struct DICTINFO * psvbfile[128+1]
int ivbkeyinsert(const int ihandle, struct VBTREE *pstree, const int ikeynumber, unsigned char *pckeyvalue, off_t trownode, off_t tdupnumber, struct VBTREE *pschild)
int ivbexit(const int ihandle)
static int irowinsert(const int ihandle, char *pcrow_buffer, off_t trownumber)
struct keydesc * pskeydesc[32]