applied MSVC compatibility patch from Dwight Kelly
[swftools.git] / lib / devices / file.c
index 7546f75..70d1979 100644 (file)
@@ -33,7 +33,7 @@ int file_setparameter(struct _gfxdevice*dev, const char*key, const char*value)
 {
     internal_t*i = (internal_t*)dev->internal;
     fprintf(i->fi, "setparameter %s=%s\n", key, value);
-    return 0;
+    return 1;
 }
 
 void file_startpage(struct _gfxdevice*dev, int width, int height)
@@ -199,8 +199,11 @@ gfxresult_t* file_finish(struct _gfxdevice*dev)
 
 void gfxdevice_file_init(gfxdevice_t*dev, char*filename)
 {
-    internal_t*i = malloc(sizeof(internal_t));
+    internal_t*i = (internal_t*)malloc(sizeof(internal_t));
     memset(dev, 0, sizeof(gfxdevice_t));
+
+    dev->name = "file";
+
     dev->internal = i;
 
     dev->setparameter = file_setparameter;