HbbTv  17.9.0
Open source HBBTV engine
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
hz_debug.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2013 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 // pre-processor mechanism so multiple inclusions don't cause compilation error
26 #ifndef _HZ_DEBUG_H
27 #define _HZ_DEBUG_H
28 
29 
30 #ifdef DEBUG
31 #define PRINT(string, vars ...) printf(string "\n", ##vars)
32 #define DBG(string, vars ...) printf("[%s:%d] "string "\n", __FUNCTION__, __LINE__,##vars)
33 #define DBGCODE(x) x
34 #else
35 #define DBG(string, vars ...)
36 #define DBGCODE(x)
37 #endif
38 
39 #define DBGERR(string, vars ...) printf("ERROR [%s:%d] "string "\n", __FUNCTION__, __LINE__,##vars)
40 
41 #endif // _HZ_DEBUG_H