From: Michael Drake Date: Fri, 23 Aug 2013 08:26:38 +0000 (+0100) Subject: Move gradient logging to svgtiny_gradient.c, and suppress when not debugging gradients. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=294c0413ad612c4353b99235619ddb5f74b02692;p=libsvgtiny.git Move gradient logging to svgtiny_gradient.c, and suppress when not debugging gradients. --- diff --git a/src/svgtiny.c b/src/svgtiny.c index 13249b6..5be977f 100644 --- a/src/svgtiny.c +++ b/src/svgtiny.c @@ -1392,8 +1392,6 @@ static void _svgtiny_parse_color(const char *s, svgtiny_colour *c, *rparen = 0; svgtiny_find_gradient(id, state); free(id); - fprintf(stderr, "linear_gradient_stop_count %i\n", - state->linear_gradient_stop_count); if (state->linear_gradient_stop_count == 0) *c = svgtiny_TRANSPARENT; else if (state->linear_gradient_stop_count == 1) diff --git a/src/svgtiny_gradient.c b/src/svgtiny_gradient.c index 5361532..8103c14 100644 --- a/src/svgtiny_gradient.c +++ b/src/svgtiny_gradient.c @@ -88,6 +88,11 @@ void svgtiny_find_gradient(const char *id, struct svgtiny_parse_state *state) dom_string_unref(id_str); dom_node_unref(gradient); + + #ifdef GRADIENT_DEBUG + fprintf(stderr, "linear_gradient_stop_count %i\n", + state->linear_gradient_stop_count); + #endif }