1
0
Fork 0

new logging system

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@987
This commit is contained in:
Peter Veenstra 2003-05-04 19:12:09 +00:00
parent a336b5d7cc
commit c9b747adc4
15 changed files with 45 additions and 33 deletions

View file

@ -53,6 +53,8 @@ char* AnalyzeInstruction(char* inst, bool saveSelector);
void SaveMemory(Bit16u seg, Bit16u ofs1, Bit32s num);
class DEBUG;
extern void DEBUG_ShowMsg(Bit32u entry, char* format, ...);
DEBUG* pDebugcom = 0;
bool exitLoop = false;
bool logHeavy = false;

View file

@ -44,6 +44,9 @@ namespace {
};
extern int old_cursor_state;
void DEBUG_ShowMsg(Bit32u entry, char * format,...) {
if (!(entry & LOG_ERROR) && entry && !loggrp[entry].enabled) return;
@ -58,7 +61,14 @@ void DEBUG_ShowMsg(Bit32u entry, char * format,...) {
wrefresh(dbg.win_out);
if(debuglog) fprintf(debuglog,"%10d: %s\n",cycle_count,buf);
}
void LOG::operator() (char* format, ...){
char buf[1024];
va_list msg;
va_start(msg,format);
vsprintf(buf,format,msg);
va_end(msg);
DEBUG_ShowMsg(this->d_type|this->d_severity,buf);
}
static void Draw_RegisterLayout(void) {