]> git.sur5r.net Git - cc65/blobdiff - src/ar65/objdata.h
goto.c warning fix for implicit truncation
[cc65] / src / ar65 / objdata.h
index 731040af471131ff0bd88c72c8ed28ffaf8437f2..3ae8e294978d031bdd3015b099627f0aa6f69f0d 100644 (file)
@@ -1,15 +1,15 @@
 /*****************************************************************************/
 /*                                                                           */
-/*                                objdata.h                                 */
+/*                                 objdata.h                                 */
 /*                                                                           */
-/*             Handling object file data for the ar65 archiver              */
+/*              Handling object file data for the ar65 archiver              */
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 1998-2003 Ullrich von Bassewitz                                       */
-/*               Römerstrasse 52                                             */
-/*               D-70794 Filderstadt                                         */
-/* EMail:        uz@cc65.org                                                 */
+/* (C) 1998-2011, Ullrich von Bassewitz                                      */
+/*                Roemerstrasse 52                                           */
+/*                D-70794 Filderstadt                                        */
+/* EMail:         uz@cc65.org                                                */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
 
 
 
+/* common */
+#include "coll.h"
+#include "objdefs.h"
+
+
+
 /*****************************************************************************/
-/*                                          Data                                    */
+/*                                   Data                                    */
 /*****************************************************************************/
 
 
 
 /* Values for the Flags field */
-#define        OBJ_HAVEDATA    0x0001          /* The object data is in the tmp file */
-#define OBJ_MARKED     0x0002          /* Generic marker bit */
+#define OBJ_HAVEDATA    0x0001          /* The object data is in the tmp file */
 
 
 /* Internal structure holding object file data */
 typedef struct ObjData ObjData;
 struct ObjData {
-    ObjData*           Next;           /* Linked list of all objects */
-    char*              Name;           /* Module name */
-    unsigned           Index;          /* Module index */
-    unsigned           Flags;
-    unsigned long      MTime;          /* Modifiation time of object file */
-    unsigned long      Start;          /* Start offset of data in library */
-    unsigned long      Size;           /* Size of data in library */
-    unsigned            StringCount;    /* Number of strings */
-    char**              Strings;        /* Strings from the object file */
-    unsigned long              ImportSize;     /* Size of imports */
-    void*              Imports;        /* Imports as raw data */
-    unsigned long      ExportSize;     /* Size of exports */
-    void*              Exports;        /* Exports as raw data */
+    char*               Name;           /* Module name */
+
+    /* Index entry */
+    unsigned            Flags;
+    unsigned long       MTime;          /* Modifiation time of object file */
+    unsigned long       Start;          /* Start offset of data in library */
+    unsigned long       Size;           /* Size of data in library */
+
+    /* Object file header */
+    ObjHeader           Header;
+
+    /* Basic data needed for simple checks */
+    Collection          Strings;        /* Strings from the object file */
+    Collection          Exports;        /* Exports list from object file */
 };
 
 
 
-/* Object data list management */
-extern unsigned                ObjCount;       /* Count of files in the list */
-extern ObjData*                ObjRoot;        /* List of object files */
-extern ObjData*                ObjLast;        /* Last entry in list */
-extern ObjData**       ObjPool;        /* Object files as array */
+/* Collection with all object files */
+extern Collection       ObjPool;
 
 
 
 /*****************************************************************************/
-/*                                          Code                                    */
+/*                                   Code                                    */
 /*****************************************************************************/
 
 
@@ -89,28 +92,19 @@ ObjData* NewObjData (void);
 void FreeObjData (ObjData* O);
 /* Free a complete struct */
 
+void ClearObjData (ObjData* O);
+/* Remove any data stored in O */
+
 ObjData* FindObjData (const char* Module);
 /* Search for the module with the given name and return it. Return NULL if the
- * module is not in the list.
- */
+** module is not in the list.
+*/
 
 void DelObjData (const char* Module);
 /* Delete the object module from the list */
 
-void MakeObjPool (void);
-/* Allocate memory, index the entries and make the ObjPool valid */
-
-const char* GetObjName (unsigned Index);
-/* Get the name of a module by index */
-
-const char* GetObjString (const ObjData* O, unsigned Index);
-/* Get a string from the string pool of an object file */
-
 
 
 /* End of objdata.h */
 
 #endif
-
-
-