diff options
Diffstat (limited to '')
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | fm.h | 3 | ||||
-rw-r--r-- | image.c | 26 | ||||
-rw-r--r-- | rc.c | 3 |
5 files changed, 26 insertions, 17 deletions
@@ -1,4 +1,12 @@ 2002-07-23 Hiroyuki Ito <hito@crl.go.jp> + + * [w3m-dev 03280] w3m-img without w3mimgsize + * fm.h (Imagesize): deleted + * image.c (getImageSize): rewrite to use w3mimgdisplay + instead of w3mimgsize + * rc.c (params1): remove imgsize, merged to imgdisplay + +2002-07-23 Hiroyuki Ito <hito@crl.go.jp> * [w3m-dev 03279] w3m-img for framebuffer update http://homepage3.nifty.com/slokar/fb/w3mfb.patch.gz @@ -3646,4 +3654,4 @@ * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.412 2002/07/22 16:17:32 ukai Exp $ +$Id: ChangeLog,v 1.413 2002/07/22 16:27:30 ukai Exp $ @@ -1,5 +1,6 @@ w3m 0.4? +* rc: imgsize: obsoleted * w3m-img for framebuffer merged ---------------------------------------------------------------- @@ -1,4 +1,4 @@ -/* $Id: fm.h,v 1.60 2002/06/01 16:50:16 ukai Exp $ */ +/* $Id: fm.h,v 1.61 2002/07/22 16:27:31 ukai Exp $ */ /* * w3m: WWW wo Miru utility * @@ -822,7 +822,6 @@ global int showLineNum init(FALSE); global int show_srch_str init(TRUE); #ifdef USE_IMAGE global char *Imgdisplay init(IMGDISPLAY); -global char *Imgsize init(IMGSIZE); global int activeImage init(FALSE); global int displayImage init(TRUE); global int autoImage init(TRUE); @@ -1,4 +1,4 @@ -/* $Id: image.c,v 1.9 2002/04/17 02:36:45 ukai Exp $ */ +/* $Id: image.c,v 1.10 2002/07/22 16:27:31 ukai Exp $ */ #include "fm.h" #include <sys/types.h> @@ -588,7 +588,6 @@ int getImageSize(ImageCache * cache) { Str tmp; - FILE *f; int w = 0, h = 0; if (!activeImage) @@ -597,18 +596,21 @@ getImageSize(ImageCache * cache) (cache->width > 0 && cache->height > 0)) return FALSE; tmp = Strnew(); - if (!strchr(Imgsize, '/')) - Strcat_m_charp(tmp, w3m_lib_dir(), "/", NULL); - Strcat_m_charp(tmp, Imgsize, " ", shell_quote(cache->file), - " 2> /dev/null", NULL); - f = popen(tmp->ptr, "r"); - if (!f) + if (!(Imgdisplay_rf && Imgdisplay_wf)) { + if (!openImgdisplay()) return FALSE; - while (fscanf(f, "%d %d", &w, &h) < 0) { - if (feof(f)) - break; } - pclose(f); + fputs("5;", Imgdisplay_wf); /* Get Size */ + fputs(cache->file, Imgdisplay_wf); + fputs("\n", Imgdisplay_wf); + fflush(Imgdisplay_wf); + { + char buf[1024]; + fgets(buf, sizeof(buf), Imgdisplay_rf); + if(sscanf(buf, "%d %d", &w, &h) != 2) { + return FALSE; + } + } if (!(w > 0 && h > 0)) return FALSE; @@ -1,4 +1,4 @@ -/* $Id: rc.c,v 1.46 2002/06/01 17:10:37 ukai Exp $ */ +/* $Id: rc.c,v 1.47 2002/07/22 16:27:31 ukai Exp $ */ /* * Initialization file etc. */ @@ -494,7 +494,6 @@ struct param_ptr params1[] = { NULL}, {"imgdisplay", P_STRING, PI_TEXT, (void *)&Imgdisplay, CMT_IMGDISPLAY, NULL}, - {"imgsize", P_STRING, PI_TEXT, (void *)&Imgsize, CMT_IMGSIZE, NULL}, #endif {"show_lnum", P_INT, PI_ONOFF, (void *)&showLineNum, CMT_SHOW_NUM, NULL}, {"show_srch_str", P_INT, PI_ONOFF, (void *)&show_srch_str, |