//
int chcheck(LONG amt)
{
+ DEBUG { printf("chcheck(%u)\n", amt); }
// If in BSS section, no allocation required
if (scattr & SBSS)
return 0;
if (!amt)
amt = CH_THRESHOLD;
+ DEBUG { printf(" challoc=%i, ch_size=%i, diff=%i\n", challoc, ch_size, challoc-ch_size); }
if ((int)(challoc - ch_size) >= (int)amt)
return 0;
if (amt < CH_CODE_SIZE)
amt = CH_CODE_SIZE;
+ DEBUG { printf(" amt (adjusted)=%u\n", amt); }
SECT * p = §[cursect];
CHUNK * cp = malloc(sizeof(CHUNK) + amt);
loc = *fup.lp++;
cfileno = *fup.wp++;
curlineno = (int)*fup.wp++;
+DEBUG { printf("ResolveFixups: cfileno=%u\n", cfileno); }
+ // This is based on global vars cfileno, curfname :-P
+ // This approach is kinda meh as well. I think we can do better than this.
+ SetFilenameForErrorReporting();
esym = NULL;