cmm: Add dirname of the input file to include path.

git-svn-id: svn://kolibrios.org@7668 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Ivan Baravy 2019-06-05 01:08:02 +00:00
parent 920044111f
commit 40f4d2b2b9

View File

@ -315,6 +315,13 @@ int i;
printf("Bad input file extension '%s'.",rawext);
exit(e_badinputfilename);
}
// Add dirname of the input file to include path.
char *slash_idx = strrchr((char*)rawfilename, DIV_FOLD);
if (slash_idx) {
*slash_idx = '\0';
IncludePath((char*)rawfilename);
*slash_idx = DIV_FOLD;
}
}
void compile()