diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7c0bb3b1..5d78c609 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -37,7 +37,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.cc read_tcp.cc scroll.cc specials.cc tailhead.cc - temphelper.cc text_object.cc timeinfo.c top.cc algebra.c prioqueue.c proc.c + temphelper.cc text_object.cc timeinfo.cc top.cc algebra.c prioqueue.c proc.c user.c) # add timed thread library diff --git a/src/timeinfo.c b/src/timeinfo.cc similarity index 96% rename from src/timeinfo.c rename to src/timeinfo.cc index 802850db..79ac9255 100644 --- a/src/timeinfo.c +++ b/src/timeinfo.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 * @@ -75,7 +75,7 @@ void scan_tztime(struct text_object *obj, const char *arg) } } - ts = malloc(sizeof(struct tztime_s)); + ts = (tztime_s*) malloc(sizeof(struct tztime_s)); memset(ts, 0, sizeof(struct tztime_s)); ts->fmt = strndup(fmt ? fmt : "%F %T", text_buffer_size); ts->tz = tz ? strndup(tz, text_buffer_size) : NULL; @@ -105,7 +105,7 @@ void print_tztime(struct text_object *obj, char *p, int p_max_size) char *oldTZ = NULL; time_t t; struct tm *tm; - struct tztime_s *ts = obj->data.opaque; + struct tztime_s *ts = (tztime_s*) obj->data.opaque; if (!ts) return; @@ -139,7 +139,7 @@ void free_time(struct text_object *obj) void free_tztime(struct text_object *obj) { - struct tztime_s *ts = obj->data.opaque; + struct tztime_s *ts = (tztime_s*) obj->data.opaque; if (!ts) return; diff --git a/src/timeinfo.h b/src/timeinfo.h index e0772637..281b3c34 100644 --- a/src/timeinfo.h +++ b/src/timeinfo.h @@ -30,10 +30,6 @@ #ifndef _TIMEINFO_H #define _TIMEINFO_H -#ifdef __cplusplus -extern "C" { -#endif - /* for the times_in_seconds configuration variable and it's users */ void set_times_in_seconds(char); char times_in_seconds(void); @@ -55,8 +51,4 @@ void print_format_time(struct text_object *obj, char *p, int p_max_size); void free_time(struct text_object *); void free_tztime(struct text_object *); -#ifdef __cplusplus -} -#endif - #endif /* _TIMEINFO_H */