22 #define IVBBUFFERLEVEL 4
41 if (pslock ==
NULL || trownumber < pslock->trownumber) {
43 if (psnewlock ==
NULL) {
48 psnewlock->
psnext = pslock;
56 if (trownumber >
svbfile[iindexhandle].pslocktail->trownumber) {
58 if (psnewlock ==
NULL) {
68 while (pslock->psnext && trownumber > pslock->psnext->trownumber) {
72 if (pslock->trownumber == trownumber) {
73 if (pslock->ihandle == ihandle) {
84 if (psnewlock ==
NULL) {
91 pslock->
psnext = psnewlock;
100 struct VBLOCK *pslocktodelete;
108 if (!pslock || pslock->
trownumber > trownumber) {
114 if (pslock->
ihandle != ihandle) {
119 if (!
svbfile[iindexhandle].pslockhead) {
133 pslocktodelete = pslock->
psnext;
135 if (pslocktodelete->
ihandle != ihandle) {
140 if (pslocktodelete ==
svbfile[iindexhandle].pslocktail) {
179 const unsigned int ispecial)
196 for (iloop = 0; iloop <
MAXSUBS; iloop++) {
262 memcpy ((
void *)&psvbptr->
sdictnode, (
void *)cvbnodetmp,
277 for (iloop = 0; iloop <
MAXSUBS; iloop++) {
278 if (psvbptr->
pstree[iloop]) {
293 struct VBKEY *pskey, *pskeycurr;
294 off_t tlength, ttransnumber;
295 int iresult = 0, iloop, iloop2, isaveerror;
318 memcpy ((
void *)cvbnodetmp, (
void *)&psvbptr->
sdictnode,
334 for (iloop2 = 0; iloop2 < psvbptr->
inkeys; iloop2++) {
359 pskeycurr = pskeycurr->
psnext) {
360 if (pskeycurr != pskey && pskeycurr->
pschild) {
425 memcpy ((
void *)&psvbptr->
sdictnode, (
void *)cvbnodetmp,
436 off_t tlength = 1, toffset;
454 if (trownumber == 0) {
456 pslock = pslock->
psnext) {
476 if ((imode !=
VBUNLOCK) && trownumber) {
int ivblock(const int ihandle, const off_t toffset, const off_t tlength, const int imode)
struct VBFILE svbfile[128 *3]
struct VBLOCK * psvblockallocate(const int ihandle)
struct VBLOCK * pslocktail
unsigned char iindexchanged
int ivbblockread(const int ihandle, const int iisindex, const off_t tblocknumber, char *cbuffer)
struct VBLOCK * pslockhead
void vvblockfree(struct VBLOCK *pslock)
int ivbexit(const int ihandle)
int ivbfileopenlock(const int ihandle, const int imode)
unsigned char iisdictlocked
EC ARGUMENT EC EC BOUND EC BOUND EC BOUND EC BOUND TABLE EC DATA EC DATA EC DATA PTR NULL
int ivbenter(const int ihandle, const unsigned int imodifying, const unsigned int ispecial)
struct VBKEY * pskeycurr[32]
struct DICTNODE sdictnode
struct DICTINFO * psvbfile[128+1]
unsigned char iisdatalocked
int ivbblockwrite(const int ihandle, const int iisindex, const off_t tblocknumber, const char *cbuffer)
void vvbtreeallfree(const int ihandle, const int ikeynumber, struct VBTREE *pstree)
static void inl_stquad(off_t tvalue, void *pclocation)
struct VBTREE * pstree[32]
int ivbdatalock(const int ihandle, const int imode, const off_t trownumber)
static int ilockdelete(const int ihandle, const off_t trownumber)
static int ilockinsert(const int ihandle, const off_t trownumber)
struct VBKEY * pskeyfirst
static off_t inl_ldquad(void *pclocation)