From eb7fc320cc1e67e0755ed21c629eef15624350c5 Mon Sep 17 00:00:00 2001 From: cuz Date: Sun, 23 Nov 2003 21:38:54 +0000 Subject: [PATCH] New DefAddrSize variable git-svn-id: svn://svn.cc65.org/cc65/trunk@2679 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/ca65/global.c | 11 ++++++++--- src/ca65/global.h | 3 ++- src/ca65/symentry.c | 4 ++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/ca65/global.c b/src/ca65/global.c index 051845ac5..cc0dc79f3 100644 --- a/src/ca65/global.c +++ b/src/ca65/global.c @@ -7,7 +7,7 @@ /* */ /* */ /* (C) 1998-2003 Ullrich von Bassewitz */ -/* Römerstrasse 52 */ +/* Römerstraße 52 */ /* D-70794 Filderstadt */ /* EMail: uz@cc65.org */ /* */ @@ -33,7 +33,11 @@ -#include "global.h" +/* common */ +#include "addrsize.h" + +/* ca65 */ +#include "global.h" @@ -60,7 +64,8 @@ unsigned char SmartMode = 0; /* Smart mode */ unsigned char DbgSyms = 0; /* Add debug symbols */ unsigned char Listing = 0; /* Create listing file */ unsigned char LineCont = 0; /* Allow line continuation */ - +unsigned char DefAddrSize = ADDR_SIZE_ABS; /* Default address size */ + /* Emulation features */ unsigned char DollarIsPC = 0; /* Allow the $ symbol as current PC */ unsigned char NoColonLabels = 0; /* Allow labels without a colon */ diff --git a/src/ca65/global.h b/src/ca65/global.h index 24a41c03b..69633c635 100644 --- a/src/ca65/global.h +++ b/src/ca65/global.h @@ -7,7 +7,7 @@ /* */ /* */ /* (C) 1998-2003 Ullrich von Bassewitz */ -/* Römerstrasse 52 */ +/* Römerstraße 52 */ /* D-70794 Filderstadt */ /* EMail: uz@cc65.org */ /* */ @@ -61,6 +61,7 @@ extern unsigned char SmartMode; /* Smart mode */ extern unsigned char DbgSyms; /* Add debug symbols */ extern unsigned char Listing; /* Create listing file */ extern unsigned char LineCont; /* Allow line continuation */ +extern unsigned char DefAddrSize; /* Default address size */ /* Emulation features */ extern unsigned char DollarIsPC; /* Allow the $ symbol as current PC */ diff --git a/src/ca65/symentry.c b/src/ca65/symentry.c index 6d3dbc30c..bc2300971 100644 --- a/src/ca65/symentry.c +++ b/src/ca65/symentry.c @@ -271,9 +271,9 @@ void SymImport (SymEntry* S, unsigned char AddrSize, unsigned Flags) return; } - /* Map a default address size to a real value */ + /* If no address size is given, use the default address size */ if (AddrSize == ADDR_SIZE_DEFAULT) { - AddrSize = SymAddrSize (S); + AddrSize = DefAddrSize; } /* If the symbol is marked as import or global, check the symbol flags, -- 2.39.5