jengelh-datetimespielwiese
Last change
on this file since f71453 was
021751,
checked in by Niels Ranosch <ranosch@…>, 11 years ago
|
FIX: empty debug function-macros should better be: ((void) 0/1)
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | /* emacs edit mode for this file is -*- C++ -*- */ |
---|
2 | /* $Id$ */ |
---|
3 | |
---|
4 | /* It should be possible to include this file multiple times for different */ |
---|
5 | /* settings of DEBUGOUTPUT */ |
---|
6 | |
---|
7 | #undef DEBINCLEVEL |
---|
8 | #undef DEBDECLEVEL |
---|
9 | #undef DEBOUTSL |
---|
10 | #undef DEBOUT |
---|
11 | #undef DEBOUTENDL |
---|
12 | #undef DEBOUTLN |
---|
13 | |
---|
14 | #ifdef DEBUGOUTPUT |
---|
15 | #ifdef HAVE_IOSTREAM |
---|
16 | #include <iostream> |
---|
17 | #elif defined(HAVE_IOSTREAM_H) |
---|
18 | #include <iostream.h> |
---|
19 | #endif |
---|
20 | void deb_inc_level(); |
---|
21 | void deb_dec_level(); |
---|
22 | extern char * deb_level_msg; |
---|
23 | #define DEBINCLEVEL(stream, msg) \ |
---|
24 | (stream << deb_level_msg << "entering << " << msg << " >>" << endl, deb_inc_level()) |
---|
25 | #define DEBDECLEVEL(stream, msg) \ |
---|
26 | (deb_dec_level(), stream << deb_level_msg << "leaving << " << msg << " >>" << endl) |
---|
27 | #define DEBOUTSL(stream) \ |
---|
28 | (stream << deb_level_msg, stream.flush()) |
---|
29 | #define DEBOUT(stream, objects) \ |
---|
30 | (stream << objects, stream.flush()) |
---|
31 | #define DEBOUTENDL(stream) \ |
---|
32 | (stream << endl) |
---|
33 | #define DEBOUTLN(stream, objects) \ |
---|
34 | (stream << deb_level_msg << objects << endl) |
---|
35 | #else /* DEBUGOUTPUT */ |
---|
36 | #define DEBINCLEVEL(stream, msg) ((void) 0) |
---|
37 | #define DEBDECLEVEL(stream, msg) ((void) 0) |
---|
38 | #define DEBOUTSL(stream) ((void) 0) |
---|
39 | #define DEBOUT(stream, objects) ((void) 0) |
---|
40 | #define DEBOUTENDL(stream) ((void) 0) |
---|
41 | #define DEBOUTLN(stream, objects) ((void) 0) |
---|
42 | #endif /* DEBUGOUTPUT */ |
---|
Note: See
TracBrowser
for help on using the repository browser.