diff options
| author | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-11-15 15:57:16 +0000 | 
|---|---|---|
| committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-11-15 15:57:16 +0000 | 
| commit | 875c34f259cfbd07ab25b56927fbb999b0de8150 (patch) | |
| tree | d9ae61c341562e49c10907521f219ab2bf462ba2 | |
| parent | [w3m-dev 03436] Check image size (diff) | |
| download | w3m-875c34f259cfbd07ab25b56927fbb999b0de8150.tar.gz w3m-875c34f259cfbd07ab25b56927fbb999b0de8150.zip | |
fix indent
| -rw-r--r-- | file.c | 8 | ||||
| -rw-r--r-- | image.c | 14 | 
2 files changed, 12 insertions, 10 deletions
| @@ -1,4 +1,4 @@ -/* $Id: file.c,v 1.119 2002/11/15 15:56:36 ukai Exp $ */ +/* $Id: file.c,v 1.120 2002/11/15 15:57:16 ukai Exp $ */  #include "fm.h"  #include <sys/types.h>  #include "myctype.h" @@ -4953,8 +4953,10 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit)  			    image->url = parsedURL2Str(&u)->ptr;  			    image->ext = filename_extension(u.file, TRUE);  			    image->cache = NULL; -			    image->width = (w > MAX_IMAGE_SIZE) ? MAX_IMAGE_SIZE: w; -			    image->height = (h > MAX_IMAGE_SIZE) ? MAX_IMAGE_SIZE: h; +			    image->width = +				(w > MAX_IMAGE_SIZE) ? MAX_IMAGE_SIZE : w; +			    image->height = +				(h > MAX_IMAGE_SIZE) ? MAX_IMAGE_SIZE : h;  			    image->xoffset = xoffset;  			    image->yoffset = yoffset;  			    image->y = currentLn(buf) - top; @@ -1,4 +1,4 @@ -/* $Id: image.c,v 1.18 2002/11/15 15:56:36 ukai Exp $ */ +/* $Id: image.c,v 1.19 2002/11/15 15:57:16 ukai Exp $ */  #include "fm.h"  #include <sys/types.h> @@ -630,16 +630,16 @@ getImageSize(ImageCache * cache)      if (h == 0)  	h = 1;      if (cache->width < 0 && cache->height < 0) { -	cache->width = (w > MAX_IMAGE_SIZE) ? MAX_IMAGE_SIZE: w; -	cache->height = (h > MAX_IMAGE_SIZE) ? MAX_IMAGE_SIZE: h; +	cache->width = (w > MAX_IMAGE_SIZE) ? MAX_IMAGE_SIZE : w; +	cache->height = (h > MAX_IMAGE_SIZE) ? MAX_IMAGE_SIZE : h;      }      else if (cache->width < 0) { -        int tmp = (int)((double)cache->height * w / h + 0.5); -	cache->width = (tmp > MAX_IMAGE_SIZE) ? MAX_IMAGE_SIZE: tmp; +	int tmp = (int)((double)cache->height * w / h + 0.5); +	cache->width = (tmp > MAX_IMAGE_SIZE) ? MAX_IMAGE_SIZE : tmp;      }      else if (cache->height < 0) { -        int tmp = (int)((double)cache->width * h / w + 0.5); -	cache->height = (tmp > MAX_IMAGE_SIZE) ? MAX_IMAGE_SIZE: tmp; +	int tmp = (int)((double)cache->width * h / w + 0.5); +	cache->height = (tmp > MAX_IMAGE_SIZE) ? MAX_IMAGE_SIZE : tmp;      }      if (cache->width == 0)  	cache->width = 1; | 
