X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Futil.h;h=08b15636acdcc66ae0c440755bfc45bf276ec13e;hp=8a6dc4da2174a1c747db67dfed9347b8afa01cea;hb=ded522fd0a15d740354329c5066ebd3473563e57;hpb=4449a8d6647cb1b5c251de9b77a0f4230811f09e diff --git a/src/util.h b/src/util.h index 8a6dc4da..08b15636 100644 --- a/src/util.h +++ b/src/util.h @@ -155,12 +155,14 @@ extern char *wimlib_strdup(const char *str); #endif /* ENABLE_CUSTOM_MEMORY_ALLOCATOR */ -extern char *utf16_to_utf8(const char *utf16_str, size_t utf16_len, - size_t *utf8_len_ret); +/* encoding.c */ +extern int utf16_to_utf8(const char *utf16_str, size_t utf16_nbytes, + char **utf8_str_ret, size_t *utf8_nbytes_ret); -extern char *utf8_to_utf16(const char *utf8_str, size_t utf8_len, - size_t *utf16_len_ret); +extern int utf8_to_utf16(const char *utf8_str, size_t utf8_nbytes, + char **utf16_str_ret, size_t *utf16_nbytes_ret); +/* util.c */ extern void randomize_byte_array(u8 *p, size_t n); extern void randomize_char_array_with_alnum(char p[], size_t n);