handle CR to LF

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/ptyview_with_pipes@39552 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Riccardo Mottola 2016-03-16 00:50:17 +00:00
parent 233b83b218
commit d1a269c0cb

View file

@ -302,18 +302,26 @@
chars = [theEvent characters];
if ([chars length] == 1)
{
{
unichar c;
c = [chars characterAtIndex: 0];
// NSLog(@"char: %d", c);
if (c == 3) // ETX, Control-C
{
[self interrupt]; // send the interrupt signal to the subtask
}
if (c == 13) // CR
{
[self putString: @"\n"];
}
else
{
[self putChar: c];
[self putString: chars];
}
}
}
else
NSLog(@"characters: |%@|", chars);
}
@end