Conditionally split on windows with CR-LF

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@40268 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Riccardo Mottola 2016-12-16 01:24:14 +00:00
parent af6ec6a874
commit f1db0b7265
2 changed files with 15 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2016-12-16 Riccardo Mottola <rm@gnu.org>
* Modules/Debuggers/ProjectCenter/PipeDelegate.m
Conditionally split on windows with CR-LF
2016-11-28 Riccardo Mottola <rm@gnu.org>
* Modules/Parsers/ProjectCenter/PCParser.m

View file

@ -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];