X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fdrawer.c;h=671ac84aa07b3ef2a606da6ae0c0e817c7235839;hp=f5196ca7eb75708d573db63b744811cb722b994d;hb=879d0eec420fe0fd5ddcd56c8fe62b82a6744edd;hpb=3ef17c4cee41231e1eed731c08381d3ddf0c8d1a diff --git a/lib/drawer.c b/lib/drawer.c index f5196ca..671ac84 100644 --- a/lib/drawer.c +++ b/lib/drawer.c @@ -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;