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

Last change on this file since 3206 was 3206, checked in by sandervl, 25 years ago

mutex fixes + added vsemaphore class

File size: 2.5 KB
Line 
1/* $Id: dbglocal.cpp,v 1.5 2000-03-23 19:23:44 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"registry",
114"queue",
115"hmthread",
116"hmprocess",
117"vsemaphore"
118};
119//******************************************************************************
120//******************************************************************************
121void ParseLogStatus()
122{
123 char *envvar = getenv(DBG_ENVNAME);
124 char *dbgvar;
125 int i;
126
127 for(i=0;i<DBG_MAXFILES;i++) {
128 DbgEnabled[i] = 1;
129 }
130
131 if(!envvar)
132 return;
133
134 dbgvar = strstr(envvar, "dll");
135 if(dbgvar) {
136 if(*(dbgvar-1) == '-') {
137 for(i=0;i<DBG_MAXFILES;i++) {
138 DbgEnabled[i] = 0;
139 }
140 }
141 }
142 for(i=0;i<DBG_MAXFILES;i++) {
143 dbgvar = strstr(envvar, DbgFileNames[i]);
144 if(dbgvar) {
145 if(*(dbgvar-1) == '-') {
146 DbgEnabled[i] = 0;
147 }
148 else
149 if(*(dbgvar-1) == '+') {
150 DbgEnabled[i] = 1;
151 }
152 }
153 }
154}
155//******************************************************************************
156//******************************************************************************
157
158#endif
Note: See TracBrowser for help on using the repository browser.