From db2d61187d34d41221dd345bdfbb8741307b2f87 Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Wed, 13 Mar 2002 15:48:20 +0000 Subject: [w3m-dev 03125] w3m -m < image * file.c (openGeneralPagerBuffer): use internal viewer for -m option From: Hironori Sakamoto --- ChangeLog | 7 ++++++- file.c | 11 ++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 33ded8b..58b6925 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-03-14 Hironori Sakamoto + + * [w3m-dev 03125] w3m -m < image + * file.c (openGeneralPagerBuffer): use internal viewer for -m option + 2002-03-13 Hironori Sakamoto * [w3m-dev 03116] Re: aligned block in @@ -3127,4 +3132,4 @@ * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.344 2002/03/12 16:59:50 ukai Exp $ +$Id: ChangeLog,v 1.345 2002/03/13 15:48:20 ukai Exp $ diff --git a/file.c b/file.c index fb48e36..580397c 100644 --- a/file.c +++ b/file.c @@ -1,4 +1,4 @@ -/* $Id: file.c,v 1.82 2002/03/12 16:59:50 ukai Exp $ */ +/* $Id: file.c,v 1.83 2002/03/13 15:48:20 ukai Exp $ */ #include "fm.h" #include #include "myctype.h" @@ -6675,6 +6675,15 @@ openGeneralPagerBuffer(InputStream stream) buf = openPagerBuffer(stream, t_buf); buf->type = "text/plain"; } +#ifdef USE_IMAGE + else if (activeImage && displayImage && !useExtImageViewer && + !(w3m_dump & ~DUMP_FRAME) && !strncasecmp(t, "image/", 6)) { + cur_baseURL = New(ParsedURL); + parseURL("-", cur_baseURL, NULL); + buf = loadImageBuffer(&uf, t_buf); + buf->type = t; + } +#endif else { if (doExternal(uf, "-", t, &buf, t_buf)) { if (buf == NULL || buf == NO_BUFFER) -- cgit v1.2.3