]> git.sur5r.net Git - cc65/commitdiff
Removed underlines from structure names.
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 2 Nov 2000 22:11:25 +0000 (22:11 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 2 Nov 2000 22:11:25 +0000 (22:11 +0000)
Moved the fragment type into its own module.

git-svn-id: svn://svn.cc65.org/cc65/trunk@430 b7a2c559-68d2-44c3-8de9-860c34a00d81

13 files changed:
src/ld65/bin.c
src/ld65/config.h
src/ld65/dbgsyms.h
src/ld65/exports.c
src/ld65/exports.h
src/ld65/expr.h
src/ld65/fragment.c [new file with mode: 0644]
src/ld65/fragment.h [new file with mode: 0644]
src/ld65/make/gcc.mak
src/ld65/make/watcom.mak
src/ld65/objdata.h
src/ld65/segments.c
src/ld65/segments.h

index 1a9aabbec089fc5ebe4107bbf28b5f6e6bc08620..abc873e675789c90fb0253b96e2716e005365d54 100644 (file)
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
-
-#include "../common/xmalloc.h"
-
+                                           
+/* common */
+#include "xmalloc.h"
+         
+/* ld65 */
 #include "global.h"
 #include "error.h"
 #include "fileio.h"
@@ -91,7 +93,7 @@ void FreeBinDesc (BinDesc* D)
 /* Free a binary format descriptor */
 {
     xfree (D);
-}    
+}
 
 
 
@@ -206,7 +208,7 @@ static int BinUnresolved (const char* Name, void* D)
 
 
 
