msvcrt: Move _initterm_e implementation (from msvcr90).

This commit is contained in:
Piotr Caban 2010-11-17 23:42:29 +01:00 committed by Alexandre Julliard
parent bf446e7cfb
commit 2770155532
4 changed files with 27 additions and 28 deletions

View file

@ -30,8 +30,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(msvcr90);
typedef int (CDECL *_INITTERM_E_FN)(void);
/*********************************************************************
* DllMain (MSVCR90.@)
*/
@ -80,30 +78,6 @@ void * CDECL _encoded_null(void)
return MSVCR90_encode_pointer(NULL);
}
/*********************************************************************
* _initterm_e (MSVCR90.@)
*
* call an array of application initialization functions and report the return value
*/
int CDECL _initterm_e(_INITTERM_E_FN *table, _INITTERM_E_FN *end)
{
int res = 0;
TRACE("(%p, %p)\n", table, end);
while (!res && table < end) {
if (*table) {
TRACE("calling %p\n", **table);
res = (**table)();
if (res)
TRACE("function %p failed: 0x%x\n", *table, res);
}
table++;
}
return res;
}
/*********************************************************************
* _invalid_parameter_noinfo (MSVCR90.@)
*/

View file

@ -571,7 +571,7 @@
@ cdecl _i64tow_s(int64 ptr long long) msvcrt._i64tow_s
@ stub _initptd
@ cdecl _initterm(ptr ptr) msvcrt._initterm
@ cdecl _initterm_e(ptr ptr)
@ cdecl _initterm_e(ptr ptr) msvcrt._initterm_e
@ stub _inp
@ stub _inpd
@ stub _inpw

View file

@ -132,6 +132,7 @@ MSVCRT_wchar_t ** msvcrt_SnapshotOfEnvironmentW(MSVCRT_wchar_t **wblk)
}
typedef void (CDECL *_INITTERMFUN)(void);
typedef int (CDECL *_INITTERM_E_FN)(void);
/***********************************************************************
* __p___argc (MSVCRT.@)
@ -395,6 +396,30 @@ void CDECL _initterm(_INITTERMFUN *start,_INITTERMFUN *end)
}
}
/*********************************************************************
* _initterm_e (MSVCRT.@)
*
* call an array of application initialization functions and report the return value
*/
int CDECL _initterm_e(_INITTERM_E_FN *table, _INITTERM_E_FN *end)
{
int res = 0;
TRACE("(%p, %p)\n", table, end);
while (!res && table < end) {
if (*table) {
TRACE("calling %p\n", **table);
res = (**table)();
if (res)
TRACE("function %p failed: 0x%x\n", *table, res);
}
table++;
}
return res;
}
/*********************************************************************
* __set_app_type (MSVCRT.@)
*/

View file

@ -518,7 +518,7 @@
@ cdecl _i64tow(int64 ptr long) ntdll._i64tow
@ cdecl _i64tow_s(int64 ptr long long) _i64tow_s
@ cdecl _initterm(ptr ptr)
# stub _initterm_e
@ cdecl _initterm_e(ptr ptr)
@ stub _inp #(long) -i386
@ stub _inpd #(long) -i386
@ stub _inpw #(long) -i386