1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-26 12:27:52 +00:00

cpp-ify mboxscan.c

This commit is contained in:
Nikolas Garofil 2010-02-09 01:49:51 +01:00
parent b49ac8e6d3
commit d0646bc4bb
3 changed files with 6 additions and 14 deletions

View File

@ -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)

View File

@ -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;

View File

@ -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_ */