summaryrefslogtreecommitdiff
path: root/atari/gui.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 /atari/gui.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 'atari/gui.c')
-rw-r--r--atari/gui.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/atari/gui.c b/atari/gui.c
index f1f557e2e..af5e1f8ba 100644
--- a/atari/gui.c
+++ b/atari/gui.c
@@ -326,7 +326,7 @@ static void gui_window_set_title(struct gui_window *gw, const char *title)
int l;
char * conv;
l = strlen(title)+1;
- if (utf8_to_local_encoding(title, l-1, &conv) == UTF8_CONVERT_OK ) {
+ if (utf8_to_local_encoding(title, l-1, &conv) == NSERROR_OK ) {
l = MIN((uint32_t)atari_sysinfo.aes_max_win_title_len, strlen(conv));
if(gw->title == NULL)
gw->title = malloc(l);
@@ -699,16 +699,16 @@ static void gui_get_clipboard(char **buffer, size_t *length)
// clipboard is in atari encoding, convert it to utf8:
char *utf8 = NULL;
- utf8_convert_ret ret;
+ nserror ret;
clip_len = strlen(clip);
if (clip_len > 0) {
ret = utf8_to_local_encoding(clip, clip_len, &utf8);
- if (ret == UTF8_CONVERT_OK && utf8 != NULL) {
+ if (ret == NSERROR_OK && utf8 != NULL) {
*buffer = utf8;
*length = strlen(utf8);
} else {
- assert(ret == UTF8_CONVERT_OK && utf8 != NULL);
+ assert(ret == NSERROR_OK && utf8 != NULL);
}
}
@@ -731,14 +731,14 @@ static void gui_set_clipboard(const char *buffer, size_t length,
// convert utf8 input to atari encoding:
- utf8_convert_ret ret;
+ nserror ret;
char *clip = NULL;
ret = utf8_to_local_encoding(buffer,length, &clip);
- if (ret == UTF8_CONVERT_OK) {
+ if (ret == NSERROR_OK) {
scrap_txt_write(clip);
} else {
- assert(ret == UTF8_CONVERT_OK);
+ assert(ret == NSERROR_OK);
}
free(clip);
}