/*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
typedef struct BTreeControlBlock { // fields specific to BTree CBs
- UInt8 reserved1; // keep for alignment with old style fields
+ UInt8 keyCompareType; /* Key string Comparison Type */
UInt8 btreeType;
UInt16 treeDepth;
FileReference fileRefNum; // refNum of btree file
UInt32 numHintChecks;
UInt32 numPossibleHints; // Looks like a formated hint
UInt32 numValidHints; // Hint used to find correct record.
-
+ UInt32 reservedNodes;
} BTreeControlBlock, *BTreeControlBlockPtr;
UInt32 CalcMapBits (BTreeControlBlockPtr btreePtr);
+SInt32 BTAvailableNodes (BTreeControlBlock *btree);
+
+void BTUpdateReserve (BTreeControlBlockPtr btreePtr,
+ int nodes);
//////////////////////////////// Misc Operations ////////////////////////////////
OSStatus TrashNode (BTreeControlBlockPtr btreePtr,
NodePtr nodePtr );
+// XXXdbg
+void ModifyBlockStart(FileReference vp, BlockDescPtr blockPtr);
+// XXXdbg
+
OSStatus UpdateNode (BTreeControlBlockPtr btreePtr,
NodePtr nodePtr,
UInt32 transactionID,
//// Node Buffer Operations
-OSStatus CheckNode (BTreeControlBlockPtr btreePtr,
- NodeDescPtr node );
-
void ClearNode (BTreeControlBlockPtr btreePtr,
NodeDescPtr node );