1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

cp_to_unicode: Simplify and cleanup

This commit is contained in:
Jonas Fonseca 2006-08-14 02:19:10 +02:00 committed by Jonas Fonseca
parent c5005ceeb3
commit 8a8fc52eec

View File

@ -525,17 +525,17 @@ cp2utf_8(int from, int c)
unicode_val_T
cp_to_unicode(int codepage, unsigned char **string, unsigned char *end)
{
unicode_val_T ret;
if (is_cp_utf8(codepage))
return utf_8_to_unicode(string, end);
else {
if (*string >= end)
return UCS_NO_CHAR;
else {
unicode_val_T ret = cp2u(codepage, **string);
ret = cp2u(codepage, **string);
++*string;
return ret;
}
}
}
#endif /* CONFIG_UTF_8 */