• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.5.8/xnu-1228.15.4/bsd/hfs/hfscommon/BTree/

Lines Matching defs:index

63 	   <CS2>	 7/21/97	msd		Make GetRecordByIndex check its record index input; it now
126 // SearchNode - Return index for record that matches key.
132 // GetRecordOffset - Return the offset for record "index".
133 // GetRecordAddress - Return address of record "index".
134 // GetOffsetAddress - Return address of offset for record "index".
147 u_int16_t index );
151 u_int16_t index );
155 u_int16_t index,
160 u_int16_t index );
165 #define GetRecordOffset(btreePtr,node,index) (*(short *) ((u_int8_t *)(node) + (btreePtr)->nodeSize - ((index) << 1) - kOffsetSize))
483 index - position record is to be inserted
492 u_int16_t index,
515 indexOffset = GetRecordOffset (btreePtr, node, index);
527 InsertOffset (btreePtr, node, index, recSize);
550 index - position record is to be inserted
562 u_int16_t index,
601 indexOffset = GetRecordOffset (btreePtr, node, index);
613 InsertOffset (btreePtr, node, index, keySize + recSize);
639 ClearMemory (dst + rawKeyLength, bytesToMove); // clear pad bytes in index key
660 index - position record is to be inserted
667 u_int16_t index )
677 indexOffset = GetRecordOffset (btreePtr, node, index);
678 nextOffset = GetRecordOffset (btreePtr, node, index + 1);
688 DeleteOffset (btreePtr, node, index);
700 Routine: SearchNode - Return index for record that matches key.
702 Function: Returns the record index for the record that matches the search key.
703 If no record was found that matches the search key, the "insert index"
712 Output: index - pointer to beginning of key for record
714 Result: true - success (index = record index)
715 false - key did not match anything in node (index = insert index)
725 int32_t index;
736 index = (lowerBound + upperBound) >> 1;
738 trialKey = (KeyPtr) ((u_int8_t *)node + *(offset - index));
743 upperBound = index - 1; /* search < trial */
745 lowerBound = index + 1; /* search > trial */
747 *returnIndex = index; /* search == trial */
752 *returnIndex = lowerBound; /* lowerBound is insert index */
767 index - index of record to get
778 u_int16_t index,
788 // Make sure index is valid (in range 0..numRecords-1)
790 if (index >= node->numRecords)
794 offset = GetRecordOffset (btreePtr, node, index);
806 nextOffset = GetRecordOffset (btreePtr, node, index + 1);
863 Routine: GetRecordOffset - Return the offset for record "index".
869 index - record to obtain offset for
871 Result: - offset (in bytes) from beginning of node of record specified by index
877 u_int16_t index )
882 pos = (u_int8_t *)node + btreePtr->nodeSize - (index << 1) - kOffsetSize;
892 Routine: GetRecordAddress - Return address of record "index".
898 index - record to obtain offset address for
900 Result: - pointer to record "index".
906 u_int16_t index )
910 pos = (u_int8_t *)node + GetRecordOffset (btreePtr, node, index);
920 Routine: GetRecordSize - Return size of record "index".
924 Note: This does not work on the FreeSpace index!
928 index - record to obtain record size for
930 Result: - size of record "index".
935 u_int16_t index )
939 pos = (u_int16_t *) ((Ptr)node + btreePtr->nodeSize - (index << 1) - kOffsetSize);
947 Routine: GetOffsetAddress - Return address of offset for record "index".
953 index - record to obtain offset address for
955 Result: - pointer to offset for record "index".
960 u_int16_t index )
964 pos = (Ptr)node + btreePtr->nodeSize - (index << 1) -2;
972 Routine: GetChildNodeNum - Return child node number from index record "index".
974 Function: Returns the first u_int32_t stored after the key for record "index".
977 The key.length stored at record "index" is ODD. //�� change for variable length index keys
981 index - record to obtain child node number from
983 Result: - child node number from record "index".
988 u_int16_t index )
992 pos = GetRecordAddress (btreePtr, nodePtr, index);
1003 Function: Add an offset at 'index' by shifting 'index+1' through the last offset
1009 index - index at which to insert record
1017 u_int16_t index,
1025 numOffsets = node->numRecords++ - index; // subtract index & postincrement
1038 Function: Delete the offset at 'index' by shifting 'index+1' through the last offset
1039 and adjusting them by the size of the record 'index'.
1044 index - index at which to delete record
1051 u_int16_t index )
1057 dst = GetOffsetAddress (btreePtr, node, index);
1060 numOffsets = --node->numRecords - index; // predecrement numRecords & subtract index