/*****************************************************************************\ * Copyright (c) 2004 Mark Aylett * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * * "Software"), to deal in the Software without restriction, including * * without limitation the rights to use, copy, modify, merge, publish, * * distribute, sublicense, and/or sell copies of the Software, and to permit * * persons to whom the Software is furnished to do so, subject to the * * following conditions: * * * * The above copyright notice and this permission notice shall be included * * in all copies or substantial portions of the Software. * * * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE * * USE OR OTHER DEALINGS IN THE SOFTWARE. * \*****************************************************************************/ /** * \file mar_debug_c.h * \brief TODO */ #ifndef INCLUDED_MAR_DEBUG_C #define INCLUDED_MAR_DEBUG_C #ifndef INCLUDED_MAR_STORAGE_C #include "mar_storage_c.h" #endif /* INCLUDED_MAR_STORAGE_C */ #if defined(WIN32) && !defined(NDEBUG) #ifndef INCLUDED_MALLOC #define INCLUDED_MALLOC #include #endif /* INCLUDED_MALLOC */ #ifndef INCLUDED_STDLIB #define INCLUDED_STDLIB #include #endif /* INCLUDED_STDLIB */ #define _CRTDBG_MAP_ALLOC #ifndef INCLUDED_CRTDBG #define INCLUDED_CRTDBG #include #endif /* INCLUDED_CRTDBG */ #endif /* WIN32 && !NDEBUG */ #ifndef INCLUDED_STDIO #define INCLUDED_STDIO #include #endif /* INCLUDED_STDIO */ #if defined(NDEBUG) #define MAR_DEBUG_MSG 1 ? (void)0 : (void)printf #else /* !NDEBUG */ #define MAR_DEBUG_MSG printf #endif /* !NDEBUG */ #if !defined(WIN32) || defined(NDEBUG) #define MAR_INITLEAKDUMP() (void)0 #define MAR_DUMPLEAKS() (void)0 #else /* WIN32 && !NDEBUG */ MAR_EXTERN void mar_initleakdump_(void); MAR_EXTERN void mar_dumpleaks_(void); #define MAR_INITLEAKDUMP() mar_initleakdump_() #define MAR_DUMPLEAKS() mar_dumpleaks_() #endif /* WIN32 && !NDEBUG */ #endif /* INCLUDED_MAR_DEBUG_C */