Lines Matching refs:srclen
60 static inline unsigned int get_surrogate_value( const WCHAR *src, unsigned int srclen )
65 srclen <= 1 || /* missing low surrogate */
74 static inline int get_length_wcs_utf8( int flags, const WCHAR *src, unsigned int srclen )
79 for (len = 0; srclen; srclen--, src++)
91 if (!(val = get_surrogate_value( src, srclen )))
102 srclen--;
110 int wine_utf8_wcstombs( int flags, const WCHAR *src, int srclen, char *dst, int dstlen )
114 if (!dstlen) return get_length_wcs_utf8( flags, src, srclen );
116 for (len = dstlen; srclen; srclen--, src++)
138 if (!(val = get_surrogate_value( src, srclen )))
166 srclen--;
201 static inline int get_length_mbs_utf8_compose( int flags, const char *src, int srclen )
206 const char *srcend = src + srclen;
241 static int utf8_mbstowcs_compose( int flags, const char *src, int srclen, WCHAR *dst, int dstlen )
244 const char *srcend = src + srclen;
248 if (!dstlen) return get_length_mbs_utf8_compose( flags, src, srclen );
289 static inline int get_length_mbs_utf8( int flags, const char *src, int srclen )
293 const char *srcend = src + srclen;
316 int wine_utf8_mbstowcs( int flags, const char *src, int srclen, WCHAR *dst, int dstlen )
319 const char *srcend = src + srclen;
322 if (flags & MB_COMPOSITE) return utf8_mbstowcs_compose( flags, src, srclen, dst, dstlen );
324 if (!dstlen) return get_length_mbs_utf8( flags, src, srclen );