X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fdevices%2Ffile.c;h=70d1979b6a4b70cc3c069b509d81d84804411732;hb=b93de056e0b79f57c8f8fe22985b166c7d2c3dc3;hp=72290e83472fe4736780c4994f7eb2ca16a2e421;hpb=03cce7a7a066b1f49c7f46986b631aa25b051155;p=swftools.git diff --git a/lib/devices/file.c b/lib/devices/file.c index 72290e8..70d1979 100644 --- a/lib/devices/file.c +++ b/lib/devices/file.c @@ -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;