summaryrefslogtreecommitdiff
path: root/util/AnsiTerm.cpp
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-04-29 15:44:44 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-04-29 15:44:44 +0200
commitb18f5bf2db0fba2e7e539f68645836036d940d26 (patch)
tree23c4dd8f3d273f34ef9bbe1799d1958685559915 /util/AnsiTerm.cpp
parenta7f89980e5b3f4b9a74c70dbc5ffe8aabd28be28 (diff)
Imported Upstream version 2.9.6upstream/2.9.6
Diffstat (limited to 'util/AnsiTerm.cpp')
-rw-r--r--util/AnsiTerm.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/util/AnsiTerm.cpp b/util/AnsiTerm.cpp
index be94465..750fd52 100644
--- a/util/AnsiTerm.cpp
+++ b/util/AnsiTerm.cpp
@@ -22,6 +22,8 @@
* 10/17/09 Robert Nelson
* - Use GetProcAddress for (Get/Set)ConsoleScreenBufferInfoEx since they
* are only available on Vista and beyond.
+ * 01/27/2015 Andy Cress
+ * - handle ProcessRM asserts
*
* Todo:
* - Implement soft tabs
@@ -1089,6 +1091,7 @@ CAnsiTerm::OutputText(void)
if (WriteConsoleW(m_hConsole, &m_OutputBuffer[m_dwOutputCount - 1], 1, &dwWritten, NULL))
{
+ dbglog("OutputTest: WriteConsoleW error1\n");
assert(dwWritten == 1);
}
@@ -1102,6 +1105,7 @@ CAnsiTerm::OutputText(void)
if (WriteConsoleW(m_hConsole, pwszCurrent, dwPartialCount, &dwWritten, NULL))
{
+ dbglog("OutputTest: WriteConsoleW error2\n");
assert(dwWritten == dwPartialCount);
}
else
@@ -1530,6 +1534,8 @@ CAnsiTerm::ProcessRIS(void)
bool
CAnsiTerm::ProcessRM(void)
{
+ bool bret = true;
+
if (m_bPrivateParameters)
{
for (int index = 0; index < m_ParameterCount; index++)
@@ -1538,7 +1544,8 @@ CAnsiTerm::ProcessRM(void)
{
case 0:
default:
- assert(false);
+ dbglog("ProcessRM: illegal private param %d\n",m_Parameters[index]);
+ bret = false;
break;
case DECCKM:
m_bCursorKeyMode = false;
@@ -1584,11 +1591,13 @@ CAnsiTerm::ProcessRM(void)
switch (m_Parameters[index])
{
case 20: m_bLineFeedNewLineMode = false; break; // LNM
- default: assert(false); break;
+ default:
+ dbglog("ProcessRM: illegal public param %d\n",m_Parameters[index]);
+ bret = false; break;
}
}
}
- return true;
+ return bret;
}
bool