File: simdebug.cc

package info (click to toggle)
simutrans 102.2.2~ds1-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 11,540 kB
  • ctags: 10,505
  • sloc: cpp: 85,535; ansic: 3,224; makefile: 510; sh: 40
file content (41 lines) | stat: -rw-r--r-- 577 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
#ifndef _SIM_DEBUG
#define _SIM_DEBUG

#include <assert.h>
#include <stdlib.h>

#include "simdebug.h"
#include "utils/log.h"


/**
 * The log for all messages
 * @author Hj. Malthaner
 */
log_t *dbg = NULL;


/**
 * Inits logging facility.
 * @author Hj. Malthaner
 */
void init_logging(const char *logname, bool force_flush, bool log_debug)
{
	dbg = new log_t(logname, force_flush, log_debug);
}


#ifdef DEBUG

#ifdef _MSC_VER
int __cdecl _purecall()
#else
extern "C" void __cxa_pure_virtual()
#endif
{
	dbg->fatal("unknown", "pure virtual function call");
}

#endif

#endif