mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-14 11:33:14 +00:00
Fix bug with SF ID 3101185
This commit is contained in:
parent
8123e447e2
commit
0ee557a4ee
@ -460,12 +460,9 @@ void print_loadavg(struct text_object *obj, char *p, int p_max_size)
|
||||
|
||||
void scan_no_update(struct text_object *obj, const char *arg)
|
||||
{
|
||||
struct text_object subroot;
|
||||
|
||||
obj->data.s = (char*) malloc(text_buffer_size);
|
||||
parse_conky_vars(&subroot, arg, obj->data.s, text_buffer_size);
|
||||
evaluate(arg, obj->data.s, text_buffer_size);
|
||||
obj->data.s = (char*) realloc(obj->data.s, strlen(obj->data.s) + 1);
|
||||
free_text_objects(&subroot);
|
||||
}
|
||||
|
||||
void free_no_update(struct text_object *obj) {
|
||||
|
@ -724,6 +724,7 @@ struct text_object *construct_text_object(char *s, const char *arg, long
|
||||
END OBJ(execp, 0)
|
||||
scan_exec_arg(obj, arg);
|
||||
obj->parse = true;
|
||||
obj->verbatim_output = true;
|
||||
obj->thread = false;
|
||||
obj->callbacks.print = &print_exec;
|
||||
obj->callbacks.free = &free_exec;
|
||||
@ -764,6 +765,7 @@ struct text_object *construct_text_object(char *s, const char *arg, long
|
||||
END OBJ_ARG(execpi, 0, "execpi needs arguments")
|
||||
scan_execi_arg(obj, arg);
|
||||
obj->parse = true;
|
||||
obj->verbatim_output = true;
|
||||
obj->thread = false;
|
||||
obj->callbacks.print = &print_execi;
|
||||
obj->callbacks.free = &free_execi;
|
||||
@ -776,6 +778,7 @@ struct text_object *construct_text_object(char *s, const char *arg, long
|
||||
END OBJ_ARG(texecpi, 0, "texecpi needs arguments")
|
||||
scan_execi_arg(obj, arg);
|
||||
obj->parse = true;
|
||||
obj->verbatim_output = true;
|
||||
obj->thread = true;
|
||||
obj->callbacks.print = &print_execi;
|
||||
obj->callbacks.free = &free_execi;
|
||||
@ -1635,6 +1638,7 @@ struct text_object *construct_text_object(char *s, const char *arg, long
|
||||
obj->callbacks.free = &gen_free_opaque;
|
||||
END OBJ_ARG(lua_parse, 0, "lua_parse needs arguments: <function name> [function parameters]")
|
||||
obj->data.s = strndup(arg, text_buffer_size);
|
||||
obj->verbatim_output = true;
|
||||
obj->callbacks.print = &print_lua_parse;
|
||||
obj->callbacks.free = &gen_free_opaque;
|
||||
END OBJ_ARG(lua_bar, 0, "lua_bar needs arguments: <height>,<width> <function name> [function parameters]")
|
||||
|
@ -290,9 +290,7 @@ void scan_execgraph_arg(struct text_object *obj, const char *arg)
|
||||
|
||||
void fill_p(char *buffer, struct text_object *obj, char *p, int p_max_size) {
|
||||
if(obj->parse == true) {
|
||||
struct text_object subroot;
|
||||
parse_conky_vars(&subroot, buffer, p, p_max_size);
|
||||
free_text_objects(&subroot);
|
||||
evaluate(buffer, p, p_max_size);
|
||||
} else snprintf(p, p_max_size, "%s", buffer);
|
||||
remove_deleted_chars(p);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user