-void BinWriteTarget (BinDesc* D, struct File_* F)
+void BinWriteTarget (BinDesc* D, struct File* F)
 /* Write a binary output file */
 {
     Memory* M;
index 2f5c8114baf00145d614c9ef7c94778261c531ea..b5e60824551dd8825750bbd6146fcc1bb1cc8385 100644 (file)
 
 
 /* File list entry */
-typedef struct File_ File;
-struct File_ {
+typedef struct File File;
+struct File {
     File*              Next;           /* Pointer to next entry in list */
     unsigned           Flags;
     unsigned           Format;         /* Output format */
-    struct Memory_*    MemList;        /* List of memory areas in this file */
-    struct Memory_*    MemLast;        /* Last memory area in this file */
-    char               Name [1];       /* Name of file */
+    struct Memory    MemList;        /* List of memory areas in this file */
+    struct Memory    MemLast;        /* Last memory area in this file */
+    char               Name [1];       /* Name of file */
 };
 
 /* Segment list node. Needed because there are two lists (RUN & LOAD) */
-typedef struct MemListNode_ MemListNode;
-struct MemListNode_ {
-    MemListNode*       Next;           /* Next entry */
-    struct SegDesc_*   Seg;            /* Segment */
+typedef struct MemListNode MemListNode;
+struct MemListNode {
+    MemListNode*       Next;           /* Next entry */
+    struct SegDesc   Seg;            /* Segment */
 };
 
 /* Memory list entry */
-typedef struct Memory_ Memory;
-struct Memory_ {
-    Memory*            Next;           /* Pointer to next entry in list */
+typedef struct Memory Memory;
+struct Memory {
+    Memory*            Next;           /* Pointer to next entry in list */
     Memory*                    FNext;          /* Next in file list */
     unsigned                   Attr;           /* Which values are valid? */
-    unsigned           Flags;          /* Set of bitmapped flags */
+    unsigned           Flags;          /* Set of bitmapped flags */
     unsigned long      Start;          /* Start address */
     unsigned long              Size;           /* Length of memory section */
     unsigned long              FillLevel;      /* Actual fill level of segment */
     unsigned char      FillVal;        /* Value used to fill rest of seg */
     MemListNode*       SegList;        /* List of segments for this section */
     MemListNode*       SegLast;        /* Last segment in this section */
-    File*              F;              /* File that contains the entry */
-    char               Name [1];       /* Name of the memory section */
+    File*              F;              /* File that contains the entry */
+    char               Name [1];       /* Name of the memory section */
 };
 
 /* Segment descriptor entry */
-typedef struct SegDesc_ SegDesc;
-struct SegDesc_ {
-    SegDesc*                   Next;           /* Pointer to next entry in list */
-    Segment*           Seg;            /* Pointer to segment structure */
-    unsigned           Attr;           /* Attributes for segment */
-    unsigned           Flags;          /* Set of bitmapped flags */
-    Memory*            Load;           /* Load memory section */
-    Memory*            Run;            /* Run memory section */
+typedef struct SegDesc SegDesc;
+struct SegDesc {
+    SegDesc*                   Next;           /* Pointer to next entry in list */
+    Segment*           Seg;            /* Pointer to segment structure */
+    unsigned           Attr;           /* Attributes for segment */
+    unsigned           Flags;          /* Set of bitmapped flags */
+    Memory*            Load;           /* Load memory section */
+    Memory*            Run;            /* Run memory section */
     unsigned long              Addr;           /* Start address or offset into segment */
-    unsigned char      Align;          /* Alignment if given */
-    char               Name [1];       /* Copy of name */
+    unsigned char      Align;          /* Alignment if given */
+    char               Name [1];       /* Copy of name */
 };
 
 /* Segment list */
@@ -107,17 +107,17 @@ extern unsigned           SegDescCount;   /* Number of entries in list */
 #define MF_RO          0x0004          /* Read only memory area */
 
 /* Segment flags */
-#define SF_RO          0x0001          /* Read only segment */
-#define SF_BSS                 0x0002          /* Segment is BSS style segment */
-#define SF_ZP          0x0004          /* Zeropage segment (o65 only) */
-#define SF_WPROT       0x0008          /* Write protected segment */
+#define SF_RO          0x0001          /* Read only segment */
+#define SF_BSS                 0x0002          /* Segment is BSS style segment */
+#define SF_ZP          0x0004          /* Zeropage segment (o65 only) */
+#define SF_WPROT       0x0008          /* Write protected segment */
 #define SF_DEFINE              0x0010          /* Define start and size */
-#define SF_ALIGN       0x0020          /* Align the segment */
-#define SF_OFFSET      0x0040          /* Segment has offset in memory */
-#define SF_START       0x0080          /* Segment has fixed start address */
+#define SF_ALIGN       0x0020          /* Align the segment */
+#define SF_OFFSET      0x0040          /* Segment has offset in memory */
+#define SF_START       0x0080          /* Segment has fixed start address */
 #define SF_LOAD_AND_RUN        0x1000          /* LOAD and RUN given */
 #define SF_RUN_DEF             0x2000          /* RUN symbols already defined */
-#define SF_LOAD_DEF    0x4000          /* LOAD symbols already defined */
+#define SF_LOAD_DEF    0x4000          /* LOAD symbols already defined */
 
 
 
@@ -145,3 +145,4 @@ void CfgWriteTarget (void);
 
 
 
+                     
index 1c65a5501b71b2589834504f0d53db5afe5d60df..7f8e98f18ab91a17295fd1753aa65e434bba3eeb 100644 (file)
@@ -43,7 +43,7 @@
 /* common */
 #include "exprdefs.h"
 #include "filepos.h"
-         
+
 /* ld65 */
 #include "objdata.h"
 
@@ -56,8 +56,8 @@
 
 
 /* Debug symbol structure */
-typedef struct DbgSym_ DbgSym;
-struct DbgSym_ {
+typedef struct DbgSym DbgSym;
+struct DbgSym {
     DbgSym*                    Next;           /* Pool linear list link */
     unsigned                   Flags;          /* Generic flags */
     ObjData*                   Obj;            /* Object file that exports the name */
@@ -92,4 +92,5 @@ void PrintDbgSymLabels (ObjData* O, FILE* F);
 
 
 
-                               
+
+            
index 971db1558cd778d5bfccd2b997e1a25e2e17bf76..1b58fb84a5169d0d43a44968f4588f5f8b42a2d5 100644 (file)
@@ -2,7 +2,7 @@
 /*                                                                           */
 /*                                exports.c                                 */
 /*                                                                           */
-/*                   Exports handing for the ld65 linker                    */
+/*                  Exports handling for the ld65 linker                    */
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
index 075c5ca489029429cf233b68df5c0af9d2f11610..df35676109032d69d7102df58c24779e7914d506 100644 (file)
@@ -43,7 +43,7 @@
 /* common */
 #include "exprdefs.h"
 #include "filepos.h"
-         
+
 /* ld65 */
 #include "objdata.h"
 #include "config.h"
 
 
 /* Import symbol structure */
-typedef struct Import_ Import;
-struct Import_ {
-    Import*            Next;           /* Single linked list */
-    ObjData*           Obj;            /* Object file that imports the name */
-    FilePos            Pos;            /* File position of reference */
+typedef struct Import Import;
+struct Import {
+    Import*            Next;           /* Single linked list */
+    ObjData*           Obj;            /* Object file that imports the name */
+    FilePos            Pos;            /* File position of reference */
     union {
-       struct Export_* Exp;            /* Matching export for this import */
-       const char*     Name;           /* Name if not in table */
+       struct Export Exp;            /* Matching export for this import */
+       const char*     Name;           /* Name if not in table */
     } V;
-    unsigned char      Type;           /* Type of import */
+    unsigned char      Type;           /* Type of import */
 };
 
 
 
 /* Export symbol structure */
-typedef struct Export_ Export;
-struct Export_ {
+typedef struct Export Export;
+struct Export {
     Export*                    Next;           /* Hash table link */
-    unsigned           Flags;          /* Generic flags */
-    ObjData*           Obj;            /* Object file that exports the name */
-    unsigned           ImpCount;       /* How many imports for this symbol? */
-    Import*            ImpList;        /* List of imports for this symbol */
-    FilePos            Pos;            /* File position of definition */
+    unsigned           Flags;          /* Generic flags */
+    ObjData*           Obj;            /* Object file that exports the name */
+    unsigned           ImpCount;       /* How many imports for this symbol? */
+    Import*            ImpList;        /* List of imports for this symbol */
+    FilePos            Pos;            /* File position of definition */
     ExprNode*                  Expr;           /* Expression (0 if not def'd) */
     unsigned char      Type;           /* Type of export */
     char*                      Name;           /* Name - dynamically allocated */
@@ -157,7 +157,7 @@ void CircularRefError (const Export* E);
 /* Print an error about a circular reference using to define the given export */
 
 
-
+            
 /* End of exports.h */
 
 #endif
index 6305e9ee449187d2a173728e29ea7cfdc5db36fd..938ed34484d4e81644032e2b69ede0671261be2f 100644 (file)
 
 
 
-#include "../common/exprdefs.h"
-
+/* common */
+#include "exprdefs.h"
+         
+/* ld65 */
 #include "objdata.h"
 #include "exports.h"
 #include "config.h"
diff --git a/src/ld65/fragment.c b/src/ld65/fragment.c
new file mode 100644 (file)
index 0000000..22b45f8
--- /dev/null
@@ -0,0 +1,79 @@
+/*****************************************************************************/
+/*                                                                           */
+/*                               fragment.c                                 */
+/*                                                                           */
+/*                       Code/data fragment routines                        */
+/*                                                                           */
+/*                                                                           */
+/*                                                                           */
+/* (C) 1998-2000 Ullrich von Bassewitz                                       */
+/*               Wacholderweg 14                                             */
+/*               D-70597 Stuttgart                                           */
+/* EMail:        uz@musoftware.de                                            */
+/*                                                                           */
+/*                                                                           */
+/* This software is provided 'as-is', without any expressed or implied       */
+/* warranty.  In no event will the authors be held liable for any damages    */
+/* arising from the use of this software.                                    */
+/*                                                                           */
+/* Permission is granted to anyone to use this software for any purpose,     */
+/* including commercial applications, and to alter it and redistribute it    */
+/* freely, subject to the following restrictions:                            */
+/*                                                                           */
+/* 1. The origin of this software must not be misrepresented; you must not   */
+/*    claim that you wrote the original software. If you use this software   */
+/*    in a product, an acknowledgment in the product documentation would be  */
+/*    appreciated but is not required.                                       */
+/* 2. Altered source versions must be plainly marked as such, and must not   */
+/*    be misrepresented as being the original software.                      */
+/* 3. This notice may not be removed or altered from any source              */
+/*    distribution.                                                          */
+/*                                                                           */
+/*****************************************************************************/
+
+                   
+
+/* common */
+#include "xmalloc.h"
+
+/* ld65 */
+#include "segments.h"
+#include "fragment.h"
+
+
+
+/*****************************************************************************/
+/*                                          Code                                    */
+/*****************************************************************************/
+
+
+
+Fragment* NewFragment (unsigned char Type, unsigned long Size, Section* S)
+/* Create a new fragment and insert it into the section S */
+{
+    /* Allocate memory */
+    Fragment* F = xmalloc (sizeof (Fragment) - 1 + Size);      /* Portable? */
+
+    /* Initialize the data */
+    F->Next = 0;
+    F->Obj  = 0;
+    F->Size = Size;
+    F->Expr = 0;
+    F->Type = Type;
+
+    /* Insert the code fragment into the segment */
+    if (S->FragRoot == 0) {
+       /* First fragment */
+       S->FragRoot = F;
+    } else {
+       S->FragLast->Next = F;
+    }
+    S->FragLast = F;
+    S->Size += Size;
+
+    /* Return the new fragment */
+    return F;
+}
+
+
+
diff --git a/src/ld65/fragment.h b/src/ld65/fragment.h
new file mode 100644 (file)
index 0000000..cae0a15
--- /dev/null
@@ -0,0 +1,83 @@
+/*****************************************************************************/
+/*                                                                           */
+/*                               fragment.h                                 */
+/*                                                                           */
+/*                       Code/data fragment routines                        */
+/*                                                                           */
+/*                                                                           */
+/*                                                                           */
+/* (C) 1998-2000 Ullrich von Bassewitz                                       */
+/*               Wacholderweg 14                                             */
+/*               D-70597 Stuttgart                                           */
+/* EMail:        uz@musoftware.de                                            */
+/*                                                                           */
+/*                                                                           */
+/* This software is provided 'as-is', without any expressed or implied       */
+/* warranty.  In no event will the authors be held liable for any damages    */
+/* arising from the use of this software.                                    */
+/*                                                                           */
+/* Permission is granted to anyone to use this software for any purpose,     */
+/* including commercial applications, and to alter it and redistribute it    */
+/* freely, subject to the following restrictions:                            */
+/*                                                                           */
+/* 1. The origin of this software must not be misrepresented; you must not   */
+/*    claim that you wrote the original software. If you use this software   */
+/*    in a product, an acknowledgment in the product documentation would be  */
+/*    appreciated but is not required.                                       */
+/* 2. Altered source versions must be plainly marked as such, and must not   */
+/*    be misrepresented as being the original software.                      */
+/* 3. This notice may not be removed or altered from any source              */
+/*    distribution.                                                          */
+/*                                                                           */
+/*****************************************************************************/
+
+
+
+#ifndef FRAGMENT_H
+#define FRAGMENT_H
+
+
+
+/* common */
+#include "filepos.h"
+
+
+
+/*****************************************************************************/
+/*                                          Data                                    */
+/*****************************************************************************/
+
+
+
+/* Fragment structure */
+typedef struct Fragment Fragment;
+struct Fragment {
+    Fragment*          Next;           /* Next fragment in list */
+    struct ObjData*    Obj;            /* Source of fragment */
+    unsigned long              Size;           /* Size of data/expression */
+    struct ExprNode*   Expr;           /* Expression if FRAG_EXPR */
+    FilePos            Pos;            /* File position in source */
+    unsigned char      Type;           /* Type of fragment */
+    unsigned char              LitBuf [1];     /* Dynamically alloc'ed literal buffer */
+};
+
+
+
+/*****************************************************************************/
+/*                                          Code                                    */
+/*****************************************************************************/
+
+
+
+Fragment* NewFragment (unsigned char Type, unsigned long Size, struct Section* S);
+/* Create a new fragment and insert it into the section S */
+
+
+
+/* End of fragment.h */
+
+#endif
+
+
+
+
index 30a6be1a7d111f9868a8fb9bd247b43cb88a0d84..8db28cb6d49ca0661ce96affbe49bab1e17a41d1 100644 (file)
@@ -26,6 +26,7 @@ OBJS =        bin.o           \
        expr.o          \
        extsyms.o       \
        fileio.o        \
+       fragment.o      \
        global.o        \
        library.o       \
        main.o          \
index cd3515ccff1af19ecf2dcf798b05e16db52bb52d..583d7335ea4c99c9f8bc55a99bf7ba7b1feacaed 100644 (file)
@@ -76,6 +76,7 @@ OBJS =        bin.obj         \
        expr.obj        \
        extsyms.obj     \
        fileio.obj      \
+       fragment.obj    \
        global.obj      \
        library.obj     \
        main.obj        \
index 5db0848d8e7ea5a362aa9f8cd8478a21b201059b..4813d809dd84fe50755333852845688d69e86830 100644 (file)
 
 
 /* Internal structure holding object file data */
-typedef struct ObjData_ ObjData;
-struct ObjData_ {
+typedef struct ObjData ObjData;
+struct ObjData {
     ObjData*           Next;           /* Linked list of all objects */
     char*              Name;           /* Module name */
     char*                      LibName;        /* Name of library */
-    ObjHeader          Header;         /* Header of file */
+    ObjHeader          Header;         /* Header of file */
     unsigned long      Start;          /* Start offset of data in library */
     unsigned           Flags;
-    unsigned           FileCount;      /* Input file count */
-    char**             Files;          /* List of input files */
-    unsigned           SectionCount;   /* Count of sections in this object */
-    struct Section_**          Sections;       /* List of all sections */
-    unsigned           ExportCount;    /* Count of exports */
-    struct Export_**   Exports;        /* List of all exports */
-    unsigned           ImportCount;    /* Count of imports */
-    struct Import_**   Imports;        /* List of all imports */
-    unsigned           DbgSymCount;    /* Count of debug symbols */
-    struct DbgSym_**           DbgSyms;        /* List of debug symbols */
+    unsigned           FileCount;      /* Input file count */
+    char**             Files;          /* List of input files */
+    unsigned           SectionCount;   /* Count of sections in this object */
+    struct Section**   Sections;       /* List of all sections */
+    unsigned           ExportCount;    /* Count of exports */
+    struct Export**    Exports;        /* List of all exports */
+    unsigned           ImportCount;    /* Count of imports */
+    struct Import**    Imports;        /* List of all imports */
+    unsigned           DbgSymCount;    /* Count of debug symbols */
+    struct DbgSym**    DbgSyms;        /* List of debug symbols */
 };
 
 
@@ -105,4 +105,4 @@ void FreeObjData (ObjData* O);
 
 
 
-         
+
index 7758358180228c2db2bb3f7f46e09f3ff1cc5c0b..ea3dec3cc11baa0f83cf20875ad737372c56bd40 100644 (file)
@@ -48,6 +48,7 @@
 #include "error.h"
 #include "expr.h"
 #include "fileio.h"
+#include "fragment.h"
 #include "global.h"
 #include "segments.h"
 
 
 
 
-/* Fragment structure */
-typedef struct Fragment_ Fragment;
-struct Fragment_ {
-    Fragment*          Next;           /* Next fragment in list */
-    ObjData*           Obj;            /* Source of fragment */
-    unsigned long              Size;           /* Size of data/expression */
-    ExprNode*                  Expr;           /* Expression if FRAG_EXPR */
-    FilePos            Pos;            /* File position in source */
-    unsigned char      Type;           /* Type of fragment */
-    unsigned char              LitBuf [1];     /* Dynamically alloc'ed literal buffer */
-};
-
-
-
 /* Hash table */
 #define HASHTAB_SIZE   253
 static Segment*                HashTab [HASHTAB_SIZE];
@@ -88,35 +75,6 @@ static Segment*              SegRoot = 0;    /* List of all segments */
 
 
 
-static Fragment* NewFragment (unsigned char Type, unsigned long Size, Section* S)
-/* Create a new fragment and insert it into the segment S */
-{
-    /* Allocate memory */
-    Fragment* F = xmalloc (sizeof (Fragment) - 1 + Size);      /* Portable? */
-
-    /* Initialize the data */
-    F->Next = 0;
-    F->Obj  = 0;
-    F->Size = Size;
-    F->Expr = 0;
-    F->Type = Type;
-
-    /* Insert the code fragment into the segment */
-    if (S->FragRoot == 0) {
-       /* First fragment */
-       S->FragRoot = F;
-    } else {
-       S->FragLast->Next = F;
-    }
-    S->FragLast = F;
-    S->Size += Size;
-
-    /* Return the new fragment */
-    return F;
-}
-
-
-
 static Segment* NewSegment (const char* Name, unsigned char Type)
 /* Create a new segment and initialize it */
 {
@@ -413,7 +371,7 @@ void SegDump (void)
                        while (Count--) {
                            if (I > 75) {
                                printf ("\n   ");
-                               I = 3;
+                               I = 3;
                            }
                            printf (" %02X", *Data++);
                            I += 3;
@@ -435,7 +393,7 @@ void SegDump (void)
 
                    case FRAG_FILL:
                        printf ("    Empty space (%lu bytes)\n", F->Size);
-                       break;
+                       break;
 
                    default:
                        Internal ("Invalid fragment type: %02X", F->Type);
index f69e9c2db6170a584712e7f4bdf1ab37ac670657..b045229ea91ed74b6391987b84ff9cd17d83cf5f 100644 (file)
@@ -40,9 +40,8 @@
 
 #include <stdio.h>
 
-#include "../common/exprdefs.h"
-
-#include "objdata.h"
+/* common */
+#include "exprdefs.h"
 
 
 
 
 
 
-/* Forward for the section structure (a section is a part of a segment) */
-typedef struct Section_ Section;
-
 /* Segment structure */
-typedef struct Segment_ Segment;
-struct Segment_ {
-    Segment*           Next;           /* Hash list */
-    Segment*           List;           /* List of all segments */
-    Section*           SecRoot;        /* Section list */
-    Section*           SecLast;        /* Pointer to last section */
-    unsigned long      PC;             /* PC were this segment is located */
-    unsigned long      Size;           /* Size of data so far */
-    ObjData*           AlignObj;       /* Module that requested the alignment */
-    unsigned char      Align;          /* Alignment needed */
-    unsigned char      FillVal;        /* Value to use for fill bytes */
-    unsigned char      Type;           /* Type of segment */
-    char               Dumped;         /* Did we dump this segment? */
+typedef struct Segment Segment;
+struct Segment {
+    Segment*           Next;           /* Hash list */
+    Segment*           List;           /* List of all segments */
+    struct Section*    SecRoot;        /* Section list */
+    struct Section*    SecLast;        /* Pointer to last section */
+    unsigned long      PC;             /* PC were this segment is located */
+    unsigned long      Size;           /* Size of data so far */
+    struct ObjData*    AlignObj;       /* Module that requested the alignment */
+    unsigned char      Align;          /* Alignment needed */
+    unsigned char      FillVal;        /* Value to use for fill bytes */
+    unsigned char      Type;           /* Type of segment */
+    char               Dumped;         /* Did we dump this segment? */
     char                       Name [1];       /* Name, dynamically allocated */
 };
 
 
 
 /* Section structure (a section is a part of a segment) */
-struct Section_ {
-    Section*           Next;           /* List of sections in a segment */
-    Segment*           Seg;            /* Segment that contains the section */
-    struct Fragment_*  FragRoot;       /* Fragment list */
-    struct Fragment_*  FragLast;       /* Pointer to last fragment */
+typedef struct Section Section;
+struct Section {
+    Section*           Next;           /* List of sections in a segment */
+    Segment*           Seg;            /* Segment that contains the section */
+    struct Fragment*   FragRoot;       /* Fragment list */
+    struct Fragment*   FragLast;       /* Pointer to last fragment */
     unsigned long      Offs;           /* Offset into the segment */
     unsigned long      Size;           /* Size of the section */
     unsigned char      Align;          /* Alignment */
@@ -97,10 +94,10 @@ struct Section_ {
 #define SEG_EXPR_TOO_COMPLEX   2       /* Expression too complex */
 
 typedef unsigned (*SegWriteFunc) (ExprNode* E,               /* The expression to write */
-                                 int Signed,         /* Signed expression? */
-                                 unsigned Size,      /* Size (=range) */
-                                 unsigned long Offs, /* File offset */
-                                 void* Data);        /* Callers data */
+                                 int Signed,         /* Signed expression? */
+                                 unsigned Size,      /* Size (=range) */
+                                 unsigned long Offs, /* File offset */
+                                 void* Data);        /* Callers data */
 
 
 
@@ -110,7 +107,7 @@ typedef unsigned (*SegWriteFunc) (ExprNode* E,            /* The expression to write
 
 
 
-Section* ReadSection (FILE* F, ObjData* O);
+Section* ReadSection (FILE* F, struct ObjData* O);
 /* Read a section from a file */
 
 Segment* SegFind (const char* Name);
@@ -150,3 +147,4 @@ void CheckSegments (void);
 
 
 
+