From ca183f36c4158d5d7cc9c7d237eb4e1982a48bd5 Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Mon, 12 May 2003 16:24:50 +0000 Subject: [w3m-dev 03895] type=image support of pre_form * form.c (loadPreFOrm): add image (preFormUpdateBuffer): add FORM_INPUT_IMAGE * doc/README.pre_form: update * doc-jp/README.pre_form: ditto From: Hironori SAKAMOTO --- ChangeLog | 10 +++++++++- doc-jp/README.pre_form | 9 +++++---- doc/README.pre_form | 10 ++++++---- form.c | 8 ++++++-- 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index db76082..f6ff712 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2003-05-13 Hironori SAKAMOTO + + * [w3m-dev 03895] type=image support of pre_form + * form.c (loadPreFOrm): add image + (preFormUpdateBuffer): add FORM_INPUT_IMAGE + * doc/README.pre_form: update + * doc-jp/README.pre_form: ditto + 2003-05-11 Fumitoshi UKAI * [w3m-dev 03891] Re: urimethodmap and relative URL @@ -7796,4 +7804,4 @@ a * [w3m-dev 03276] compile error on EWS4800 * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.833 2003/05/10 18:20:29 ukai Exp $ +$Id: ChangeLog,v 1.834 2003/05/12 16:24:50 ukai Exp $ diff --git a/doc-jp/README.pre_form b/doc-jp/README.pre_form index 08efe4b..eef127f 100644 --- a/doc-jp/README.pre_form +++ b/doc-jp/README.pre_form @@ -14,7 +14,8 @@ password checkbox [] radio section -submit [] +submit [ []] +image [ []] textarea : @@ -28,7 +29,7 @@ input, select または textarea 要素の value 属性を設定します。 checkbox, radio は name 属性と value 属性が一致する input 要素を check します。 が 0、no または off の場合は checkbox の check を外します。 -submit の場合、 が設定してある時は、一致する name 属性を持つ -input 要素を submit します。 が設定していない場合は、最後の -input type=submit 要素を submit します。 +submit, image の場合、 が設定してある時は、一致する name 属性 +(と value 属性)を持つ input 要素を submit します。 を設定して +いない場合は、最後の input type=submit 要素を submit します。 は、シェルの様に \,'〜',"〜" でクォート可能です。 diff --git a/doc/README.pre_form b/doc/README.pre_form index 1f9fc10..972ef90 100644 --- a/doc/README.pre_form +++ b/doc/README.pre_form @@ -16,7 +16,8 @@ password checkbox [] radio section -submit [] +submit [ []] +image [ []] textarea : @@ -33,9 +34,10 @@ The line beginning with checkbox, radio means that it will check input element which name and value attribute matches with and respectively. If is 0, no, or off, disable check of the checkbox. -The line beginning with submit means that it will submit input element which -name attribute matches with , or submit last -element if no specified. +The line beginning with submit or image means that it will submit input +element which name attribute matches with (and value attribute +matches with ), or submit last element if no + specified. You quote \, ' (single-quote) or " (double quote) as you do in shell. diff --git a/form.c b/form.c index 29a0992..34392c1 100644 --- a/form.c +++ b/form.c @@ -1,4 +1,4 @@ -/* $Id: form.c,v 1.30 2003/01/29 17:10:38 ukai Exp $ */ +/* $Id: form.c,v 1.31 2003/05/12 16:24:53 ukai Exp $ */ /* * HTML forms */ @@ -727,6 +727,7 @@ add_pre_form_item(struct pre_form *pf, struct pre_form_item *prev, int type, * radio * select * submit [ []] + * image [ []] * textarea * * /textarea @@ -810,6 +811,8 @@ loadPreForm(void) type = FORM_INPUT_RADIO; else if (!strcmp(s, "submit")) type = FORM_INPUT_SUBMIT; + else if (!strcmp(s, "image")) + type = FORM_INPUT_IMAGE; else if (!strcmp(s, "select")) type = FORM_SELECT; else if (!strcmp(s, "textarea")) { @@ -873,7 +876,8 @@ preFormUpdateBuffer(Buffer *buf) for (pi = pf->item; pi; pi = pi->next) { if (pi->type != fi->type) continue; - if (pi->type == FORM_INPUT_SUBMIT) { + if (pi->type == FORM_INPUT_SUBMIT || + pi->type == FORM_INPUT_IMAGE) { if ((!pi->name || !*pi->name || (fi->name && !Strcmp_charp(fi->name, pi->name))) && (!pi->value || !*pi->value || -- cgit v1.2.3