define WorkspaceExtension = "ews";
define ProjectExtension = "epj";
+define stringInFileIncludedFrom = "In file included from ";
+
void ReplaceSpaces(char * output, char * source)
{
int c, dc;
//printf("Peeking and GetLine...\n");
if((result = f.Peek()) && (result = f.GetLine(line, sizeof(line)-1)))
{
- const char * stringInFileIncludedFrom = "In file included from ";
char * inFileIncludedFrom = strstr(line, stringInFileIncludedFrom);
if(strstr(line, compiler.makeCommand) == line && line[lenMakeCommand] == ':')
{
char * bracket;
if(colon)
{
+ char * inFileIncludedFrom = strstr(line, stringInFileIncludedFrom);
+ char * start = inFileIncludedFrom ? line + strlen(stringInFileIncludedFrom) : line;
+ int len = (int)(colon - start);
+ len = Min(len, MAX_LOCATION-1);
// Cut module name
- strncpy(moduleName, line, colon - line);
- moduleName[colon - line] = '\0';
+ strncpy(moduleName, start, len);
+ moduleName[len] = '\0';
}
else
strcpy(moduleName, line);