diff --git a/ChangeLog b/ChangeLog index 449820f..e91dc3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-12-16 Riccardo Mottola + + * Modules/Debuggers/ProjectCenter/PipeDelegate.m + Conditionally split on windows with CR-LF + 2016-11-28 Riccardo Mottola * Modules/Parsers/ProjectCenter/PCParser.m diff --git a/Modules/Debuggers/ProjectCenter/PipeDelegate.m b/Modules/Debuggers/ProjectCenter/PipeDelegate.m index ebd249f..cc841a1 100644 --- a/Modules/Debuggers/ProjectCenter/PipeDelegate.m +++ b/Modules/Debuggers/ProjectCenter/PipeDelegate.m @@ -332,16 +332,23 @@ unescapedString = [unescapedString stringByReplacingOccurrencesOfString: @"\\n" withString: @"\n"]; unescapedString = [unescapedString stringByReplacingOccurrencesOfString: @"\\t" withString: @"\t"]; unescapedString = [unescapedString stringByReplacingOccurrencesOfString: @"\\032" withString: @" "]; - + return unescapedString; } - (void) parseString: (NSString *)inputString { - NSArray *components = [inputString componentsSeparatedByString:@"\n"]; - NSEnumerator *en = [components objectEnumerator]; + NSArray *components; + NSEnumerator *en; NSString *item = nil; +#if defined(__MINGW32__) + components = [inputString componentsSeparatedByString:@"\r\n"]; +#else + components = [inputString componentsSeparatedByString:@"\n"]; +#endif + en = [components objectEnumerator]; + while((item = [en nextObject]) != nil) { PCDebuggerOutputTypes outtype = [self parseStringLine: item];