• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/libsvgtiny/0001-disable-debug-printfs.patch
Vicente Olivert RieraVicente Olivert Riera committed 0a54105160c11 Dec 2014
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
svntiny: svntiny_gradient.c: only print debugging if GRADIENT_DEBUG is enabled
2
​
3
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
4
---
5
 src/svgtiny_gradient.c |   23 ++++++++++++++++++++++-
6
 1 file changed, 22 insertions(+), 1 deletion(-)
7
​
8
Index: libsvgtiny/src/svgtiny_gradient.c
9
===================================================================
10
--- libsvgtiny.orig/src/svgtiny_gradient.c
11
+++ libsvgtiny/src/svgtiny_gradient.c
12
@@ -30,8 +30,9 @@ void svgtiny_find_gradient(const char *i
13
 {
14
    xmlNode *gradient;
15
 
16
+#ifdef GRADIENT_DEBUG
17
    fprintf(stderr, "svgtiny_find_gradient: id \"%s\"\n", id);
18
-
19
+#endif
20
    state->linear_gradient_stop_count = 0;
21
    state->gradient_x1 = "0%";
22
    state->gradient_y1 = "0%";
23
@@ -47,13 +48,17 @@ void svgtiny_find_gradient(const char *i
24
 
25
    gradient = svgtiny_find_element_by_id(
26
            (xmlNode *) state->document, id);
27
+#ifdef GRADIENT_DEBUG
28
    fprintf(stderr, "gradient %p\n", (void *) gradient);
29
+#endif
30
    if (!gradient) {
31
        fprintf(stderr, "gradient \"%s\" not found\n", id);
32
        return;
33
    }
34
 
35
+#ifdef GRADIENT_DEBUG
36
    fprintf(stderr, "gradient name \"%s\"\n", gradient->name);
37
+#endif
38
    if (strcmp((const char *) gradient->name, "linearGradient") == 0) {
39
        svgtiny_parse_linear_gradient(gradient, state);
40
    }
41
@@ -98,8 +103,10 @@ svgtiny_code svgtiny_parse_linear_gradie
42
                return svgtiny_OUT_OF_MEMORY;
43
            svgtiny_parse_transform(s, &a, &b, &c, &d, &e, &f);
44
            free(s);
45
+#ifdef GRADIENT_DEBUG
46
            fprintf(stderr, "transform %g %g %g %g %g %g\n",
47
                    a, b, c, d, e, f);
48
+#endif
49
            state->gradient_transform.a = a;
50
            state->gradient_transform.b = b;
51
            state->gradient_transform.c = c;
52
@@ -143,7 +150,9 @@ svgtiny_code svgtiny_parse_linear_gradie
53
        }
54
 
55
        if (offset != -1 && color != svgtiny_TRANSPARENT) {
56
+#ifdef GRADIENT_DEBUG
57
            fprintf(stderr, "stop %g %x\n", offset, color);
58
+#endif
59
            state->gradient_stop[i].offset = offset;
60
            state->gradient_stop[i].color = color;
61
            i++;
62
@@ -220,9 +229,11 @@ svgtiny_code svgtiny_add_path_linear_gra
63
    #endif
64
 
65
    /* compute gradient vector */
66
+#ifdef GRADIENT_DEBUG
67
    fprintf(stderr, "x1 %s, y1 %s, x2 %s, y2 %s\n",
68
            state->gradient_x1, state->gradient_y1,
69
            state->gradient_x2, state->gradient_y2);
70
+#endif
71
    if (!state->gradient_user_space_on_use) {
72
        gradient_x0 = object_x0 +
73
                svgtiny_parse_length(state->gradient_x1,
74
@@ -297,9 +308,11 @@ svgtiny_code svgtiny_add_path_linear_gra
75
 
76
    /* invert gradient transform for applying to vertices */
77
    svgtiny_invert_matrix(&state->gradient_transform.a, trans);
78
+#ifdef GRADIENT_DEBUG
79
    fprintf(stderr, "inverse transform %g %g %g %g %g %g\n",
80
            trans[0], trans[1], trans[2], trans[3],
81
            trans[4], trans[5]);
82
+#endif
83
 
84
    /* compute points on the path for triangle vertices */
85
    /* r, r0, r1 are distance along gradient vector */
86
@@ -372,8 +385,10 @@ svgtiny_code svgtiny_add_path_linear_gra
87
        steps = ceilf(fabsf(r1 - r0) / 0.05);
88
        if (steps == 0)
89
            steps = 1;
90
+#ifdef GRADIENT_DEBUG
91
        fprintf(stderr, "r0 %g, r1 %g, steps %i\n",
92
                r0, r1, steps);
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.