From 97a0556585171cb1bbf91a7d1aec1e937414eb2e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 25 Jul 2008 17:20:40 +0200 Subject: move ca_debug to a proper source files --- src/Makefile.am | 2 +- src/macro.c | 34 ++++++++++++++++++++++++++++++++++ src/macro.h | 9 +-------- 3 files changed, 36 insertions(+), 9 deletions(-) create mode 100644 src/macro.c diff --git a/src/Makefile.am b/src/Makefile.am index 5bea6d5..b3acc3c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -47,7 +47,7 @@ libcanberra_la_SOURCES = \ read-wav.c read-wav.h \ sound-theme-spec.c sound-theme-spec.h \ llist.h \ - macro.h \ + macro.h macro.c \ malloc.c malloc.h libcanberra_la_CFLAGS = \ $(AM_CFLAGS) \ 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 + . +***/ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include "macro.h" + +ca_bool_t ca_debug(void) { + const char *d; + + if ((d = getenv("CANBERRA_DEBUG"))) + return !!*d; + + return FALSE; +} diff --git a/src/macro.h b/src/macro.h index db8affe..efc57dc 100644 --- a/src/macro.h +++ b/src/macro.h @@ -162,14 +162,7 @@ typedef int ca_bool_t; -static inline ca_bool_t ca_debug(void) { - const char *d; - - if ((d = getenv("CANBERRA_DEBUG"))) - return !!*d; - - return FALSE; -} +ca_bool_t ca_debug(void); static inline size_t ca_align(size_t l) { return (((l + sizeof(void*) - 1) / sizeof(void*)) * sizeof(void*)); -- cgit