|
|
1.1 root 1: // This is a part of the Microsoft Foundation Classes C++ library.
2: // Copyright (C) 1992 Microsoft Corporation
3: // All rights reserved.
4: //
5: // This source code is only intended as a supplement to the
6: // Microsoft Foundation Classes Reference and Microsoft
7: // QuickHelp documentation provided with the library.
8: // See these sources for detailed information regarding the
9: // Microsoft Foundation Classes product.
10:
11: #ifdef _WINDOWS
12: #include "afxwin.h"
13: #else
14: #include "afx.h"
15: #endif
16: #pragma hdrstop
17:
18: #ifdef AFX_CORE_SEG
19: #pragma code_seg(AFX_CORE_SEG)
20: #endif
21:
22: #ifdef _DEBUG
23:
24: // If you want to route afxDump output to a different location than
25: // the default, just copy this file to your application build directory,
26: // modify the afxDumpFile and link the new object module into your program.
27:
28: // You must have AFX.INI (from \C700\MFC\SRC) in your Windows
29: // directory if you desire diagnostic output.
30:
31: // See TN007.TXT for a description of afxTraceFlags and afxTraceEnabled.
32:
33: #ifndef _WINDOWS
34: static CStdioFile _afxDumpFile(stderr);
35: CDumpContext NEAR _afxDump(&_afxDumpFile);
36: #else
37: CDumpContext NEAR _afxDump(NULL);
38: #endif //!_WINDOWS
39: CDumpContext& afxDump = _afxDump;
40:
41: static char BASED_CODE szIniFile[] = "AFX.INI";
42: static char BASED_CODE szDiagSection[] = "Diagnostics";
43:
44: extern "C" BOOL
45: AfxDiagnosticInit(void)
46: {
47: #ifdef _WINDOWS
48: afxTraceEnabled = ::GetPrivateProfileInt(szDiagSection, "TraceEnabled",
49: FALSE, szIniFile);
50: afxTraceFlags = ::GetPrivateProfileInt(szDiagSection, "TraceFlags",
51: 0, szIniFile);
52: #else
53: afxTraceEnabled = 1; // dump to stderr by default
54: #endif
55: return TRUE;
56: }
57:
58: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.