diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-03-14 16:12:02 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-03-14 16:12:02 +0000 |
commit | 739eb5f7ab4d8d10e054ba80813bc1d9e3307450 (patch) | |
tree | 16824ac9f18cd2fa93458381c83d4579fa047761 /buffer.c | |
parent | * proto.h (readHeader): added (diff) | |
download | w3m-739eb5f7ab4d8d10e054ba80813bc1d9e3307450.tar.gz w3m-739eb5f7ab4d8d10e054ba80813bc1d9e3307450.zip |
[w3m-dev 03129] Re: X-Face
* configure (use_xface): ask
* fm.h (_Buffer): add header_source
* buffer.c (reshapeBuffer): fix reshape when reading stdin with image
fix disappearing header when reading stdin
* file.c (xface2xbm): check file existence
* file.c (readHeader): save to tmp file
X-Face when activeImage & displayImage
* main.c (dispI): comment out checking content type
* main.c (stopI): ditto
* scripts/xface2xbm.in: update compface URL
read from file $XF
write to file $XBM
From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to '')
-rw-r--r-- | buffer.c | 23 |
1 files changed, 16 insertions, 7 deletions
@@ -1,4 +1,4 @@ -/* $Id: buffer.c,v 1.11 2002/03/13 15:51:36 ukai Exp $ */ +/* $Id: buffer.c,v 1.12 2002/03/14 16:12:05 ukai Exp $ */ #include "fm.h" #ifdef USE_MOUSE @@ -497,15 +497,11 @@ reshapeBuffer(Buffer *buf) buf->need_reshape = FALSE; if (buf->sourcefile == NULL) return; - if (buf->currentURL.scheme == SCM_LOCAL && - !strcmp(buf->currentURL.file, "-")) - return; init_stream(&f, SCM_LOCAL, NULL); examineFile(buf->mailcap_source ? buf->mailcap_source : buf->sourcefile, &f); if (f.stream == NULL) return; - copyBuffer(&sbuf, buf); clearBuffer(buf); while (buf->frameset) { @@ -523,8 +519,21 @@ reshapeBuffer(Buffer *buf) UseContentCharset = FALSE; UseAutoDetect = FALSE; #endif - if (buf->search_header && buf->currentURL.scheme == SCM_LOCAL) - readHeader(&f, buf, TRUE, NULL); + if (buf->search_header && buf->currentURL.scheme == SCM_LOCAL) { + if (buf->header_source && (buf->mailcap_source || + !strcmp(buf->currentURL.file, "-"))) { + URLFile h; + init_stream(&h, SCM_LOCAL, NULL); + examineFile(buf->header_source, &h); + if (h.stream) { + readHeader(&h, buf, TRUE, NULL); + UFclose(&h); + } + } + else + readHeader(&f, buf, TRUE, NULL); + } + if (!strcasecmp(buf->type, "text/html")) loadHTMLBuffer(&f, buf); else |