diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | file.c | 12 | ||||
-rw-r--r-- | html.c | 7 | ||||
-rw-r--r-- | html.h | 5 |
4 files changed, 21 insertions, 11 deletions
@@ -1,3 +1,9 @@ +2007-04-19 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp> + + * [w3m-dev 04211] input type=image + * file.c, html.[ch]: avoid conflicts between input_alt and img_alt. + fix calculation of labeled line numbers when fold_line=1. + 2007-04-19 Hiroyuki Ito <ZXB01226@nifty.com> * [w3m-dev 04197] Re: italic text @@ -8794,4 +8800,4 @@ a * [w3m-dev 03276] compile error on EWS4800 * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.975 2007/04/19 11:42:29 inu Exp $ +$Id: ChangeLog,v 1.976 2007/04/19 12:00:37 inu Exp $ @@ -1,4 +1,4 @@ -/* $Id: file.c,v 1.250 2006/12/27 02:15:24 ukai Exp $ */ +/* $Id: file.c,v 1.251 2007/04/19 12:00:37 inu Exp $ */ #include "fm.h" #include <sys/types.h> #include "myctype.h" @@ -2250,7 +2250,7 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer, } else { /* plain text */ int l = atoi(pu.label); - gotoLine(b, l); + gotoRealLine(b, l); b->pos = 0; arrangeCursor(b); } @@ -3161,7 +3161,7 @@ process_img(struct parsed_tag *tag, int width) #else int w, i, nw, n; #endif - int pre_int = FALSE; + int pre_int = FALSE, ext_pre_int = FALSE; Str tmp = Strnew(); if (!parsedtag_get_value(tag, ATTR_SRC, &p)) @@ -3217,6 +3217,8 @@ process_img(struct parsed_tag *tag, int width) parsedtag_get_value(tag, ATTR_HEIGHT, &i); r = NULL; parsedtag_get_value(tag, ATTR_USEMAP, &r); + if (parsedtag_exists(tag, ATTR_PRE_INT)) + ext_pre_int = TRUE; tmp = Strnew_size(128); #ifdef USE_IMAGE @@ -3445,7 +3447,7 @@ process_img(struct parsed_tag *tag, int width) } #endif Strcat_charp(tmp, "</img_alt>"); - if (pre_int) + if (pre_int && !ext_pre_int) Strcat_charp(tmp, "</pre_int>"); if (r) { Strcat_charp(tmp, "</input_alt>"); @@ -3584,7 +3586,7 @@ process_input(struct parsed_tag *tag) Strcat(tmp, Sprintf(" width=\"%d\"", iw)); if (parsedtag_get_value(tag, ATTR_HEIGHT, &ih)) Strcat(tmp, Sprintf(" height=\"%d\"", ih)); - Strcat_charp(tmp, ">"); + Strcat_charp(tmp, " pre_int>"); Strcat_charp(tmp, "</input_alt></pre_int>"); return tmp; } @@ -1,4 +1,4 @@ -/* $Id: html.c,v 1.29 2006/12/10 11:06:12 inu Exp $ */ +/* $Id: html.c,v 1.30 2007/04/19 12:00:38 inu Exp $ */ #include "html.h" /* Define HTML Tag Infomation Table */ @@ -29,9 +29,9 @@ unsigned char ALST_PRE[] = { ATTR_FOR_TABLE, ATTR_CORE }; #define MAXA_PRE MAXA_CORE + 1 unsigned char ALST_IMG[] = { ATTR_SRC, ATTR_ALT, ATTR_WIDTH, ATTR_HEIGHT, ATTR_ALIGN, ATTR_USEMAP, - ATTR_ISMAP, ATTR_TITLE, ATTR_CORE + ATTR_ISMAP, ATTR_TITLE, ATTR_PRE_INT, ATTR_CORE }; -#define MAXA_IMG MAXA_CORE + 8 +#define MAXA_IMG MAXA_CORE + 9 unsigned char ALST_TABLE[] = { ATTR_BORDER, ATTR_WIDTH, ATTR_HBORDER, ATTR_CELLSPACING, ATTR_CELLPADDING, ATTR_VSPACE, ATTR_CORE @@ -348,4 +348,5 @@ TagAttrInfo AttrMAP[MAX_TAGATTR] = { {"referer", VTYPE_STR, AFLG_INT}, /* 71 ATTR_REFERER */ {"selectnumber", VTYPE_NUMBER, AFLG_INT}, /* 72 ATTR_SELECTNUMBER */ {"textareanumber", VTYPE_NUMBER, AFLG_INT}, /* 73 ATTR_TEXTAREANUMBER */ + {"pre_int", VTYPE_NONE, AFLG_INT}, /* 74 ATTR_PRE_INT */ }; @@ -1,4 +1,4 @@ -/* $Id: html.h,v 1.27 2006/12/10 11:06:12 inu Exp $ */ +/* $Id: html.h,v 1.28 2007/04/19 12:00:38 inu Exp $ */ #ifndef _HTML_H #define _HTML_H #ifdef USE_SSL @@ -301,8 +301,9 @@ typedef struct { #define ATTR_REFERER 71 #define ATTR_SELECTNUMBER 72 #define ATTR_TEXTAREANUMBER 73 +#define ATTR_PRE_INT 74 -#define MAX_TAGATTR 74 +#define MAX_TAGATTR 75 /* HTML Tag Information Table */ |