source: trunk/src/user32/dbglocal.cpp@ 2860

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

window class ctor bugfix

File size: 2.2 KB
Line 
1/* $Id: dbglocal.cpp,v 1.2 2000-02-22 19:15:20 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"user32",
22"loadres",
23"dde",
24"win32wndhandle",
25"wsprintf",
26"winmouse",
27"icon",
28"hook",
29"winkeyboard",
30"defwndproc",
31"syscolor",
32"char",
33"initterm",
34"uitools",
35"unknown",
36"spy",
37"wndmsg",
38"display",
39"pmwindow",
40"pmframe",
41"win32class",
42"win32wnd",
43"win32dlg",
44"msgbox",
45"window",
46"windowmsg",
47"windowclass",
48"win32wbase",
49"windowword",
50"gen_object",
51"oslibwin",
52"win32wndchild",
53"controls",
54"button",
55"static",
56"scroll",
57"listbox",
58"menu",
59"combo",
60"edit",
61"winswitch",
62"icontitle",
63"clipboard",
64"winicon",
65"win32wmdiclient",
66"oslibutil",
67"oslibmsg",
68"dib",
69"oslibdos",
70"win32wmdichild",
71"winprop",
72"wingdi",
73"oslibgdi",
74"winaccel",
75"win32wbasepos",
76"oslibres",
77"dc",
78"timer",
79"caret",
80"resource",
81"winproc",
82"text",
83"oslibmsgtranslate",
84"windlgmsg",
85"windlg",
86"win32wdesktop",
87"win32wbasenonclient"
88};
89//******************************************************************************
90//******************************************************************************
91void ParseLogStatus()
92{
93 char *envvar = getenv(DBG_ENVNAME);
94 char *dbgvar;
95 int i;
96
97 for(i=0;i<DBG_MAXFILES;i++) {
98 DbgEnabled[i] = 1;
99 }
100
101 if(!envvar)
102 return;
103
104 dbgvar = strstr(envvar, "dll");
105 if(dbgvar) {
106 if(*(dbgvar-1) == '-') {
107 for(i=0;i<DBG_MAXFILES;i++) {
108 DbgEnabled[i] = 0;
109 }
110 }
111 }
112 for(i=0;i<DBG_MAXFILES;i++) {
113 dbgvar = strstr(envvar, DbgFileNames[i]);
114 if(dbgvar) {
115 if(*(dbgvar-1) == '-') {
116 DbgEnabled[i] = 0;
117 }
118 else
119 if(*(dbgvar-1) == '+') {
120 DbgEnabled[i] = 1;
121 }
122 }
123 }
124}
125//******************************************************************************
126//******************************************************************************
127
128#endif
Note: See TracBrowser for help on using the repository browser.