Commit ccb4c484 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcp90: Added _Fiopen functions implementation.

parent f457511b
...@@ -2036,12 +2036,9 @@ MSVCP_bool __thiscall basic_filebuf_char_is_open(const basic_filebuf_char *this) ...@@ -2036,12 +2036,9 @@ MSVCP_bool __thiscall basic_filebuf_char_is_open(const basic_filebuf_char *this)
return this->file != NULL; return this->file != NULL;
} }
/* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PB_WHH@Z */ /* ?_Fiopen@std@@YAPAU_iobuf@@PB_WHH@Z */
/* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEB_WHH@Z */ /* ?_Fiopen@std@@YAPEAU_iobuf@@PEB_WHH@Z */
/* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBGHH@Z */ FILE* __cdecl _Fiopen_wchar(const wchar_t *name, int mode, int prot)
/* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBGHH@Z */
DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_wchar, 16)
basic_filebuf_char* __thiscall basic_filebuf_char_open_wchar(basic_filebuf_char *this, const wchar_t *name, int mode, int prot)
{ {
static const wchar_t rW[] = {'r',0}; static const wchar_t rW[] = {'r',0};
static const struct { static const struct {
...@@ -2064,10 +2061,7 @@ basic_filebuf_char* __thiscall basic_filebuf_char_open_wchar(basic_filebuf_char ...@@ -2064,10 +2061,7 @@ basic_filebuf_char* __thiscall basic_filebuf_char_open_wchar(basic_filebuf_char
int mode_idx; int mode_idx;
FILE *f = NULL; FILE *f = NULL;
TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot); TRACE("(%s %d %d)\n", debugstr_w(name), mode, prot);
if(basic_filebuf_char_is_open(this))
return NULL;
for(mode_idx=0; mode_idx<sizeof(str_mode)/sizeof(str_mode[0]); mode_idx++) for(mode_idx=0; mode_idx<sizeof(str_mode)/sizeof(str_mode[0]); mode_idx++)
if(str_mode[mode_idx].mode == real_mode) if(str_mode[mode_idx].mode == real_mode)
...@@ -2096,6 +2090,39 @@ basic_filebuf_char* __thiscall basic_filebuf_char_open_wchar(basic_filebuf_char ...@@ -2096,6 +2090,39 @@ basic_filebuf_char* __thiscall basic_filebuf_char_open_wchar(basic_filebuf_char
return NULL; return NULL;
} }
return f;
}
/* ?_Fiopen@std@@YAPAU_iobuf@@PBDHH@Z */
/* ?_Fiopen@std@@YAPEAU_iobuf@@PEBDHH@Z */
FILE* __cdecl _Fiopen(const char *name, int mode, int prot)
{
wchar_t nameW[FILENAME_MAX];
TRACE("(%s %d %d)\n", name, mode, prot);
if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
return NULL;
return _Fiopen_wchar(nameW, mode, prot);
}
/* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PB_WHH@Z */
/* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEB_WHH@Z */
/* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBGHH@Z */
/* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBGHH@Z */
DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_wchar, 16)
basic_filebuf_char* __thiscall basic_filebuf_char_open_wchar(basic_filebuf_char *this, const wchar_t *name, int mode, int prot)
{
FILE *f = NULL;
TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
if(basic_filebuf_char_is_open(this))
return NULL;
if(!(f = _Fiopen_wchar(name, mode, prot)))
return NULL;
basic_filebuf_char__Init(this, f, INITFL_open); basic_filebuf_char__Init(this, f, INITFL_open);
basic_filebuf_char__Initcvt(this, codecvt_char_use_facet(this->base.loc)); basic_filebuf_char__Initcvt(this, codecvt_char_use_facet(this->base.loc));
return this; return this;
......
...@@ -2206,12 +2206,12 @@ ...@@ -2206,12 +2206,12 @@
@ cdecl -arch=win64 ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADDH@Z(ptr ptr long long) num_put_wchar__Ffmt @ cdecl -arch=win64 ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADDH@Z(ptr ptr long long) num_put_wchar__Ffmt
@ thiscall -arch=win32 ?_Findarr@ios_base@std@@AAEAAU_Iosarray@12@H@Z(ptr long) ios_base_Findarr @ thiscall -arch=win32 ?_Findarr@ios_base@std@@AAEAAU_Iosarray@12@H@Z(ptr long) ios_base_Findarr
@ cdecl -arch=win64 ?_Findarr@ios_base@std@@AEAAAEAU_Iosarray@12@H@Z(ptr long) ios_base_Findarr @ cdecl -arch=win64 ?_Findarr@ios_base@std@@AEAAAEAU_Iosarray@12@H@Z(ptr long) ios_base_Findarr
@ stub -arch=win32 ?_Fiopen@std@@YAPAU_iobuf@@PBDHH@Z @ cdecl -arch=win32 ?_Fiopen@std@@YAPAU_iobuf@@PBDHH@Z(str long long) _Fiopen
@ stub -arch=win64 ?_Fiopen@std@@YAPEAU_iobuf@@PEBDHH@Z @ cdecl -arch=win64 ?_Fiopen@std@@YAPEAU_iobuf@@PEBDHH@Z(str long long) _Fiopen
@ stub -arch=win32 ?_Fiopen@std@@YAPAU_iobuf@@PBGHH@Z @ cdecl -arch=win32 ?_Fiopen@std@@YAPAU_iobuf@@PBGHH@Z(wstr long long) _Fiopen_wchar
@ stub -arch=win64 ?_Fiopen@std@@YAPEAU_iobuf@@PEBGHH@Z @ cdecl -arch=win64 ?_Fiopen@std@@YAPEAU_iobuf@@PEBGHH@Z(wstr long long) _Fiopen_wchar
@ stub -arch=win32 ?_Fiopen@std@@YAPAU_iobuf@@PB_WHH@Z @ cdecl -arch=win32 ?_Fiopen@std@@YAPAU_iobuf@@PB_WHH@Z(wstr long long) _Fiopen_wchar
@ stub -arch=win64 ?_Fiopen@std@@YAPEAU_iobuf@@PEB_WHH@Z @ cdecl -arch=win64 ?_Fiopen@std@@YAPEAU_iobuf@@PEB_WHH@Z(wstr long long) _Fiopen_wchar
@ cdecl -arch=win32 ?_Fput@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DPBDIIII@Z(ptr ptr long ptr ptr long str long long long long) num_put_char__Fput @ cdecl -arch=win32 ?_Fput@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DPBDIIII@Z(ptr ptr long ptr ptr long str long long long long) num_put_char__Fput
@ cdecl -arch=win64 ?_Fput@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DPEBD_K333@Z(ptr ptr ptr ptr long str long long long long) num_put_char__Fput @ cdecl -arch=win64 ?_Fput@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DPEBD_K333@Z(ptr ptr ptr ptr long str long long long long) num_put_char__Fput
@ stub -arch=win32 ?_Fput@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GPBDIIII@Z @ stub -arch=win32 ?_Fput@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GPBDIIII@Z
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment