diff options
author | Ito Hiroyuki <ZXB01226@nifty.com> | 2010-07-18 14:10:09 +0000 |
---|---|---|
committer | Ito Hiroyuki <ZXB01226@nifty.com> | 2010-07-18 14:10:09 +0000 |
commit | 6a2579bb264742a07cdbbd52c21cb6d74324ddef (patch) | |
tree | b18c8bb5e238fc8903cf2a3b7dd4665e41b4b04d /main.c | |
parent | set line->size (diff) | |
download | w3m-6a2579bb264742a07cdbbd52c21cb6d74324ddef.tar.gz w3m-6a2579bb264742a07cdbbd52c21cb6d74324ddef.zip |
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=242599#21
* file.c
(is_html_type): added.
(examineFile, loadGeneralFile, _saveBuffer)
(openGeneralPagerBuffer, reloadBuffer): use is_html_type() instead of strcasecmp().
(loadGeneralFile): set f.guess_tupe
* display.c
(displayBuffer): use is_html_type() instead of strcasecmp().
* buffer.c
(reshapeBuffer): use is_html_type() instead of strcasecmp().
* backend.c
(internal_get): use is_html_type() instead of strcasecmp().
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.259 2007/06/04 13:21:10 inu Exp $ */ +/* $Id: main.c,v 1.260 2010/07/18 14:10:09 htrb Exp $ */ #define MAINPROGRAM #include "fm.h" #include <signal.h> @@ -4616,10 +4616,10 @@ DEFUN(vwSrc, SOURCE VIEW, "View HTML source") buf = newBuffer(INIT_BUFFER_WIDTH); - if (!strcasecmp(Currentbuf->type, "text/html")) { + if (is_html_type(Currentbuf->type)) { buf->type = "text/plain"; if (Currentbuf->real_type && - !strcasecmp(Currentbuf->real_type, "text/html")) + is_html_type(Currentbuf->real_type)) buf->real_type = "text/plain"; else buf->real_type = Currentbuf->real_type; @@ -4769,8 +4769,8 @@ DEFUN(reload, RELOAD, "Reload buffer") repBuffer(Currentbuf, buf); if ((buf->type != NULL) && (sbuf.type != NULL) && ((!strcasecmp(buf->type, "text/plain") && - !strcasecmp(sbuf.type, "text/html")) || - (!strcasecmp(buf->type, "text/html") && + is_html_type(sbuf.type)) || + (is_html_type(buf->type) && !strcasecmp(sbuf.type, "text/plain")))) { vwSrc(); if (Currentbuf != buf) @@ -5092,7 +5092,7 @@ DEFUN(dispI, DISPLAY_IMAGE, "Restart loading and drawing of images") return; displayImage = TRUE; /* - * if (!(Currentbuf->type && !strcmp(Currentbuf->type, "text/html"))) + * if (!(Currentbuf->type && is_html_type(Currentbuf->type))) * return; */ Currentbuf->image_flag = IMG_FLAG_AUTO; @@ -5105,7 +5105,7 @@ DEFUN(stopI, STOP_IMAGE, "Stop loading and drawing of images") if (!activeImage) return; /* - * if (!(Currentbuf->type && !strcmp(Currentbuf->type, "text/html"))) + * if (!(Currentbuf->type && is_html_type(Currentbuf->type))) * return; */ Currentbuf->image_flag = IMG_FLAG_SKIP; |