summaryrefslogtreecommitdiff
path: root/image/jpeg.c
diff options
context:
space:
mode:
authorFran├žois Revel <mmu_man@netsurf-browser.org>2008-07-29 09:25:54 +0000
committerFran├žois Revel <mmu_man@netsurf-browser.org>2008-07-29 09:25:54 +0000
commitd49fc659235759fd8f09a02ae8bdca7a61af5f0b (patch)
treee468fcd02ac26dcb5617e2928ee5c870d81407f2 /image/jpeg.c
parentaf7be03db3dab8365afadd37b45603a535e5dbe6 (diff)
downloadnetsurf-d49fc659235759fd8f09a02ae8bdca7a61af5f0b.tar.gz
netsurf-d49fc659235759fd8f09a02ae8bdca7a61af5f0b.tar.bz2
C89 again
svn path=/trunk/netsurf/; revision=4793
Diffstat (limited to 'image/jpeg.c')
-rw-r--r--image/jpeg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/image/jpeg.c b/image/jpeg.c
index 21d3773f7..ec2e62899 100644
--- a/image/jpeg.c
+++ b/image/jpeg.c
@@ -123,6 +123,7 @@ bool nsjpeg_convert(struct content *c, int w, int h)
rowstride = bitmap_get_rowstride(bitmap);
do {
+ int i;
JSAMPROW scanlines[1];
scanlines[0] = (JSAMPROW) (pixels +
rowstride * cinfo.output_scanline);
@@ -130,7 +131,7 @@ bool nsjpeg_convert(struct content *c, int w, int h)
#if RGB_RED != 0 || RGB_GREEN != 1 || RGB_BLUE != 2 || RGB_PIXELSIZE != 4
/* expand to RGBA */
- for (int i = width - 1; 0 <= i; i--) {
+ for (i = width - 1; 0 <= i; i--) {
int r = scanlines[0][i * RGB_PIXELSIZE + RGB_RED];
int g = scanlines[0][i * RGB_PIXELSIZE + RGB_GREEN];
int b = scanlines[0][i * RGB_PIXELSIZE + RGB_BLUE];