source: branches/swt/src/gdiplus/dbglocal.cpp

Last change on this file was 22120, checked in by rousseau, 10 years ago

Integrating from Wine Sources [gdiplus]

We will start with 'gdiplus.cpp' and build a minimal 'gdiplus.dll'.
While climbing up the wine-repo, more info will be obtained about the
integration process. This info is collected at the developer-site with
the goal of auto-integration in the future.

Commit: a781bbf096d9a3264fe52fa90891b5a19fca9e4d
Wine git-repo: git://source.winehq.org/git/wine.git

File size: 2.2 KB
Line 
1/* $Id: dbglocal.cpp,v 1.10 2004-01-11 11:42:08 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 DbgEnabledGDIPLUS[DBG_MAXFILES] = {0};
20USHORT DbgEnabledLvl2GDIPLUS[DBG_MAXFILES] = {0};
21
22static const char *DbgFileNames[DBG_MAXFILES] =
23{
24"gdiplus",
25"initterm"
26///...
27};
28//******************************************************************************
29//******************************************************************************
30void ParseLogStatusGDIPLUS()
31{
32 char *envvar = getenv(DBG_ENVNAME);
33 char *envvar2= getenv(DBG_ENVNAME_LVL2);
34 char *dbgvar;
35 int i;
36
37 for(i=0;i<DBG_MAXFILES;i++) {
38 DbgEnabledGDIPLUS[i] = 1;
39 }
40
41 if(!envvar)
42 return;
43
44 dbgvar = strstr(envvar, "dll");
45 if(dbgvar) {
46 if(*(dbgvar-1) == '-') {
47 for(i=0;i<DBG_MAXFILES;i++) {
48 DbgEnabledGDIPLUS[i] = 0;
49 }
50 }
51 }
52 for(i=0;i<DBG_MAXFILES;i++) {
53 int len = strlen(DbgFileNames[i]);
54 dbgvar = strstr(envvar, DbgFileNames[i]);
55 if(dbgvar && !islower(dbgvar[len])) {
56 if(*(dbgvar-1) == '-') {
57 DbgEnabledGDIPLUS[i] = 0;
58 }
59 else
60 if(*(dbgvar-1) == '+') {
61 DbgEnabledGDIPLUS[i] = 1;
62 }
63 }
64 }
65 if(envvar2) {
66 dbgvar = strstr(envvar2, "dll");
67 if(dbgvar) {
68 if(*(dbgvar-1) == '+') {
69 for(i=0;i<DBG_MAXFILES;i++) {
70 DbgEnabledLvl2GDIPLUS[i] = 1;
71 }
72 }
73 }
74 for(i=0;i<DBG_MAXFILES;i++) {
75 int len = strlen(DbgFileNames[i]);
76 dbgvar = strstr(envvar2, DbgFileNames[i]);
77 if(dbgvar && !islower(dbgvar[len])) {
78 if(*(dbgvar-1) == '-') {
79 DbgEnabledLvl2GDIPLUS[i] = 0;
80 }
81 else
82 if(*(dbgvar-1) == '+') {
83 DbgEnabledLvl2GDIPLUS[i] = 1;
84 }
85 }
86 }
87 }
88}
89//******************************************************************************
90//******************************************************************************
91
92#endif
Note: See TracBrowser for help on using the repository browser.