--- sbbs/sbbs3/ctrl/spyformunit.cpp 2018/04/24 16:39:34 1.1.1.1 +++ sbbs/sbbs3/ctrl/spyformunit.cpp 2018/04/24 16:41:06 1.1.1.2 @@ -1,12 +1,12 @@ /* Synchronet Control Panel (GUI Borland C++ Builder Project for Win32) */ -/* $Id: spyformunit.cpp,v 1.1.1.1 2018/04/24 16:39:34 root Exp $ */ +/* $Id: spyformunit.cpp,v 1.1.1.2 2018/04/24 16:41:06 root Exp $ */ /**************************************************************************** * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2000 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2003 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -52,22 +52,31 @@ __fastcall TSpyForm::TSpyForm(TComponent { Width=MainForm->SpyTerminalWidth; Height=MainForm->SpyTerminalHeight; - KeyboardActive->Checked=MainForm->SpyTerminalKeyboardActive; Terminal = new TEmulVT(this); Terminal->Parent=this; Terminal->Align=alClient; Terminal->OnKeyPress=FormKeyPress; Terminal->OnMouseUp=FormMouseUp; + Terminal->AutoWrap=true; ActiveControl=Terminal; } //--------------------------------------------------------------------------- -int strip_telnet(uchar *buf, int len) +__fastcall TSpyForm::~TSpyForm() +{ + delete Terminal; +} +//--------------------------------------------------------------------------- +int __fastcall TSpyForm::strip_telnet(uchar *buf, int len) { int i; int telnet_cmd=0; int newlen=0; for(i=0;iClear(); + continue; + } if(buf[i]==TELNET_IAC || telnet_cmd) { if(telnet_cmd==1 && buf[i]==TELNET_IAC) { telnet_cmd=0; /* escape IAC */ @@ -120,6 +129,8 @@ void __fastcall TSpyForm::FormShow(TObje Terminal->Clear(); Terminal->WriteStr("*** Synchronet Local Spy ***\r\n\r\n"); Terminal->WriteStr("ANSI Terminal Emulation:"+CopyRight+"\r\n\r\n"); + + KeyboardActive->Checked=!MainForm->SpyTerminalKeyboardActive; KeyboardActiveClick(Sender); } //---------------------------------------------------------------------------