[w3m-dev 03620] -m option and header

* buffer.c (reshapeBuffer): fix reading from stdin
			fix -m option
* display.c (redrawNLine): rewrite
	(redrawLine): return l instead of l->next
	(redrawLineImage): ditto
* file.c (loadFile): read header even if skip header
	(loadGeneralFile): read header even if skip header
* fm.h (SkipHeader): added
* main.c (main): check whether reading from stdin
		SkipHeader
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
This commit is contained in:
Fumitoshi UKAI
2003-01-10 16:08:19 +00:00
parent 0cf4f52a13
commit 900d16573c
6 changed files with 53 additions and 35 deletions

View File

@@ -1,4 +1,4 @@
/* $Id: buffer.c,v 1.16 2002/12/02 17:27:36 ukai Exp $ */
/* $Id: buffer.c,v 1.17 2003/01/10 16:08:20 ukai Exp $ */
#include "fm.h"
#ifdef USE_MOUSE
@@ -530,9 +530,9 @@ reshapeBuffer(Buffer *buf)
UseContentCharset = FALSE;
UseAutoDetect = FALSE;
#endif
if (buf->search_header && buf->currentURL.scheme == SCM_LOCAL) {
if (buf->header_source && (buf->mailcap_source ||
!strcmp(buf->currentURL.file, "-"))) {
if (buf->header_source) {
if (buf->currentURL.scheme != SCM_LOCAL ||
buf->mailcap_source || !strcmp(buf->currentURL.file, "-")) {
URLFile h;
init_stream(&h, SCM_LOCAL, NULL);
examineFile(buf->header_source, &h);
@@ -540,8 +540,8 @@ reshapeBuffer(Buffer *buf)
readHeader(&h, buf, TRUE, NULL);
UFclose(&h);
}
}
else
}
else if (buf->search_header) /* -m option */
readHeader(&f, buf, TRUE, NULL);
}