summaryrefslogtreecommitdiff
path: root/render/form.h
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2005-04-16 05:09:33 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2005-04-16 05:09:33 +0000
commitc17dc661eae89cea66959fad4fe48d77f1faf174 (patch)
tree1909b4157137e66b3f74adc75ca1a2bbf3bc3c6f /render/form.h
parent37a4119ab80b1a7c7e37707c4e029218bdcbe549 (diff)
downloadnetsurf-c17dc661eae89cea66959fad4fe48d77f1faf174.tar.gz
netsurf-c17dc661eae89cea66959fad4fe48d77f1faf174.tar.bz2
[project @ 2005-04-16 05:09:32 by jmb]
Split out UTF-8 handling functions. Submit URL-encoded forms in sensible encoding: * First entry in accept-charset list, if present * Document encoding, otherwise We may want to explicitly look for UTF-8, to save converting. Convert cnv_str_local_enc/cnv_local_enc_str to use iconv (they're now veneers for utf8_[to/from]_enc). Provide mechanism for looking up local system charset (derived from system alphabet, under RISC OS) svn path=/import/netsurf/; revision=1647
Diffstat (limited to 'render/form.h')
-rw-r--r--render/form.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/render/form.h b/render/form.h
index ceddd96f8..c1e01ae0a 100644
--- a/render/form.h
+++ b/render/form.h
@@ -31,6 +31,7 @@ typedef enum {
struct form {
char *action; /**< URL to submit to. */
form_method method; /**< Method and enctype. */
+ char *charset; /**< Charset to submit form in */
struct form_control *controls; /**< Linked list of controls. */
struct form_control *last_control; /**< Last control in list. */
struct form *prev; /**< Previous form in doc. */
@@ -101,7 +102,7 @@ struct form_successful_control {
struct form_successful_control *next; /**< Next in linked list. */
};
-struct form *form_new(char *action, form_method method);
+struct form *form_new(char *action, form_method method, char *charset);
struct form_control *form_new_control(form_control_type type);
void form_add_control(struct form *form, struct form_control *control);
void form_free_control(struct form_control *control);
@@ -110,7 +111,8 @@ bool form_add_option(struct form_control *control, char *value, char *text,
bool form_successful_controls(struct form *form,
struct form_control *submit_button,
struct form_successful_control **successful_controls);
-char *form_url_encode(struct form_successful_control *control);
+char *form_url_encode(struct form *form,
+ struct form_successful_control *control);
void form_free_successful(struct form_successful_control *control);
#endif