mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-15 17:47:09 +00:00
{down,up}speedgraph: convert to match common signature
This commit is contained in:
parent
80114f3b1e
commit
80e41032cd
@ -1130,7 +1130,7 @@ void generate_text_internal(char *p, int p_max_size,
|
||||
}
|
||||
#ifdef X11
|
||||
OBJ(downspeedgraph) {
|
||||
print_downspeedgraph(obj, p);
|
||||
print_downspeedgraph(obj, p, p_max_size);
|
||||
}
|
||||
#endif /* X11 */
|
||||
OBJ(else) {
|
||||
@ -1935,7 +1935,7 @@ void generate_text_internal(char *p, int p_max_size,
|
||||
}
|
||||
#ifdef X11
|
||||
OBJ(upspeedgraph) {
|
||||
print_upspeedgraph(obj, p);
|
||||
print_upspeedgraph(obj, p, p_max_size);
|
||||
}
|
||||
#endif /* X11 */
|
||||
OBJ(uptime_short) {
|
||||
|
@ -206,21 +206,21 @@ void parse_net_stat_graph_arg(struct text_object *obj, const char *arg, void *fr
|
||||
obj->data.opaque = get_net_stat(DEFAULTNETDEV, obj, free_at_crash);
|
||||
}
|
||||
|
||||
void print_downspeedgraph(struct text_object *obj, char *p)
|
||||
void print_downspeedgraph(struct text_object *obj, char *p, int p_max_size)
|
||||
{
|
||||
struct net_stat *ns = obj->data.opaque;
|
||||
|
||||
if (!ns)
|
||||
if (!ns || !p_max_size)
|
||||
return;
|
||||
|
||||
new_graph(obj, p, ns->recv_speed / 1024.0);
|
||||
}
|
||||
|
||||
void print_upspeedgraph(struct text_object *obj, char *p)
|
||||
void print_upspeedgraph(struct text_object *obj, char *p, int p_max_size)
|
||||
{
|
||||
struct net_stat *ns = obj->data.opaque;
|
||||
|
||||
if (!ns)
|
||||
if (!ns || !p_max_size)
|
||||
return;
|
||||
|
||||
new_graph(obj, p, ns->trans_speed / 1024.0);
|
||||
|
@ -71,8 +71,8 @@ void print_addrs(struct text_object *, char *, int);
|
||||
#endif /* __linux__ */
|
||||
#ifdef X11
|
||||
void parse_net_stat_graph_arg(struct text_object *, const char *, void *);
|
||||
void print_downspeedgraph(struct text_object *, char *);
|
||||
void print_upspeedgraph(struct text_object *, char *);
|
||||
void print_downspeedgraph(struct text_object *, char *, int);
|
||||
void print_upspeedgraph(struct text_object *, char *, int);
|
||||
#endif /* X11 */
|
||||
#ifdef __linux__
|
||||
#ifdef HAVE_IWLIB
|
||||
|
Loading…
Reference in New Issue
Block a user