diff options
author | Ole Loots <ole@monochrom.net> | 2012-12-21 14:05:55 +0100 |
---|---|---|
committer | Ole Loots <ole@monochrom.net> | 2012-12-21 14:05:55 +0100 |
commit | 858b8a5a0ad13be8ca57e76c34e1a1bbe993fb07 (patch) | |
tree | 587b8906ac01adbee9349940defc8e6b7a7892d0 /desktop/options.c | |
parent | 15f8a056d5daca0600fbb11485060ac3337ffebe (diff) | |
download | netsurf-858b8a5a0ad13be8ca57e76c34e1a1bbe993fb07.tar.gz netsurf-858b8a5a0ad13be8ca57e76c34e1a1bbe993fb07.tar.bz2 |
HTML Choices editing works now, but it still requires
some authentication token to be generated to make it secure.
Diffstat (limited to 'desktop/options.c')
-rw-r--r-- | desktop/options.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/desktop/options.c b/desktop/options.c index 4bdac6d24..12468fb84 100644 --- a/desktop/options.c +++ b/desktop/options.c @@ -327,7 +327,7 @@ nsoption_output_value_html_input(struct option_entry_s *option, option->key, (*((char **)option->p) != NULL) ? *((char **)option->p) : - "NULL"); + ""); break; } @@ -537,3 +537,20 @@ nsoption_dump(FILE *outf) } while (res > 0); } +/* exported interface documented in options.h */ +bool nsoption_set_key(const char *key, const char *value) +{ + bool ret = false; + int i; + + for (i = 0; i != option_table_entries; i++) { + if (strcasecmp(key, option_table[i].key) != 0) + continue; + + strtooption(value, option_table + i); + ret = true; + break; + } + + return(ret); +} |