mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-15 19:56:55 +00:00
Combine print_execp and print_exec as much as possible
This commit is contained in:
parent
f0ed783041
commit
463836ebf9
@ -581,13 +581,16 @@ struct text_object *construct_text_object(const char *s, const char *arg, long
|
|||||||
#endif /* BUILD_IMLIB2 */
|
#endif /* BUILD_IMLIB2 */
|
||||||
END OBJ(exec, 0)
|
END OBJ(exec, 0)
|
||||||
scan_exec_arg(obj, arg);
|
scan_exec_arg(obj, arg);
|
||||||
|
obj->parse = false;
|
||||||
|
obj->thread = false;
|
||||||
obj->callbacks.print = &print_exec;
|
obj->callbacks.print = &print_exec;
|
||||||
obj->callbacks.free = &free_exec;
|
obj->callbacks.free = &free_exec;
|
||||||
END OBJ(execp, 0)
|
END OBJ(execp, 0)
|
||||||
scan_exec_arg(obj, arg);
|
scan_exec_arg(obj, arg);
|
||||||
obj->verbatim_output = 1;
|
obj->verbatim_output = 1;
|
||||||
obj->parse = true;
|
obj->parse = true;
|
||||||
obj->callbacks.print = &print_execp;
|
obj->thread = false;
|
||||||
|
obj->callbacks.print = &print_exec;
|
||||||
obj->callbacks.free = &free_exec;
|
obj->callbacks.free = &free_exec;
|
||||||
END OBJ(execbar, 0)
|
END OBJ(execbar, 0)
|
||||||
scan_exec_arg(obj, arg);
|
scan_exec_arg(obj, arg);
|
||||||
|
@ -289,12 +289,6 @@ void scan_execgraph_arg(struct text_object *obj, const char *arg)
|
|||||||
}
|
}
|
||||||
#endif /* BUILD_X11 */
|
#endif /* BUILD_X11 */
|
||||||
|
|
||||||
void print_exec(struct text_object *obj, char *p, int p_max_size)
|
|
||||||
{
|
|
||||||
read_exec(obj->data.s, p, p_max_size);
|
|
||||||
remove_deleted_chars(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
void fill_p(char *buffer, struct text_object *obj, char *p, int p_max_size) {
|
void fill_p(char *buffer, struct text_object *obj, char *p, int p_max_size) {
|
||||||
if(obj->parse == true) {
|
if(obj->parse == true) {
|
||||||
struct text_object subroot;
|
struct text_object subroot;
|
||||||
@ -304,7 +298,7 @@ void fill_p(char *buffer, struct text_object *obj, char *p, int p_max_size) {
|
|||||||
remove_deleted_chars(p);
|
remove_deleted_chars(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
void print_execp(struct text_object *obj, char *p, int p_max_size)
|
void print_exec(struct text_object *obj, char *p, int p_max_size)
|
||||||
{
|
{
|
||||||
char *buf;
|
char *buf;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user