applied MSVC compatibility patch from Dwight Kelly
[swftools.git] / lib / devices / file.c
index 72290e8..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)
@@ -102,12 +102,12 @@ void file_fillgradient(struct _gfxdevice*dev, gfxline_t*line, gfxgradient_t*grad
     dumpline(i->fi, line);
 }
 
-void file_addfont(struct _gfxdevice*dev, char*fontid, gfxfont_t*font)
+void file_addfont(struct _gfxdevice*dev, gfxfont_t*font)
 {
     internal_t*i = (internal_t*)dev->internal;
 }
 
-void file_drawchar(struct _gfxdevice*dev, char*fontid, int glyph, gfxcolor_t*color, gfxmatrix_t*matrix)
+void file_drawchar(struct _gfxdevice*dev, gfxfont_t*font, int glyph, gfxcolor_t*color, gfxmatrix_t*matrix)
 {
     internal_t*i = (internal_t*)dev->internal;
 }
@@ -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;