-static void* CollFirst (Collection* C)
-/* Return the first item in a collection */
-{
- /* We must have at least one entry */
- assert (C->Count > 0);
-
- /* Return the element */
- return C->Items[0].Ptr;
-}
-
-
-
static void CollQuickSort (Collection* C, int Lo, int Hi,
int (*Compare) (const void*, const void*))
/* Internal recursive sort function. */
{
cc65_sourceinfo* S = xmalloc (sizeof (*S) - sizeof (S->data[0]) +
Count * sizeof (S->data[0]));
- S->count = Count;
+ S->count = Count;
return S;
}
}
/* Step 1: Determine the number of unique address entries needed */
- LI = CollFirst (LineInfos);
+ LI = CollAt (LineInfos, 0);
L->Count += (LI->End - LI->Start) + 1;
End = LI->End;
for (I = 1; I < CollCount (LineInfos); ++I) {
/* Step 3: Determine the number of entries per unique address */
List = L->List;
- LI = CollFirst (LineInfos);
+ LI = CollAt (LineInfos, 0);
StartIndex = 0;
Start = LI->Start;
End = LI->End;
/* Step 5: Enter the data into the table */
List = L->List;
- LI = CollFirst (LineInfos);
+ LI = CollAt (LineInfos, 0);
StartIndex = 0;
Start = LI->Start;
End = LI->End;