mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-27 20:44:56 +00:00
cpp-ify mboxscan.c
This commit is contained in:
parent
b49ac8e6d3
commit
d0646bc4bb
@ -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
|
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
|
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
|
temphelper.cc text_object.c timeinfo.c top.cc algebra.c prioqueue.c proc.c
|
||||||
user.c)
|
user.c)
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* -*- mode: c; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*-
|
/* -*- mode: c++; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*-
|
||||||
* vim: ts=4 sw=4 noet ai cindent syntax=c
|
* vim: ts=4 sw=4 noet ai cindent syntax=cpp
|
||||||
*
|
*
|
||||||
* Conky, a system monitor, based on torsmo
|
* 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;
|
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));
|
memset(msd, 0, sizeof(struct mboxscan_data));
|
||||||
|
|
||||||
msd->args = strndup(arg, text_buffer_size);
|
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)
|
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)
|
if (!msd)
|
||||||
return;
|
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)
|
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)
|
if (!msd)
|
||||||
return;
|
return;
|
@ -30,16 +30,8 @@
|
|||||||
#ifndef _MBOXSCAN_H_
|
#ifndef _MBOXSCAN_H_
|
||||||
#define _MBOXSCAN_H_
|
#define _MBOXSCAN_H_
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void parse_mboxscan_arg(struct text_object *, const char *);
|
void parse_mboxscan_arg(struct text_object *, const char *);
|
||||||
void print_mboxscan(struct text_object *, char *, int);
|
void print_mboxscan(struct text_object *, char *, int);
|
||||||
void free_mboxscan(struct text_object *);
|
void free_mboxscan(struct text_object *);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* _MBOXSCAN_H_ */
|
#endif /* _MBOXSCAN_H_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user