Skip to content

Commit

Permalink
Remove the WinTelnetEngine (#6526)
Browse files Browse the repository at this point in the history
Nobody was using it.

Discussed in #2661.
  • Loading branch information
DHowett authored Jun 17, 2020
1 parent c1076a8 commit ffaba38
Show file tree
Hide file tree
Showing 11 changed files with 2 additions and 470 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "../../renderer/base/Renderer.hpp"
#include "../../renderer/vt/Xterm256Engine.hpp"
#include "../../renderer/vt/XtermEngine.hpp"
#include "../../renderer/vt/WinTelnetEngine.hpp"

class InputBuffer; // This for some reason needs to be fwd-decl'd
#include "../host/inputBuffer.hpp"
Expand Down
11 changes: 0 additions & 11 deletions src/host/VtIo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#include "../renderer/vt/XtermEngine.hpp"
#include "../renderer/vt/Xterm256Engine.hpp"
#include "../renderer/vt/WinTelnetEngine.hpp"

#include "../renderer/base/renderer.hpp"
#include "../types/inc/utils.hpp"
Expand Down Expand Up @@ -51,10 +50,6 @@ VtIo::VtIo() :
{
ioMode = VtIoMode::XTERM;
}
else if (VtMode == WIN_TELNET_STRING)
{
ioMode = VtIoMode::WIN_TELNET;
}
else if (VtMode == XTERM_ASCII_STRING)
{
ioMode = VtIoMode::XTERM_ASCII;
Expand Down Expand Up @@ -178,12 +173,6 @@ VtIo::VtIo() :
gci.Get16ColorTable(),
true);
break;
case VtIoMode::WIN_TELNET:
_pVtRenderEngine = std::make_unique<WinTelnetEngine>(std::move(_hOutput),
gci,
initialViewport,
gci.Get16ColorTable());
break;
default:
return E_FAIL;
}
Expand Down
1 change: 0 additions & 1 deletion src/host/ut_host/ConptyOutputTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "../../renderer/base/Renderer.hpp"
#include "../../renderer/vt/Xterm256Engine.hpp"
#include "../../renderer/vt/XtermEngine.hpp"
#include "../../renderer/vt/WinTelnetEngine.hpp"
#include "../Settings.hpp"

#include "CommonState.hpp"
Expand Down
4 changes: 2 additions & 2 deletions src/host/ut_host/ConsoleArgumentsTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ void ConsoleArgumentsTests::CombineVtPipeHandleTests()
false), // inheritCursor
true); // successful parse?

commandline = L"conhost.exe --vtmode telnet";
commandline = L"conhost.exe --vtmode xterm-256color";
ArgTestsRunner(L"#2 Check that handles with mode is OK",
commandline,
hInSample,
Expand All @@ -672,7 +672,7 @@ void ConsoleArgumentsTests::CombineVtPipeHandleTests()
L"", // clientCommandLine
hInSample,
hOutSample,
L"telnet", // vtMode
L"xterm-256color", // vtMode
0, // width
0, // height
false, // forceV1
Expand Down
38 changes: 0 additions & 38 deletions src/host/ut_host/VtIoTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#include "..\..\renderer\vt\Xterm256Engine.hpp"
#include "..\..\renderer\vt\XtermEngine.hpp"
#include "..\..\renderer\vt\WinTelnetEngine.hpp"
#include "..\..\renderer\base\Renderer.hpp"
#include "..\Settings.hpp"
#include "..\VtIo.hpp"
Expand Down Expand Up @@ -83,9 +82,6 @@ void VtIoTests::ModeParsingTest()
VERIFY_SUCCEEDED(VtIo::ParseIoMode(L"xterm-256color", mode));
VERIFY_ARE_EQUAL(mode, VtIoMode::XTERM_256);

VERIFY_SUCCEEDED(VtIo::ParseIoMode(L"win-telnet", mode));
VERIFY_ARE_EQUAL(mode, VtIoMode::WIN_TELNET);

VERIFY_SUCCEEDED(VtIo::ParseIoMode(L"xterm-ascii", mode));
VERIFY_ARE_EQUAL(mode, VtIoMode::XTERM_ASCII);

Expand Down Expand Up @@ -145,13 +141,6 @@ void VtIoTests::DtorTestJustEngine()
Log::Comment(NoThrowString().Format(L"Made XtermEngine"));
delete pRenderEngineXtermAscii;
Log::Comment(NoThrowString().Format(L"Deleted."));

hOutputFile.reset(INVALID_HANDLE_VALUE);

auto pRenderEngineWinTelnet = new WinTelnetEngine(std::move(hOutputFile), p, SetUpViewport(), colorTable);
Log::Comment(NoThrowString().Format(L"Made WinTelnetEngine"));
delete pRenderEngineWinTelnet;
Log::Comment(NoThrowString().Format(L"Deleted."));
}
}

Expand Down Expand Up @@ -211,17 +200,6 @@ void VtIoTests::DtorTestDeleteVtio()
Log::Comment(NoThrowString().Format(L"Made XtermEngine"));
delete vtio;
Log::Comment(NoThrowString().Format(L"Deleted."));

hOutputFile = wil::unique_hfile(INVALID_HANDLE_VALUE);
vtio = new VtIo();
Log::Comment(NoThrowString().Format(L"Made VtIo"));
vtio->_pVtRenderEngine = std::make_unique<WinTelnetEngine>(std::move(hOutputFile),
p,
SetUpViewport(),
colorTable);
Log::Comment(NoThrowString().Format(L"Made WinTelnetEngine"));
delete vtio;
Log::Comment(NoThrowString().Format(L"Deleted."));
}
}

Expand Down Expand Up @@ -274,15 +252,6 @@ void VtIoTests::DtorTestStackAlloc()
colorTable,
true);
}

hOutputFile.reset(INVALID_HANDLE_VALUE);
{
VtIo vtio;
vtio._pVtRenderEngine = std::make_unique<WinTelnetEngine>(std::move(hOutputFile),
p,
SetUpViewport(),
colorTable);
}
}
}

Expand Down Expand Up @@ -329,13 +298,6 @@ void VtIoTests::DtorTestStackAllocMany()
SetUpViewport(),
colorTable,
true);

hOutputFile.reset(INVALID_HANDLE_VALUE);
VtIo vtio4;
vtio4._pVtRenderEngine = std::make_unique<WinTelnetEngine>(std::move(hOutputFile),
p,
SetUpViewport(),
colorTable);
}
}
}
Expand Down
Loading

0 comments on commit ffaba38

Please sign in to comment.