added logging.h
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@986
This commit is contained in:
parent
5bc559f1c4
commit
a336b5d7cc
4 changed files with 80 additions and 18 deletions
|
@ -13,6 +13,7 @@ hardware.h \
|
|||
inout.h \
|
||||
joystick.h \
|
||||
keyboard.h \
|
||||
logging.h \
|
||||
mem.h \
|
||||
mixer.h \
|
||||
modules.h \
|
||||
|
|
|
@ -63,25 +63,12 @@ class Config;
|
|||
extern Config * control;
|
||||
extern Bitu errorlevel;
|
||||
|
||||
|
||||
#ifndef __LOGGING_H_
|
||||
#include "logging.h"
|
||||
#endif // the logging system.
|
||||
|
||||
#define LOG_MSG S_Warn
|
||||
|
||||
enum LOG_TYPES {
|
||||
LOG_ALL,
|
||||
LOG_VGA, LOG_VGAGFX,LOG_VGAMISC,LOG_INT10,
|
||||
LOG_SB,LOG_DMA,
|
||||
LOG_FPU,LOG_CPU,
|
||||
LOG_FCB,LOG_FILES,LOG_IOCTL,LOG_EXEC,LOG_DOSMISC,
|
||||
LOG_PIT,LOG_KEYBOARD,LOG_PIC,
|
||||
LOG_MOUSE,LOG_BIOS,LOG_GUI,LOG_MISC,
|
||||
LOG_MAX,LOG_ERROR=0x80
|
||||
};
|
||||
|
||||
#if C_DEBUG
|
||||
extern void DEBUG_ShowMsg(Bit32u msgmask, char * msg,...);
|
||||
#define LOG DEBUG_ShowMsg
|
||||
#else
|
||||
#define LOG
|
||||
#endif /* C_DEBUG */
|
||||
|
||||
#endif /* __DOSBOX_H */
|
||||
|
||||
|
|
69
include/logging.h
Normal file
69
include/logging.h
Normal file
|
@ -0,0 +1,69 @@
|
|||
#ifndef __LOGGING_H_
|
||||
#define __LOGGING_H_
|
||||
enum LOG_TYPES {
|
||||
LOG_ALL,
|
||||
LOG_VGA, LOG_VGAGFX,LOG_VGAMISC,LOG_INT10,
|
||||
LOG_SB,LOG_DMA,
|
||||
LOG_FPU,LOG_CPU,
|
||||
LOG_FCB,LOG_FILES,LOG_IOCTL,LOG_EXEC,LOG_DOSMISC,
|
||||
LOG_PIT,LOG_KEYBOARD,LOG_PIC,
|
||||
LOG_MOUSE,LOG_BIOS,LOG_GUI,LOG_MISC,
|
||||
LOG_MAX
|
||||
};
|
||||
|
||||
enum LOG_SEVERITIES {
|
||||
LOG_NORMAL,
|
||||
LOG_WARN,
|
||||
LOG_ERROR
|
||||
};
|
||||
|
||||
#if C_DEBUG
|
||||
class LOG
|
||||
{
|
||||
LOG_TYPES d_type;
|
||||
LOG_SEVERITIES d_severity;
|
||||
public:
|
||||
|
||||
LOG (LOG_TYPES type , LOG_SEVERITIES severity):
|
||||
d_type(type),
|
||||
d_severity(severity)
|
||||
{}
|
||||
void operator() (char* buf, ...); //../src/debug/debug_gui.cpp
|
||||
|
||||
};
|
||||
|
||||
|
||||
#else //C_DEBUG
|
||||
|
||||
struct LOG
|
||||
{
|
||||
LOG(LOG_TYPES type, LOG_SEVERITIES severity) { return;}
|
||||
void operator()(char* buf) { return;}
|
||||
void operator()(char* buf, double f1) { return;}
|
||||
void operator()(char* buf, double f1, Bit32u u1) { return;}
|
||||
void operator()(char* buf, Bitu u1, double f1) { return;}
|
||||
|
||||
void operator()(char* buf, Bitu u1, Bitu u2) { return;}
|
||||
void operator()(char* buf, Bits u1, Bits u2) { return;}
|
||||
void operator()(char* buf, Bitu u1, Bits u2) { return;}
|
||||
void operator()(char* buf, Bits u1, Bitu u2) { return;}
|
||||
void operator()(char* buf, Bit32s u1) { return;}
|
||||
void operator()(char* buf, Bit32u u1) { return;}
|
||||
void operator()(char* buf, Bits s1) { return;}
|
||||
void operator()(char* buf, Bitu u1) { return;}
|
||||
|
||||
void operator()(char* buf, char* s1) { return;}
|
||||
void operator()(char* buf, char* s1, Bit32u u1) { return;}
|
||||
void operator()(char* buf, char* s1, Bit32u u1, Bit32u u2) { return;}
|
||||
void operator()(char* buf, Bit32u u1, char* s1) { return;}
|
||||
|
||||
|
||||
|
||||
}; //add missing operators to here
|
||||
//try to avoid anything smaller than bit32...
|
||||
|
||||
#endif //C_DEBUG
|
||||
|
||||
|
||||
#endif //__LOGGING_H_
|
||||
|
|
@ -20,6 +20,7 @@ CFG=dosbox - Win32 Debug
|
|||
!MESSAGE "dosbox - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "dosbox - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
|
@ -711,6 +712,10 @@ SOURCE=..\include\keyboard.h
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\include\logging.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\include\mem.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
|
Loading…
Add table
Reference in a new issue