fixed compile problems.
authorkramm <kramm>
Tue, 10 Feb 2004 18:41:24 +0000 (18:41 +0000)
committerkramm <kramm>
Tue, 10 Feb 2004 18:41:24 +0000 (18:41 +0000)
lib/modules/swffont.c
release.in
src/swfc.c

index f355829..9a572e1 100644 (file)
@@ -442,7 +442,7 @@ SWFFONT* swf_LoadFont(char*filename)
 #elif defined(HAVE_T1LIB)
     return swf_LoadT1Font(filename);
 #else
-    fprintf(stderr, "Error: Neither T1lib nor FreeType support compiled in. Could not load %s\n", infile);
+    fprintf(stderr, "Error: Neither T1lib nor FreeType support compiled in. Could not load %s\n", filename);
     return 0;
 #endif
 }
index 2fdacac..98897b3 100644 (file)
@@ -37,6 +37,8 @@ ${name}/lib/action/lex.swf4.c \
 ${name}/lib/action/lex.swf5.c \
 ${name}/lib/action/swf4compiler.tab.c \
 ${name}/lib/action/swf5compiler.tab.c \
+${name}/lib/action/swf4compiler.tab.h \
+${name}/lib/action/swf5compiler.tab.h \
 ${name}/src/parser.lex \
 ${name}/src/parser.h \
 ${name}/src/Makefile.in \
index 4aaa50e..1be48cc 100644 (file)
@@ -776,22 +776,30 @@ void s_image(char*name, char*type, char*filename, int quality)
        s_box(name, 0, 0, black, 20, 0);
        return;
     }
-    tag = swf_InsertTag(tag, ST_DEFINEBITSJPEG2);
-    swf_SetU16(tag, imageID);
+    if(type=="jpeg") {
+#ifndef HAVE_LIBJPEG
+       warning("no jpeg support compiled in");
+       s_box(name, 0, 0, black, 20, 0);
+       return;
+#else
+       tag = swf_InsertTag(tag, ST_DEFINEBITSJPEG2);
+       swf_SetU16(tag, imageID);
 
-    if(swf_SetJPEGBits(tag, filename, quality) < 0) {
-       syntaxerror("Image \"%s\" not found, or contains errors", filename);
-    }
+       if(swf_SetJPEGBits(tag, filename, quality) < 0) {
+           syntaxerror("Image \"%s\" not found, or contains errors", filename);
+       }
 
-    swf_GetJPEGSize(filename, &width, &height);
+       swf_GetJPEGSize(filename, &width, &height);
 
-    r.xmin = 0;
-    r.ymin = 0;
-    r.xmax = width*20;
-    r.ymax = height*20;
+       r.xmin = 0;
+       r.ymin = 0;
+       r.xmax = width*20;
+       r.ymax = height*20;
 
-    s_addimage(name, id, tag, r);
-    incrementid();
+       s_addimage(name, id, tag, r);
+       incrementid();
+#endif
+    }
 
     /* step 2: the character */
     tag = swf_InsertTag(tag, ST_DEFINESHAPE); // todo: should be defineshape2/3 once images can be transparent.(?)