• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/hfs-285/fsck_hfs/dfalib/

Lines Matching refs:index

53 //	SearchNode			- Return index for record that matches key.
59 // GetRecordOffset - Return the offset for record "index".
60 // GetRecordAddress - Return address of record "index".
61 // GetOffsetAddress - Return address of offset for record "index".
77 UInt16 index );
81 UInt16 index );
85 UInt16 index,
90 UInt16 index );
95 #define GetRecordOffset(btreePtr,node,index) (*(short *) ((UInt8 *)(node) + (btreePtr)->nodeSize - ((index) << 1) - kOffsetSize))
401 index - position record is to be inserted
410 UInt16 index,
433 indexOffset = GetRecordOffset (btreePtr, node, index);
444 InsertOffset (btreePtr, node, index, recSize);
467 index - position record is to be inserted
479 UInt16 index,
518 indexOffset = GetRecordOffset (btreePtr, node, index);
529 InsertOffset (btreePtr, node, index, keySize + recSize);
555 ClearMemory (dst + rawKeyLength, bytesToMove); // clear pad bytes in index key
576 index - position record is to be inserted
583 UInt16 index )
593 indexOffset = GetRecordOffset (btreePtr, node, index);
594 nextOffset = GetRecordOffset (btreePtr, node, index + 1);
603 DeleteOffset (btreePtr, node, index);
610 Routine: SearchNode - Return index for record that matches key.
612 Function: Returns the record index for the record that matches the search key.
613 If no record was found that matches the search key, the "insert index"
622 Output: index - pointer to beginning of key for record
624 Result: true - success (index = record index)
625 false - key did not match anything in node (index = insert index)
635 SInt32 index;
647 index = (lowerBound + upperBound) >> 1; // divide by 2
649 trialKey = (KeyPtr) GetRecordAddress (btreePtr, node, index );
657 if (result < 0) upperBound = index - 1; // search < trial
658 else if (result > 0) lowerBound = index + 1; // search > trial
661 *returnIndex = index;
666 *returnIndex = lowerBound; // lowerBound is insert index
681 index - index of record to get
692 UInt16 index,
702 // Make sure index is valid (in range 0..numRecords-1)
704 if (index >= node->numRecords)
708 offset = GetRecordOffset (btreePtr, node, index);
720 nextOffset = GetRecordOffset (btreePtr, node, index + 1);
777 Routine: GetRecordOffset - Return the offset for record "index".
783 index - record to obtain offset for
785 Result: - offset (in bytes) from beginning of node of record specified by index
791 UInt16 index )
796 pos = (UInt8 *)node + btreePtr->nodeSize - (index << 1) - kOffsetSize;
806 Routine: GetRecordAddress - Return address of record "index".
812 index - record to obtain offset address for
814 Result: - pointer to record "index".
820 UInt16 index )
824 pos = (UInt8 *)node + GetRecordOffset (btreePtr, node, index);
834 Routine: GetRecordSize - Return size of record "index".
838 Note: This does not work on the FreeSpace index!
842 index - record to obtain record size for
844 Result: - size of record "index".
849 UInt16 index )
853 pos = (UInt16 *) ((Ptr)node + btreePtr->nodeSize - (index << 1) - kOffsetSize);
861 Routine: GetOffsetAddress - Return address of offset for record "index".
867 index - record to obtain offset address for
869 Result: - pointer to offset for record "index".
874 UInt16 index )
878 pos = (Ptr)node + btreePtr->nodeSize - (index << 1) -2;
886 Routine: GetChildNodeNum - Return child node number from index record "index".
888 Function: Returns the first UInt32 stored after the key for record "index".
891 The key.length stored at record "index" is ODD. //�� change for variable length index keys
895 index - record to obtain child node number from
897 Result: - child node number from record "index".
902 UInt16 index )
906 pos = GetRecordAddress (btreePtr, nodePtr, index);
917 Function: Add an offset at 'index' by shifting 'index+1' through the last offset
923 index - index at which to insert record
931 UInt16 index,
939 numOffsets = node->numRecords++ - index; // subtract index & postincrement
952 Function: Delete the offset at 'index' by shifting 'index+1' through the last offset
953 and adjusting them by the size of the record 'index'.
958 index - index at which to delete record
965 UInt16 index )
971 dst = GetOffsetAddress (btreePtr, node, index);
974 numOffsets = --node->numRecords - index; // predecrement numRecords & subtract index