libt3window
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules
log.h
1 /* Copyright (C) 2012 G.P. Halkes
2  This program is free software: you can redistribute it and/or modify
3  it under the terms of the GNU General Public License version 3, as
4  published by the Free Software Foundation.
5 
6  This program is distributed in the hope that it will be useful,
7  but WITHOUT ANY WARRANTY; without even the implied warranty of
8  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9  GNU General Public License for more details.
10 
11  You should have received a copy of the GNU General Public License
12  along with this program. If not, see <http://www.gnu.org/licenses/>.
13 */
14 #ifndef T3_WINDOW_LOG_H
15 #define T3_WINDOW_LOG_H
16 
17 #ifndef _T3_WINDOW_INTERNAL
18 #error This header file is for internal use _only_!!
19 #endif
20 
21 #include <stdio.h>
22 
23 #include "window_api.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 #ifdef _T3_WINDOW_DEBUG
30 
31 T3_WINDOW_LOCAL void init_log(void);
32 /* Note: these must be declared with T3_WINDOW_API such that they can be accessed
33  from the clipboard modules. */
34 T3_WINDOW_API void lprintf(const char *fmt, ...)
35  #ifdef __GNUC__
36  __attribute__((format(printf, 1, 2)))
37  #endif
38  ;
39 #else
40 #define init_log()
41 #define lprintf(fmt, ...)
42 #endif
43 
44 #ifdef __cplusplus
45 } /* extern "C" */
46 #endif
47 
48 #endif