diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a7524cf4..3072ac13 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -147,7 +147,7 @@ if(BUILD_NVIDIA) endif(BUILD_NVIDIA) if(BUILD_IMLIB2) - set(imlib2 imlib2.c) + set(imlib2 imlib2.cc) set(optional_sources ${optional_sources} ${imlib2}) endif(BUILD_IMLIB2) diff --git a/src/imlib2.c b/src/imlib2.cc similarity index 98% rename from src/imlib2.c rename to src/imlib2.cc index e45e4164..e0bd5d4c 100644 --- a/src/imlib2.c +++ b/src/imlib2.cc @@ -118,9 +118,9 @@ void cimlib_deinit(void) void cimlib_add_image(const char *args) { struct image_list_s *cur = NULL; - char *tmp; + const char *tmp; - cur = malloc(sizeof(struct image_list_s)); + cur = (struct image_list_s *)malloc(sizeof(struct image_list_s)); memset(cur, 0, sizeof(struct image_list_s)); if (!sscanf(args, "%1023s", cur->name)) { diff --git a/src/imlib2.h b/src/imlib2.h index 0651089f..c371e534 100644 --- a/src/imlib2.h +++ b/src/imlib2.h @@ -26,10 +26,6 @@ #include -#ifdef __cplusplus -extern "C" { -#endif - void cimlib_add_image(const char *name); void cimlib_set_cache_size(long size); void cimlib_set_cache_flush_interval(long interval); @@ -40,8 +36,4 @@ void cimlib_cleanup(void); void print_image_callback(struct text_object *, char *, int); -#ifdef __cplusplus -} -#endif - #endif /* _CONKY_IMBLI2_H_ */