summaryrefslogtreecommitdiff
path: root/src/debug.h
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2010-07-17 17:05:21 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2010-07-17 17:05:21 +0200
commitae46674dd69cc4e65f595dc364a8c35c8d6aee30 (patch)
tree917210687fb1e6869ecc902bbb6cffa70ec1ef72 /src/debug.h
parentcb6b53e20ab7f7450d10a27a987a6ccbfeb4fe1e (diff)
--debug-level → --debug
Diffstat (limited to 'src/debug.h')
-rw-r--r--src/debug.h30
1 files changed, 14 insertions, 16 deletions
diff --git a/src/debug.h b/src/debug.h
index 156bf1c..93cb6bf 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -39,28 +39,26 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifdef DEBUG
#ifdef __GNUC__
-#define D(i, a) \
+#define D(a) \
{ \
- if(i <= opt.debug_level) \
- { \
- printf("%-12s +%-4u %-20s : ",__FILE__,__LINE__,__FUNCTION__); \
- printf a; \
- fflush(stdout); \
- } \
+ if (opt.debug) { \
+ printf("%-12s +%-4u %-20s : ",__FILE__,__LINE__,__FUNCTION__); \
+ printf a; \
+ fflush(stdout); \
+ } \
}
#else /* __GNUC__ */
-#define D(i, a) \
+#define D(a) \
{ \
- if(i <= opt.debug_level) \
- { \
- printf("%-12s +%-4u : ",__FILE__,__LINE__); \
- printf a; \
- } \
- fflush(stdout); \
- }
+ if (opt.debug) { \
+ printf("%-12s +%-4u : ",__FILE__,__LINE__); \
+ printf a; \
+ fflush(stdout); \
+ } \
+}
#endif /* __GNUC__ */
#else /* DEBUG */
-#define D(i,a)
+#define D(a)
#endif /* DEBUG */
#endif /* DEBUG_H */