Lines Matching refs:btcb
33 static OSErr CheckBTreeKey(const BTreeKey *key, const BTreeControlBlock *btcb);
34 static Boolean ValidHFSRecord(const void *record, const BTreeControlBlock *btcb, u_int16_t recordSize);
47 BTreeControlBlock *btcb;
52 btcb = (BTreeControlBlock*) fcb->fcbBTCBPtr;
56 if ( btcb->maxKeyLength == kHFSExtentKeyMaximumLength )
58 else if ( btcb->maxKeyLength == kHFSPlusExtentKeyMaximumLength )
70 result = CheckBTreeKey((BTreeKey *) key, btcb);
73 BlockMoveData(key, &searchIterator.key, CalcKeySize(btcb, (BTreeKey *) key)); //�� should we range check against maxkeylen?
81 result = CheckBTreeKey(&searchIterator.key, btcb);
84 BlockMoveData(&searchIterator.key, foundKey, CalcKeySize(btcb, &searchIterator.key)); //�� warning, this could overflow user's buffer!!!
86 if ( DEBUG_BUILD && !ValidHFSRecord(data, btcb, *dataSize) )
102 BTreeControlBlock *btcb;
107 btcb = (BTreeControlBlock*) fcb->fcbBTCBPtr;
115 result = CheckBTreeKey((const BTreeKey *) key, btcb);
118 BlockMoveData(key, &iterator.key, CalcKeySize(btcb, (const BTreeKey *) key)); //�� should we range check against maxkeylen?
120 if ( DEBUG_BUILD && !ValidHFSRecord(newData, btcb, dataSize) )
136 static OSErr CheckBTreeKey(const BTreeKey *key, const BTreeControlBlock *btcb)
140 if ( btcb->attributes & kBTBigKeysMask )
145 if ( (keyLen < 6) || (keyLen > btcb->maxKeyLength) )
156 static Boolean ValidHFSRecord(const void *record, const BTreeControlBlock *btcb, u_int16_t recordSize)
160 if ( btcb->maxKeyLength == kHFSExtentKeyMaximumLength )
164 else if (btcb->maxKeyLength == kHFSPlusExtentKeyMaximumLength )