00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "config_interrogatedb.h"
00016 #include "interrogate_request.h"
00017 #include "configVariableBool.h"
00018 #include "configVariableSearchPath.h"
00019 #include "dconfig.h"
00020
00021 #if defined(WIN32_VC) && defined(_DEBUG)
00022
00023 #define USE_WIN32_DBGHEAP
00024 #include <crtdbg.h>
00025 #endif
00026
00027 Configure(config_interrogatedb);
00028 NotifyCategoryDef(interrogatedb, "");
00029
00030 ConfigureFn(config_interrogatedb) {
00031
00032
00033 #ifdef USE_WIN32_DBGHEAP
00034 ConfigVariableBool use_win32_dbgheap("use-win32-dbgheap", false);
00035 ConfigVariableBool win32_report_leaks("win32-report-leaks", false);
00036
00037 int dbg_flags = _CrtSetDbgFlag( _CRTDBG_REPORT_FLAG );
00038
00039 if (use_win32_dbgheap.get_string_value() == "full") {
00040
00041
00042 dbg_flags |= (_CRTDBG_ALLOC_MEM_DF | _CRTDBG_CHECK_ALWAYS_DF |
00043 _CRTDBG_CHECK_CRT_DF);
00044
00045 } else {
00046
00047
00048 if (!use_win32_dbgheap) {
00049
00050
00051
00052 dbg_flags = 0;
00053 }
00054 }
00055
00056 if (win32_report_leaks) {
00057
00058
00059
00060 dbg_flags |= _CRTDBG_LEAK_CHECK_DF;
00061 }
00062
00063 _CrtSetDbgFlag(dbg_flags);
00064 #endif
00065 }
00066
00067 ConfigVariableSearchPath interrogatedb_path
00068 ("interrogatedb-path", "The search path for interrogate's *.in files.");
00069