Removed underlines from structure names.
Moved the fragment type into its own module. git-svn-id: svn://svn.cc65.org/cc65/trunk@430 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -40,9 +40,8 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "../common/exprdefs.h"
|
||||
|
||||
#include "objdata.h"
|
||||
/* common */
|
||||
#include "exprdefs.h"
|
||||
|
||||
|
||||
|
||||
@@ -52,34 +51,32 @@
|
||||
|
||||
|
||||
|
||||
/* 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);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user