X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fdevices%2Ffile.c;h=98aaaa296dd734378d6a9c0a833ae3f5b6c0efd4;hb=0784a8a882e7b98299fb6a90f0f9a7ebb322562b;hp=e8cd97342d61cbebca1ba5becbc2be051591ff89;hpb=50dfb884ef98074f52053bd3c7d2333a87f976ad;p=swftools.git diff --git a/lib/devices/file.c b/lib/devices/file.c index e8cd973..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" @@ -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";