mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-03-14 06:31:31 +00:00
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:
parent
233b83b218
commit
d1a269c0cb
1 changed files with 11 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue