File: logging.h

package info (click to toggle)
dosbox 0.63-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,488 kB
  • ctags: 8,517
  • sloc: cpp: 50,650; ansic: 5,113; sh: 3,338; makefile: 161
file content (65 lines) | stat: -rw-r--r-- 1,563 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#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_PAGING,
	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_IO,
	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

};

void DEBUG_ShowMsg(char * format,...);
#define LOG_MSG DEBUG_ShowMsg

#else  //C_DEBUG

struct LOG
{
	LOG(LOG_TYPES type, LOG_SEVERITIES severity)										{ return;}
	void operator()(char const* buf)													{ return;}
	void operator()(char const* buf, double f1)											{ return;}
	void operator()(char const* buf, double f1, double f2)								{ return;}
	void operator()(char const* buf, double f1, double f2, double f3)					{ return;}

	void operator()(char const* buf, char const* s1)									{ return;}
	void operator()(char const* buf, char const* s1, double f1)							{ return;}
	void operator()(char const* buf, char const* s1, double f1,double f2)				{ return;}
	void operator()(char const* buf, double  f1, char const* s1)						{ return;}



}; //add missing operators to here
	//try to avoid anything smaller than bit32...
void GFX_ShowMsg(char * format,...);
#define LOG_MSG GFX_ShowMsg

#endif //C_DEBUG


#endif //__LOGGING_H_