more horizontal refactoring
[swftools.git] / lib / drawer.c
index f5196ca..671ac84 100644 (file)
@@ -50,7 +50,7 @@ static char* getToken(const char**p)
     else while(**p && !strchr(" ,()\t\n\r", **p)) {
        (*p)++;
     }
-    result = malloc((*p)-start+1);
+    result = (char*)malloc((*p)-start+1);
     memcpy(result,start,(*p)-start+1);
     result[(*p)-start] = 0;
     return result;
@@ -254,7 +254,6 @@ static int approximate3(const struct cspline*s, struct qspline*q, int size, doub
        char left = 0,recurse=0;
        int t;
        int probes = 15;
-       double dx,dy;
 
        /* create simple approximation: a qspline which run's through the
           qspline point at 0.5 */
@@ -322,6 +321,7 @@ static int approximate3(const struct cspline*s, struct qspline*q, int size, doub
 
        /* convert control point representation to 
           d*x^3 + c*x^2 + b*x + a */
+       double dx,dy;
        dx= s->end.x  - s->control2.x*3 + s->control1.x*3 - s->start.x;
        dy= s->end.y  - s->control2.y*3 + s->control1.y*3 - s->start.y;