MHEG  17.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
glue_assert.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2009 Ocean Blue Software Ltd
4  *
5  * This file is part of a DTVKit Software Component
6  * You are permitted to copy, modify or distribute this file subject to the terms
7  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
8  *
9  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
10  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
11  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
12  *
13  * If you or your organisation is not a member of DTVKit then you have access
14  * to this source code outside of the terms of the licence agreement
15  * and you are expected to delete this and any associated files immediately.
16  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
17  *******************************************************************************/
25 #ifndef _GLUE_ASSERT_H
26 #define _GLUE_ASSERT_H
27 
28 #ifdef DEBUG_ASSERT
29 
30  #include "stb_debug.h"
31  #undef assert
32  #define assert(x) if (!(x)) STB_SPDebugAssertFail(__FILE__, __LINE__,#x);
33  #define ASSERT(x) assert(x);
34 
35 #elif defined(NDEBUG) || defined(__DIAB)
36 
37  #undef assert
38  #define assert(x)
39  #define ASSERT(x)
40 
41 #elif defined(_WIN32_WCE)
42 
43  #include <winbase.h>
44  #undef assert
45  #define assert(x)
46  #define ASSERT(x)
47 
48 #else
49  #include <assert.h>
50  #define ASSERT(x) assert(x);
51 
52 #endif
53 
54 #define ASSERTL1(x) ASSERT(x)
55 
56 #endif /*_GLUE_ASSERT_H*/
Debug functions required by MHEG5 engine in debug builds.