winecfg: Update Portuguese translation.
[wine/testsucceed.git] / dlls / msvcirt / msvcirt.c
blob924e84c73077262eadd6651102766f7d70e1f2b4
1 /*
2 * Copyright (C) 2007 Alexandre Julliard
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include "config.h"
20 #include "wine/port.h"
22 #include <stdarg.h>
24 #include "windef.h"
25 #include "winbase.h"
26 #include "wine/debug.h"
28 WINE_DEFAULT_DEBUG_CHANNEL(msvcirt);
30 typedef struct {
31 LPVOID VTable;
32 } class_ostream;
34 #ifdef __i386__ /* thiscall functions are i386-specific */
36 #define THISCALL(func) __thiscall_ ## func
37 #define THISCALL_NAME(func) __ASM_NAME("__thiscall_" #func)
38 #define DEFINE_THISCALL_WRAPPER(func,args) \
39 extern void THISCALL(func)(void); \
40 __ASM_GLOBAL_FUNC(__thiscall_ ## func, \
41 "popl %eax\n\t" \
42 "pushl %ecx\n\t" \
43 "pushl %eax\n\t" \
44 "jmp " __ASM_NAME(#func) __ASM_STDCALL(args) )
45 #else /* __i386__ */
47 #define THISCALL(func) func
48 #define THISCALL_NAME(func) __ASM_NAME(#func)
49 #define DEFINE_THISCALL_WRAPPER(func,args) /* nothing */
51 #endif /* __i386__ */
53 /******************************************************************
54 * ??6ostream@@QAEAAV0@H@Z (MSVCRTI.@)
55 * class ostream & __thiscall ostream::operator<<(int)
57 DEFINE_THISCALL_WRAPPER(MSVCIRT_operator_sl_int,8)
58 void * __stdcall MSVCIRT_operator_sl_int(class_ostream * _this, int integer)
60 FIXME("(%p)->(%d) stub\n", _this, integer);
61 return _this;
64 /******************************************************************
65 * ??6ostream@@QAEAAV0@PBD@Z (MSVCRTI.@)
66 * class ostream & __thiscall ostream::operator<<(char const *)
68 DEFINE_THISCALL_WRAPPER(MSVCIRT_operator_sl_pchar,8)
69 void * __stdcall MSVCIRT_operator_sl_pchar(class_ostream * _this, const char * string)
71 FIXME("(%p)->(%s) stub\n", _this, debugstr_a(string));
72 return _this;
75 /******************************************************************
76 * ??6ostream@@QAEAAV0@P6AAAV0@AAV0@@Z@Z (MSVCRTI.@)
77 * class ostream & __thiscall ostream::operator<<(class ostream & (__cdecl*)(class ostream &))
79 DEFINE_THISCALL_WRAPPER(MSVCIRT_operator_sl_callback,8)
80 void * __stdcall MSVCIRT_operator_sl_callback(class_ostream * _this, class_ostream * (__cdecl*func)(class_ostream*))
82 TRACE("%p, %p\n", _this, func);
83 return func(_this);
86 /******************************************************************
87 * ?endl@@YAAAVostream@@AAV1@@Z (MSVCRTI.@)
88 * class ostream & __cdecl endl(class ostream &)
90 void * CDECL MSVCIRT_endl(class_ostream * _this)
92 FIXME("(%p)->() stub\n", _this);
93 return _this;
96 BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
98 switch (reason)
100 case DLL_WINE_PREATTACH:
101 return FALSE; /* prefer native version */
102 case DLL_PROCESS_ATTACH:
103 DisableThreadLibraryCalls( inst );
104 break;
106 return TRUE;