Fixed line info issues

git-svn-id: svn://svn.cc65.org/cc65/trunk@763 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2001-05-29 07:39:01 +00:00
parent 369f59c1bb
commit 45242a8e02
2 changed files with 15 additions and 22 deletions

View File

@@ -166,8 +166,17 @@ static int CmpLineInfo (void* Data, const void* LI1_, const void* LI2_)
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;
}
}
@@ -203,6 +212,9 @@ void WriteLineInfo (void)
ObjWriteVar (0);
}
/* End of line infos */
ObjEndLineInfos ();
}