"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "dlls/msvcrt/locale.c" between
wine-5.12.tar.xz and wine-5.13.tar.xz

About: Wine is an Open Source implementation of the MS Windows API on top of X, OpenGL, and Unix. Think of Wine as a compatibility layer for running Windows programs. Development release.

locale.c  (wine-5.12.tar.xz):locale.c  (wine-5.13.tar.xz)
skipping to change at line 715 skipping to change at line 715
} }
#endif #endif
/********************************************************************* /*********************************************************************
* __crtLCMapStringA (MSVCRT.@) * __crtLCMapStringA (MSVCRT.@)
*/ */
int CDECL __crtLCMapStringA( int CDECL __crtLCMapStringA(
LCID lcid, DWORD mapflags, const char* src, int srclen, char* dst, LCID lcid, DWORD mapflags, const char* src, int srclen, char* dst,
int dstlen, unsigned int codepage, int xflag int dstlen, unsigned int codepage, int xflag
) { ) {
FIXME("(lcid %x, flags %x, %s(%d), %p(%d), %x, %d), partial stub!\n", WCHAR buf_in[32], *in = buf_in;
lcid,mapflags,src,srclen,dst,dstlen,codepage,xflag); WCHAR buf_out[32], *out = buf_out;
/* FIXME: A bit incorrect. But msvcrt itself just converts its int in_len, out_len, r;
* arguments to wide strings and then calls LCMapStringW
*/ TRACE("(lcid %x, flags %x, %s(%d), %p(%d), %x, %d), partial stub!\n",
return LCMapStringA(lcid,mapflags,src,srclen,dst,dstlen); lcid, mapflags, src, srclen, dst, dstlen, codepage, xflag);
in_len = MultiByteToWideChar(codepage, MB_ERR_INVALID_CHARS, src, srclen, NU
LL, 0);
if (!in_len) return 0;
if (in_len > ARRAY_SIZE(buf_in))
{
in = malloc(in_len * sizeof(WCHAR));
if (!in) return 0;
}
r = MultiByteToWideChar(codepage, MB_ERR_INVALID_CHARS, src, srclen, in, in_
len);
if (!r) goto done;
if (mapflags & LCMAP_SORTKEY)
{
r = LCMapStringW(lcid, mapflags, in, in_len, (WCHAR*)dst, dstlen);
goto done;
}
r = LCMapStringW(lcid, mapflags, in, in_len, NULL, 0);
if (!r) goto done;
out_len = r;
if (r > ARRAY_SIZE(buf_out))
{
out = malloc(r * sizeof(WCHAR));
if (!out)
{
r = 0;
goto done;
}
}
r = LCMapStringW(lcid, mapflags, in, in_len, out, out_len);
if (!r) goto done;
r = WideCharToMultiByte(codepage, 0, out, out_len, dst, dstlen, NULL, NULL);
done:
if (in != buf_in) free(in);
if (out != buf_out) free(out);
return r;
} }
/********************************************************************* /*********************************************************************
* __crtLCMapStringW (MSVCRT.@) * __crtLCMapStringW (MSVCRT.@)
*/ */
int CDECL __crtLCMapStringW(LCID lcid, DWORD mapflags, const MSVCRT_wchar_t *src , int CDECL __crtLCMapStringW(LCID lcid, DWORD mapflags, const MSVCRT_wchar_t *src ,
int srclen, MSVCRT_wchar_t *dst, int dstlen, unsigned int codepage, int xflag) int srclen, MSVCRT_wchar_t *dst, int dstlen, unsigned int codepage, int xflag)
{ {
FIXME("(lcid %x, flags %x, %s(%d), %p(%d), %x, %d), partial stub!\n", FIXME("(lcid %x, flags %x, %s(%d), %p(%d), %x, %d), partial stub!\n",
lcid, mapflags, debugstr_w(src), srclen, dst, dstlen, codepage, xfla g); lcid, mapflags, debugstr_w(src), srclen, dst, dstlen, codepage, xfla g);
 End of changes. 1 change blocks. 
6 lines changed or deleted 48 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)