-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmylog.h
51 lines (42 loc) · 982 Bytes
/
mylog.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* File: mylog.h
*
* Description: See "mylog.c"
*
* Comments: See "notice.txt" for copyright and license information.
*
*/
#ifndef __MYLOG_H__
#define __MYLOG_H__
#undef DLL_DECLARE
#ifdef WIN32
#ifdef _MYLOG_FUNCS_IMPLEMENT_
#define DLL_DECLARE _declspec(dllexport)
#else
#ifdef _MYLOG_FUNCS_IMPORT_
#define DLL_DECLARE _declspec(dllimport)
#else
#define DLL_DECLARE
#endif /* _MYLOG_FUNCS_IMPORT_ */
#endif /* _MYLOG_FUNCS_IMPLEMENT_ */
#else
#define DLL_DECLARE
#endif /* WIN32 */
#include <stdio.h>
#ifndef WIN32
#include <unistd.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
DLL_DECLARE void mylog(const char *fmt,...);
#define inolog if (get_mylog() > 1) mylog /* for really temporary debug */
extern void qlog(char *fmt,...);
#define inoqlog if (get_qlog() > 1) qlog /* for really temporary debug */
int get_qlog(void);
int get_mylog(void);
void InitializeLogging(void);
void FinalizeLogging(void);
#ifdef __cplusplus
}
#endif
#endif /* __MYLOG_H__ */