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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
////////////////////////////////////////////////////////////////////////////
//
// API DEFINITION FILE
//
// Here the behaviour of the exported API is specified.
//
//
////////////////////////////////////////////////////////////////////////////
#ifndef API_H_INCLUDED
#define API_H_INCLUDED
#include "platform.h"
// DEBUGGING
#ifdef SM2_DSP
#ifdef DEBUG2
#include <stdio.h>
#define DEB(x) x
#else
#define DEB(x)
#endif
#else
#ifdef DEBUG
#include <stdio.h>
#define DEB(x) x
#else
#define DEB(x)
#endif
#endif
// Some people might want to use the __stdcall calling convention.
// They will have to define USE_STDCALL.
#if defined(__linux__ ) || !defined(USE_STDCALL)
#define APIDECL
#else
#define APIDECL WINAPI
#endif
#ifndef EXTERN_C
#ifdef __cplusplus
#define EXTERN_C extern "C"
#else
#define EXTERN_C
#endif
#endif
#ifdef __cplusplus
#define PF_INLINE inline
#else
#ifdef __GNUC__
#define PF_INLINE static __inline__
#else
#define PF_INLINE
#endif
#endif
#ifndef SM2_DSP
#if defined (WIN32)
#if defined (CAMDLL_EXPORTS) || defined (CAMWRAPPER_EXPORTS)
#define CAMDLL_API EXTERN_C __declspec(dllexport)
#else
#define CAMDLL_API EXTERN_C __declspec(dllimport)
#endif
#ifdef COMDLL_EXPORTS
#define COMDLL_API EXTERN_C __declspec(dllexport)
#else
#define COMDLL_API EXTERN_C __declspec(dllimport)
#endif
#else
#define CAMDLL_API
#define COMDLL_API
#endif
#else
#define CAMDLL_API
#define COMDLL_API EXTERN_C
#endif
#endif // API_H_INCLUDED
|