diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8434349a..c404d3dc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -36,7 +36,7 @@ endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/build.h) set(conky_sources colours.cc combine.cc common.cc conky.cc core.cc diskio.cc entropy.cc exec.cc fs.cc mail.cc mixer.cc net_stat.cc template.cc - mboxscan.c read_tcp.c scroll.cc specials.cc tailhead.cc + mboxscan.cc read_tcp.c scroll.cc specials.cc tailhead.cc temphelper.cc text_object.c timeinfo.c top.cc algebra.c prioqueue.c proc.c user.c) diff --git a/src/mboxscan.c b/src/mboxscan.cc similarity index 96% rename from src/mboxscan.c rename to src/mboxscan.cc index 3a00e6b4..dfa6b3e3 100644 --- a/src/mboxscan.c +++ b/src/mboxscan.cc @@ -1,5 +1,5 @@ -/* -*- mode: c; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*- - * vim: ts=4 sw=4 noet ai cindent syntax=c +/* -*- mode: c++; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*- + * vim: ts=4 sw=4 noet ai cindent syntax=cpp * * Conky, a system monitor, based on torsmo * @@ -381,7 +381,7 @@ void parse_mboxscan_arg(struct text_object *obj, const char *arg) { struct mboxscan_data *msd; - msd = malloc(sizeof(struct mboxscan_data)); + msd = (mboxscan_data*) malloc(sizeof(struct mboxscan_data)); memset(msd, 0, sizeof(struct mboxscan_data)); msd->args = strndup(arg, text_buffer_size); @@ -394,7 +394,7 @@ void parse_mboxscan_arg(struct text_object *obj, const char *arg) void print_mboxscan(struct text_object *obj, char *p, int p_max_size) { - struct mboxscan_data *msd = obj->data.opaque; + struct mboxscan_data *msd = (mboxscan_data*) obj->data.opaque; if (!msd) return; @@ -405,7 +405,7 @@ void print_mboxscan(struct text_object *obj, char *p, int p_max_size) void free_mboxscan(struct text_object *obj) { - struct mboxscan_data *msd = obj->data.opaque; + struct mboxscan_data *msd = (mboxscan_data*) obj->data.opaque; if (!msd) return; diff --git a/src/mboxscan.h b/src/mboxscan.h index 784ade5a..0844536c 100644 --- a/src/mboxscan.h +++ b/src/mboxscan.h @@ -30,16 +30,8 @@ #ifndef _MBOXSCAN_H_ #define _MBOXSCAN_H_ -#ifdef __cplusplus -extern "C" { -#endif - void parse_mboxscan_arg(struct text_object *, const char *); void print_mboxscan(struct text_object *, char *, int); void free_mboxscan(struct text_object *); -#ifdef __cplusplus -} -#endif - #endif /* _MBOXSCAN_H_ */