Default to NOT escape all on receieve

This commit is contained in:
mysticbbs 2013-02-22 20:47:40 -05:00
parent 599002788c
commit acb6449d46
1 changed files with 38 additions and 1 deletions

View File

@ -199,7 +199,7 @@ Begin
Status.Protocol := 'Zmodem'; Status.Protocol := 'Zmodem';
LastSent := 0; LastSent := 0;
EscapeAll := True; EscapeAll := False;
Attn := ''; Attn := '';
End; End;
@ -503,6 +503,7 @@ Begin
End; End;
*) *)
(*
Procedure TProtocolZmodem.SendEscaped (B: SmallInt); Procedure TProtocolZmodem.SendEscaped (B: SmallInt);
Begin Begin
Case B of Case B of
@ -537,6 +538,42 @@ Begin
Client.BufWriteChar(Char(LastSent)); Client.BufWriteChar(Char(LastSent));
End; End;
*)
Procedure TProtocolZmodem.SendEscaped (B: SmallInt);
Begin
Case B of
DLE,
DLEHI,
XON,
XONHI,
XOFF,
XOFFHI,
ZDLE : Begin
Client.BufWriteChar(Char(ZDLE));
LastSent := B XOR $40;
End;
13,
13 OR $80 : If (LastSent AND $7F = Ord('@')) Then Begin
Client.BufWriteChar(Char(ZDLE));
LastSent := B XOR $40;
End Else
LastSent := B;
255 : Begin
Client.BufWriteChar(Char(ZDLE));
LastSent := ZRUB1;
End;
Else
If (EscapeAll) and ((B AND $60) = 0) Then Begin
Client.BufWriteChar(Char(ZDLE));
LastSent := B XOR $40;
End Else
LastSent := B;
End;
Client.BufWriteChar(Char(LastSent));
End;
Procedure TProtocolZmodem.ZSendBinaryHeader (FrameType : Byte); Procedure TProtocolZmodem.ZSendBinaryHeader (FrameType : Byte);
Var Var