X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fdevices%2Ffile.c;h=98aaaa296dd734378d6a9c0a833ae3f5b6c0efd4;hb=e444519da3359f5207016ad58b82336c41c74945;hp=3b83c290d6efbf4424701d63e4595094cc76d12a;hpb=5386028e78548134c4a475dcfd815569e7dc9676;p=swftools.git diff --git a/lib/devices/file.c b/lib/devices/file.c index 3b83c29..98aaaa2 100644 --- a/lib/devices/file.c +++ b/lib/devices/file.c @@ -20,7 +20,10 @@ #include #include +#ifndef WIN32 #include +#endif +#include #include #include "../gfxdevice.h" @@ -33,7 +36,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) @@ -112,7 +115,7 @@ void file_drawchar(struct _gfxdevice*dev, gfxfont_t*font, int glyph, gfxcolor_t* internal_t*i = (internal_t*)dev->internal; } -void file_drawlink(struct _gfxdevice*dev, gfxline_t*line, char*action) +void file_drawlink(struct _gfxdevice*dev, gfxline_t*line, const char*action) { internal_t*i = (internal_t*)dev->internal; fprintf(i->fi, "drawlink %s\n", action); @@ -138,7 +141,7 @@ void fileresult_destroy(struct _gfxresult*gfx) free(i->filename);i->filename = 0; } -int fileresult_save(struct _gfxresult*gfx, char*filename) +int fileresult_save(struct _gfxresult*gfx, const char*filename) { gfxresult_internal_t*i = (gfxresult_internal_t*)gfx->internal; FILE*fi,*fo; @@ -168,7 +171,7 @@ int fileresult_save(struct _gfxresult*gfx, char*filename) return 0; } -void* fileresult_get(struct _gfxresult*gfx, char*name) +void* fileresult_get(struct _gfxresult*gfx, const char*name) { return 0; } @@ -199,7 +202,7 @@ 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";