<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
- <OutDir>$(SolutionDir)\..</OutDir>
+ <OutDir>$(SolutionDir)\..\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
int bytes = 0;
long pos, size, bytesRead;
char msg[256];
+ char buf1[256];
+ int i;
// Check to see if we're in BSS, and, if so, throw an error
if (scattr & SBSS)
return ERROR;
}
- if ((fd = open(string[tok[1]], _OPEN_INC)) < 0)
+ // Attempt to open the include file in the current directory, then (if that
+ // failed) try list of include files passed in the enviroment string or by
+ // the "-d" option.
+ if ((fd = open(string[tok[1]], _OPEN_INC)) < 0)
{
- errors("cannot open include binary file (%s)", string[tok[1]]);
- return ERROR;
+ for (i = 0; nthpath("RMACPATH", i, buf1) != 0; i++)
+ {
+ fd = strlen(buf1);
+
+ if (fd > 0 && buf1[fd - 1] != SLASHCHAR) // Append path char if necessary
+ strcat(buf1, SLASHSTRING);
+
+ strcat(buf1, string[tok[1]]);
+
+ if ((fd = open(buf1, _OPEN_INC)) >= 0)
+ goto allright;
+ }
+
+ return errors("cannot open: \"%s\"", string[tok[1]]);
}
+allright:
+
+
size = lseek(fd, 0L, SEEK_END);
pos = lseek(fd, 0L, SEEK_SET);
chcheck(size);
LONG mcalloc; // #bytes alloc'd to current mark chunk
LONG mcused; // #bytes used in current mark chunk
uint16_t curfrom; // Current "from" section
+LONG markimg(register char * mp, LONG siz, LONG tsize, int okflag);
//
// Imports