summaryrefslogtreecommitdiff
path: root/framebuffer/font_internal.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 /framebuffer/font_internal.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 'framebuffer/font_internal.c')
-rw-r--r--framebuffer/font_internal.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/framebuffer/font_internal.c b/framebuffer/font_internal.c
index dc1b35820..d13ba0032 100644
--- a/framebuffer/font_internal.c
+++ b/framebuffer/font_internal.c
@@ -59,7 +59,7 @@ fb_get_font(const plot_font_style_t *fstyle)
}
}
-utf8_convert_ret utf8_to_font_encoding(const struct fb_font_desc* font,
+nserror_ret utf8_to_font_encoding(const struct fb_font_desc* font,
const char *string,
size_t len,
char **result)
@@ -68,7 +68,7 @@ utf8_convert_ret utf8_to_font_encoding(const struct fb_font_desc* font,
}
-utf8_convert_ret utf8_to_local_encoding(const char *string,
+nserror utf8_to_local_encoding(const char *string,
size_t len,
char **result)
{
@@ -76,20 +76,20 @@ utf8_convert_ret utf8_to_local_encoding(const char *string,
}
-utf8_convert_ret utf8_from_local_encoding(const char *string,
+nserror utf8_from_local_encoding(const char *string,
size_t len,
char **result)
{
*result = malloc(len + 1);
if (*result == NULL) {
- return UTF8_CONVERT_NOMEM;
+ return NSERROR_NOMEM;
}
memcpy(*result, string, len);
(*result)[len] = '\0';
- return UTF8_CONVERT_OK;
+ return NSERROR_OK;
}
static bool nsfont_width(const plot_font_style_t *fstyle,