Some code cleanup.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5282 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2011-08-29 20:30:57 +00:00
parent eee6068029
commit c2bf1b9ba4
3 changed files with 40 additions and 47 deletions

View File

@@ -132,29 +132,17 @@ void CreateMapFile (int ShortMap)
void CreateLabelFile (void)
/* Create a label file */
{
unsigned I;
/* Open the label file */
FILE* F = fopen (LabelFileName, "w");
if (F == 0) {
Error ("Cannot create label file `%s': %s", LabelFileName, strerror (errno));
}
/* Clear the debug sym table (used to detect duplicates) */
ClearDbgSymTable ();
/* Print the labels for the export symbols */
PrintExportLabels (F);
/* Create labels from all modules we have linked into the output file */
for (I = 0; I < CollCount (&ObjDataList); ++I) {
/* Get the object file */
ObjData* O = CollAtUnchecked (&ObjDataList, I);
/* Output the labels */
PrintDbgSymLabels (O, F);
}
/* Output the labels */
PrintDbgSymLabels (F);
/* Close the file */
if (fclose (F) != 0) {