diff options
author | Robin Watts <robin.watts@artifex.com> | 2010-05-13 19:41:18 +0200 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2010-05-13 19:41:18 +0200 |
commit | 743aaedeabc607a6651f24642ab407419e595a74 (patch) | |
tree | b345c61fb66c4310030e062b4218dc6571d8a822 /fitz | |
parent | 988fc7212595bb1206d0211f68eae6a3c7ede122 (diff) | |
download | mupdf-743aaedeabc607a6651f24642ab407419e595a74.tar.xz |
Various fixes to avoid relying on C99. Move definitions of variables back to the start of the block.
Diffstat (limited to 'fitz')
-rw-r--r-- | fitz/dev_bbox.c | 3 | ||||
-rw-r--r-- | fitz/dev_draw.c | 3 | ||||
-rw-r--r-- | fitz/dev_text.c | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/fitz/dev_bbox.c b/fitz/dev_bbox.c index 27943a98..78e03c74 100644 --- a/fitz/dev_bbox.c +++ b/fitz/dev_bbox.c @@ -78,11 +78,12 @@ fz_bboxfreeuser(void *user) fz_device * fz_newbboxdevice(fz_bbox *bboxp) { + fz_device *dev; fz_bboxdevice *bdev = fz_malloc(sizeof(fz_bboxdevice)); bdev->bbox = bboxp; *bdev->bbox = fz_emptybbox; - fz_device *dev = fz_newdevice(bdev); + dev = fz_newdevice(bdev); dev->freeuser = fz_bboxfreeuser; dev->fillpath = fz_bboxfillpath; dev->strokepath = fz_bboxstrokepath; diff --git a/fitz/dev_draw.c b/fitz/dev_draw.c index 532df55d..2f25c535 100644 --- a/fitz/dev_draw.c +++ b/fitz/dev_draw.c @@ -855,6 +855,7 @@ fz_drawfreeuser(void *user) fz_device * fz_newdrawdevice(fz_glyphcache *cache, fz_pixmap *dest) { + fz_device *dev; fz_drawdevice *ddev = fz_malloc(sizeof(fz_drawdevice)); if (dest->colorspace) ddev->model = fz_keepcolorspace(dest->colorspace); @@ -866,7 +867,7 @@ fz_newdrawdevice(fz_glyphcache *cache, fz_pixmap *dest) ddev->dest = dest; ddev->cliptop = 0; - fz_device *dev = fz_newdevice(ddev); + dev = fz_newdevice(ddev); dev->freeuser = fz_drawfreeuser; dev->fillpath = fz_drawfillpath; diff --git a/fitz/dev_text.c b/fitz/dev_text.c index 57db9e8a..02ee9687 100644 --- a/fitz/dev_text.c +++ b/fitz/dev_text.c @@ -293,12 +293,13 @@ fz_textfreeuser(void *user) fz_device * fz_newtextdevice(fz_textspan *root) { + fz_device *dev; fz_textdevice *tdev = fz_malloc(sizeof(fz_textdevice)); tdev->span = root; tdev->point.x = -1; tdev->point.y = -1; - fz_device *dev = fz_newdevice(tdev); + dev = fz_newdevice(tdev); dev->freeuser = fz_textfreeuser; dev->filltext = fz_textfilltext; dev->stroketext = fz_textstroketext; |