# HG changeset patch # User Matti Hamalainen # Date 1527763583 -10800 # Node ID bd68c9adc7ca94cf6744ca179d4aa35881cbbac5 # Parent dbffbd333a162670b1a4f4fb972f1b485e31ed8b Rename some constants. diff -r dbffbd333a16 -r bd68c9adc7ca tools/objlink.c --- a/tools/objlink.c Thu May 31 13:32:26 2018 +0300 +++ b/tools/objlink.c Thu May 31 13:46:23 2018 +0300 @@ -10,8 +10,8 @@ #include "dmargs.h" #include "dmfile.h" -#define MAX_FILENAMES (128) -#define MAX_MEMBLOCKS (128) +#define SET_MAX_FILENAMES (128) +#define SET_MAX_MEMBLOCKS (128) /* Typedefs @@ -30,7 +30,7 @@ char *desc; int size; // Total addressable memory size int nmemBlocks; // Defined memory areas - DMMemBlock memBlocks[MAX_MEMBLOCKS]; + DMMemBlock memBlocks[SET_MAX_MEMBLOCKS]; } DMMemModel; typedef struct @@ -120,10 +120,10 @@ /* Global variables */ int nsrcFiles = 0; // Number of source files -DMSourceFile srcFiles[MAX_FILENAMES]; // Source file names +DMSourceFile srcFiles[SET_MAX_FILENAMES]; // Source file names int nmemBlocks = 0; -DMMemBlock memBlocks[MAX_FILENAMES]; +DMMemBlock memBlocks[SET_MAX_FILENAMES]; char *optLinkFileName = NULL; int optLinkFileFormat = FMT_GENERIC; @@ -209,7 +209,7 @@ return FALSE; } - if (nmemBlocks < MAX_FILENAMES) + if (nmemBlocks < SET_MAX_FILENAMES) { memBlocks[nmemBlocks].start = startAddr; memBlocks[nmemBlocks].end = endAddr; @@ -221,7 +221,7 @@ else { dmErrorMsg("Maximum number of memBlock definitions (%d) exceeded!\n", - MAX_FILENAMES); + SET_MAX_FILENAMES); return FALSE; } }