gcc 2.95.4 fixes
authorkramm <kramm>
Tue, 3 Feb 2004 14:53:22 +0000 (14:53 +0000)
committerkramm <kramm>
Tue, 3 Feb 2004 14:53:22 +0000 (14:53 +0000)
lib/drawer.c
lib/modules/swftext.c
lib/modules/swftools.c
src/swfc.c

index d371657..81e7991 100644 (file)
@@ -242,6 +242,12 @@ void draw_cubicTo(drawer_t*draw, FPOINT*  control1, FPOINT* control2, FPOINT*  t
 {
     struct qspline q[128];
     struct cspline c;
 {
     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;
     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;
     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;t<num;t++) {
        FPOINT mid;
        FPOINT to;
     for(t=0;t<num;t++) {
        FPOINT mid;
        FPOINT to;
index 90e44cb..8d61e04 100644 (file)
@@ -1201,11 +1201,12 @@ void swf_DrawText(drawer_t*draw, SWFFONT*font, char*text)
     while(*s) {
        SHAPE*shape;
        SHAPE2*shape2;
     while(*s) {
        SHAPE*shape;
        SHAPE2*shape2;
+       SHAPELINE*l;
        U32 c = readUTF8char(&s);
        int g = font->ascii2glyph[c];
        shape = font->glyph[g].shape;
        shape2 = swf_ShapeToShape2(shape);
        U32 c = readUTF8char(&s);
        int g = font->ascii2glyph[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;
        while(l) {
            if(l->type == moveTo) {
                FPOINT to;
index 3618ad9..d6e93de 100644 (file)
@@ -859,8 +859,8 @@ void swf_Relocate (SWF*swf, char*bitmap)
 void swf_RelocateDepth(SWF*swf, char*bitmap)
 {
     TAG*tag;
 void swf_RelocateDepth(SWF*swf, char*bitmap)
 {
     TAG*tag;
-    tag = swf->firstTag;
     int nr;
     int nr;
+    tag = swf->firstTag;
     for(nr=65535;nr>=0;nr--) {
        if(bitmap[nr] != 0) 
            break;
     for(nr=65535;nr>=0;nr--) {
        if(bitmap[nr] != 0) 
            break;
index c9d4420..a410286 100644 (file)
@@ -926,13 +926,15 @@ GRADIENT parseGradient(const char*str)
     memset(&gradient, 0, sizeof(GRADIENT));
     while(*p) {
        char*posstr,*colorstr;
     memset(&gradient, 0, sizeof(GRADIENT));
     while(*p) {
        char*posstr,*colorstr;
+       float pos;
+       RGBA color;
        posstr = gradient_getToken(&p);
        if(!*posstr)
            break;
        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);
        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;
        if(gradient.num == sizeof(gradient.ratios)/sizeof(gradient.ratios[0])) {
            warning("gradient record too big- max size is 8, rest ignored");
            break;