aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--file.c9
-rw-r--r--fm.h3
-rw-r--r--rc.c5
4 files changed, 23 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 9a4e914..ddccc81 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,14 @@
2010-07-19 d+w3m@vdr.jp
* [w3m-dev 04321] Re: w3m's bugs from bugs.debian.org
+ * http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=329863#8
+ * rc.c: Introduce option pseudo_inlines.
+ * fm.h: add global variable pseudoInlines.
+ * file.c (process_img): check q.
+
+2010-07-19 d+w3m@vdr.jp
+
+ * [w3m-dev 04321] Re: w3m's bugs from bugs.debian.org
* http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=537706#10
* rc.c (interpret_rc): check line->length before call Strchop().
@@ -9011,4 +9019,4 @@ a * [w3m-dev 03276] compile error on EWS4800
* release-0-2-1
* import w3m-0.2.1
-$Id: ChangeLog,v 1.1013 2010/07/19 12:25:53 htrb Exp $
+$Id: ChangeLog,v 1.1014 2010/07/19 12:53:39 htrb Exp $
diff --git a/file.c b/file.c
index f53184d..61fb050 100644
--- a/file.c
+++ b/file.c
@@ -1,4 +1,4 @@
-/* $Id: file.c,v 1.257 2010/07/19 11:45:24 htrb Exp $ */
+/* $Id: file.c,v 1.258 2010/07/19 12:53:39 htrb Exp $ */
#include "fm.h"
#include <sys/types.h>
#include "myctype.h"
@@ -3224,6 +3224,13 @@ process_img(struct parsed_tag *tag, int width)
parsedtag_get_value(tag, ATTR_ALT, &q);
t = q;
parsedtag_get_value(tag, ATTR_TITLE, &t);
+ if (q == NULL || (*q == '\0' && ignore_null_img_alt)) {
+ if (!pseudoInlines && (t == NULL ||
+ (*t == '\0' && ignore_null_img_alt)))
+ return tmp;
+ q = t;
+ }
+
w = -1;
if (parsedtag_get_value(tag, ATTR_WIDTH, &w)) {
if (w < 0) {
diff --git a/fm.h b/fm.h
index eab000b..9f54d15 100644
--- a/fm.h
+++ b/fm.h
@@ -1,4 +1,4 @@
-/* $Id: fm.h,v 1.141 2010/07/19 12:08:41 htrb Exp $ */
+/* $Id: fm.h,v 1.142 2010/07/19 12:53:39 htrb Exp $ */
/*
* w3m: WWW wo Miru utility
*
@@ -948,6 +948,7 @@ global int image_map_list init(TRUE);
#else
global int displayImage init(FALSE); /* XXX: emacs-w3m use display_image=off */
#endif
+global int pseudoInlines init(TRUE);
global char *Editor init(DEF_EDITOR);
#ifdef USE_W3MMAILER
global char *Mailer init(NULL);
diff --git a/rc.c b/rc.c
index ab2b2c5..21a34bc 100644
--- a/rc.c
+++ b/rc.c
@@ -1,4 +1,4 @@
-/* $Id: rc.c,v 1.110 2010/07/19 12:25:53 htrb Exp $ */
+/* $Id: rc.c,v 1.111 2010/07/19 12:53:39 htrb Exp $ */
/*
* Initialization file etc.
*/
@@ -75,6 +75,7 @@ static int OptionEncode = FALSE;
#define CMT_DECODE_URL N_("Display decoded URL")
#define CMT_DISPLINEINFO N_("Display current line number")
#define CMT_DISP_IMAGE N_("Display inline images")
+#define CMT_PSEUDO_INLINES N_("Display pseudo-ALTs for inline images with no ALT or TITLE string")
#ifdef USE_IMAGE
#define CMT_AUTO_IMAGE N_("Load inline images automatically")
#define CMT_MAX_LOAD_IMAGE N_("Maximum processes for parallel image loading")
@@ -385,6 +386,8 @@ struct param_ptr params1[] = {
/* XXX: emacs-w3m force to off display_image even if image options off */
{"display_image", P_INT, PI_ONOFF, (void *)&displayImage, CMT_DISP_IMAGE,
NULL},
+ {"pseudo_inlines", P_INT, PI_ONOFF, (void *)&pseudoInlines,
+ CMT_PSEUDO_INLINES, NULL},
#ifdef USE_IMAGE
{"auto_image", P_INT, PI_ONOFF, (void *)&autoImage, CMT_AUTO_IMAGE, NULL},
{"max_load_image", P_INT, PI_TEXT, (void *)&maxLoadImage,