/* */
/* */
/* */
-/* (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);