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

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

Added new logging feature

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