Use LineInfo instead of raw FilePos objects. Most information in the object

files does now have lists of LineInfos attached. Compiles but UNTESTED!


git-svn-id: svn://svn.cc65.org/cc65/trunk@4921 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2011-01-26 19:42:17 +00:00
parent 25c13a4f54
commit 733e832b5d
19 changed files with 349 additions and 295 deletions

View File

@@ -181,42 +181,3 @@ const char* GetObjFileName (const ObjData* O)
const char* GetSourceFileName (const ObjData* O, unsigned Index)
/* Get the name of the source file with the given index. If O is NULL, return
* "[linker generated]" as the file name.
*/
{
/* Check if we have an object file */
if (O == 0) {
/* No object file */
if (Index == INVALID_STRING_ID) {
return "[linker generated]";
} else {
return GetString (Index);
}
} else {
/* Check the parameter */
if (Index >= CollCount (&O->Files)) {
/* Error() will terminate the program */
Warning ("Invalid file index (%u) in module `%s' (input file corrupt?)",
Index, GetObjFileName (O));
return "[invalid]"; /* ### */
} else {
/* Get a pointer to the file info struct */
const FileInfo* FI = CollConstAt (&O->Files, Index);
/* Return the name */
return GetString (FI->Name);
}
}
}