Added SegDef struct and a few functions to the segdefs module

git-svn-id: svn://svn.cc65.org/cc65/trunk@1668 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2002-11-28 17:34:16 +00:00
parent 6b46bf3b10
commit 34f42ce630
4 changed files with 142 additions and 1 deletions

View File

@@ -6,7 +6,7 @@
/* */
/* */
/* */
/* (C) 1998-2000 Ullrich von Bassewitz */
/* (C) 1998-2002 Ullrich von Bassewitz */
/* Wacholderweg 14 */
/* D-70597 Stuttgart */
/* EMail: uz@musoftware.de */
@@ -71,6 +71,39 @@
#define FRAG_FILL 0x20 /* Fill bytes */
/* Segment definition */
typedef struct SegDef SegDef;
struct SegDef {
const char* Name; /* Segment name */
unsigned Type; /* Segment type, see above */
};
/* Initializer for static SegDefs */
#define STATIC_SEGDEF_INITIALIZER(name, type) { (name), (type) }
/*****************************************************************************/
/* Code */
/*****************************************************************************/
SegDef* NewSegDef (const char* Name, unsigned Type);
/* Create a new segment definition and return it */
void FreeSegDef (SegDef* D);
/* Free a segment definition */
SegDef* DupSegDef (const SegDef* D);
/* Duplicate a segment definition and return it */
int ValidSegName (const char* Name);
/* Return true if the given segment name is valid, return false otherwise */
/* End of segdefs.h */
#endif