modified autogen.sh to remove reference to osl/
[converter.git] / include / converter / converter.h
blobe07785bd989abd0b8b4eaed0ccfc454805ade297
1 #ifndef POCC_CONVERTER_H
2 #define POCC_CONVERTER_H
4 //#define OSL_GMP_IS_HERE
5 #include <string.h> // for strdup
7 #ifdef OSL_GMP_IS_HERE
8 #include <gmp.h>
9 #endif
11 #include "scoplib/scop.h"
12 #include "osl/scop.h"
13 #include "converter/converter_int.h"
15 #define CONVERTER_error(msg) \
16 do { \
17 fprintf(stderr,"[converter] Error: "msg" (%s).\n", __func__); \
18 exit(1); \
19 }while(0)
21 #define CONVERTER_warning(msg) \
22 do { \
23 fprintf(stderr,"[converter] Warning: "msg" (%s).\n", __func__); \
24 }while(0)
26 # define CONVERTER_info(msg) \
27 do { \
28 fprintf(stderr,"[converter] Info: "msg" (%s).\n", __func__); \
29 } while (0)
31 #define CONVERTER_malloc(ptr, type, size) \
32 do { \
33 if (((ptr) = (type)malloc(size)) == NULL) \
34 CONVERTER_error("memory overflow"); \
35 }while(0)
37 # define CONVERTER_strdup(destination, source) \
38 do { \
39 if (source != NULL) { \
40 if (((destination) = strdup(source)) == NULL) \
41 CONVERTER_error("memory overflow"); \
42 } \
43 else { \
44 destination = NULL; \
45 CONVERTER_warning("strdup of a NULL string"); \
46 } \
47 } while (0)
49 # define CONVERTER_max(x,y) ((x) > (y)? (x) : (y))
50 # define CONVERTER_min(x,y) ((x) < (y)? (x) : (y))
52 osl_scop_p convert_scop_scoplib2osl(scoplib_scop_p);
53 scoplib_scop_p convert_scop_osl2scoplib(osl_scop_p);
55 int convert_osl_scop_equal( osl_scop_p, osl_scop_p);
56 int convert_scoplib_scop_equal( scoplib_scop_p, scoplib_scop_p);
57 #endif