]> git.sur5r.net Git - cc65/blobdiff - src/ld65/fileinfo.c
One more place where OutputNameUsed must be flagged.
[cc65] / src / ld65 / fileinfo.c
index 2aeb5284bb02063ca9aa17aa025b9319a7acf054..7965d574f6c987a32faf4aab4a8a8317b3b449ba 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2001      Ullrich von Bassewitz                                       */
-/*               Wacholderweg 14                                             */
-/*               D-70597 Stuttgart                                           */
-/* EMail:        uz@cc65.org                                                 */
+/* (C) 2001-2010, Ullrich von Bassewitz                                      */
+/*                Roemerstrasse 52                                           */
+/*                D-70794 Filderstadt                                        */
+/* EMail:         uz@cc65.org                                                */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
 static FileInfo* NewFileInfo (void)
 /* Allocate and initialize a new FileInfo struct and return it */
 {
+    /* We will assign file info ids in increasing order of creation */
+    static unsigned Id = 0;
+
     /* Allocate memory */
     FileInfo* FI = xmalloc (sizeof (FileInfo));
 
+    /* Initialize stuff */
+    FI->Id = Id++;
+
     /* Return the new struct */
     return FI;
 }
 
 
 
-FileInfo* ReadFileInfo (FILE* F, ObjData* O attribute ((unused)))
+FileInfo* ReadFileInfo (FILE* F, ObjData* O)
 /* Read a file info from a file and return it */
 {
     /* Allocate a new FileInfo structure */
     FileInfo* FI = NewFileInfo ();
 
     /* Read the fields from the file */
-    FI->Name  = ReadVar (F);
+    FI->Name  = MakeGlobalStringId (O, ReadVar (F));
     FI->MTime = Read32 (F);
     FI->Size  = Read32 (F);