Author: rmottola
Date: Fri Dec 16 02:24:14 2016
New Revision: 40268

URL: http://svn.gna.org/viewcvs/gnustep?rev=40268&view=rev
Log:
Conditionally split on windows with CR-LF

Modified:
    apps/projectcenter/trunk/ChangeLog
    apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PipeDelegate.m

Modified: apps/projectcenter/trunk/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/apps/projectcenter/trunk/ChangeLog?rev=40268&r1=40267&r2=40268&view=diff
==============================================================================
--- apps/projectcenter/trunk/ChangeLog  (original)
+++ apps/projectcenter/trunk/ChangeLog  Fri Dec 16 02:24:14 2016
@@ -1,3 +1,8 @@
+2016-12-16 Riccardo Mottola <[email protected]>
+
+       * Modules/Debuggers/ProjectCenter/PipeDelegate.m
+       Conditionally split on windows with CR-LF
+
 2016-11-28 Riccardo Mottola <[email protected]>
 
        * Modules/Parsers/ProjectCenter/PCParser.m

Modified: 
apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PipeDelegate.m
URL: 
http://svn.gna.org/viewcvs/gnustep/apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PipeDelegate.m?rev=40268&r1=40267&r2=40268&view=diff
==============================================================================
--- apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PipeDelegate.m     
(original)
+++ apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PipeDelegate.m     
Fri Dec 16 02:24:14 2016
@@ -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];


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to