aboutsummaryrefslogtreecommitdiffstats
path: root/frame.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2003-01-09 15:30:20 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2003-01-09 15:30:20 +0000
commit0cf4f52a13161e1ed57ecf4e682d3bb945528cb8 (patch)
tree9392549495a5321f60c061064b287b7777e9bfd7 /frame.c
parent[w3m-dev 03617] sourcefile when Content-Encoding: is specified. (diff)
downloadw3m-0cf4f52a13161e1ed57ecf4e682d3bb945528cb8.tar.gz
w3m-0cf4f52a13161e1ed57ecf4e682d3bb945528cb8.zip
[w3m-dev 03619] Re: Error occured while reset
* file.c (process_img): check image.ext (HTMLlineproc2body): check image.ext (loadImageBuffer): url, ext is in URLFile * frame.c (unloadFrame): no need to push to fileToDelete (copyFrame): no need to reset FB_TODELETE (resetFrameElement): f_body->source, buf->sourcefile (frame_download_source): buf->source buf->sourcefile reset * frame.h (FB_NOCACHE): deleted (FB_TODELETE): deleted * main.c (vmSrc): Currentbuf->sourcefile need_reshape if images exist From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to 'frame.c')
-rw-r--r--frame.c35
1 files changed, 5 insertions, 30 deletions
diff --git a/frame.c b/frame.c
index 20781d8..8a27772 100644
--- a/frame.c
+++ b/frame.c
@@ -1,4 +1,4 @@
-/* $Id: frame.c,v 1.27 2002/12/14 15:28:37 ukai Exp $ */
+/* $Id: frame.c,v 1.28 2003/01/09 15:30:43 ukai Exp $ */
#include "fm.h"
#include "parsetagx.h"
#include "myctype.h"
@@ -107,8 +107,6 @@ newFrame(struct parsed_tag *tag, Buffer *buf)
static void
unloadFrame(struct frame_body *b)
{
- if (b->source && b->flags & FB_TODELETE)
- pushText(fileToDelete, b->source);
b->attr = F_UNLOADED;
}
@@ -177,7 +175,6 @@ copyFrame(struct frame_body *ob)
rb = New(struct frame_body);
bcopy((const void *)ob, (void *)rb, sizeof(struct frame_body));
- rb->flags &= ~FB_TODELETE;
return rb;
}
@@ -316,21 +313,12 @@ resetFrameElement(union frameset_element *f_element,
f_body->attr = F_BODY;
f_body->name = f_name;
f_body->url = parsedURL2Str(&buf->currentURL)->ptr;
+ f_body->source = buf->sourcefile;
+ buf->sourcefile = NULL;
if (buf->mailcap_source) {
f_body->source = buf->mailcap_source;
- f_body->flags |= FB_TODELETE;
buf->mailcap_source = NULL;
}
- else if (buf->real_scheme == SCM_LOCAL) {
- f_body->source = buf->sourcefile;
- }
- else {
- Str tmp = tmpfname(TMPF_FRAME, NULL);
- rename(buf->sourcefile, tmp->ptr);
- f_body->source = tmp->ptr;
- f_body->flags |= FB_TODELETE;
- buf->sourcefile = NULL;
- }
f_body->type = buf->type;
f_body->referer = referer;
f_body->request = request;
@@ -345,7 +333,6 @@ frame_download_source(struct frame_body *b, ParsedURL *currentURL,
{
Buffer *buf;
struct frameset *ret_frameset = NULL;
- Str tmp;
ParsedURL url;
if (b == NULL || b->url == NULL || b->url[0] == '\0')
@@ -381,25 +368,13 @@ frame_download_source(struct frame_body *b, ParsedURL *currentURL,
return NULL;
}
b->url = parsedURL2Str(&buf->currentURL)->ptr;
- b->source = buf->sourcefile;
b->type = buf->type;
+ b->source = buf->sourcefile;
+ buf->sourcefile = NULL;
if (buf->mailcap_source) {
b->source = buf->mailcap_source;
- b->flags |= FB_TODELETE;
buf->mailcap_source = NULL;
}
- else if ((buf->real_scheme != SCM_LOCAL)
-#ifdef USE_IMAGE
- || (activeImage && !useExtImageViewer &&
- buf->real_type && !strncasecmp(buf->real_type, "image/", 6))
-#endif
- ) {
- tmp = tmpfname(TMPF_FRAME, NULL);
- rename(buf->sourcefile, tmp->ptr);
- b->source = tmp->ptr;
- b->flags |= FB_TODELETE;
- buf->sourcefile = NULL;
- }
b->attr = F_BODY;
if (buf->frameset) {
ret_frameset = buf->frameset;