00001 /***************************************************************** 00002 | 00003 | Melo - Debug Support 00004 | 00005 | Copyright 2004-2006 Axiomatic Systems LLC 00006 | 00007 | This file is part of Melo (Melo AAC Decoder). 00008 | 00009 | Unless you have obtained Melo under a difference license, 00010 | this version of Melo is Melo|GPL. 00011 | Melo|GPL is free software; you can redistribute it and/or modify 00012 | it under the terms of the GNU General Public License as published by 00013 | the Free Software Foundation; either version 2, or (at your option) 00014 | any later version. 00015 | 00016 | Melo|GPL is distributed in the hope that it will be useful, 00017 | but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 | GNU General Public License for more details. 00020 | 00021 | You should have received a copy of the GNU General Public License 00022 | along with Melo|GPL; see the file COPYING. If not, write to the 00023 | Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 00024 | 02111-1307, USA. 00025 | 00026 ****************************************************************/ 00031 #ifndef _MLO_DEBUG_H_ 00032 #define _MLO_DEBUG_H_ 00033 00034 /*---------------------------------------------------------------------- 00035 | includes 00036 +---------------------------------------------------------------------*/ 00037 00038 #include "MloConfig.h" 00039 00040 #if defined(MLO_CONFIG_HAVE_ASSERT_H) 00041 #include <assert.h> 00042 #endif 00043 00044 /*---------------------------------------------------------------------- 00045 | Macros 00046 +---------------------------------------------------------------------*/ 00047 00048 /* Check a constant expression to make the compiler fail if false. 00049 Requires a ";" at the end */ 00050 #define MLO_CHECK_CST(name, cond) typedef int MLO_CheckCst_##name [(cond) ? 1 : -1] 00051 00052 /*---------------------------------------------------------------------- 00053 | prototypes 00054 +---------------------------------------------------------------------*/ 00055 #ifdef __cplusplus 00056 extern "C" { 00057 #endif /* __cplusplus */ 00058 00059 extern void MLO_Debug(const char* format, ...); 00060 #define MLO_ASSERT(_x) assert(_x) 00061 00062 #ifdef __cplusplus 00063 } 00064 #endif /* __cplusplus */ 00065 00066 #endif /* _MLO_DEBUG_H_ */