From: "Iván Matellanes" Subject: [3/6] msvcirt: Forward signed char exports to char functions directly Message-Id: <1469095012-6244-3-git-send-email-matellanes.ivan@gmail.com> Date: Thu, 21 Jul 2016 10:56:52 +0100 In-Reply-To: <1469095012-6244-1-git-send-email-matellanes.ivan@gmail.com> References: <1469095012-6244-1-git-send-email-matellanes.ivan@gmail.com> signed char and char are equivalent in Visual C++, so specific functions for signed char are unnecessary. Signed-off-by: Iván Matellanes --- dlls/msvcirt/msvcirt.c | 44 ++++++++++++++++---------------------------- dlls/msvcirt/msvcirt.spec | 24 ++++++++++++------------ 2 files changed, 28 insertions(+), 40 deletions(-) diff --git a/dlls/msvcirt/msvcirt.c b/dlls/msvcirt/msvcirt.c index 7ea6541..78917f8 100644 --- a/dlls/msvcirt/msvcirt.c +++ b/dlls/msvcirt/msvcirt.c @@ -2458,10 +2458,12 @@ void __thiscall ostream_osfx(ostream *this) ios_unlock(base); } +/* ?put@ostream@@QAEAAV1@C@Z */ +/* ?put@ostream@@QEAAAEAV1@C@Z */ /* ?put@ostream@@QAEAAV1@D@Z */ /* ?put@ostream@@QEAAAEAV1@D@Z */ -DEFINE_THISCALL_WRAPPER(ostream_put_char, 8) -ostream* __thiscall ostream_put_char(ostream *this, char c) +DEFINE_THISCALL_WRAPPER(ostream_put, 8) +ostream* __thiscall ostream_put(ostream *this, char c) { ios *base = ostream_get_ios(this); @@ -2475,20 +2477,12 @@ ostream* __thiscall ostream_put_char(ostream *this, char c) return this; } -/* ?put@ostream@@QAEAAV1@C@Z */ -/* ?put@ostream@@QEAAAEAV1@C@Z */ -DEFINE_THISCALL_WRAPPER(ostream_put_signed_char, 8) -ostream* __thiscall ostream_put_signed_char(ostream *this, signed char c) -{ - return ostream_put_char(this, (char) c); -} - /* ?put@ostream@@QAEAAV1@E@Z */ /* ?put@ostream@@QEAAAEAV1@E@Z */ -DEFINE_THISCALL_WRAPPER(ostream_put_unsigned_char, 8) -ostream* __thiscall ostream_put_unsigned_char(ostream *this, unsigned char c) +DEFINE_THISCALL_WRAPPER(ostream_put_unsigned, 8) +ostream* __thiscall ostream_put_unsigned(ostream *this, unsigned char c) { - return ostream_put_char(this, (char) c); + return ostream_put(this, c); } /* ?seekp@ostream@@QAEAAV1@J@Z */ @@ -2540,10 +2534,12 @@ streampos __thiscall ostream_tellp(ostream *this) return pos; } +/* ?write@ostream@@QAEAAV1@PBCH@Z */ +/* ?write@ostream@@QEAAAEAV1@PEBCH@Z */ /* ?write@ostream@@QAEAAV1@PBDH@Z */ /* ?write@ostream@@QEAAAEAV1@PEBDH@Z */ -DEFINE_THISCALL_WRAPPER(ostream_write_char, 12) -ostream* __thiscall ostream_write_char(ostream *this, const char *str, int count) +DEFINE_THISCALL_WRAPPER(ostream_write, 12) +ostream* __thiscall ostream_write(ostream *this, const char *str, int count) { ios *base = ostream_get_ios(this); @@ -2557,20 +2553,12 @@ ostream* __thiscall ostream_write_char(ostream *this, const char *str, int count return this; } -/* ?write@ostream@@QAEAAV1@PBCH@Z */ -/* ?write@ostream@@QEAAAEAV1@PEBCH@Z */ -DEFINE_THISCALL_WRAPPER(ostream_write_signed_char, 12) -ostream* __thiscall ostream_write_signed_char(ostream *this, const signed char *str, int count) -{ - return ostream_write_char(this, (const char*) str, count); -} - /* ?write@ostream@@QAEAAV1@PBEH@Z */ /* ?write@ostream@@QEAAAEAV1@PEBEH@Z */ -DEFINE_THISCALL_WRAPPER(ostream_write_unsigned_char, 12) -ostream* __thiscall ostream_write_unsigned_char(ostream *this, const unsigned char *str, int count) +DEFINE_THISCALL_WRAPPER(ostream_write_unsigned, 12) +ostream* __thiscall ostream_write_unsigned(ostream *this, const unsigned char *str, int count) { - return ostream_write_char(this, (const char*) str, count); + return ostream_write(this, (const char*) str, count); } /* ?writepad@ostream@@AAEAAV1@PBD0@Z */ @@ -2858,7 +2846,7 @@ ostream* __thiscall ostream_print_ios_manip(ostream *this, ios* (__cdecl *func)( ostream* __cdecl ostream_endl(ostream *this) { TRACE("(%p)\n", this); - ostream_put_char(this, '\n'); + ostream_put(this, '\n'); return ostream_flush(this); } @@ -2867,7 +2855,7 @@ ostream* __cdecl ostream_endl(ostream *this) ostream* __cdecl ostream_ends(ostream *this) { TRACE("(%p)\n", this); - return ostream_put_char(this, 0); + return ostream_put(this, 0); } /* ?flush@@YAAAVostream@@AAV1@@Z */ diff --git a/dlls/msvcirt/msvcirt.spec b/dlls/msvcirt/msvcirt.spec index 74dde53..0a92096 100644 --- a/dlls/msvcirt/msvcirt.spec +++ b/dlls/msvcirt/msvcirt.spec @@ -603,12 +603,12 @@ @ cdecl -arch=win64 ?precision@ios@@QEAAHH@Z(ptr long) ios_precision_set @ thiscall -arch=win32 ?precision@ios@@QBEHXZ(ptr) ios_precision_get @ cdecl -arch=win64 ?precision@ios@@QEBAHXZ(ptr) ios_precision_get -@ thiscall -arch=win32 ?put@ostream@@QAEAAV1@C@Z(ptr long) ostream_put_signed_char -@ cdecl -arch=win64 ?put@ostream@@QEAAAEAV1@C@Z(ptr long) ostream_put_signed_char -@ thiscall -arch=win32 ?put@ostream@@QAEAAV1@D@Z(ptr long) ostream_put_char -@ cdecl -arch=win64 ?put@ostream@@QEAAAEAV1@D@Z(ptr long) ostream_put_char -@ thiscall -arch=win32 ?put@ostream@@QAEAAV1@E@Z(ptr long) ostream_put_unsigned_char -@ cdecl -arch=win64 ?put@ostream@@QEAAAEAV1@E@Z(ptr long) ostream_put_unsigned_char +@ thiscall -arch=win32 ?put@ostream@@QAEAAV1@C@Z(ptr long) ostream_put +@ cdecl -arch=win64 ?put@ostream@@QEAAAEAV1@C@Z(ptr long) ostream_put +@ thiscall -arch=win32 ?put@ostream@@QAEAAV1@D@Z(ptr long) ostream_put +@ cdecl -arch=win64 ?put@ostream@@QEAAAEAV1@D@Z(ptr long) ostream_put +@ thiscall -arch=win32 ?put@ostream@@QAEAAV1@E@Z(ptr long) ostream_put_unsigned +@ cdecl -arch=win64 ?put@ostream@@QEAAAEAV1@E@Z(ptr long) ostream_put_unsigned @ thiscall -arch=win32 ?putback@istream@@QAEAAV1@D@Z(ptr long) istream_putback @ cdecl -arch=win64 ?putback@istream@@QEAAAEAV1@D@Z(ptr long) istream_putback @ thiscall -arch=win32 ?pword@ios@@QBEAAPAXH@Z(ptr long) ios_pword @@ -766,12 +766,12 @@ @ cdecl -arch=win64 ?width@ios@@QEAAHH@Z(ptr long) ios_width_set @ thiscall -arch=win32 ?width@ios@@QBEHXZ(ptr) ios_width_get @ cdecl -arch=win64 ?width@ios@@QEBAHXZ(ptr) ios_width_get -@ thiscall -arch=win32 ?write@ostream@@QAEAAV1@PBCH@Z(ptr str long) ostream_write_signed_char -@ cdecl -arch=win64 ?write@ostream@@QEAAAEAV1@PEBCH@Z(ptr str long) ostream_write_signed_char -@ thiscall -arch=win32 ?write@ostream@@QAEAAV1@PBDH@Z(ptr str long) ostream_write_char -@ cdecl -arch=win64 ?write@ostream@@QEAAAEAV1@PEBDH@Z(ptr str long) ostream_write_char -@ thiscall -arch=win32 ?write@ostream@@QAEAAV1@PBEH@Z(ptr str long) ostream_write_unsigned_char -@ cdecl -arch=win64 ?write@ostream@@QEAAAEAV1@PEBEH@Z(ptr str long) ostream_write_unsigned_char +@ thiscall -arch=win32 ?write@ostream@@QAEAAV1@PBCH@Z(ptr str long) ostream_write +@ cdecl -arch=win64 ?write@ostream@@QEAAAEAV1@PEBCH@Z(ptr str long) ostream_write +@ thiscall -arch=win32 ?write@ostream@@QAEAAV1@PBDH@Z(ptr str long) ostream_write +@ cdecl -arch=win64 ?write@ostream@@QEAAAEAV1@PEBDH@Z(ptr str long) ostream_write +@ thiscall -arch=win32 ?write@ostream@@QAEAAV1@PBEH@Z(ptr str long) ostream_write_unsigned +@ cdecl -arch=win64 ?write@ostream@@QEAAAEAV1@PEBEH@Z(ptr str long) ostream_write_unsigned @ thiscall -arch=win32 ?writepad@ostream@@AAEAAV1@PBD0@Z(ptr str str) ostream_writepad @ cdecl -arch=win64 ?writepad@ostream@@AEAAAEAV1@PEBD0@Z(ptr str str) ostream_writepad @ cdecl -arch=win32 ?ws@@YAAAVistream@@AAV1@@Z(ptr) istream_ws -- 2.7.4