summaryrefslogtreecommitdiff
path: root/include/disfluid.h
blob: 91a284d12df3a9b31400f4b49a464599d2b0cf9b (plain)
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
#ifndef H_DISFLUID_INCLUDED
# define H_DISFLUID_INCLUDED

# include <stdlib.h>

# if defined _WIN32 && !defined __CYGWIN__
#  define LIBDISFLUID_DLL_MADNESS 1
# else
#  define LIBDISFLUID_DLL_MADNESS 0
# endif

# if BUILDING_LIBDISFLUID && HAVE_VISIBILITY
#  define LIBDISFLUID_DLL_EXPORTED __attribute__((__visibility__("default")))
# elif BUILDING_LIBDISFLUID && LIBDISFLUID_DLL_MADNESS
#  define LIBDISFLUID_DLL_EXPORTED __declspec(dllexport)
# elif LIBDISFLUID_DLL_MADNESS
#  define LIBDISFLUID_DLL_EXPORTED __declspec(dllimport)
# else
#  define LIBDISFLUID_DLL_EXPORTED
# endif

# define LIBDISFLUID_API \
  LIBDISFLUID_DLL_EXPORTED

# ifdef ATTRIBUTE_DEALLOC
#  define LIBDISFLUID_DEALLOC_WITH ATTRIBUTE_DEALLOC
# else
#  define LIBDISFLUID_DEALLOC_WITH(f, i)
# endif

# ifdef ATTRIBUTE_DEALLOC_FREE
#  define LIBDISFLUID_DEALLOC_WITH_FREE ATTRIBUTE_DEALLOC_FREE
# else
#  define LIBDISFLUID_DEALLOC_WITH_FREE
# endif

# ifdef __cplusplus
extern "C"
{
# endif				/* __cplusplus */

  LIBDISFLUID_API extern const char *disfluid_version (void);

  /* Run the disfluid unit tests. The return value must be deallocated
     with free. */
  LIBDISFLUID_API LIBDISFLUID_DEALLOC_WITH_FREE char
    *disfluid_run_tests (size_t *n_tests, size_t *n_errors);

# ifdef __cplusplus
}
# endif				/* __cplusplus */

#endif				/* not H_DISFLUID_INCLUDED */