diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-05-12 16:24:50 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-05-12 16:24:50 +0000 |
commit | ca183f36c4158d5d7cc9c7d237eb4e1982a48bd5 (patch) | |
tree | f7ad75be9f8013cf7694e861833c1a65fb3b03da /form.c | |
parent | [w3m-dev 03891] Re: urimethodmap and relative URL (diff) | |
download | w3m-ca183f36c4158d5d7cc9c7d237eb4e1982a48bd5.tar.gz w3m-ca183f36c4158d5d7cc9c7d237eb4e1982a48bd5.zip |
[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 <h-saka@lsi.nec.co.jp>
Diffstat (limited to 'form.c')
-rw-r--r-- | form.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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 <name> <value> * select <name> <value> * submit [<name> [<value>]] + * image [<name> [<value>]] * textarea <name> * <value> * /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 || |