summaryrefslogtreecommitdiff
path: root/utils.h
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-12-11 10:02:13 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2023-01-03 11:02:11 -0800
commit3e486c4578f3f6a81fc0f9afba6551dfa8c7b63b (patch)
tree9530291dc25bd3f137778129297a32e76ceb8bb8 /utils.h
parenta3bbf780252e55bb1dcab717289ef09e00d11223 (diff)
downloadxorg-app-xkbcomp-3e486c4578f3f6a81fc0f9afba6551dfa8c7b63b.tar.gz
Only build debug infrastructure if DEBUG is defined
It's only used when DEBUG is defined, so don't build it when we're not using it. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/utils.h b/utils.h
index 7a4d641..2ccff4f 100644
--- a/utils.h
+++ b/utils.h
@@ -164,23 +164,22 @@ uInformation(const char * /* s */ , ...
/***====================================================================***/
+#ifdef DEBUG
#ifndef DEBUG_VAR
#define DEBUG_VAR debugFlags
#endif
-extern
- unsigned int DEBUG_VAR;
+extern unsigned int DEBUG_VAR;
- extern void uDebug(char * /* s */ , ...
- ) _X_ATTRIBUTE_PRINTF(1, 2);
+extern void uDebug(char *, ...) _X_ATTRIBUTE_PRINTF(1, 2);
- extern Boolean uSetDebugFile(char *name);
+extern Boolean uSetDebugFile(char *name);
- extern int uDebugIndentLevel;
+extern int uDebugIndentLevel;
#define uDebugIndent(l) (uDebugIndentLevel+=(l))
#define uDebugOutdent(l) (uDebugIndentLevel-=(l))
-#ifdef DEBUG
+
#define uDEBUG(f,s) { if (DEBUG_VAR&(f)) uDebug(s);}
#define uDEBUG1(f,s,a) { if (DEBUG_VAR&(f)) uDebug(s,a);}
#define uDEBUG2(f,s,a,b) { if (DEBUG_VAR&(f)) uDebug(s,a,b);}