mirror of
https://github.com/cc65/cc65.git
synced 2024-12-28 06:30:16 +00:00
Hold address sizes in an unsigned char
git-svn-id: svn://svn.cc65.org/cc65/trunk@2680 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
eb7fc320cc
commit
f99049f84c
@ -102,7 +102,7 @@ Segment* ActiveSeg = &CodeSeg;
|
||||
|
||||
|
||||
|
||||
static Segment* NewSegment (const char* Name, unsigned AddrSize)
|
||||
static Segment* NewSegment (const char* Name, unsigned char AddrSize)
|
||||
/* Create a new segment, insert it into the global list and return it */
|
||||
{
|
||||
Segment* S;
|
||||
@ -261,7 +261,7 @@ void SegAlign (unsigned Power, int Val)
|
||||
|
||||
|
||||
|
||||
unsigned GetSegAddrSize (unsigned SegNum)
|
||||
unsigned char GetSegAddrSize (unsigned SegNum)
|
||||
/* Return the address size of the segment with the given number */
|
||||
{
|
||||
/* Search for the segment */
|
||||
|
@ -116,7 +116,7 @@ INLINE unsigned GetCurrentSegNum (void)
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_INLINE)
|
||||
INLINE unsigned GetCurrentSegAddrSize (void)
|
||||
INLINE unsigned char GetCurrentSegAddrSize (void)
|
||||
/* Get the address size of the current segment */
|
||||
{
|
||||
return ActiveSeg->Def->AddrSize;
|
||||
@ -131,7 +131,7 @@ void SegAlign (unsigned Power, int Val);
|
||||
* given value.
|
||||
*/
|
||||
|
||||
unsigned GetSegAddrSize (unsigned SegNum);
|
||||
unsigned char GetSegAddrSize (unsigned SegNum);
|
||||
/* Return the address size of the segment with the given number */
|
||||
|
||||
unsigned long GetPC (void);
|
||||
|
@ -45,7 +45,7 @@
|
||||
|
||||
|
||||
|
||||
SegDef* NewSegDef (const char* Name, unsigned AddrSize)
|
||||
SegDef* NewSegDef (const char* Name, unsigned char AddrSize)
|
||||
/* Create a new segment definition and return it */
|
||||
{
|
||||
/* Allocate memory */
|
||||
@ -78,3 +78,4 @@ SegDef* DupSegDef (const SegDef* Def)
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
||||
#define SEGDEFS_H
|
||||
|
||||
|
||||
|
||||
|
||||
/* common */
|
||||
#include "addrsize.h"
|
||||
|
||||
@ -52,8 +52,8 @@
|
||||
/* Segment definition */
|
||||
typedef struct SegDef SegDef;
|
||||
struct SegDef {
|
||||
char* Name; /* Segment name */
|
||||
unsigned AddrSize; /* Default address size */
|
||||
char* Name; /* Segment name */
|
||||
unsigned char AddrSize; /* Default address size */
|
||||
};
|
||||
|
||||
/* Initializer for static SegDefs */
|
||||
@ -67,7 +67,7 @@ struct SegDef {
|
||||
|
||||
|
||||
|
||||
SegDef* NewSegDef (const char* Name, unsigned AddrSize);
|
||||
SegDef* NewSegDef (const char* Name, unsigned char AddrSize);
|
||||
/* Create a new segment definition and return it */
|
||||
|
||||
void FreeSegDef (SegDef* D);
|
||||
@ -77,7 +77,7 @@ SegDef* DupSegDef (const SegDef* D);
|
||||
/* Duplicate a segment definition and return it */
|
||||
|
||||
|
||||
|
||||
|
||||
/* End of segdefs.h */
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user