Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
50b3d7b3
Commit
50b3d7b3
authored
May 02, 1999
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Misc fixes and improvements.
parent
0e7bd08c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
18 deletions
+21
-18
debugdefs.h
include/debugdefs.h
+1
-1
debugtools.h
include/debugtools.h
+16
-13
main.c
misc/main.c
+3
-3
make_debug
tools/make_debug
+1
-1
No files found.
include/debugdefs.h
View file @
50b3d7b3
...
...
@@ -167,7 +167,7 @@ int dbch_x11drv = 155;
#define DEBUG_CHANNEL_COUNT 156
char
debug_msg_enabled
[
DEBUG_CHANNEL_COUNT
][
DEBUG_CLASS_COUNT
]
=
{
char
__
debug_msg_enabled
[
DEBUG_CHANNEL_COUNT
][
DEBUG_CLASS_COUNT
]
=
{
{
1
,
1
,
0
,
0
},
{
1
,
1
,
0
,
0
},
{
1
,
1
,
0
,
0
},
...
...
include/debugtools.h
View file @
50b3d7b3
...
...
@@ -14,23 +14,24 @@
enum
__DEBUG_CLASS
{
__DBCL_FIXME
,
__DBCL_ERR
,
__DBCL_WARN
,
__DBCL_TRACE
,
__DBCL_COUNT
};
extern
char
debug_msg_enabled
[][
__DBCL_COUNT
];
extern
char
__
debug_msg_enabled
[][
__DBCL_COUNT
];
extern
const
char
*
const
debug_cl_name
[
__DBCL_COUNT
];
extern
const
char
*
const
debug_ch_name
[];
#define __DEBUGGING(dbcl,dbch) (debug_msg_enabled[(dbch)][(dbcl)])
#define __GET_DEBUGGING(dbcl,dbch) (__debug_msg_enabled[(dbch)][(dbcl)])
#define __SET_DEBUGGING(dbcl,dbch,on) (__debug_msg_enabled[(dbch)][(dbcl)] = (on))
#ifndef __GNUC__
#define __FUNCTION__ ""
#endif
#define __DPRINTF(dbcl,dbch) \
(!__DEBUGGING(dbcl,dbch) || \
(!__
GET_
DEBUGGING(dbcl,dbch) || \
(dbg_printf("%s:%s:%s ", debug_cl_name[(dbcl)], debug_ch_name[(dbch)], __FUNCTION__),0)) \
? 0 : dbg_printf
#define __DUMMY_DPRINTF
()
1 ? 0 : ((int (*)(char *, ...)) NULL)
#define __DUMMY_DPRINTF 1 ? 0 : ((int (*)(char *, ...)) NULL)
/* Exported definitions and macros */
...
...
@@ -51,21 +52,21 @@ extern const char * const debug_ch_name[];
/* use configure to allow user to compile out debugging messages */
#ifndef NO_TRACE_MSGS
#define TRACE __DPRINTF(__DBCL_TRACE,DBCH_DEFAULT)
#define TRACE __DPRINTF(__DBCL_TRACE,
*
DBCH_DEFAULT)
#define TRACE_(ch) __DPRINTF(__DBCL_TRACE,dbch_##ch)
#define TRACE_ON(ch) __DEBUGGING(__DBCL_TRACE,dbch_##ch)
#define TRACE_ON(ch) __
GET_
DEBUGGING(__DBCL_TRACE,dbch_##ch)
#else
#define TRACE_(ch) __DUMMY_DPRINTF
#define TRACE_ON(ch) 0
#endif
/* NO_TRACE_MSGS */
#ifndef NO_DEBUG_MSGS
#define WARN __DPRINTF(__DBCL_WARN,DBCH_DEFAULT)
#define WARN __DPRINTF(__DBCL_WARN,
*
DBCH_DEFAULT)
#define WARN_(ch) __DPRINTF(__DBCL_WARN,dbch_##ch)
#define WARN_ON(ch) __DEBUGGING(__DBCL_WARN,dbch_##ch)
#define FIXME __DPRINTF(__DBCL_FIXME,DBCH_DEFAULT)
#define WARN_ON(ch) __
GET_
DEBUGGING(__DBCL_WARN,dbch_##ch)
#define FIXME __DPRINTF(__DBCL_FIXME,
*
DBCH_DEFAULT)
#define FIXME_(ch) __DPRINTF(__DBCL_FIXME,dbch_##ch)
#define FIXME_ON(ch) __DEBUGGING(__DBCL_FIXME,dbch_##ch)
#define FIXME_ON(ch) __
GET_
DEBUGGING(__DBCL_FIXME,dbch_##ch)
#else
#define WARN __DUMMY_DPRINTF
#define WARN_(ch) __DUMMY_DPRINTF
...
...
@@ -78,15 +79,18 @@ extern const char * const debug_ch_name[];
/* define error macro regardless of what is configured */
/* Solaris got an 'ERR' define in <sys/reg.h> */
#undef ERR
#define ERR __DPRINTF(__DBCL_ERR,DBCH_DEFAULT)
#define ERR __DPRINTF(__DBCL_ERR,
*
DBCH_DEFAULT)
#define ERR_(ch) __DPRINTF(__DBCL_ERR,dbch_##ch)
#define ERR_ON(ch) __DEBUGGING(__DBCL_ERR,dbch_##ch)
#define ERR_ON(ch) __
GET_
DEBUGGING(__DBCL_ERR,dbch_##ch)
#define DECLARE_DEBUG_CHANNEL(ch) \
extern const int dbch_##ch;
#define DEFAULT_DEBUG_CHANNEL(ch) \
extern const int dbch_##ch; static const int *const DBCH_DEFAULT = &dbch_##ch;
#define DPRINTF dbg_printf
#define MESSAGE dbg_printf
#ifdef OLD_DEBUG_MACROS
/* transition macros */
#undef TRACE
...
...
@@ -98,7 +102,6 @@ extern const char * const debug_ch_name[];
#define FIXME(ch, fmt, args...) FIXME_(ch)(fmt, ## args)
#define ERR(ch, fmt, args...) ERR_(ch)(fmt, ## args)
#define MSG(format, args...) fprintf(stderr, format, ## args)
#define DPRINTF dbg_printf
#define DUMP dbg_printf
#endif
...
...
misc/main.c
View file @
50b3d7b3
...
...
@@ -220,7 +220,7 @@ BOOL MAIN_ParseDebugOptions(char *options)
for
(
i
=
0
;
i
<
DEBUG_CHANNEL_COUNT
;
i
++
)
for
(
j
=
0
;
j
<
DEBUG_CLASS_COUNT
;
j
++
)
if
(
cls
==
-
1
||
cls
==
j
)
debug_msg_enabled
[
i
][
j
]
=
(
*
options
==
'+'
);
__SET_DEBUGGING
(
i
,
j
,
(
*
options
==
'+'
)
);
}
else
if
(
!
lstrncmpiA
(
options
+
1
,
"relay="
,
6
)
||
!
lstrncmpiA
(
options
+
1
,
"snoop="
,
6
))
...
...
@@ -232,7 +232,7 @@ BOOL MAIN_ParseDebugOptions(char *options)
if
(
debug_ch_name
&&
(
!
lstrncmpiA
(
debug_ch_name
[
i
],
options
+
1
,
5
))){
for
(
j
=
0
;
j
<
DEBUG_CLASS_COUNT
;
j
++
)
if
(
cls
==
-
1
||
cls
==
j
)
debug_msg_enabled
[
i
][
j
]
=
TRUE
;
__SET_DEBUGGING
(
i
,
j
,
1
)
;
break
;
}
/* should never happen, maybe assert(i!=DEBUG_CHANNEL_COUNT)? */
...
...
@@ -272,7 +272,7 @@ BOOL MAIN_ParseDebugOptions(char *options)
if
(
debug_ch_name
&&
(
!
lstrncmpiA
(
options
+
1
,
debug_ch_name
[
i
],
l
-
1
))){
for
(
j
=
0
;
j
<
DEBUG_CLASS_COUNT
;
j
++
)
if
(
cls
==
-
1
||
cls
==
j
)
debug_msg_enabled
[
i
][
j
]
=
(
*
options
==
'+'
);
__SET_DEBUGGING
(
i
,
j
,
(
*
options
==
'+'
)
);
break
;
}
if
(
i
==
DEBUG_CHANNEL_COUNT
)
...
...
tools/make_debug
View file @
50b3d7b3
...
...
@@ -38,7 +38,7 @@ echo "#define DEBUG_CHANNEL_COUNT $chno"
count
=
1
echo
echo
'char debug_msg_enabled[DEBUG_CHANNEL_COUNT][DEBUG_CLASS_COUNT] = {'
echo
'char
__
debug_msg_enabled[DEBUG_CHANNEL_COUNT][DEBUG_CLASS_COUNT] = {'
for
ch
in
$DEBUG_CHANNELS
do
if
[
"
${
count
}
"
!=
"
${
chno
}
"
]
;
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment