From 51d149442489d7515aceb0909d6e1e5a28cf0531 Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Sat, 21 Nov 2009 05:36:09 -0800 Subject: fixed whitespace --- src/bmp.c | 2 +- src/gif.c | 2 +- src/jpeg.c | 2 +- src/netpbm.c | 18 +++++++++--------- src/png.c | 10 +++++----- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/bmp.c b/src/bmp.c index 6fea4bf..01a4970 100644 --- a/src/bmp.c +++ b/src/bmp.c @@ -102,7 +102,7 @@ struct image *bmp_open(FILE *f){ b->rowwidth += 4 - (b->rowwidth & 3); } - b->img.fmt = &bmp; + b->img.fmt = &bmp; return (struct image *)b; } diff --git a/src/gif.c b/src/gif.c index 8887efd..ef6c312 100644 --- a/src/gif.c +++ b/src/gif.c @@ -45,7 +45,7 @@ static struct image *gif_open(FILE *f){ g->img.bufwidth = gif->SWidth; g->img.bufheight = gif->SHeight; - g->img.fmt = &giflib; + g->img.fmt = &giflib; return (struct image *)g; } diff --git a/src/jpeg.c b/src/jpeg.c index fbe53f6..d10cede 100644 --- a/src/jpeg.c +++ b/src/jpeg.c @@ -52,7 +52,7 @@ static struct image *jpeg_open(FILE *f){ j->jerr.pub.error_exit = error_exit; - j->img.fmt = &libjpeg; + j->img.fmt = &libjpeg; return (struct image *)j; } diff --git a/src/netpbm.c b/src/netpbm.c index dbd3d16..951bfd9 100644 --- a/src/netpbm.c +++ b/src/netpbm.c @@ -8,7 +8,7 @@ struct netpbm_t{ struct image img; FILE *f; - char format; + char format; unsigned int maxval; }; @@ -68,14 +68,14 @@ static unsigned char readvali(struct netpbm_t *b){ } static unsigned char readvalb(struct netpbm_t *b){ - if(b->maxval == 65535){ - int val = fgetc(b->f) << 8; - val |= fgetc(b->f); - return val * 255 / b->maxval; - }else{ - int val = fgetc(b->f); - return val * 255 / b->maxval; - } + if(b->maxval == 65535){ + int val = fgetc(b->f) << 8; + val |= fgetc(b->f); + return val * 255 / b->maxval; + }else{ + int val = fgetc(b->f); + return val * 255 / b->maxval; + } } int netpbm_read(struct image *img){ diff --git a/src/png.c b/src/png.c index 4dea588..9e9077d 100644 --- a/src/png.c +++ b/src/png.c @@ -57,14 +57,14 @@ struct image *png_open(FILE *f){ p->img.bufwidth = png_get_image_width(p->png_ptr, p->info_ptr); p->img.bufheight = png_get_image_height(p->png_ptr, p->info_ptr); - p->img.fmt = &libpng; + p->img.fmt = &libpng; return (struct image *)p; } int png_read(struct image *img){ unsigned int y; - png_bytepp row_pointers; + png_bytepp row_pointers; struct png_t *p = (struct png_t *)img; if(setjmp(png_jmpbuf(p->png_ptr))){ @@ -93,11 +93,11 @@ int png_read(struct image *img){ png_read_update_info(p->png_ptr, p->info_ptr); } - row_pointers = (png_bytepp)malloc(img->bufheight * sizeof(png_bytep)); - for(y = 0; y < img->bufheight; y++) + row_pointers = (png_bytepp)malloc(img->bufheight * sizeof(png_bytep)); + for(y = 0; y < img->bufheight; y++) row_pointers[y] = img->buf + y * img->bufwidth * 3; - png_read_image(p->png_ptr, row_pointers); + png_read_image(p->png_ptr, row_pointers); free(row_pointers); img->state = LOADED; -- cgit v1.2.3