Added line infos

git-svn-id: svn://svn.cc65.org/cc65/trunk@748 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2001-05-23 19:03:40 +00:00
parent ea2cf602b0
commit bfbedfa54b
26 changed files with 451 additions and 77 deletions

View File

@@ -460,6 +460,7 @@ static void WriteOneSeg (Segment* Seg)
Fragment* Frag;
Fragment* F;
unsigned long Size;
unsigned LineInfoIndex;
/* Write the segment name followed by the byte count in this segment */
ObjWriteStr (Seg->Name);
@@ -534,6 +535,12 @@ static void WriteOneSeg (Segment* Seg)
/* Write the file position of this fragment */
ObjWritePos (&Frag->Pos);
/* Write extra line info for this fragment. Zero is considered
* "no line info", so add one to the value.
*/
LineInfoIndex = Frag->LI? Frag->LI->Index + 1 : 0;
ObjWriteVar (LineInfoIndex);
/* Next fragment */
Frag = Frag->Next;
}