summaryrefslogtreecommitdiff
path: root/desktop/global_history.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2014-01-28 21:40:13 +0000
committerVincent Sanders <vince@netsurf-browser.org>2014-01-28 21:40:13 +0000
commit654da2ffb5abf2afe9532f1d0cb77ed88f8a97cc (patch)
treeefbc3d97a8650b682b7181e748698de9c555d80d /desktop/global_history.c
parent4b760c7e499e2f5cb1d06242d5f186e14e94496a (diff)
downloadnetsurf-654da2ffb5abf2afe9532f1d0cb77ed88f8a97cc.tar.gz
netsurf-654da2ffb5abf2afe9532f1d0cb77ed88f8a97cc.tar.bz2
move utf8 conversion routines to use nserror instead of their own error enum
Diffstat (limited to 'desktop/global_history.c')
-rw-r--r--desktop/global_history.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/desktop/global_history.c b/desktop/global_history.c
index e8d99efc2..9d0e47e34 100644
--- a/desktop/global_history.c
+++ b/desktop/global_history.c
@@ -828,21 +828,21 @@ static nserror global_history_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 global_history_entry *e = node_data;
- utf8_convert_ret ret;
char *t_text;
char *u_text;
ret = utf8_to_html(e->data[GH_TITLE].value, "iso-8859-1",
e->data[GH_TITLE].value_len, &t_text);
- if (ret != UTF8_CONVERT_OK)
+ if (ret != NSERROR_OK)
return NSERROR_SAVE_FAILED;
ret = utf8_to_html(e->data[GH_URL].value, "iso-8859-1",
e->data[GH_URL].value_len, &u_text);
- if (ret != UTF8_CONVERT_OK) {
+ if (ret != NSERROR_OK) {
free(t_text);
return NSERROR_SAVE_FAILED;
}
@@ -855,12 +855,11 @@ static nserror global_history_export_enter_cb(void *ctx, void *node_data,
} else if (type == TREE_NODE_FOLDER) {
struct global_history_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;
fprintf(tw->fp, "<li><h4>%s</h4>\n<ul>\n", f_text);