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 --- form.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'form.c') 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