mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-01 06:11:49 +00:00
convert $endif to callbacks.print
This commit is contained in:
parent
718ed9d280
commit
37cbdcf89b
@ -804,9 +804,6 @@ void generate_text_internal(char *p, int p_max_size,
|
|||||||
need_to_load_fonts = 1;
|
need_to_load_fonts = 1;
|
||||||
}
|
}
|
||||||
#endif /* X11 */
|
#endif /* X11 */
|
||||||
OBJ(endif) {
|
|
||||||
/* harmless object, just ignore */
|
|
||||||
}
|
|
||||||
OBJ(pid_chroot) {
|
OBJ(pid_chroot) {
|
||||||
char buf[max_user_text];
|
char buf[max_user_text];
|
||||||
|
|
||||||
|
@ -547,6 +547,7 @@ struct text_object *construct_text_object(const char *s, const char *arg, long
|
|||||||
obj->callbacks.iftest = &gen_false_iftest;
|
obj->callbacks.iftest = &gen_false_iftest;
|
||||||
END OBJ(endif, 0)
|
END OBJ(endif, 0)
|
||||||
obj_be_ifblock_endif(ifblock_opaque, obj);
|
obj_be_ifblock_endif(ifblock_opaque, obj);
|
||||||
|
obj->callbacks.print = &gen_print_nothing;
|
||||||
END OBJ(eval, 0)
|
END OBJ(eval, 0)
|
||||||
obj->data.s = strndup(arg ? arg : "", text_buffer_size);
|
obj->data.s = strndup(arg ? arg : "", text_buffer_size);
|
||||||
obj->callbacks.print = &print_evaluate;
|
obj->callbacks.print = &print_evaluate;
|
||||||
|
@ -43,6 +43,13 @@ int gen_false_iftest(struct text_object *obj)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void gen_print_nothing(struct text_object *obj, char *p, int p_max_size)
|
||||||
|
{
|
||||||
|
(void)obj;
|
||||||
|
(void)p;
|
||||||
|
(void)p_max_size;
|
||||||
|
}
|
||||||
|
|
||||||
/* text_object_list
|
/* text_object_list
|
||||||
*
|
*
|
||||||
* this list is special. it looks like this:
|
* this list is special. it looks like this:
|
||||||
|
@ -497,6 +497,10 @@ void gen_free_opaque(struct text_object *);
|
|||||||
* used for the else object */
|
* used for the else object */
|
||||||
int gen_false_iftest(struct text_object *);
|
int gen_false_iftest(struct text_object *);
|
||||||
|
|
||||||
|
/* generic nothing printer callback printing nothing
|
||||||
|
* used for the endif object */
|
||||||
|
void gen_print_nothing(struct text_object *, char *, int);
|
||||||
|
|
||||||
struct text_object {
|
struct text_object {
|
||||||
struct text_object *next, *prev; /* doubly linked list of text objects */
|
struct text_object *next, *prev; /* doubly linked list of text objects */
|
||||||
struct text_object *sub; /* for objects parsing text into objects */
|
struct text_object *sub; /* for objects parsing text into objects */
|
||||||
|
Loading…
Reference in New Issue
Block a user