diff options
Diffstat (limited to 'filter/filter-format.c')
-rw-r--r-- | filter/filter-format.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/filter/filter-format.c b/filter/filter-format.c index 00dcba00d3..8f0f67b16e 100644 --- a/filter/filter-format.c +++ b/filter/filter-format.c @@ -11,18 +11,20 @@ #include "filter-arg-types.h" #include "filter-xml.h" +#define d(x) + /* FIXME: remove static, this is defined in filter-xml */ static int filter_find_rule(struct filter_rule *a, char *name) { - printf("finding, is %s = %s?\n", a->name, name); + d(printf("finding, is %s = %s?\n", a->name, name)); return strcmp(a->name, name); } static int filter_find_arg(FilterArg *a, char *name) { - printf("finding, is %s = %s?\n", a->name, name); + d(printf("finding, is %s = %s?\n", a->name, name)); return strcmp(a->name, name); } @@ -67,11 +69,11 @@ arg_text(FilterArg *arg) value = arg->values; - printf("getting text from arg %s\n", arg->name); + d(printf("getting text from arg %s\n", arg->name)); if (value == NULL) return NULL; - + str = g_string_new(""); filter_arg_write_text(arg, str); out = str->str; @@ -84,14 +86,14 @@ description_decode_text(struct filter_desc *d, struct description_decode_lambda { GList *list; char *txt; - + switch (d->type) { case FILTER_XML_TEXT: case FILTER_XML_DESC: dotext: - printf("appending '%s'\n", d->data); + d(printf("appending '%s'\n", d->data)); /* printf("vartype = %s\n", detokenise(d->vartype)); */ - printf("varname = %s\n", d->varname); + d(printf("varname = %s\n", d->varname)); if (d->vartype !=-1 && d->varname && (list = g_list_find_custom(l->args, d->varname, (GCompareFunc) filter_find_arg)) && (txt = arg_text(list->data))) { @@ -112,13 +114,13 @@ filter_description_text(GList *description, GList *args) char *txt; struct description_decode_lambda l; - printf("\ndecoding ...\n"); + d(printf("\ndecoding ...\n")); l.str = g_string_new(""); l.args = args; g_list_foreach(description, (GFunc) description_decode_text, &l); - printf("string is '%s'\n", l.str->str); + d(printf("string is '%s'\n", l.str->str)); txt = l.str->str; g_string_free(l.str, FALSE); @@ -129,7 +131,7 @@ filter_description_text(GList *description, GList *args) static void html_write(GtkHTML *html, GtkHTMLStreamHandle *stream, char *s) { - printf("appending html '%s'\n", s); + d(printf("appending html '%s'\n", s)); gtk_html_write(html, stream, s, strlen(s)); } @@ -145,9 +147,9 @@ description_decode_html(struct filter_desc *d, struct description_decode_lambda case FILTER_XML_TEXT: case FILTER_XML_DESC: dotext: - printf("appending '%s'\n", d->data); + d(printf("appending '%s'\n", d->data)); /*printf("vartype = %s\n", detokenise(d->vartype));*/ - printf("varname = %s\n", d->varname); + d(printf("varname = %s\n", d->varname)); free = FALSE; if (d->vartype !=-1 && d->varname) { char *link; @@ -190,7 +192,7 @@ filter_description_html_write(GList *description, GList *args, GtkHTML *html, Gt char *txt; struct description_decode_lambda l; - printf("\ndecoding ...\n"); + d(printf("\ndecoding ...\n")); l.str = NULL; l.args = args; |