mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-27 20:44:56 +00:00
Fix bug with SF ID 3101185 (manual merge)
This commit is contained in:
commit
fcf318c6dd
@ -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.get(*state));
|
||||
parse_conky_vars(&subroot, arg, obj->data.s, text_buffer_size.get(*state));
|
||||
obj->data.s = (char*) malloc(text_buffer_size);
|
||||
evaluate(arg, obj->data.s, text_buffer_size.get(*state));
|
||||
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) {
|
||||
|
@ -720,6 +720,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;
|
||||
@ -760,6 +761,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;
|
||||
@ -772,6 +774,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;
|
||||
@ -1632,6 +1635,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.get(*state));
|
||||
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