From: kramm Date: Tue, 3 Feb 2004 14:53:22 +0000 (+0000) Subject: gcc 2.95.4 fixes X-Git-Tag: release-0-5-0~44 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=1b92dcdf739c6b827ac037ce74a9d9df0fc857a8 gcc 2.95.4 fixes --- diff --git a/lib/drawer.c b/lib/drawer.c index d371657..81e7991 100644 --- a/lib/drawer.c +++ b/lib/drawer.c @@ -242,6 +242,12 @@ void draw_cubicTo(drawer_t*draw, FPOINT* control1, FPOINT* control2, FPOINT* t { struct qspline q[128]; struct cspline c; + double quality = 80; + double maxerror = (500-(quality*5)>1?500-(quality*5):1)/20.0; + + int num = approximate3(&c, q, 128, maxerror*maxerror); + int t; + c.start.x = draw->pos.x; c.start.y = draw->pos.y; c.control1.x = control1->x; @@ -250,11 +256,7 @@ void draw_cubicTo(drawer_t*draw, FPOINT* control1, FPOINT* control2, FPOINT* t c.control2.y = control2->y; c.end.x = to->x; c.end.y = to->y; - double quality = 80; - double maxerror = (500-(quality*5)>1?500-(quality*5):1)/20.0; - int num = approximate3(&c, q, 128, maxerror*maxerror); - int t; for(t=0;tascii2glyph[c]; shape = font->glyph[g].shape; shape2 = swf_ShapeToShape2(shape); - SHAPELINE*l = shape2->lines; + l = shape2->lines; while(l) { if(l->type == moveTo) { FPOINT to; diff --git a/lib/modules/swftools.c b/lib/modules/swftools.c index 3618ad9..d6e93de 100644 --- a/lib/modules/swftools.c +++ b/lib/modules/swftools.c @@ -859,8 +859,8 @@ void swf_Relocate (SWF*swf, char*bitmap) void swf_RelocateDepth(SWF*swf, char*bitmap) { TAG*tag; - tag = swf->firstTag; int nr; + tag = swf->firstTag; for(nr=65535;nr>=0;nr--) { if(bitmap[nr] != 0) break; diff --git a/src/swfc.c b/src/swfc.c index c9d4420..a410286 100644 --- a/src/swfc.c +++ b/src/swfc.c @@ -926,13 +926,15 @@ GRADIENT parseGradient(const char*str) memset(&gradient, 0, sizeof(GRADIENT)); while(*p) { char*posstr,*colorstr; + float pos; + RGBA color; posstr = gradient_getToken(&p); if(!*posstr) break; - float pos = parsePercent(posstr); + pos = parsePercent(posstr); if(!*p) syntaxerror("Error in shape data: Color expected after %s", posstr); colorstr = gradient_getToken(&p); - RGBA color = parseColor(colorstr); + color = parseColor(colorstr); if(gradient.num == sizeof(gradient.ratios)/sizeof(gradient.ratios[0])) { warning("gradient record too big- max size is 8, rest ignored"); break;