X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;ds=sidebyside;f=include%2Fwimlib%2Fencoding.h;h=c3b7fb8cf79b2c85127f23af749de223cef19477;hb=c5e4bd4c75bf1f1e8c75c460853340a15917d55c;hp=b48fe9ced389568fac1f1de3da12b479d6168323;hpb=fe221b8f000dbd52b884d1ac71d75f49a44cc05c;p=wimlib diff --git a/include/wimlib/encoding.h b/include/wimlib/encoding.h index b48fe9ce..c3b7fb8c 100644 --- a/include/wimlib/encoding.h +++ b/include/wimlib/encoding.h @@ -1,12 +1,12 @@ #ifndef _WIMLIB_ENCODING_H #define _WIMLIB_ENCODING_H +#include + #include "wimlib/error.h" #include "wimlib/util.h" #include "wimlib/types.h" -#include - extern void iconv_global_init(void); @@ -35,7 +35,16 @@ varname1##_to_##varname2##_buf(const chartype1 *in, size_t in_nbytes, \ chartype2 *out); extern utf16lechar * -utf16le_dupz(const utf16lechar *ustr, size_t usize); +utf16le_dupz(const void *ustr, size_t usize); + +extern utf16lechar * +utf16le_dup(const utf16lechar *ustr); + +extern size_t +utf16le_len_bytes(const utf16lechar *s); + +extern size_t +utf16le_len_chars(const utf16lechar *s); #if !TCHAR_IS_UTF16LE DECLARE_CHAR_CONVERSION_FUNCTIONS(utf16le, tstr, utf16lechar, tchar); @@ -72,6 +81,10 @@ cmp_utf16le_strings(const utf16lechar *s1, size_t n1, const utf16lechar *s2, size_t n2, bool ignore_case); +extern int +cmp_utf16le_strings_z(const utf16lechar *s1, const utf16lechar *s2, + bool ignore_case); + /* Convert a string in the platform-dependent encoding to UTF-16LE, but if both * encodings are UTF-16LE, simply re-use the string. Release with * tstr_put_utf16le() when done. */