source: trunk/src/winmm/dbglocal.cpp@ 5087

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

* empty log message *

File size: 1.6 KB
Line 
1/* $Id: dbglocal.cpp,v 1.2 2000-02-22 19:12:16 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#ifdef DEBUG
11
12#include <os2wrap.h>
13#include <stdlib.h>
14#include <stdio.h>
15#include <string.h>
16#include "dbglocal.h"
17
18USHORT DbgEnabled[DBG_MAXFILES];
19char *DbgFileNames[DBG_MAXFILES] =
20{
21"os2timer",
22"waveout",
23"dwaveout",
24"time",
25"wavein",
26"auxiliary",
27"auxos2",
28"mixer",
29"midi",
30"irtmidi",
31"midistrm",
32"initterm",
33"mci",
34"joy",
35"mmio",
36"driver",
37"playsound",
38"joyos2",
39"resource"
40};
41//******************************************************************************
42//******************************************************************************
43void ParseLogStatus()
44{
45 char *envvar = getenv(DBG_ENVNAME);
46 char *dbgvar;
47 int i;
48
49 for(i=0;i<DBG_MAXFILES;i++) {
50 DbgEnabled[i] = 1;
51 }
52
53 if(!envvar)
54 return;
55
56 dbgvar = strstr(envvar, "dll");
57 if(dbgvar) {
58 if(*(dbgvar-1) == '-') {
59 for(i=0;i<DBG_MAXFILES;i++) {
60 DbgEnabled[i] = 0;
61 }
62 }
63 }
64 for(i=0;i<DBG_MAXFILES;i++) {
65 dbgvar = strstr(envvar, DbgFileNames[i]);
66 if(dbgvar) {
67 if(*(dbgvar-1) == '-') {
68 DbgEnabled[i] = 0;
69 }
70 else
71 if(*(dbgvar-1) == '+') {
72 DbgEnabled[i] = 1;
73 }
74 }
75 }
76}
77//******************************************************************************
78//******************************************************************************
79
80#endif
Note: See TracBrowser for help on using the repository browser.