From 38311ddf58666c08214a31359ae118ba0fcb3bcb Mon Sep 17 00:00:00 2001 From: mysticbbs Date: Fri, 24 Aug 2012 17:39:46 -0400 Subject: [PATCH] Alpha 18 sync --- mdl/m_pipe_disk.pas | 1 + mdl/m_protocol_zmodem.pas | 47 ++++++++++++++++++++++++++++++++++++--- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/mdl/m_pipe_disk.pas b/mdl/m_pipe_disk.pas index 02acc97..61e5c7d 100644 --- a/mdl/m_pipe_disk.pas +++ b/mdl/m_pipe_disk.pas @@ -140,6 +140,7 @@ Begin BlockRead (PipeInput, Buffer[0], Len, bRead); If IsClient And TimerUp(ResetTimer) Then Begin + Ch := #1; SendToPipe(Ch, 1); diff --git a/mdl/m_protocol_zmodem.pas b/mdl/m_protocol_zmodem.pas index b61c7ee..0191ba3 100644 --- a/mdl/m_protocol_zmodem.pas +++ b/mdl/m_protocol_zmodem.pas @@ -170,8 +170,10 @@ Begin GOTCRCW : Result := 'GOTCRCW'; ZCRC : Result := 'ZCRC'; Else - Result := 'UNKNOWN:' + strI2S(Ord(B)); + Result := 'UNKNOWN'; End; + + Result := Result + ' Ord:' + strI2S(Ord(B)); End; {$ENDIF} @@ -197,7 +199,7 @@ Begin Status.Protocol := 'Zmodem'; LastSent := 0; - EscapeAll := True; + EscapeAll := False; Attn := ''; End; @@ -318,7 +320,7 @@ Begin End; End; - {$IFDEF ZCHARLOG} ZLog('ZDLRead -> ' + strI2S(Result)); {$ENDIF} + {$IFDEF ZCHARLOG} ZLog('ZDLRead -> ' + HeaderType(Result)); {$ENDIF} End; (* @@ -462,6 +464,45 @@ Begin ZReceiveBinaryHeader32 := RxType; End; +(* +//XON, XOFF, DLE, CTRLX, CR@CR... +//ALSO translate TELNET_IAC... optional? +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.SendEscaped (B: SmallInt); Begin Case B of