diff --git a/src/common.cc b/src/common.cc index a7bbec4e..9e21fa82 100644 --- a/src/common.cc +++ b/src/common.cc @@ -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) { diff --git a/src/core.cc b/src/core.cc index a672a52b..0b4717af 100644 --- a/src/core.cc +++ b/src/core.cc @@ -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 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: , [function parameters]") diff --git a/src/exec.cc b/src/exec.cc index 60ec47db..904f1a44 100644 --- a/src/exec.cc +++ b/src/exec.cc @@ -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); }