From 0369c273f23b727b155180671933727d61e2035e Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Tue, 27 Nov 2001 18:23:33 +0000 Subject: [w3m-dev 02578] From: Fumitoshi UKAI --- file.c | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) (limited to 'file.c') diff --git a/file.c b/file.c index bd7d406..22011f9 100644 --- a/file.c +++ b/file.c @@ -1,4 +1,4 @@ -/* $Id: file.c,v 1.15 2001/11/25 17:41:57 ukai Exp $ */ +/* $Id: file.c,v 1.16 2001/11/27 18:23:33 ukai Exp $ */ #include "fm.h" #include #include "myctype.h" @@ -2324,8 +2324,9 @@ process_anchor(struct parsed_tag *tag, char *tagbuf) Str process_input(struct parsed_tag *tag) { - int i, w, v, x, y, z; + int i, w, v, x, y, z, iw, ih; char *q, *p, *r, *p2; + char *pi = NULL; Str tmp; char *qq = ""; int qlen = 0; @@ -2360,10 +2361,11 @@ process_input(struct parsed_tag *tag) case FORM_INPUT_RESET: q = "RESET"; break; - /* if no VALUE attribute is specified in * tag, then the value "on" is used * as a - * default value. It is not a part of HTML4.0 * specification, - * but an imitation of Netscape * behaviour. */ + /* if no VALUE attribute is specified in + * tag, then the value "on" is used + * as a default value. It is not a part of HTML4.0 + * specification, but an imitation of Netscape behaviour. + */ case FORM_INPUT_CHECKBOX: q = "on"; } @@ -2434,20 +2436,31 @@ process_input(struct parsed_tag *tag) } break; case FORM_INPUT_IMAGE: + parsedtag_get_value(tag, ATTR_SRC, &pi); + if (pi) { + Strcat(tmp, Sprintf(""); + if (p2) + Strcat_charp(tmp, html_quote(p2)); + else + Strcat_charp(tmp, qq); + Strcat_charp(tmp, ""); + break; + } + /* FALL THROUGH */ case FORM_INPUT_SUBMIT: case FORM_INPUT_BUTTON: - if (p2) { + if (p2) Strcat_charp(tmp, html_quote(p2)); - i = strlen(p2); - } - else { + else Strcat_charp(tmp, qq); - i = qlen; - } break; case FORM_INPUT_RESET: Strcat_charp(tmp, qq); - i = qlen; break; case FORM_INPUT_RADIO: case FORM_INPUT_CHECKBOX: @@ -3963,8 +3976,7 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit) /* nothing to do */ break; case HTML_AREA: - if (buf->maplist == NULL) /* outside of * - * * * * * .. */ + if (buf->maplist == NULL) /* outside of .. */ break; if (parsedtag_get_value(tag, ATTR_HREF, &p)) { p = remove_space(p); -- cgit v1.2.3