#include "ralloc.h"
#include "device.h"
-#if defined(__BORLANDC__) || defined(_MSC_VER)
-#define STRCASECMP stricmp
-#define STRNCASECMP strnicmp
-#else
-#define STRCASECMP strcasecmp
-#define STRNCASECMP strncasecmp
-#endif
-
extern int Gstack_base_addr;
extern int Gstack_size;
static unsigned int config2_word = DEFAULT_CONFIG2_WORD;
static memRange *rangeRAM = NULL;
-extern void emitSymbolToFile (FILE *of, const char *name, const char *section_type, int size, int addr, int useEQU, int globalize);
-
/* parse a value from the configuration file */
static int parse_config_value(char *str)
r->end_address = parse_config_value(word[pcount]);
r->alias = parse_config_value(word[1]);
r->bank = (r->start_address >> 7) & 3;
+ // add memRange to device entry for future lookup (sharebanks)
+ r->next = rangeRAM;
+ rangeRAM = r;
}
-
- // add memRange to device entry for future lookup (sharebanks)
- r->next = rangeRAM;
- rangeRAM = r;
}
/* read line by line */
pic_buf[sizeof(pic_buf)-1] = '\0';
while (fgets(pic_buf, sizeof(pic_buf)-1, pic_file) != NULL && !done) {
+ unsigned llen;
+ llen = strlen (pic_buf);
/* remove trailing spaces */
- while (isspace(pic_buf[strlen(pic_buf)-1]))
- pic_buf[strlen(pic_buf)-1] = '\0';
+ while (llen && isspace(pic_buf[llen-1])) {
+ pic_buf[llen-1] = '\0';
+ llen--;
+ }
/* remove leading spaces */
for (pic_buf_pos = pic_buf; isspace(*pic_buf_pos); pic_buf_pos++)