Add wpseditor, the Google Summer of Code 2008 project of Rostislav Chekan. Closes...
[kugel-rb.git] / utils / wpseditor / libwps / src / defs.h
blob810c8da238a58c37f78d8c685d8eaeda8c1e40d2
1 #ifndef DEFS_H_INCLUDED
2 #define DEFS_H_INCLUDED
4 typedef int (*pfdebugf)(const char* fmt,...);
5 extern pfdebugf dbgf;
7 #ifdef BUILD_DLL
8 # define EXPORT __declspec(dllexport)
9 #else
10 # define EXPORT
11 #endif
13 #ifndef MIN
14 # define MIN(a, b) (((a)<(b))?(a):(b))
15 #endif
17 #ifndef MAX
18 # define MAX(a, b) (((a)>(b))?(a):(b))
19 #endif
21 #define SWAP_16(x) ((typeof(x))(unsigned short)(((unsigned short)(x) >> 8) | \
22 ((unsigned short)(x) << 8)))
24 #define SWAP_32(x) ((typeof(x))(unsigned long)( ((unsigned long)(x) >> 24) | \
25 (((unsigned long)(x) & 0xff0000ul) >> 8) | \
26 (((unsigned long)(x) & 0xff00ul) << 8) | \
27 ((unsigned long)(x) << 24)))
29 #define PLAYMODES_NUM 5
30 enum api_playmode {
31 API_STATUS_PLAY,
32 API_STATUS_STOP,
33 API_STATUS_PAUSE,
34 API_STATUS_FASTFORWARD,
35 API_STATUS_FASTBACKWARD
38 extern enum api_playmode playmodes[PLAYMODES_NUM];
39 extern const char *playmodeNames[];
41 #endif // DEFS_H_INCLUDED