msvcp140: Introduce _Mbstatet structure.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
bbab63cfcf
commit
3b62083443
|
@ -53,12 +53,13 @@ MSVCP_bool ios_base_Sync = FALSE;
|
|||
typedef struct {
|
||||
streamoff off;
|
||||
__int64 DECLSPEC_ALIGN(8) pos;
|
||||
int state;
|
||||
} fpos_int;
|
||||
_Mbstatet state;
|
||||
} fpos_mbstatet;
|
||||
|
||||
static inline const char* debugstr_fpos_int(fpos_int *fpos)
|
||||
static inline const char* debugstr_fpos_mbstatet(fpos_mbstatet *fpos)
|
||||
{
|
||||
return wine_dbg_sprintf("fpos(%s %s %d)", wine_dbgstr_longlong(fpos->off), wine_dbgstr_longlong(fpos->pos), fpos->state);
|
||||
return wine_dbg_sprintf("fpos(%s %s %d)", wine_dbgstr_longlong(fpos->off),
|
||||
wine_dbgstr_longlong(fpos->pos), MBSTATET_TO_INT(&fpos->state));
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
|
@ -88,7 +89,7 @@ typedef struct {
|
|||
char putback;
|
||||
#endif
|
||||
MSVCP_bool wrotesome;
|
||||
int state;
|
||||
_Mbstatet state;
|
||||
MSVCP_bool close;
|
||||
#if _MSVCP_VER == 70
|
||||
locale loc;
|
||||
|
@ -107,7 +108,7 @@ typedef struct {
|
|||
wchar_t putback;
|
||||
#endif
|
||||
MSVCP_bool wrotesome;
|
||||
int state;
|
||||
_Mbstatet state;
|
||||
MSVCP_bool close;
|
||||
#if _MSVCP_VER == 70
|
||||
locale loc;
|
||||
|
@ -1647,19 +1648,22 @@ DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekoff, 24)
|
|||
DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekoff, 20)
|
||||
#endif
|
||||
#if _MSVCP_VER >= 100
|
||||
#define call_basic_streambuf_char_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 40, fpos_int*, (basic_streambuf_char*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
|
||||
#define call_basic_streambuf_char_seekoff(this, ret, off, way, mode) \
|
||||
CALL_VTBL_FUNC(this, 40, fpos_mbstatet*, (basic_streambuf_char*, fpos_mbstatet*, streamoff, int, int), (this, ret, off, way, mode))
|
||||
#elif _MSVCP_VER >= 80
|
||||
#define call_basic_streambuf_char_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 36, fpos_int*, (basic_streambuf_char*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
|
||||
#define call_basic_streambuf_char_seekoff(this, ret, off, way, mode) \
|
||||
CALL_VTBL_FUNC(this, 36, fpos_mbstatet*, (basic_streambuf_char*, fpos_mbstatet*, streamoff, int, int), (this, ret, off, way, mode))
|
||||
#else
|
||||
#define call_basic_streambuf_char_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 32, fpos_int*, (basic_streambuf_char*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
|
||||
#define call_basic_streambuf_char_seekoff(this, ret, off, way, mode) \
|
||||
CALL_VTBL_FUNC(this, 32, fpos_mbstatet*, (basic_streambuf_char*, fpos_mbstatet*, streamoff, int, int), (this, ret, off, way, mode))
|
||||
#endif
|
||||
fpos_int* __thiscall basic_streambuf_char_seekoff(basic_streambuf_char *this,
|
||||
fpos_int *ret, streamoff off, int way, int mode)
|
||||
fpos_mbstatet* __thiscall basic_streambuf_char_seekoff(basic_streambuf_char *this,
|
||||
fpos_mbstatet *ret, streamoff off, int way, int mode)
|
||||
{
|
||||
TRACE("(%p %s %d %d)\n", this, wine_dbgstr_longlong(off), way, mode);
|
||||
ret->off = -1;
|
||||
ret->pos = 0;
|
||||
ret->state = 0;
|
||||
memset(&ret->state, 0, sizeof(ret->state));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1674,8 +1678,8 @@ DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff, 24)
|
|||
#else
|
||||
DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff, 20)
|
||||
#endif
|
||||
fpos_int* __thiscall basic_streambuf_char_pubseekoff(basic_streambuf_char *this,
|
||||
fpos_int *ret, streamoff off, int way, int mode)
|
||||
fpos_mbstatet* __thiscall basic_streambuf_char_pubseekoff(basic_streambuf_char *this,
|
||||
fpos_mbstatet *ret, streamoff off, int way, int mode)
|
||||
{
|
||||
TRACE("(%p %s %d %d)\n", this, wine_dbgstr_longlong(off), way, mode);
|
||||
return call_basic_streambuf_char_seekoff(this, ret, off, way, mode);
|
||||
|
@ -1688,8 +1692,8 @@ DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff_old, 24)
|
|||
#else
|
||||
DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff_old, 20)
|
||||
#endif
|
||||
fpos_int* __thiscall basic_streambuf_char_pubseekoff_old(basic_streambuf_char *this,
|
||||
fpos_int *ret, streamoff off, unsigned int way, unsigned int mode)
|
||||
fpos_mbstatet* __thiscall basic_streambuf_char_pubseekoff_old(basic_streambuf_char *this,
|
||||
fpos_mbstatet *ret, streamoff off, unsigned int way, unsigned int mode)
|
||||
{
|
||||
TRACE("(%p %s %d %d)\n", this, wine_dbgstr_longlong(off), way, mode);
|
||||
return basic_streambuf_char_pubseekoff(this, ret, off, way, mode);
|
||||
|
@ -1699,39 +1703,42 @@ fpos_int* __thiscall basic_streambuf_char_pubseekoff_old(basic_streambuf_char *t
|
|||
/* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
|
||||
DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekpos, 36)
|
||||
#if _MSVCP_VER >= 100
|
||||
#define call_basic_streambuf_char_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 44, fpos_int*, (basic_streambuf_char*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
|
||||
#define call_basic_streambuf_char_seekpos(this, ret, pos, mode) \
|
||||
CALL_VTBL_FUNC(this, 44, fpos_mbstatet*, (basic_streambuf_char*, fpos_mbstatet*, fpos_mbstatet, int), (this, ret, pos, mode))
|
||||
#elif _MSVCP_VER >= 80
|
||||
#define call_basic_streambuf_char_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 40, fpos_int*, (basic_streambuf_char*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
|
||||
#define call_basic_streambuf_char_seekpos(this, ret, pos, mode) \
|
||||
CALL_VTBL_FUNC(this, 40, fpos_mbstatet*, (basic_streambuf_char*, fpos_mbstatet*, fpos_mbstatet, int), (this, ret, pos, mode))
|
||||
#else
|
||||
#define call_basic_streambuf_char_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 36, fpos_int*, (basic_streambuf_char*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
|
||||
#define call_basic_streambuf_char_seekpos(this, ret, pos, mode) \
|
||||
CALL_VTBL_FUNC(this, 36, fpos_mbstatet*, (basic_streambuf_char*, fpos_mbstatet*, fpos_mbstatet, int), (this, ret, pos, mode))
|
||||
#endif
|
||||
fpos_int* __thiscall basic_streambuf_char_seekpos(basic_streambuf_char *this,
|
||||
fpos_int *ret, fpos_int pos, int mode)
|
||||
fpos_mbstatet* __thiscall basic_streambuf_char_seekpos(basic_streambuf_char *this,
|
||||
fpos_mbstatet *ret, fpos_mbstatet pos, int mode)
|
||||
{
|
||||
TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
|
||||
TRACE("(%p %s %d)\n", this, debugstr_fpos_mbstatet(&pos), mode);
|
||||
ret->off = -1;
|
||||
ret->pos = 0;
|
||||
ret->state = 0;
|
||||
memset(&ret->state, 0, sizeof(ret->state));
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
|
||||
/* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
|
||||
DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos, 36)
|
||||
fpos_int* __thiscall basic_streambuf_char_pubseekpos(basic_streambuf_char *this,
|
||||
fpos_int *ret, fpos_int pos, int mode)
|
||||
fpos_mbstatet* __thiscall basic_streambuf_char_pubseekpos(basic_streambuf_char *this,
|
||||
fpos_mbstatet *ret, fpos_mbstatet pos, int mode)
|
||||
{
|
||||
TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
|
||||
TRACE("(%p %s %d)\n", this, debugstr_fpos_mbstatet(&pos), mode);
|
||||
return call_basic_streambuf_char_seekpos(this, ret, pos, mode);
|
||||
}
|
||||
|
||||
/* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
|
||||
/* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
|
||||
DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos_old, 36)
|
||||
fpos_int* __thiscall basic_streambuf_char_pubseekpos_old(basic_streambuf_char *this,
|
||||
fpos_int *ret, fpos_int pos, unsigned int mode)
|
||||
fpos_mbstatet* __thiscall basic_streambuf_char_pubseekpos_old(basic_streambuf_char *this,
|
||||
fpos_mbstatet *ret, fpos_mbstatet pos, unsigned int mode)
|
||||
{
|
||||
TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
|
||||
TRACE("(%p %s %d)\n", this, debugstr_fpos_mbstatet(&pos), mode);
|
||||
return basic_streambuf_char_pubseekpos(this, ret, pos, mode);
|
||||
}
|
||||
|
||||
|
@ -2552,19 +2559,22 @@ DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekoff, 24)
|
|||
DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekoff, 20)
|
||||
#endif
|
||||
#if _MSVCP_VER >= 100
|
||||
#define call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 40, fpos_int*, (basic_streambuf_wchar*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
|
||||
#define call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode) \
|
||||
CALL_VTBL_FUNC(this, 40, fpos_mbstatet*, (basic_streambuf_wchar*, fpos_mbstatet*, streamoff, int, int), (this, ret, off, way, mode))
|
||||
#elif _MSVCP_VER >= 80
|
||||
#define call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 36, fpos_int*, (basic_streambuf_wchar*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
|
||||
#define call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode) \
|
||||
CALL_VTBL_FUNC(this, 36, fpos_mbstatet*, (basic_streambuf_wchar*, fpos_mbstatet*, streamoff, int, int), (this, ret, off, way, mode))
|
||||
#else
|
||||
#define call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 32, fpos_int*, (basic_streambuf_wchar*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
|
||||
#define call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode) \
|
||||
CALL_VTBL_FUNC(this, 32, fpos_mbstatet*, (basic_streambuf_wchar*, fpos_mbstatet*, streamoff, int, int), (this, ret, off, way, mode))
|
||||
#endif
|
||||
fpos_int* __thiscall basic_streambuf_wchar_seekoff(basic_streambuf_wchar *this,
|
||||
fpos_int *ret, streamoff off, int way, int mode)
|
||||
fpos_mbstatet* __thiscall basic_streambuf_wchar_seekoff(basic_streambuf_wchar *this,
|
||||
fpos_mbstatet *ret, streamoff off, int way, int mode)
|
||||
{
|
||||
TRACE("(%p %s %d %d)\n", this, wine_dbgstr_longlong(off), way, mode);
|
||||
ret->off = -1;
|
||||
ret->pos = 0;
|
||||
ret->state = 0;
|
||||
memset(&ret->state, 0, sizeof(ret->state));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -2581,8 +2591,8 @@ DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff, 24)
|
|||
#else
|
||||
DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff, 20)
|
||||
#endif
|
||||
fpos_int* __thiscall basic_streambuf_wchar_pubseekoff(basic_streambuf_wchar *this,
|
||||
fpos_int *ret, streamoff off, int way, int mode)
|
||||
fpos_mbstatet* __thiscall basic_streambuf_wchar_pubseekoff(basic_streambuf_wchar *this,
|
||||
fpos_mbstatet *ret, streamoff off, int way, int mode)
|
||||
{
|
||||
TRACE("(%p %s %d %d)\n", this, wine_dbgstr_longlong(off), way, mode);
|
||||
return call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode);
|
||||
|
@ -2597,8 +2607,8 @@ DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff_old, 24)
|
|||
#else
|
||||
DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff_old, 20)
|
||||
#endif
|
||||
fpos_int* __thiscall basic_streambuf_wchar_pubseekoff_old(basic_streambuf_wchar *this,
|
||||
fpos_int *ret, streamoff off, unsigned int way, unsigned int mode)
|
||||
fpos_mbstatet* __thiscall basic_streambuf_wchar_pubseekoff_old(basic_streambuf_wchar *this,
|
||||
fpos_mbstatet *ret, streamoff off, unsigned int way, unsigned int mode)
|
||||
{
|
||||
TRACE("(%p %s %d %d)\n", this, wine_dbgstr_longlong(off), way, mode);
|
||||
return basic_streambuf_wchar_pubseekoff(this, ret, off, way, mode);
|
||||
|
@ -2610,19 +2620,22 @@ fpos_int* __thiscall basic_streambuf_wchar_pubseekoff_old(basic_streambuf_wchar
|
|||
/* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
|
||||
DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekpos, 36)
|
||||
#if _MSVCP_VER >= 100
|
||||
#define call_basic_streambuf_wchar_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 44, fpos_int*, (basic_streambuf_wchar*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
|
||||
#define call_basic_streambuf_wchar_seekpos(this, ret, pos, mode) \
|
||||
CALL_VTBL_FUNC(this, 44, fpos_mbstatet*, (basic_streambuf_wchar*, fpos_mbstatet*, fpos_mbstatet, int), (this, ret, pos, mode))
|
||||
#elif _MSVCP_VER >= 80
|
||||
#define call_basic_streambuf_wchar_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 40, fpos_int*, (basic_streambuf_wchar*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
|
||||
#define call_basic_streambuf_wchar_seekpos(this, ret, pos, mode) \
|
||||
CALL_VTBL_FUNC(this, 40, fpos_mbstatet*, (basic_streambuf_wchar*, fpos_mbstatet*, fpos_mbstatet, int), (this, ret, pos, mode))
|
||||
#else
|
||||
#define call_basic_streambuf_wchar_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 36, fpos_int*, (basic_streambuf_wchar*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
|
||||
#define call_basic_streambuf_wchar_seekpos(this, ret, pos, mode) \
|
||||
CALL_VTBL_FUNC(this, 36, fpos_mbstatet*, (basic_streambuf_wchar*, fpos_mbstatet*, fpos_mbstatet, int), (this, ret, pos, mode))
|
||||
#endif
|
||||
fpos_int* __thiscall basic_streambuf_wchar_seekpos(basic_streambuf_wchar *this,
|
||||
fpos_int *ret, fpos_int pos, int mode)
|
||||
fpos_mbstatet* __thiscall basic_streambuf_wchar_seekpos(basic_streambuf_wchar *this,
|
||||
fpos_mbstatet *ret, fpos_mbstatet pos, int mode)
|
||||
{
|
||||
TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
|
||||
TRACE("(%p %s %d)\n", this, debugstr_fpos_mbstatet(&pos), mode);
|
||||
ret->off = -1;
|
||||
ret->pos = 0;
|
||||
ret->state = 0;
|
||||
memset(&ret->state, 0, sizeof(ret->state));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -2631,10 +2644,10 @@ fpos_int* __thiscall basic_streambuf_wchar_seekpos(basic_streambuf_wchar *this,
|
|||
/* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
|
||||
/* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
|
||||
DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos, 36)
|
||||
fpos_int* __thiscall basic_streambuf_wchar_pubseekpos(basic_streambuf_wchar *this,
|
||||
fpos_int *ret, fpos_int pos, int mode)
|
||||
fpos_mbstatet* __thiscall basic_streambuf_wchar_pubseekpos(basic_streambuf_wchar *this,
|
||||
fpos_mbstatet *ret, fpos_mbstatet pos, int mode)
|
||||
{
|
||||
TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
|
||||
TRACE("(%p %s %d)\n", this, debugstr_fpos_mbstatet(&pos), mode);
|
||||
return call_basic_streambuf_wchar_seekpos(this, ret, pos, mode);
|
||||
}
|
||||
|
||||
|
@ -2643,10 +2656,10 @@ fpos_int* __thiscall basic_streambuf_wchar_pubseekpos(basic_streambuf_wchar *thi
|
|||
/* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
|
||||
/* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
|
||||
DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos_old, 36)
|
||||
fpos_int* __thiscall basic_streambuf_wchar_pubseekpos_old(basic_streambuf_wchar *this,
|
||||
fpos_int *ret, fpos_int pos, unsigned int mode)
|
||||
fpos_mbstatet* __thiscall basic_streambuf_wchar_pubseekpos_old(basic_streambuf_wchar *this,
|
||||
fpos_mbstatet *ret, fpos_mbstatet pos, unsigned int mode)
|
||||
{
|
||||
TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
|
||||
TRACE("(%p %s %d)\n", this, debugstr_fpos_mbstatet(&pos), mode);
|
||||
return basic_streambuf_wchar_pubseekpos(this, ret, pos, mode);
|
||||
}
|
||||
|
||||
|
@ -2962,7 +2975,11 @@ void __thiscall basic_streambuf_wchar_swap(basic_streambuf_wchar *this, basic_st
|
|||
|
||||
/* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
|
||||
/* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
|
||||
int basic_filebuf_char__Init__Stinit = 0;
|
||||
#if _MSVCP_VER >= 140
|
||||
_Mbstatet basic_filebuf_char__Init__Stinit = {0};
|
||||
#else
|
||||
_Mbstatet basic_filebuf_char__Init__Stinit = 0;
|
||||
#endif
|
||||
|
||||
/* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
|
||||
/* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
|
||||
|
@ -3459,8 +3476,8 @@ DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekoff, 24)
|
|||
#else
|
||||
DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekoff, 20)
|
||||
#endif
|
||||
fpos_int* __thiscall basic_filebuf_char_seekoff(basic_filebuf_char *this,
|
||||
fpos_int *ret, streamoff off, int way, int mode)
|
||||
fpos_mbstatet* __thiscall basic_filebuf_char_seekoff(basic_filebuf_char *this,
|
||||
fpos_mbstatet *ret, streamoff off, int way, int mode)
|
||||
{
|
||||
fpos_t pos;
|
||||
|
||||
|
@ -3470,7 +3487,7 @@ fpos_int* __thiscall basic_filebuf_char_seekoff(basic_filebuf_char *this,
|
|||
|| fseek(this->file, off, way)) {
|
||||
ret->off = -1;
|
||||
ret->pos = 0;
|
||||
ret->state = 0;
|
||||
memset(&ret->state, 0, sizeof(ret->state));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -3484,19 +3501,19 @@ fpos_int* __thiscall basic_filebuf_char_seekoff(basic_filebuf_char *this,
|
|||
/* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
|
||||
/* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
|
||||
DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekpos, 36)
|
||||
fpos_int* __thiscall basic_filebuf_char_seekpos(basic_filebuf_char *this,
|
||||
fpos_int *ret, fpos_int pos, int mode)
|
||||
fpos_mbstatet* __thiscall basic_filebuf_char_seekpos(basic_filebuf_char *this,
|
||||
fpos_mbstatet *ret, fpos_mbstatet pos, int mode)
|
||||
{
|
||||
fpos_t fpos;
|
||||
|
||||
TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
|
||||
TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_mbstatet(&pos), mode);
|
||||
|
||||
if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this)
|
||||
|| fseek(this->file, (LONG)pos.pos, SEEK_SET)
|
||||
|| (pos.off && fseek(this->file, pos.off, SEEK_CUR))) {
|
||||
ret->off = -1;
|
||||
ret->pos = 0;
|
||||
ret->state = 0;
|
||||
memset(&ret->state, 0, sizeof(ret->state));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -3554,11 +3571,19 @@ void __thiscall basic_filebuf_char_imbue(basic_filebuf_char *this, const locale
|
|||
|
||||
/* ?_Stinit@?1??_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
|
||||
/* ?_Stinit@?1??_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
|
||||
int basic_filebuf_wchar__Init__Stinit = 0;
|
||||
#if _MSVCP_VER >= 140
|
||||
_Mbstatet basic_filebuf_wchar__Init__Stinit = {0};
|
||||
#else
|
||||
_Mbstatet basic_filebuf_wchar__Init__Stinit = 0;
|
||||
#endif
|
||||
|
||||
/* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
|
||||
/* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
|
||||
int basic_filebuf_short__Init__Stinit = 0;
|
||||
#if _MSVCP_VER >= 140
|
||||
_Mbstatet basic_filebuf_short__Init__Stinit = {0};
|
||||
#else
|
||||
_Mbstatet basic_filebuf_short__Init__Stinit = 0;
|
||||
#endif
|
||||
|
||||
/* ?_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
|
||||
/* ?_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
|
||||
|
@ -4100,8 +4125,8 @@ DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekoff, 24)
|
|||
#else
|
||||
DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekoff, 20)
|
||||
#endif
|
||||
fpos_int* __thiscall basic_filebuf_wchar_seekoff(basic_filebuf_wchar *this,
|
||||
fpos_int *ret, streamoff off, int way, int mode)
|
||||
fpos_mbstatet* __thiscall basic_filebuf_wchar_seekoff(basic_filebuf_wchar *this,
|
||||
fpos_mbstatet *ret, streamoff off, int way, int mode)
|
||||
{
|
||||
fpos_t pos;
|
||||
|
||||
|
@ -4118,7 +4143,7 @@ fpos_int* __thiscall basic_filebuf_wchar_seekoff(basic_filebuf_wchar *this,
|
|||
|| fseek(this->file, off, way)) {
|
||||
ret->off = -1;
|
||||
ret->pos = 0;
|
||||
ret->state = 0;
|
||||
memset(&ret->state, 0, sizeof(ret->state));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -4134,19 +4159,19 @@ fpos_int* __thiscall basic_filebuf_wchar_seekoff(basic_filebuf_wchar *this,
|
|||
/* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
|
||||
/* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
|
||||
DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekpos, 36)
|
||||
fpos_int* __thiscall basic_filebuf_wchar_seekpos(basic_filebuf_wchar *this,
|
||||
fpos_int *ret, fpos_int pos, int mode)
|
||||
fpos_mbstatet* __thiscall basic_filebuf_wchar_seekpos(basic_filebuf_wchar *this,
|
||||
fpos_mbstatet *ret, fpos_mbstatet pos, int mode)
|
||||
{
|
||||
fpos_t fpos;
|
||||
|
||||
TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
|
||||
TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_mbstatet(&pos), mode);
|
||||
|
||||
if(!basic_filebuf_wchar_is_open(this) || !basic_filebuf_wchar__Endwrite(this)
|
||||
|| fseek(this->file, (LONG)pos.pos, SEEK_SET)
|
||||
|| (pos.off && fseek(this->file, pos.off, SEEK_CUR))) {
|
||||
ret->off = -1;
|
||||
ret->pos = 0;
|
||||
ret->state = 0;
|
||||
memset(&ret->state, 0, sizeof(ret->state));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -4502,8 +4527,8 @@ DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekoff, 24)
|
|||
#else
|
||||
DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekoff, 20)
|
||||
#endif
|
||||
fpos_int* __thiscall basic_stringbuf_char_seekoff(basic_stringbuf_char *this,
|
||||
fpos_int *ret, streamoff off, int way, int mode)
|
||||
fpos_mbstatet* __thiscall basic_stringbuf_char_seekoff(basic_stringbuf_char *this,
|
||||
fpos_mbstatet *ret, streamoff off, int way, int mode)
|
||||
{
|
||||
char *beg, *cur_r, *cur_w;
|
||||
|
||||
|
@ -4515,7 +4540,7 @@ fpos_int* __thiscall basic_stringbuf_char_seekoff(basic_stringbuf_char *this,
|
|||
|
||||
ret->off = 0;
|
||||
ret->pos = 0;
|
||||
ret->state = 0;
|
||||
memset(&ret->state, 0, sizeof(ret->state));
|
||||
|
||||
beg = basic_streambuf_char_eback(&this->base);
|
||||
cur_r = basic_streambuf_char_gptr(&this->base);
|
||||
|
@ -4560,12 +4585,12 @@ fpos_int* __thiscall basic_stringbuf_char_seekoff(basic_stringbuf_char *this,
|
|||
/* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
|
||||
/* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
|
||||
DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekpos, 36)
|
||||
fpos_int* __thiscall basic_stringbuf_char_seekpos(basic_stringbuf_char *this,
|
||||
fpos_int *ret, fpos_int pos, int mode)
|
||||
fpos_mbstatet* __thiscall basic_stringbuf_char_seekpos(basic_stringbuf_char *this,
|
||||
fpos_mbstatet *ret, fpos_mbstatet pos, int mode)
|
||||
{
|
||||
TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
|
||||
TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_mbstatet(&pos), mode);
|
||||
|
||||
if(pos.off==-1 && pos.pos==0 && pos.state==0) {
|
||||
if(pos.off==-1 && pos.pos==0 && MBSTATET_TO_INT(&pos.state)==0) {
|
||||
*ret = pos;
|
||||
return ret;
|
||||
}
|
||||
|
@ -4921,8 +4946,8 @@ DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_seekoff, 24)
|
|||
#else
|
||||
DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_seekoff, 20)
|
||||
#endif
|
||||
fpos_int* __thiscall basic_stringbuf_wchar_seekoff(basic_stringbuf_wchar *this,
|
||||
fpos_int *ret, streamoff off, int way, int mode)
|
||||
fpos_mbstatet* __thiscall basic_stringbuf_wchar_seekoff(basic_stringbuf_wchar *this,
|
||||
fpos_mbstatet *ret, streamoff off, int way, int mode)
|
||||
{
|
||||
wchar_t *beg, *cur_r, *cur_w;
|
||||
|
||||
|
@ -4934,7 +4959,7 @@ fpos_int* __thiscall basic_stringbuf_wchar_seekoff(basic_stringbuf_wchar *this,
|
|||
|
||||
ret->off = 0;
|
||||
ret->pos = 0;
|
||||
ret->state = 0;
|
||||
memset(&ret->state, 0, sizeof(ret->state));
|
||||
|
||||
beg = basic_streambuf_wchar_eback(&this->base);
|
||||
cur_r = basic_streambuf_wchar_gptr(&this->base);
|
||||
|
@ -4981,12 +5006,12 @@ fpos_int* __thiscall basic_stringbuf_wchar_seekoff(basic_stringbuf_wchar *this,
|
|||
/* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
|
||||
/* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
|
||||
DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_seekpos, 36)
|
||||
fpos_int* __thiscall basic_stringbuf_wchar_seekpos(basic_stringbuf_wchar *this,
|
||||
fpos_int *ret, fpos_int pos, int mode)
|
||||
fpos_mbstatet* __thiscall basic_stringbuf_wchar_seekpos(basic_stringbuf_wchar *this,
|
||||
fpos_mbstatet *ret, fpos_mbstatet pos, int mode)
|
||||
{
|
||||
TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
|
||||
TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_mbstatet(&pos), mode);
|
||||
|
||||
if(pos.off==-1 && pos.pos==0 && pos.state==0) {
|
||||
if(pos.off==-1 && pos.pos==0 && MBSTATET_TO_INT(&pos.state)==0) {
|
||||
*ret = pos;
|
||||
return ret;
|
||||
}
|
||||
|
@ -6433,11 +6458,11 @@ basic_ostream_char* __thiscall basic_ostream_char_seekp(basic_ostream_char *this
|
|||
TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(off), way);
|
||||
|
||||
if(!ios_base_fail(&base->base)) {
|
||||
fpos_int seek;
|
||||
fpos_mbstatet seek;
|
||||
|
||||
basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
|
||||
&seek, off, way, OPENMODE_out);
|
||||
if(seek.off==-1 && seek.pos==0 && seek.state==0)
|
||||
if(seek.off==-1 && seek.pos==0 && MBSTATET_TO_INT(&seek.state)==0)
|
||||
basic_ios_char_setstate(base, IOSTATE_failbit);
|
||||
}
|
||||
return this;
|
||||
|
@ -6446,18 +6471,18 @@ basic_ostream_char* __thiscall basic_ostream_char_seekp(basic_ostream_char *this
|
|||
/* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
|
||||
/* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
|
||||
DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp_fpos, 28)
|
||||
basic_ostream_char* __thiscall basic_ostream_char_seekp_fpos(basic_ostream_char *this, fpos_int pos)
|
||||
basic_ostream_char* __thiscall basic_ostream_char_seekp_fpos(basic_ostream_char *this, fpos_mbstatet pos)
|
||||
{
|
||||
basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
|
||||
|
||||
TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
|
||||
TRACE("(%p %s)\n", this, debugstr_fpos_mbstatet(&pos));
|
||||
|
||||
if(!ios_base_fail(&base->base)) {
|
||||
fpos_int seek;
|
||||
fpos_mbstatet seek;
|
||||
|
||||
basic_streambuf_char_pubseekpos(basic_ios_char_rdbuf_get(base),
|
||||
&seek, pos, OPENMODE_out);
|
||||
if(seek.off==-1 && seek.pos==0 && seek.state==0)
|
||||
if(seek.off==-1 && seek.pos==0 && MBSTATET_TO_INT(&seek.state)==0)
|
||||
basic_ios_char_setstate(base, IOSTATE_failbit);
|
||||
}
|
||||
return this;
|
||||
|
@ -6466,7 +6491,7 @@ basic_ostream_char* __thiscall basic_ostream_char_seekp_fpos(basic_ostream_char
|
|||
/* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
|
||||
/* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
|
||||
DEFINE_THISCALL_WRAPPER(basic_ostream_char_tellp, 8)
|
||||
fpos_int* __thiscall basic_ostream_char_tellp(basic_ostream_char *this, fpos_int *ret)
|
||||
fpos_mbstatet* __thiscall basic_ostream_char_tellp(basic_ostream_char *this, fpos_mbstatet *ret)
|
||||
{
|
||||
basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
|
||||
|
||||
|
@ -6478,7 +6503,7 @@ fpos_int* __thiscall basic_ostream_char_tellp(basic_ostream_char *this, fpos_int
|
|||
}else {
|
||||
ret->off = -1;
|
||||
ret->pos = 0;
|
||||
ret->state = 0;
|
||||
memset(&ret->state, 0, sizeof(ret->state));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -7301,11 +7326,11 @@ basic_ostream_wchar* __thiscall basic_ostream_wchar_seekp(basic_ostream_wchar *t
|
|||
TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(off), way);
|
||||
|
||||
if(!ios_base_fail(&base->base)) {
|
||||
fpos_int seek;
|
||||
fpos_mbstatet seek;
|
||||
|
||||
basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base),
|
||||
&seek, off, way, OPENMODE_out);
|
||||
if(seek.off==-1 && seek.pos==0 && seek.state==0)
|
||||
if(seek.off==-1 && seek.pos==0 && MBSTATET_TO_INT(&seek.state)==0)
|
||||
basic_ios_wchar_setstate(base, IOSTATE_failbit);
|
||||
}
|
||||
return this;
|
||||
|
@ -7316,18 +7341,18 @@ basic_ostream_wchar* __thiscall basic_ostream_wchar_seekp(basic_ostream_wchar *t
|
|||
/* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
|
||||
/* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
|
||||
DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_seekp_fpos, 28)
|
||||
basic_ostream_wchar* __thiscall basic_ostream_wchar_seekp_fpos(basic_ostream_wchar *this, fpos_int pos)
|
||||
basic_ostream_wchar* __thiscall basic_ostream_wchar_seekp_fpos(basic_ostream_wchar *this, fpos_mbstatet pos)
|
||||
{
|
||||
basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
|
||||
|
||||
TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
|
||||
TRACE("(%p %s)\n", this, debugstr_fpos_mbstatet(&pos));
|
||||
|
||||
if(!ios_base_fail(&base->base)) {
|
||||
fpos_int seek;
|
||||
fpos_mbstatet seek;
|
||||
|
||||
basic_streambuf_wchar_pubseekpos(basic_ios_wchar_rdbuf_get(base),
|
||||
&seek, pos, OPENMODE_out);
|
||||
if(seek.off==-1 && seek.pos==0 && seek.state==0)
|
||||
if(seek.off==-1 && seek.pos==0 && MBSTATET_TO_INT(&seek.state)==0)
|
||||
basic_ios_wchar_setstate(base, IOSTATE_failbit);
|
||||
}
|
||||
return this;
|
||||
|
@ -7338,7 +7363,7 @@ basic_ostream_wchar* __thiscall basic_ostream_wchar_seekp_fpos(basic_ostream_wch
|
|||
/* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
|
||||
/* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
|
||||
DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_tellp, 8)
|
||||
fpos_int* __thiscall basic_ostream_wchar_tellp(basic_ostream_wchar *this, fpos_int *ret)
|
||||
fpos_mbstatet* __thiscall basic_ostream_wchar_tellp(basic_ostream_wchar *this, fpos_mbstatet *ret)
|
||||
{
|
||||
basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
|
||||
|
||||
|
@ -7350,7 +7375,7 @@ fpos_int* __thiscall basic_ostream_wchar_tellp(basic_ostream_wchar *this, fpos_i
|
|||
}else {
|
||||
ret->off = -1;
|
||||
ret->pos = 0;
|
||||
ret->state = 0;
|
||||
memset(&ret->state, 0, sizeof(ret->state));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -8740,7 +8765,7 @@ int __thiscall basic_istream_char_sync(basic_istream_char *this)
|
|||
/* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
|
||||
/* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
|
||||
DEFINE_THISCALL_WRAPPER(basic_istream_char_tellg, 8)
|
||||
fpos_int* __thiscall basic_istream_char_tellg(basic_istream_char *this, fpos_int *ret)
|
||||
fpos_mbstatet* __thiscall basic_istream_char_tellg(basic_istream_char *this, fpos_mbstatet *ret)
|
||||
{
|
||||
basic_ios_char *base = basic_istream_char_get_basic_ios(this);
|
||||
|
||||
|
@ -8751,26 +8776,26 @@ fpos_int* __thiscall basic_istream_char_tellg(basic_istream_char *this, fpos_int
|
|||
basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
|
||||
ret, 0, SEEKDIR_cur, OPENMODE_in);
|
||||
|
||||
if(ret->off==-1 && ret->pos==0 && ret->state==0)
|
||||
if(ret->off==-1 && ret->pos==0 && MBSTATET_TO_INT(&ret->state)==0)
|
||||
basic_ios_char_setstate(base, IOSTATE_failbit);
|
||||
}else {
|
||||
ret->off = -1;
|
||||
ret->pos = 0;
|
||||
ret->state = 0;
|
||||
memset(&ret->state, 0, sizeof(ret->state));
|
||||
}
|
||||
basic_istream_char_sentry_destroy(this);
|
||||
#else
|
||||
if(ios_base_fail(&base->base)) {
|
||||
ret->off = -1;
|
||||
ret->pos = 0;
|
||||
ret->state = 0;
|
||||
memset(&ret->state, 0, sizeof(ret->state));
|
||||
return ret;
|
||||
}
|
||||
|
||||
basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
|
||||
ret, 0, SEEKDIR_cur, OPENMODE_in);
|
||||
|
||||
if(ret->off==-1 && ret->pos==0 && ret->state==0)
|
||||
if(ret->off==-1 && ret->pos==0 && MBSTATET_TO_INT(&ret->state)==0)
|
||||
basic_ios_char_setstate(base, IOSTATE_failbit);
|
||||
#endif
|
||||
|
||||
|
@ -8799,11 +8824,11 @@ basic_istream_char* __thiscall basic_istream_char_seekg(basic_istream_char *this
|
|||
|
||||
if(basic_istream_char_sentry_create(this, TRUE)) {
|
||||
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
|
||||
fpos_int ret;
|
||||
fpos_mbstatet ret;
|
||||
|
||||
basic_streambuf_char_pubseekoff(strbuf, &ret, off, dir, OPENMODE_in);
|
||||
|
||||
if(ret.off==-1 && ret.pos==0 && ret.state==0)
|
||||
if(ret.off==-1 && ret.pos==0 && MBSTATET_TO_INT(&ret.state)==0)
|
||||
basic_ios_char_setstate(base, IOSTATE_failbit);
|
||||
}
|
||||
basic_istream_char_sentry_destroy(this);
|
||||
|
@ -8812,11 +8837,11 @@ basic_istream_char* __thiscall basic_istream_char_seekg(basic_istream_char *this
|
|||
|
||||
if(!ios_base_fail(&base->base)) {
|
||||
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
|
||||
fpos_int ret;
|
||||
fpos_mbstatet ret;
|
||||
|
||||
basic_streambuf_char_pubseekoff(strbuf, &ret, off, dir, OPENMODE_in);
|
||||
|
||||
if(ret.off==-1 && ret.pos==0 && ret.state==0)
|
||||
if(ret.off==-1 && ret.pos==0 && MBSTATET_TO_INT(&ret.state)==0)
|
||||
basic_ios_char_setstate(base, IOSTATE_failbit);
|
||||
else
|
||||
basic_ios_char_clear(base, IOSTATE_goodbit);
|
||||
|
@ -8830,37 +8855,37 @@ basic_istream_char* __thiscall basic_istream_char_seekg(basic_istream_char *this
|
|||
/* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
|
||||
/* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
|
||||
DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg_fpos, 28)
|
||||
basic_istream_char* __thiscall basic_istream_char_seekg_fpos(basic_istream_char *this, fpos_int pos)
|
||||
basic_istream_char* __thiscall basic_istream_char_seekg_fpos(basic_istream_char *this, fpos_mbstatet pos)
|
||||
{
|
||||
basic_ios_char *base = basic_istream_char_get_basic_ios(this);
|
||||
#if _MSVCP_VER >= 110
|
||||
IOSB_iostate state;
|
||||
|
||||
TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
|
||||
TRACE("(%p %s)\n", this, debugstr_fpos_mbstatet(&pos));
|
||||
|
||||
state = ios_base_rdstate(&base->base);
|
||||
ios_base_clear(&base->base, state & ~IOSTATE_eofbit);
|
||||
|
||||
if(basic_istream_char_sentry_create(this, TRUE)) {
|
||||
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
|
||||
fpos_int ret;
|
||||
fpos_mbstatet ret;
|
||||
|
||||
basic_streambuf_char_pubseekpos(strbuf, &ret, pos, OPENMODE_in);
|
||||
|
||||
if(ret.off==-1 && ret.pos==0 && ret.state==0)
|
||||
if(ret.off==-1 && ret.pos==0 && MBSTATET_TO_INT(&ret.state)==0)
|
||||
basic_ios_char_setstate(base, IOSTATE_failbit);
|
||||
}
|
||||
basic_istream_char_sentry_destroy(this);
|
||||
#else
|
||||
TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
|
||||
TRACE("(%p %s)\n", this, debugstr_fpos_mbstatet(&pos));
|
||||
|
||||
if(!ios_base_fail(&base->base)) {
|
||||
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
|
||||
fpos_int ret;
|
||||
fpos_mbstatet ret;
|
||||
|
||||
basic_streambuf_char_pubseekpos(strbuf, &ret, pos, OPENMODE_in);
|
||||
|
||||
if(ret.off==-1 && ret.pos==0 && ret.state==0)
|
||||
if(ret.off==-1 && ret.pos==0 && MBSTATET_TO_INT(&ret.state)==0)
|
||||
basic_ios_char_setstate(base, IOSTATE_failbit);
|
||||
else
|
||||
basic_ios_char_clear(base, IOSTATE_goodbit);
|
||||
|
@ -10315,7 +10340,7 @@ int __thiscall basic_istream_wchar_sync(basic_istream_wchar *this)
|
|||
/* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
|
||||
/* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
|
||||
DEFINE_THISCALL_WRAPPER(basic_istream_wchar_tellg, 8)
|
||||
fpos_int* __thiscall basic_istream_wchar_tellg(basic_istream_wchar *this, fpos_int *ret)
|
||||
fpos_mbstatet* __thiscall basic_istream_wchar_tellg(basic_istream_wchar *this, fpos_mbstatet *ret)
|
||||
{
|
||||
basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
|
||||
|
||||
|
@ -10326,25 +10351,25 @@ fpos_int* __thiscall basic_istream_wchar_tellg(basic_istream_wchar *this, fpos_i
|
|||
basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base),
|
||||
ret, 0, SEEKDIR_cur, OPENMODE_in);
|
||||
|
||||
if(ret->off==-1 && ret->pos==0 && ret->state==0)
|
||||
if(ret->off==-1 && ret->pos==0 && MBSTATET_TO_INT(&ret->state)==0)
|
||||
basic_ios_wchar_setstate(base, IOSTATE_failbit);
|
||||
}else {
|
||||
ret->off = -1;
|
||||
ret->pos = 0;
|
||||
ret->state = 0;
|
||||
memset(&ret->state, 0, sizeof(ret->state));
|
||||
}
|
||||
basic_istream_wchar_sentry_destroy(this);
|
||||
#else
|
||||
if(ios_base_fail(&base->base)) {
|
||||
ret->off = -1;
|
||||
ret->pos = 0;
|
||||
ret->state = 0;
|
||||
memset(&ret->state, 0, sizeof(ret->state));
|
||||
return ret;
|
||||
}
|
||||
|
||||
basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base),
|
||||
ret, 0, SEEKDIR_cur, OPENMODE_in);
|
||||
if(ret->off==-1 && ret->pos==0 && ret->state==0)
|
||||
if(ret->off==-1 && ret->pos==0 && MBSTATET_TO_INT(&ret->state)==0)
|
||||
basic_ios_wchar_setstate(base, IOSTATE_failbit);
|
||||
#endif
|
||||
return ret;
|
||||
|
@ -10374,11 +10399,11 @@ basic_istream_wchar* __thiscall basic_istream_wchar_seekg(basic_istream_wchar *t
|
|||
|
||||
if(basic_istream_wchar_sentry_create(this, TRUE)) {
|
||||
basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
|
||||
fpos_int ret;
|
||||
fpos_mbstatet ret;
|
||||
|
||||
basic_streambuf_wchar_pubseekoff(strbuf, &ret, off, dir, OPENMODE_in);
|
||||
|
||||
if(ret.off==-1 && ret.pos==0 && ret.state==0)
|
||||
if(ret.off==-1 && ret.pos==0 && MBSTATET_TO_INT(&ret.state)==0)
|
||||
basic_ios_wchar_setstate(base, IOSTATE_failbit);
|
||||
}
|
||||
basic_istream_wchar_sentry_destroy(this);
|
||||
|
@ -10387,11 +10412,11 @@ basic_istream_wchar* __thiscall basic_istream_wchar_seekg(basic_istream_wchar *t
|
|||
|
||||
if(!ios_base_fail(&base->base)) {
|
||||
basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
|
||||
fpos_int ret;
|
||||
fpos_mbstatet ret;
|
||||
|
||||
basic_streambuf_wchar_pubseekoff(strbuf, &ret, off, dir, OPENMODE_in);
|
||||
|
||||
if(ret.off==-1 && ret.pos==0 && ret.state==0)
|
||||
if(ret.off==-1 && ret.pos==0 && MBSTATET_TO_INT(&ret.state)==0)
|
||||
basic_ios_wchar_setstate(base, IOSTATE_failbit);
|
||||
else
|
||||
basic_ios_wchar_clear(base, IOSTATE_goodbit);
|
||||
|
@ -10407,37 +10432,37 @@ basic_istream_wchar* __thiscall basic_istream_wchar_seekg(basic_istream_wchar *t
|
|||
/* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
|
||||
/* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
|
||||
DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg_fpos, 28)
|
||||
basic_istream_wchar* __thiscall basic_istream_wchar_seekg_fpos(basic_istream_wchar *this, fpos_int pos)
|
||||
basic_istream_wchar* __thiscall basic_istream_wchar_seekg_fpos(basic_istream_wchar *this, fpos_mbstatet pos)
|
||||
{
|
||||
basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
|
||||
#if _MSVCP_VER >= 110
|
||||
IOSB_iostate state;
|
||||
|
||||
TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
|
||||
TRACE("(%p %s)\n", this, debugstr_fpos_mbstatet(&pos));
|
||||
|
||||
state = ios_base_rdstate(&base->base);
|
||||
ios_base_clear(&base->base, state & ~IOSTATE_eofbit);
|
||||
|
||||
if(basic_istream_wchar_sentry_create(this, TRUE)) {
|
||||
basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
|
||||
fpos_int ret;
|
||||
fpos_mbstatet ret;
|
||||
|
||||
basic_streambuf_wchar_pubseekpos(strbuf, &ret, pos, OPENMODE_in);
|
||||
|
||||
if(ret.off==-1 && ret.pos==0 && ret.state==0)
|
||||
if(ret.off==-1 && ret.pos==0 && MBSTATET_TO_INT(&ret.state)==0)
|
||||
basic_ios_wchar_setstate(base, IOSTATE_failbit);
|
||||
}
|
||||
basic_istream_wchar_sentry_destroy(this);
|
||||
#else
|
||||
TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
|
||||
TRACE("(%p %s)\n", this, debugstr_fpos_mbstatet(&pos));
|
||||
|
||||
if(!ios_base_fail(&base->base)) {
|
||||
basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
|
||||
fpos_int ret;
|
||||
fpos_mbstatet ret;
|
||||
|
||||
basic_streambuf_wchar_pubseekpos(strbuf, &ret, pos, OPENMODE_in);
|
||||
|
||||
if(ret.off==-1 && ret.pos==0 && ret.state==0)
|
||||
if(ret.off==-1 && ret.pos==0 && MBSTATET_TO_INT(&ret.state)==0)
|
||||
basic_ios_wchar_setstate(base, IOSTATE_failbit);
|
||||
else
|
||||
basic_ios_wchar_clear(base, IOSTATE_goodbit);
|
||||
|
@ -14299,7 +14324,7 @@ DEFINE_THISCALL_WRAPPER(strstreambuf_seekoff, 24)
|
|||
#else
|
||||
DEFINE_THISCALL_WRAPPER(strstreambuf_seekoff, 20)
|
||||
#endif
|
||||
fpos_int* __thiscall strstreambuf_seekoff(strstreambuf *this, fpos_int *ret, streamoff off, int way, int mode)
|
||||
fpos_mbstatet* __thiscall strstreambuf_seekoff(strstreambuf *this, fpos_mbstatet *ret, streamoff off, int way, int mode)
|
||||
{
|
||||
char *eback = basic_streambuf_char_eback(&this->base);
|
||||
char *pptr = basic_streambuf_char_pptr(&this->base);
|
||||
|
@ -14308,7 +14333,7 @@ fpos_int* __thiscall strstreambuf_seekoff(strstreambuf *this, fpos_int *ret, str
|
|||
TRACE("(%p %p %s %d %d)\n", this, ret, wine_dbgstr_longlong(off), way, mode);
|
||||
|
||||
ret->off = 0;
|
||||
ret->state = 0;
|
||||
memset(&ret->state, 0, sizeof(ret->state));
|
||||
|
||||
if(pptr > this->seekhigh)
|
||||
this->seekhigh = pptr;
|
||||
|
@ -14353,11 +14378,11 @@ fpos_int* __thiscall strstreambuf_seekoff(strstreambuf *this, fpos_int *ret, str
|
|||
/* ?seekpos@strstreambuf@std@@MAE?AV?$fpos@H@2@V32@H@Z */
|
||||
/* ?seekpos@strstreambuf@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
|
||||
DEFINE_THISCALL_WRAPPER(strstreambuf_seekpos, 36)
|
||||
fpos_int* __thiscall strstreambuf_seekpos(strstreambuf *this, fpos_int *ret, fpos_int pos, int mode)
|
||||
fpos_mbstatet* __thiscall strstreambuf_seekpos(strstreambuf *this, fpos_mbstatet *ret, fpos_mbstatet pos, int mode)
|
||||
{
|
||||
TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
|
||||
TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_mbstatet(&pos), mode);
|
||||
|
||||
if(pos.off==-1 && pos.pos==0 && pos.state==0) {
|
||||
if(pos.off==-1 && pos.pos==0 && MBSTATET_TO_INT(&pos.state)==0) {
|
||||
*ret = pos;
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -2372,7 +2372,7 @@ ctype_wchar* __thiscall ctype_wchar_vector_dtor(ctype_wchar *this, unsigned int
|
|||
}
|
||||
|
||||
/* _Wcrtomb */
|
||||
int __cdecl _Wcrtomb(char *s, wchar_t wch, int *state, const _Cvtvec *cvt)
|
||||
int __cdecl _Wcrtomb(char *s, wchar_t wch, _Mbstatet *state, const _Cvtvec *cvt)
|
||||
{
|
||||
int cp, size;
|
||||
BOOL def;
|
||||
|
@ -2519,7 +2519,7 @@ const wchar_t* __thiscall ctype_wchar__Narrow_s(const ctype_wchar *this, const w
|
|||
}
|
||||
|
||||
/* _Mbrtowc */
|
||||
int __cdecl _Mbrtowc(wchar_t *out, const char *in, MSVCP_size_t len, int *state, const _Cvtvec *cvt)
|
||||
int __cdecl _Mbrtowc(wchar_t *out, const char *in, MSVCP_size_t len, _Mbstatet *state, const _Cvtvec *cvt)
|
||||
{
|
||||
int i, cp;
|
||||
CPINFO cp_info;
|
||||
|
@ -2539,20 +2539,20 @@ int __cdecl _Mbrtowc(wchar_t *out, const char *in, MSVCP_size_t len, int *state,
|
|||
if(out)
|
||||
*out = (unsigned char)*in;
|
||||
|
||||
*state = 0;
|
||||
memset(state, 0, sizeof(*state));
|
||||
return *in ? 1 : 0;
|
||||
}
|
||||
|
||||
if(*state) {
|
||||
((char*)state)[1] = *in;
|
||||
if(MBSTATET_TO_INT(state)) {
|
||||
((char*)&MBSTATET_TO_INT(state))[1] = *in;
|
||||
|
||||
if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, (char*)state, 2, out, out ? 1 : 0)) {
|
||||
*state = 0;
|
||||
if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, (char*)&MBSTATET_TO_INT(state), 2, out, out ? 1 : 0)) {
|
||||
memset(state, 0, sizeof(*state));
|
||||
*_errno() = EILSEQ;
|
||||
return -1;
|
||||
}
|
||||
|
||||
*state = 0;
|
||||
memset(state, 0, sizeof(*state));
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
@ -2569,7 +2569,7 @@ int __cdecl _Mbrtowc(wchar_t *out, const char *in, MSVCP_size_t len, int *state,
|
|||
|
||||
if(is_lead) {
|
||||
if(len == 1) {
|
||||
*state = (unsigned char)*in;
|
||||
MBSTATET_TO_INT(state) = (unsigned char)*in;
|
||||
return -2;
|
||||
}
|
||||
|
||||
|
@ -2589,9 +2589,10 @@ int __cdecl _Mbrtowc(wchar_t *out, const char *in, MSVCP_size_t len, int *state,
|
|||
|
||||
static inline wchar_t mb_to_wc(char ch, const _Cvtvec *cvt)
|
||||
{
|
||||
int state = 0;
|
||||
_Mbstatet state;
|
||||
wchar_t ret;
|
||||
|
||||
memset(&state, 0, sizeof(state));
|
||||
return _Mbrtowc(&ret, &ch, 1, &state, cvt) == 1 ? ret : 0;
|
||||
}
|
||||
|
||||
|
@ -2602,9 +2603,12 @@ static inline wchar_t mb_to_wc(char ch, const _Cvtvec *cvt)
|
|||
DEFINE_THISCALL_WRAPPER(ctype_wchar__Dowiden, 8)
|
||||
wchar_t __thiscall ctype_wchar__Dowiden(const ctype_wchar *this, char ch)
|
||||
{
|
||||
_Mbstatet state;
|
||||
wchar_t ret;
|
||||
int state = 0;
|
||||
|
||||
TRACE("(%p %d)\n", this, ch);
|
||||
|
||||
memset(&state, 0, sizeof(state));
|
||||
return _Mbrtowc(&ret, &ch, 1, &state, &this->cvt)<0 ? WEOF : ret;
|
||||
}
|
||||
|
||||
|
@ -3365,16 +3369,16 @@ MSVCP_bool __thiscall codecvt_char_do_always_noconv(const codecvt_char *this)
|
|||
#if _MSVCP_VER <= 100
|
||||
#define call_codecvt_char_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
|
||||
CALL_VTBL_FUNC(this, 16, int, \
|
||||
(const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
|
||||
(const codecvt_char*, _Mbstatet*, const char*, const char*, const char**, char*, char*, char**), \
|
||||
(this, state, from, from_end, from_next, to, to_end, to_next))
|
||||
#else
|
||||
#define call_codecvt_char_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
|
||||
CALL_VTBL_FUNC(this, 24, int, \
|
||||
(const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
|
||||
(const codecvt_char*, _Mbstatet*, const char*, const char*, const char**, char*, char*, char**), \
|
||||
(this, state, from, from_end, from_next, to, to_end, to_next))
|
||||
#endif
|
||||
DEFINE_THISCALL_WRAPPER(codecvt_char_do_in, 32)
|
||||
int __thiscall codecvt_char_do_in(const codecvt_char *this, int *state,
|
||||
int __thiscall codecvt_char_do_in(const codecvt_char *this, _Mbstatet *state,
|
||||
const char *from, const char *from_end, const char **from_next,
|
||||
char *to, char *to_end, char **to_next)
|
||||
{
|
||||
|
@ -3388,7 +3392,7 @@ int __thiscall codecvt_char_do_in(const codecvt_char *this, int *state,
|
|||
/* ?in@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
|
||||
/* ?in@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
|
||||
DEFINE_THISCALL_WRAPPER(codecvt_char_in, 32)
|
||||
int __thiscall codecvt_char_in(const codecvt_char *this, int *state,
|
||||
int __thiscall codecvt_char_in(const codecvt_char *this, _Mbstatet *state,
|
||||
const char *from, const char *from_end, const char **from_next,
|
||||
char *to, char *to_end, char **to_next)
|
||||
{
|
||||
|
@ -3403,16 +3407,16 @@ int __thiscall codecvt_char_in(const codecvt_char *this, int *state,
|
|||
#if _MSVCP_VER <= 100
|
||||
#define call_codecvt_char_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
|
||||
CALL_VTBL_FUNC(this, 20, int, \
|
||||
(const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
|
||||
(const codecvt_char*, _Mbstatet*, const char*, const char*, const char**, char*, char*, char**), \
|
||||
(this, state, from, from_end, from_next, to, to_end, to_next))
|
||||
#else
|
||||
#define call_codecvt_char_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
|
||||
CALL_VTBL_FUNC(this, 28, int, \
|
||||
(const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
|
||||
(const codecvt_char*, _Mbstatet*, const char*, const char*, const char**, char*, char*, char**), \
|
||||
(this, state, from, from_end, from_next, to, to_end, to_next))
|
||||
#endif
|
||||
DEFINE_THISCALL_WRAPPER(codecvt_char_do_out, 32)
|
||||
int __thiscall codecvt_char_do_out(const codecvt_char *this, int *state,
|
||||
int __thiscall codecvt_char_do_out(const codecvt_char *this, _Mbstatet *state,
|
||||
const char *from, const char *from_end, const char **from_next,
|
||||
char *to, char *to_end, char **to_next)
|
||||
{
|
||||
|
@ -3426,7 +3430,7 @@ int __thiscall codecvt_char_do_out(const codecvt_char *this, int *state,
|
|||
/* ?out@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
|
||||
/* ?out@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
|
||||
DEFINE_THISCALL_WRAPPER(codecvt_char_out, 32)
|
||||
int __thiscall codecvt_char_out(const codecvt_char *this, int *state,
|
||||
int __thiscall codecvt_char_out(const codecvt_char *this, _Mbstatet *state,
|
||||
const char *from, const char *from_end, const char **from_next,
|
||||
char *to, char *to_end, char **to_next)
|
||||
{
|
||||
|
@ -3440,14 +3444,14 @@ int __thiscall codecvt_char_out(const codecvt_char *this, int *state,
|
|||
/* ?do_unshift@?$codecvt@DDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
|
||||
#if _MSVCP_VER <= 100
|
||||
#define call_codecvt_char_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
|
||||
int, (const codecvt_char*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
|
||||
int, (const codecvt_char*, _Mbstatet*, char*, char*, char**), (this, state, to, to_end, to_next))
|
||||
#else
|
||||
#define call_codecvt_char_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 32, \
|
||||
int, (const codecvt_char*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
|
||||
int, (const codecvt_char*, _Mbstatet*, char*, char*, char**), (this, state, to, to_end, to_next))
|
||||
#endif
|
||||
DEFINE_THISCALL_WRAPPER(codecvt_char_do_unshift, 20)
|
||||
int __thiscall codecvt_char_do_unshift(const codecvt_char *this,
|
||||
int *state, char *to, char *to_end, char **to_next)
|
||||
_Mbstatet *state, char *to, char *to_end, char **to_next)
|
||||
{
|
||||
TRACE("(%p %p %p %p %p)\n", this, state, to, to_end, to_next);
|
||||
*to_next = to;
|
||||
|
@ -3458,7 +3462,7 @@ int __thiscall codecvt_char_do_unshift(const codecvt_char *this,
|
|||
/* ?unshift@?$codecvt@DDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
|
||||
DEFINE_THISCALL_WRAPPER(codecvt_char_unshift, 20)
|
||||
int __thiscall codecvt_char_unshift(const codecvt_char *this,
|
||||
int *state, char *to, char *to_end, char **to_next)
|
||||
_Mbstatet *state, char *to, char *to_end, char **to_next)
|
||||
{
|
||||
TRACE("(%p %p %p %p %p)\n", this, state, to, to_end, to_next);
|
||||
return call_codecvt_char_do_unshift(this, state, to, to_end, to_next);
|
||||
|
@ -3468,15 +3472,15 @@ int __thiscall codecvt_char_unshift(const codecvt_char *this,
|
|||
/* ?do_length@?$codecvt@DDH@std@@MEBAHAEBHPEBD1_K@Z */
|
||||
#if _MSVCP_VER <= 100
|
||||
#define call_codecvt_char_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
|
||||
int, (const codecvt_char*, const int*, const char*, const char*, MSVCP_size_t), \
|
||||
int, (const codecvt_char*, const _Mbstatet*, const char*, const char*, MSVCP_size_t), \
|
||||
(this, state, from, from_end, max))
|
||||
#else
|
||||
#define call_codecvt_char_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 36, \
|
||||
int, (const codecvt_char*, const int*, const char*, const char*, MSVCP_size_t), \
|
||||
int, (const codecvt_char*, const _Mbstatet*, const char*, const char*, MSVCP_size_t), \
|
||||
(this, state, from, from_end, max))
|
||||
#endif
|
||||
DEFINE_THISCALL_WRAPPER(codecvt_char_do_length, 20)
|
||||
int __thiscall codecvt_char_do_length(const codecvt_char *this, const int *state,
|
||||
int __thiscall codecvt_char_do_length(const codecvt_char *this, const _Mbstatet *state,
|
||||
const char *from, const char *from_end, MSVCP_size_t max)
|
||||
{
|
||||
TRACE("(%p %p %p %p %lu)\n", this, state, from, from_end, max);
|
||||
|
@ -3486,7 +3490,7 @@ int __thiscall codecvt_char_do_length(const codecvt_char *this, const int *state
|
|||
/* ?length@?$codecvt@DDH@std@@QBEHABHPBD1I@Z */
|
||||
/* ?length@?$codecvt@DDH@std@@QEBAHAEBHPEBD1_K@Z */
|
||||
DEFINE_THISCALL_WRAPPER(codecvt_char_length, 20)
|
||||
int __thiscall codecvt_char_length(const codecvt_char *this, const int *state,
|
||||
int __thiscall codecvt_char_length(const codecvt_char *this, const _Mbstatet *state,
|
||||
const char *from, const char *from_end, MSVCP_size_t max)
|
||||
{
|
||||
TRACE("(%p %p %p %p %lu)\n", this, state, from, from_end, max);
|
||||
|
@ -3808,16 +3812,16 @@ int __thiscall codecvt_wchar_do_encoding(const codecvt_wchar *this)
|
|||
#if _MSVCP_VER <= 100
|
||||
#define call_codecvt_wchar_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
|
||||
CALL_VTBL_FUNC(this, 16, int, \
|
||||
(const codecvt_wchar*, int*, const char*, const char*, const char**, wchar_t*, wchar_t*, wchar_t**), \
|
||||
(const codecvt_wchar*, _Mbstatet*, const char*, const char*, const char**, wchar_t*, wchar_t*, wchar_t**), \
|
||||
(this, state, from, from_end, from_next, to, to_end, to_next))
|
||||
#else
|
||||
#define call_codecvt_wchar_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
|
||||
CALL_VTBL_FUNC(this, 24, int, \
|
||||
(const codecvt_wchar*, int*, const char*, const char*, const char**, wchar_t*, wchar_t*, wchar_t**), \
|
||||
(const codecvt_wchar*, _Mbstatet*, const char*, const char*, const char**, wchar_t*, wchar_t*, wchar_t**), \
|
||||
(this, state, from, from_end, from_next, to, to_end, to_next))
|
||||
#endif
|
||||
DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_in, 32)
|
||||
int __thiscall codecvt_wchar_do_in(const codecvt_wchar *this, int *state,
|
||||
int __thiscall codecvt_wchar_do_in(const codecvt_wchar *this, _Mbstatet *state,
|
||||
const char *from, const char *from_end, const char **from_next,
|
||||
wchar_t *to, wchar_t *to_end, wchar_t **to_next)
|
||||
{
|
||||
|
@ -3852,7 +3856,7 @@ int __thiscall codecvt_wchar_do_in(const codecvt_wchar *this, int *state,
|
|||
/* ?in@?$codecvt@_WDH@std@@QBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
|
||||
/* ?in@?$codecvt@_WDH@std@@QEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
|
||||
DEFINE_THISCALL_WRAPPER(codecvt_wchar_in, 32)
|
||||
int __thiscall codecvt_wchar_in(const codecvt_wchar *this, int *state,
|
||||
int __thiscall codecvt_wchar_in(const codecvt_wchar *this, _Mbstatet *state,
|
||||
const char *from, const char *from_end, const char **from_next,
|
||||
wchar_t *to, wchar_t *to_end, wchar_t **to_next)
|
||||
{
|
||||
|
@ -3869,16 +3873,16 @@ int __thiscall codecvt_wchar_in(const codecvt_wchar *this, int *state,
|
|||
#if _MSVCP_VER <= 100
|
||||
#define call_codecvt_wchar_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
|
||||
CALL_VTBL_FUNC(this, 20, int, \
|
||||
(const codecvt_wchar*, int*, const wchar_t*, const wchar_t*, const wchar_t**, char*, char*, char**), \
|
||||
(const codecvt_wchar*, _Mbstatet*, const wchar_t*, const wchar_t*, const wchar_t**, char*, char*, char**), \
|
||||
(this, state, from, from_end, from_next, to, to_end, to_next))
|
||||
#else
|
||||
#define call_codecvt_wchar_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
|
||||
CALL_VTBL_FUNC(this, 28, int, \
|
||||
(const codecvt_wchar*, int*, const wchar_t*, const wchar_t*, const wchar_t**, char*, char*, char**), \
|
||||
(const codecvt_wchar*, _Mbstatet*, const wchar_t*, const wchar_t*, const wchar_t**, char*, char*, char**), \
|
||||
(this, state, from, from_end, from_next, to, to_end, to_next))
|
||||
#endif
|
||||
DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_out, 32)
|
||||
int __thiscall codecvt_wchar_do_out(const codecvt_wchar *this, int *state,
|
||||
int __thiscall codecvt_wchar_do_out(const codecvt_wchar *this, _Mbstatet *state,
|
||||
const wchar_t *from, const wchar_t *from_end, const wchar_t **from_next,
|
||||
char *to, char *to_end, char **to_next)
|
||||
{
|
||||
|
@ -3889,7 +3893,8 @@ int __thiscall codecvt_wchar_do_out(const codecvt_wchar *this, int *state,
|
|||
*to_next = to;
|
||||
|
||||
while(*from_next!=from_end && *to_next!=to_end) {
|
||||
int old_state = *state, size;
|
||||
_Mbstatet old_state = *state;
|
||||
int size;
|
||||
char buf[MB_LEN_MAX];
|
||||
|
||||
switch((size = _Wcrtomb(buf, **from_next, state, &this->cvt))) {
|
||||
|
@ -3915,7 +3920,7 @@ int __thiscall codecvt_wchar_do_out(const codecvt_wchar *this, int *state,
|
|||
/* ?out@?$codecvt@_WDH@std@@QBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
|
||||
/* ?out@?$codecvt@_WDH@std@@QEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
|
||||
DEFINE_THISCALL_WRAPPER(codecvt_wchar_out, 32)
|
||||
int __thiscall codecvt_wchar_out(const codecvt_wchar *this, int *state,
|
||||
int __thiscall codecvt_wchar_out(const codecvt_wchar *this, _Mbstatet *state,
|
||||
const wchar_t *from, const wchar_t *from_end, const wchar_t **from_next,
|
||||
char *to, char *to_end, char **to_next)
|
||||
{
|
||||
|
@ -3931,18 +3936,18 @@ int __thiscall codecvt_wchar_out(const codecvt_wchar *this, int *state,
|
|||
/* ?do_unshift@?$codecvt@_WDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
|
||||
#if _MSVCP_VER <= 100
|
||||
#define call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
|
||||
int, (const codecvt_wchar*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
|
||||
int, (const codecvt_wchar*, _Mbstatet*, char*, char*, char**), (this, state, to, to_end, to_next))
|
||||
#else
|
||||
#define call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 32, \
|
||||
int, (const codecvt_wchar*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
|
||||
int, (const codecvt_wchar*, _Mbstatet*, char*, char*, char**), (this, state, to, to_end, to_next))
|
||||
#endif
|
||||
DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_unshift, 20)
|
||||
int __thiscall codecvt_wchar_do_unshift(const codecvt_wchar *this,
|
||||
int *state, char *to, char *to_end, char **to_next)
|
||||
_Mbstatet *state, char *to, char *to_end, char **to_next)
|
||||
{
|
||||
TRACE("(%p %p %p %p %p)\n", this, state, to, to_end, to_next);
|
||||
if(*state)
|
||||
WARN("unexpected state: %x\n", *state);
|
||||
if(MBSTATET_TO_INT(state))
|
||||
WARN("unexpected state: %x\n", MBSTATET_TO_INT(state));
|
||||
|
||||
*to_next = to;
|
||||
return CODECVT_ok;
|
||||
|
@ -3954,7 +3959,7 @@ int __thiscall codecvt_wchar_do_unshift(const codecvt_wchar *this,
|
|||
/* ?unshift@?$codecvt@_WDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
|
||||
DEFINE_THISCALL_WRAPPER(codecvt_wchar_unshift, 20)
|
||||
int __thiscall codecvt_wchar_unshift(const codecvt_wchar *this,
|
||||
int *state, char *to, char *to_end, char **to_next)
|
||||
_Mbstatet *state, char *to, char *to_end, char **to_next)
|
||||
{
|
||||
TRACE("(%p %p %p %p %p)\n", this, state, to, to_end, to_next);
|
||||
return call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next);
|
||||
|
@ -3966,18 +3971,19 @@ int __thiscall codecvt_wchar_unshift(const codecvt_wchar *this,
|
|||
/* ?do_length@?$codecvt@_WDH@std@@MEBAHAEBHPEBD1_K@Z */
|
||||
#if _MSVCP_VER <= 100
|
||||
#define call_codecvt_wchar_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
|
||||
int, (const codecvt_wchar*, const int*, const char*, const char*, MSVCP_size_t), \
|
||||
int, (const codecvt_wchar*, const _Mbstatet*, const char*, const char*, MSVCP_size_t), \
|
||||
(this, state, from, from_end, max))
|
||||
#else
|
||||
#define call_codecvt_wchar_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 36, \
|
||||
int, (const codecvt_wchar*, const int*, const char*, const char*, MSVCP_size_t), \
|
||||
int, (const codecvt_wchar*, const _Mbstatet*, const char*, const char*, MSVCP_size_t), \
|
||||
(this, state, from, from_end, max))
|
||||
#endif
|
||||
DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_length, 20)
|
||||
int __thiscall codecvt_wchar_do_length(const codecvt_wchar *this, const int *state,
|
||||
int __thiscall codecvt_wchar_do_length(const codecvt_wchar *this, const _Mbstatet *state,
|
||||
const char *from, const char *from_end, MSVCP_size_t max)
|
||||
{
|
||||
int tmp_state = *state, ret=0;
|
||||
_Mbstatet tmp_state = *state;
|
||||
int ret=0;
|
||||
|
||||
TRACE("(%p %p %p %p %ld)\n", this, state, from, from_end, max);
|
||||
|
||||
|
@ -4004,7 +4010,7 @@ int __thiscall codecvt_wchar_do_length(const codecvt_wchar *this, const int *sta
|
|||
/* ?length@?$codecvt@_WDH@std@@QBEHABHPBD1I@Z */
|
||||
/* ?length@?$codecvt@_WDH@std@@QEBAHAEBHPEBD1_K@Z */
|
||||
DEFINE_THISCALL_WRAPPER(codecvt_wchar_length, 20)
|
||||
int __thiscall codecvt_wchar_length(const codecvt_wchar *this, const int *state,
|
||||
int __thiscall codecvt_wchar_length(const codecvt_wchar *this, const _Mbstatet *state,
|
||||
const char *from, const char *from_end, MSVCP_size_t max)
|
||||
{
|
||||
TRACE("(%p %p %p %p %ld)\n", this, state, from, from_end, max);
|
||||
|
@ -8125,11 +8131,12 @@ ostreambuf_iterator_wchar* __cdecl num_put_wchar__Put(const num_put *this, ostre
|
|||
ostreambuf_iterator_wchar* __cdecl num_put_wchar__Putc(const num_put *this, ostreambuf_iterator_wchar *ret,
|
||||
ostreambuf_iterator_wchar dest, const char *ptr, MSVCP_size_t count)
|
||||
{
|
||||
int state = 0;
|
||||
_Mbstatet state;
|
||||
wchar_t ch;
|
||||
|
||||
TRACE("(%p %p %s %ld)\n", this, ret, debugstr_an(ptr, count), count);
|
||||
|
||||
memset(&state, 0, sizeof(state));
|
||||
for(; count>0; count--) {
|
||||
if(_Mbrtowc(&ch, ptr++, 1, &state, &this->cvt) == 1)
|
||||
ostreambuf_iterator_wchar_put(&dest, ch);
|
||||
|
@ -11086,6 +11093,7 @@ wint_t __cdecl towctrans(wint_t c, wctrans_t category)
|
|||
return towlower(c);
|
||||
}
|
||||
|
||||
#if _MSVCP_VER <= 71
|
||||
/* btowc */
|
||||
wint_t __cdecl btowc(int c)
|
||||
{
|
||||
|
@ -11175,6 +11183,7 @@ size_t __cdecl wcsrtombs(char *dst, const wchar_t **pstr, size_t n, mbstate_t *s
|
|||
}
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
DEFINE_RTTI_DATA0(locale_facet, 0, ".?AVfacet@locale@std@@")
|
||||
|
|
|
@ -187,6 +187,17 @@ typedef struct {
|
|||
#endif
|
||||
} _Ctypevec;
|
||||
|
||||
#if _MSVCP_VER >= 140
|
||||
typedef struct {
|
||||
int wchar;
|
||||
unsigned short byte, state;
|
||||
} _Mbstatet;
|
||||
#define MBSTATET_TO_INT(state) ((state)->wchar)
|
||||
#else
|
||||
typedef int _Mbstatet;
|
||||
#define MBSTATET_TO_INT(state) (*(state))
|
||||
#endif
|
||||
|
||||
/* class codecvt_base */
|
||||
typedef struct {
|
||||
locale_facet facet;
|
||||
|
@ -198,10 +209,10 @@ typedef struct {
|
|||
} codecvt_char;
|
||||
|
||||
MSVCP_bool __thiscall codecvt_base_always_noconv(const codecvt_base*);
|
||||
int __thiscall codecvt_char_unshift(const codecvt_char*, int*, char*, char*, char**);
|
||||
int __thiscall codecvt_char_out(const codecvt_char*, int*, const char*,
|
||||
int __thiscall codecvt_char_unshift(const codecvt_char*, _Mbstatet*, char*, char*, char**);
|
||||
int __thiscall codecvt_char_out(const codecvt_char*, _Mbstatet*, const char*,
|
||||
const char*, const char**, char*, char*, char**);
|
||||
int __thiscall codecvt_char_in(const codecvt_char*, int*, const char*,
|
||||
int __thiscall codecvt_char_in(const codecvt_char*, _Mbstatet*, const char*,
|
||||
const char*, const char**, char*, char*, char**);
|
||||
int __thiscall codecvt_base_max_length(const codecvt_base*);
|
||||
|
||||
|
@ -223,10 +234,10 @@ typedef struct {
|
|||
_Cvtvec cvt;
|
||||
} codecvt_wchar;
|
||||
|
||||
int __thiscall codecvt_wchar_unshift(const codecvt_wchar*, int*, char*, char*, char**);
|
||||
int __thiscall codecvt_wchar_out(const codecvt_wchar*, int*, const wchar_t*,
|
||||
int __thiscall codecvt_wchar_unshift(const codecvt_wchar*, _Mbstatet*, char*, char*, char**);
|
||||
int __thiscall codecvt_wchar_out(const codecvt_wchar*, _Mbstatet*, const wchar_t*,
|
||||
const wchar_t*, const wchar_t**, char*, char*, char**);
|
||||
int __thiscall codecvt_wchar_in(const codecvt_wchar*, int*, const char*,
|
||||
int __thiscall codecvt_wchar_in(const codecvt_wchar*, _Mbstatet*, const char*,
|
||||
const char*, const char**, wchar_t*, wchar_t*, wchar_t**);
|
||||
|
||||
/* class ctype_base */
|
||||
|
|
Loading…
Reference in New Issue