aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2003-01-10 16:08:19 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2003-01-10 16:08:19 +0000
commit900d16573c6efcdca06925ca66f9fe9ef5a845ec (patch)
tree024475070996701b912eab600528e8cc63a43754 /main.c
parent[w3m-dev 03619] Re: Error occured while reset (diff)
downloadw3m-900d16573c6efcdca06925ca66f9fe9ef5a845ec.tar.gz
w3m-900d16573c6efcdca06925ca66f9fe9ef5a845ec.zip
[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>
Diffstat (limited to '')
-rw-r--r--main.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/main.c b/main.c
index af395b7..b1224d9 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.186 2003/01/09 15:30:48 ukai Exp $ */
+/* $Id: main.c,v 1.187 2003/01/10 16:08:23 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -886,7 +886,8 @@ main(int argc, char **argv, char **envp)
}
else if (newbuf == NO_BUFFER)
continue;
- newbuf->search_header = search_header;
+ if (newbuf->pagerSource || strcmp(newbuf->currentURL.file, "-"))
+ newbuf->search_header = search_header;
if (CurrentTab == NULL) {
FirstTab = LastTab = CurrentTab = newTab();
nTab = 1;
@@ -4409,12 +4410,15 @@ vwSrc(void)
char old_code = DocumentCode;
DocumentCode = Currentbuf->document_code;
#endif
+ SkipHeader = Currentbuf->search_header;
buf = loadFile(fn);
#ifdef JP_CHARSET
DocumentCode = old_code;
#endif
+ SkipHeader = FALSE;
if (buf == NULL)
return;
+ buf->search_header = Currentbuf->search_header;
buf->type = "text/plain";
if (Currentbuf->real_type &&
!strcasecmp(Currentbuf->real_type, "text/html"))
@@ -4427,11 +4431,14 @@ vwSrc(void)
Currentbuf->linkBuffer[LB_SOURCE] = buf;
}
else if (!strcasecmp(Currentbuf->type, "text/plain")) {
+ SkipHeader = Currentbuf->search_header;
DefaultType = "text/html";
buf = loadGeneralFile(file_to_url(fn), NULL, NO_REFERER, 0, NULL);
+ SkipHeader = FALSE;
DefaultType = NULL;
if (buf == NULL || buf == NO_BUFFER)
return;
+ buf->search_header = Currentbuf->search_header;
if (Currentbuf->real_type &&
!strcasecmp(Currentbuf->real_type, "text/plain"))
buf->real_type = "text/html";