From 153d53bd8874c405986f76caef3ec3229f0c5dd7 Mon Sep 17 00:00:00 2001 From: daniel Date: Sat, 27 May 2006 16:59:15 +0000 Subject: [PATCH] * Merge r3698 git-svn-id: branches/fixes_2_0@3700 - --- rtl/unix/keyboard.pp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/rtl/unix/keyboard.pp b/rtl/unix/keyboard.pp index 44a194b57a..f58b34ba44 100644 --- a/rtl/unix/keyboard.pp +++ b/rtl/unix/keyboard.pp @@ -98,19 +98,26 @@ const {$endif Unused} procedure SetRawMode(b:boolean); -var - Tio : Termios; -Begin + +var Tio:Termios; + +begin TCGetAttr(1,Tio); if b then begin + {Standard output now needs #13#10.} + settextlineending(output,#13#10); OldIO:=Tio; CFMakeRaw(Tio); end else - Tio := OldIO; - TCSetAttr(1,TCSANOW,Tio); -End; + begin + Tio := OldIO; + {Standard output normally needs just a linefeed.} + settextlineending(output,#10); + end; + TCsetattr(1,TCSANOW,Tio); +end; {$ifdef linux}