From 5a8b59fd75c78f5abe8a11fdd55cd6154edc7163 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Tue, 28 Dec 2004 15:10:52 +0000 Subject: [PATCH] Slightly changed the debug display and exit routines to be more compatible with other terminals and languages Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2088 --- src/debug/debug.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/debug/debug.cpp b/src/debug/debug.cpp index 122ba85d..b5518cc3 100644 --- a/src/debug/debug.cpp +++ b/src/debug/debug.cpp @@ -16,10 +16,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: debug.cpp,v 1.60 2004-10-23 15:15:06 qbix79 Exp $ */ +/* $Id: debug.cpp,v 1.61 2004-12-28 15:10:52 qbix79 Exp $ */ #include #include +#include #include "dosbox.h" #if C_DEBUG @@ -610,8 +611,8 @@ static void DrawData(void) { ch = mem_readb(address); } else ch = 0; mvwprintw (dbg.win_data,1+y,11+3*x,"%02X",ch); - if (ch<32) ch='.'; - mvwprintw (dbg.win_data,1+y,60+x,"%c",ch); + if (ch<32 || !isprint(*reinterpret_cast(&ch))) ch='.'; + mvwprintw (dbg.win_data,1+y,60+x,"%c",ch); add++; }; } @@ -1758,7 +1759,8 @@ static void DEBUG_ShutDown(Section * sec) #ifndef WIN32 curs_set(old_cursor_state); tcsetattr(0, TCSANOW,&consolesettings); - printf("\e[0m\e[2J"); +// printf("\e[0m\e[2J"); //Seems to destroy scrolling + printf("\ec"); fflush(NULL); #endif };