diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2014-01-28 21:40:13 +0000 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2014-01-28 21:40:13 +0000 |
commit | 654da2ffb5abf2afe9532f1d0cb77ed88f8a97cc (patch) | |
tree | efbc3d97a8650b682b7181e748698de9c555d80d /desktop/hotlist.c | |
parent | 4b760c7e499e2f5cb1d06242d5f186e14e94496a (diff) | |
download | netsurf-654da2ffb5abf2afe9532f1d0cb77ed88f8a97cc.tar.gz netsurf-654da2ffb5abf2afe9532f1d0cb77ed88f8a97cc.tar.bz2 |
move utf8 conversion routines to use nserror instead of their own error enum
Diffstat (limited to 'desktop/hotlist.c')
-rw-r--r-- | desktop/hotlist.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/desktop/hotlist.c b/desktop/hotlist.c index 01fabc257..219a348ef 100644 --- a/desktop/hotlist.c +++ b/desktop/hotlist.c @@ -879,21 +879,21 @@ static nserror hotlist_export_enter_cb(void *ctx, void *node_data, enum treeview_node_type type, bool *abort) { struct treeview_export_walk_ctx *tw = ctx; + nserror ret; if (type == TREE_NODE_ENTRY) { struct hotlist_entry *e = node_data; - utf8_convert_ret ret; char *t_text; char *u_text; ret = utf8_to_html(e->data[HL_TITLE].value, "iso-8859-1", e->data[HL_TITLE].value_len, &t_text); - if (ret != UTF8_CONVERT_OK) + if (ret != NSERROR_OK) return NSERROR_SAVE_FAILED; ret = utf8_to_html(e->data[HL_URL].value, "iso-8859-1", e->data[HL_URL].value_len, &u_text); - if (ret != UTF8_CONVERT_OK) { + if (ret != NSERROR_OK) { free(t_text); return NSERROR_SAVE_FAILED; } @@ -906,12 +906,11 @@ static nserror hotlist_export_enter_cb(void *ctx, void *node_data, } else if (type == TREE_NODE_FOLDER) { struct hotlist_folder *f = node_data; - utf8_convert_ret ret; char *f_text; ret = utf8_to_html(f->data.value, "iso-8859-1", f->data.value_len, &f_text); - if (ret != UTF8_CONVERT_OK) + if (ret != NSERROR_OK) return NSERROR_SAVE_FAILED; if (f == hl_ctx.default_folder) { |