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

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

Added new logging feature

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