aboutsummaryrefslogtreecommitdiffstats
path: root/image.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-11-15 15:51:23 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-11-15 15:51:23 +0000
commit073f8a91054a0b84fc2a3c6feaada832d2818bf7 (patch)
treedb50876cd427e92a1173013500373b04e40e4778 /image.c
parentfix indent (diff)
downloadw3m-073f8a91054a0b84fc2a3c6feaada832d2818bf7.tar.gz
w3m-073f8a91054a0b84fc2a3c6feaada832d2818bf7.zip
[w3m-dev 03435] save image with SAVE
* buffer.c (discardBuffer): check image * file.c (loadImageBuffer): add st IMG_FLAG_DONE_REMOVE s/sourcefile/mailcap_source/ * fm.h (IMG_FLAG_DONT_REMOVE): added * image.c (drawImage): & IMG_FLAG_LOADED (deleteImage): & IMG_FLAG_DONT_REMOVE (showImageProgress): & IMG_FLAG_LOADED (getImage): & IMG_FLAG_LOADED (getImageSize): & IMG_FLAG_LOADED * main.c (vmSrc): delete ifdef USE_IMAGE From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to '')
-rw-r--r--image.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/image.c b/image.c
index 099b13f..1c56c92 100644
--- a/image.c
+++ b/image.c
@@ -1,4 +1,4 @@
-/* $Id: image.c,v 1.16 2002/11/09 21:55:24 ukai Exp $ */
+/* $Id: image.c,v 1.17 2002/11/15 15:51:24 ukai Exp $ */
#include "fm.h"
#include <sys/types.h>
@@ -203,7 +203,7 @@ drawImage()
return;
for (j = 0; j < n_terminal_image; j++) {
i = &terminal_image[j];
- if (!(i->cache->loaded == IMG_FLAG_LOADED &&
+ if (!(i->cache->loaded & IMG_FLAG_LOADED &&
i->width > 0 && i->height > 0))
continue;
if (!(Imgdisplay_rf && Imgdisplay_wf)) {
@@ -319,6 +319,7 @@ deleteImage(Buffer *buf)
for (i = 0, a = al->anchors; i < al->nanchor; i++, a++) {
if (a->image && a->image->cache &&
a->image->cache->loaded != IMG_FLAG_UNLOADED &&
+ !(a->image->cache->loaded & IMG_FLAG_DONT_REMOVE) &&
a->image->cache->index < 0)
unlink(a->image->cache->file);
}
@@ -360,7 +361,7 @@ showImageProgress(Buffer *buf)
for (i = 0, l = 0, n = 0, a = al->anchors; i < al->nanchor; i++, a++) {
if (a->image && a->hseq >= 0) {
n++;
- if (a->image->cache && a->image->cache->loaded == IMG_FLAG_LOADED)
+ if (a->image->cache && a->image->cache->loaded & IMG_FLAG_LOADED)
l++;
}
}
@@ -587,7 +588,7 @@ getImage(Image * image, ParsedURL *current, int flag)
if (!cache->index)
cache->index = ++image_index;
}
- if (cache->loaded == IMG_FLAG_LOADED)
+ if (cache->loaded & IMG_FLAG_LOADED)
getImageSize(cache);
return cache;
}
@@ -600,7 +601,7 @@ getImageSize(ImageCache * cache)
if (!activeImage)
return FALSE;
- if (!cache || cache->loaded != IMG_FLAG_LOADED ||
+ if (!cache || !(cache->loaded & IMG_FLAG_LOADED) ||
(cache->width > 0 && cache->height > 0))
return FALSE;
tmp = Strnew();