source: trunk/src/gdi32/dbglocal.cpp@ 10367

Last change on this file since 10367 was 9429, checked in by sandervl, 23 years ago

Added debug wrappers for all exports

File size: 2.4 KB
Line 
1/* $Id: dbglocal.cpp,v 1.9 2002-11-26 10:53:07 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 <ctype.h>
15#include "dbglocal.h"
16
17#ifdef DEBUG
18
19USHORT DbgEnabledGDI32[DBG_MAXFILES] = {0};
20USHORT DbgEnabledLvl2GDI32[DBG_MAXFILES] = {0};
21
22static char *DbgFileNames[DBG_MAXFILES] =
23{
24"gdi32",
25"opengl",
26"callback",
27"dibsect",
28"initterm",
29"resource",
30"oslibgdi",
31"font",
32"text",
33"palette",
34"line",
35"oslibgpi",
36"region",
37"metafile",
38"dibitmap",
39"blit",
40"rgbcvt",
41"objhandle",
42"transform",
43"printer",
44"icm",
45"trace"
46};
47//******************************************************************************
48//******************************************************************************
49void ParseLogStatusGDI32()
50{
51 char *envvar = getenv(DBG_ENVNAME);
52 char *envvar2= getenv(DBG_ENVNAME_LVL2);
53 char *dbgvar;
54 int i;
55
56 for(i=0;i<DBG_MAXFILES;i++) {
57 DbgEnabledGDI32[i] = 1;
58 }
59
60 if(!envvar)
61 return;
62
63 dbgvar = strstr(envvar, "dll");
64 if(dbgvar) {
65 if(*(dbgvar-1) == '-') {
66 for(i=0;i<DBG_MAXFILES;i++) {
67 DbgEnabledGDI32[i] = 0;
68 }
69 }
70 }
71 for(i=0;i<DBG_MAXFILES;i++) {
72 int len = strlen(DbgFileNames[i]);
73 dbgvar = strstr(envvar, DbgFileNames[i]);
74 if(dbgvar && !islower(dbgvar[len])) {
75 if(*(dbgvar-1) == '-') {
76 DbgEnabledGDI32[i] = 0;
77 }
78 else
79 if(*(dbgvar-1) == '+') {
80 DbgEnabledGDI32[i] = 1;
81 }
82 }
83 }
84 if(envvar2) {
85 dbgvar = strstr(envvar2, "dll");
86 if(dbgvar) {
87 if(*(dbgvar-1) == '+') {
88 for(i=0;i<DBG_MAXFILES;i++) {
89 DbgEnabledLvl2GDI32[i] = 1;
90 }
91 }
92 }
93 for(i=0;i<DBG_MAXFILES;i++) {
94 int len = strlen(DbgFileNames[i]);
95 dbgvar = strstr(envvar2, DbgFileNames[i]);
96 if(dbgvar && !islower(dbgvar[len])) {
97 if(*(dbgvar-1) == '-') {
98 DbgEnabledLvl2GDI32[i] = 0;
99 }
100 else
101 if(*(dbgvar-1) == '+') {
102 DbgEnabledLvl2GDI32[i] = 1;
103 }
104 }
105 }
106 }
107}
108//******************************************************************************
109//******************************************************************************
110
111#endif
Note: See TracBrowser for help on using the repository browser.