-static int CmpLineInfo (void* Data, const void* LI1_, const void* LI2_)
+static int CmpLineInfo (void* Data attribute ((unused)),
+ const void* LI1_, const void* LI2_)
/* Compare function for the sort */
{
/* Cast the pointers */
}
}
-
+
void MakeLineInfoIndex (void)
/* Sort the line infos and drop all unreferenced ones */
{
+ unsigned I;
+
/* Sort the collection */
CollSort (&LineInfoColl, CmpLineInfo, 0);
+
+ /* Walk over the list and index the line infos. */
+ for (I = 0; I < LineInfoValid; ++I) {
+ /* Get a pointer to this line info */
+ LineInfo* LI = CollAtUnchecked (&LineInfoColl, I);
+ LI->Index = I;
+ }
}
ObjWriteVar (0);
}
+
+ /* End of line infos */
+ ObjEndLineInfos ();
}