source: trunk/src/kernel32/dbglocal.cpp@ 2859

Last change on this file since 2859 was 2859, checked in by sandervl, 26 years ago

* empty log message *

File size: 2.4 KB
Line 
1/* $Id: dbglocal.cpp,v 1.2 2000-02-22 19:12:52 sandervl Exp $ */
2
3/*
4 * debug logging functions for OS/2
5 *
6 *
7 * Copyright 2000 Sander van Leeuwen
8 * Project Odin Software License can be found in LICENSE.TXT
9 */
10#include <os2wrap.h>
11#include <stdlib.h>
12#include <stdio.h>
13#include <string.h>
14#include "dbglocal.h"
15
16#ifdef DEBUG
17
18USHORT DbgEnabled[DBG_MAXFILES];
19char *DbgFileNames[DBG_MAXFILES] =
20{
21"kernel32",
22"kobjects",
23"console",
24"conin",
25"conbuffer",
26"conout",
27"unicode",
28"network",
29"hmdevio",
30"profile",
31"thread",
32"virtual",
33"thunk",
34"obsolete",
35"comm",
36"message",
37"resource",
38"exceptions",
39"heapshared",
40"cpuhlp",
41"heapcode",
42"lfile",
43"npipe",
44"oslibdos",
45"oslibmisc",
46"misc",
47"exceptutil",
48"lang",
49"iccio",
50"map",
51"win32util",
52"heap",
53"heapstring",
54"os2heap",
55"vmutex",
56"initterm",
57"handlemanager",
58"environ",
59"initsystem",
60"hmdevice",
61"hmopen32",
62"hmobjects",
63"hmevent",
64"hmmutex",
65"hmcomm",
66"semaphore",
67"wprocess",
68"conprop",
69"conprop2",
70"winimagelx",
71"winimagebase",
72"windllbase",
73"winexebase",
74"time",
75"mmap",
76"winimagepe2lx",
77"winimagepeldr",
78"windllpe2lx",
79"windlllx",
80"windllpeldr",
81"winexepe2lx",
82"winexelx",
83"winexepeldr",
84"winres",
85"critsection",
86"pefile",
87"winimgres",
88"wintls",
89"async",
90"fileio",
91"hmtoken",
92"kernelrsrc",
93"atom",
94"disk",
95"directory",
96"cvtbitmap",
97"hmmmap",
98"winfakepeldr",
99"cvtaccel",
100"cvticon",
101"cvticongrp",
102"oslibexcept",
103"cpu",
104"process",
105"cvtcursor",
106"cvtcursorgrp",
107"stubs",
108"interlock",
109"toolhelp",
110"codepage",
111"debug",
112"oslibdebug"
113};
114//******************************************************************************
115//******************************************************************************
116void ParseLogStatus()
117{
118 char *envvar = getenv(DBG_ENVNAME);
119 char *dbgvar;
120 int i;
121
122 for(i=0;i<DBG_MAXFILES;i++) {
123 DbgEnabled[i] = 1;
124 }
125
126 if(!envvar)
127 return;
128
129 dbgvar = strstr(envvar, "dll");
130 if(dbgvar) {
131 if(*(dbgvar-1) == '-') {
132 for(i=0;i<DBG_MAXFILES;i++) {
133 DbgEnabled[i] = 0;
134 }
135 }
136 }
137 for(i=0;i<DBG_MAXFILES;i++) {
138 dbgvar = strstr(envvar, DbgFileNames[i]);
139 if(dbgvar) {
140 if(*(dbgvar-1) == '-') {
141 DbgEnabled[i] = 0;
142 }
143 else
144 if(*(dbgvar-1) == '+') {
145 DbgEnabled[i] = 1;
146 }
147 }
148 }
149}
150//******************************************************************************
151//******************************************************************************
152
153#endif
Note: See TracBrowser for help on using the repository browser.