summaryrefslogtreecommitdiffstats
path: root/src/macro.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/macro.c')
-rw-r--r--src/macro.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/macro.c b/src/macro.c
new file mode 100644
index 0000000..93af6ee
--- /dev/null
+++ b/src/macro.c
@@ -0,0 +1,34 @@
+/***
+ This file is part of libcanberra.
+
+ Copyright 2008 Lennart Poettering
+
+ libcanberra is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation, either version 2.1 of the
+ License, or (at your option) any later version.
+
+ libcanberra is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with libcanberra. If not, If not, see
+ <http://www.gnu.org/licenses/>.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "macro.h"
+
+ca_bool_t ca_debug(void) {
+ const char *d;
+
+ if ((d = getenv("CANBERRA_DEBUG")))
+ return !!*d;
+
+ return FALSE;
+}