Commit 24beabfd authored by Alexandre Julliard's avatar Alexandre Julliard

msvcrt: Explicitly specify CDECL calling convention on exported functions.

parent 28bbdf11
...@@ -64,7 +64,7 @@ void msvcrt_free_console(void) ...@@ -64,7 +64,7 @@ void msvcrt_free_console(void)
/********************************************************************* /*********************************************************************
* _cputs (MSVCRT.@) * _cputs (MSVCRT.@)
*/ */
int _cputs(const char* str) int CDECL _cputs(const char* str)
{ {
DWORD count; DWORD count;
int retval = MSVCRT_EOF; int retval = MSVCRT_EOF;
...@@ -80,7 +80,7 @@ int _cputs(const char* str) ...@@ -80,7 +80,7 @@ int _cputs(const char* str)
/********************************************************************* /*********************************************************************
* _getch (MSVCRT.@) * _getch (MSVCRT.@)
*/ */
int _getch(void) int CDECL _getch(void)
{ {
int retval = MSVCRT_EOF; int retval = MSVCRT_EOF;
...@@ -125,7 +125,7 @@ int _getch(void) ...@@ -125,7 +125,7 @@ int _getch(void)
/********************************************************************* /*********************************************************************
* _putch (MSVCRT.@) * _putch (MSVCRT.@)
*/ */
int _putch(int c) int CDECL _putch(int c)
{ {
int retval = MSVCRT_EOF; int retval = MSVCRT_EOF;
DWORD count; DWORD count;
...@@ -139,7 +139,7 @@ int _putch(int c) ...@@ -139,7 +139,7 @@ int _putch(int c)
/********************************************************************* /*********************************************************************
* _getche (MSVCRT.@) * _getche (MSVCRT.@)
*/ */
int _getche(void) int CDECL _getche(void)
{ {
int retval; int retval;
LOCK_CONSOLE; LOCK_CONSOLE;
...@@ -153,7 +153,7 @@ int _getche(void) ...@@ -153,7 +153,7 @@ int _getche(void)
/********************************************************************* /*********************************************************************
* _cgets (MSVCRT.@) * _cgets (MSVCRT.@)
*/ */
char* _cgets(char* str) char* CDECL _cgets(char* str)
{ {
char *buf = str + 2; char *buf = str + 2;
DWORD got; DWORD got;
...@@ -191,7 +191,7 @@ char* _cgets(char* str) ...@@ -191,7 +191,7 @@ char* _cgets(char* str)
/********************************************************************* /*********************************************************************
* _ungetch (MSVCRT.@) * _ungetch (MSVCRT.@)
*/ */
int _ungetch(int c) int CDECL _ungetch(int c)
{ {
int retval = MSVCRT_EOF; int retval = MSVCRT_EOF;
LOCK_CONSOLE; LOCK_CONSOLE;
...@@ -204,7 +204,7 @@ int _ungetch(int c) ...@@ -204,7 +204,7 @@ int _ungetch(int c)
/********************************************************************* /*********************************************************************
* _kbhit (MSVCRT.@) * _kbhit (MSVCRT.@)
*/ */
int _kbhit(void) int CDECL _kbhit(void)
{ {
int retval = 0; int retval = 0;
...@@ -242,7 +242,7 @@ int _kbhit(void) ...@@ -242,7 +242,7 @@ int _kbhit(void)
/********************************************************************* /*********************************************************************
* _cprintf (MSVCRT.@) * _cprintf (MSVCRT.@)
*/ */
int _cprintf(const char* format, ...) int CDECL _cprintf(const char* format, ...)
{ {
char buf[2048], *mem = buf; char buf[2048], *mem = buf;
int written, resize = sizeof(buf), retval; int written, resize = sizeof(buf), retval;
......
...@@ -950,7 +950,7 @@ static const cxx_exception_type __non_rtti_object_exception_type = ...@@ -950,7 +950,7 @@ static const cxx_exception_type __non_rtti_object_exception_type =
* RETURNS * RETURNS
* The previously installed handler function, if any. * The previously installed handler function, if any.
*/ */
MSVCRT_terminate_function MSVCRT_set_terminate(MSVCRT_terminate_function func) MSVCRT_terminate_function CDECL MSVCRT_set_terminate(MSVCRT_terminate_function func)
{ {
thread_data_t *data = msvcrt_get_thread_data(); thread_data_t *data = msvcrt_get_thread_data();
MSVCRT_terminate_function previous = data->terminate_handler; MSVCRT_terminate_function previous = data->terminate_handler;
...@@ -970,7 +970,7 @@ MSVCRT_terminate_function MSVCRT_set_terminate(MSVCRT_terminate_function func) ...@@ -970,7 +970,7 @@ MSVCRT_terminate_function MSVCRT_set_terminate(MSVCRT_terminate_function func)
* RETURNS * RETURNS
* The previously installed handler function, if any. * The previously installed handler function, if any.
*/ */
MSVCRT_unexpected_function MSVCRT_set_unexpected(MSVCRT_unexpected_function func) MSVCRT_unexpected_function CDECL MSVCRT_set_unexpected(MSVCRT_unexpected_function func)
{ {
thread_data_t *data = msvcrt_get_thread_data(); thread_data_t *data = msvcrt_get_thread_data();
MSVCRT_unexpected_function previous = data->unexpected_handler; MSVCRT_unexpected_function previous = data->unexpected_handler;
...@@ -982,7 +982,7 @@ MSVCRT_unexpected_function MSVCRT_set_unexpected(MSVCRT_unexpected_function func ...@@ -982,7 +982,7 @@ MSVCRT_unexpected_function MSVCRT_set_unexpected(MSVCRT_unexpected_function func
/****************************************************************** /******************************************************************
* ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z (MSVCRT.@) * ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z (MSVCRT.@)
*/ */
MSVCRT__se_translator_function MSVCRT__set_se_translator(MSVCRT__se_translator_function func) MSVCRT__se_translator_function CDECL MSVCRT__set_se_translator(MSVCRT__se_translator_function func)
{ {
thread_data_t *data = msvcrt_get_thread_data(); thread_data_t *data = msvcrt_get_thread_data();
MSVCRT__se_translator_function previous = data->se_translator; MSVCRT__se_translator_function previous = data->se_translator;
...@@ -1004,7 +1004,7 @@ MSVCRT__se_translator_function MSVCRT__set_se_translator(MSVCRT__se_translator_f ...@@ -1004,7 +1004,7 @@ MSVCRT__se_translator_function MSVCRT__set_se_translator(MSVCRT__se_translator_f
* handler installed by calling set_terminate(), or (by default) abort() * handler installed by calling set_terminate(), or (by default) abort()
* is called. * is called.
*/ */
void MSVCRT_terminate(void) void CDECL MSVCRT_terminate(void)
{ {
thread_data_t *data = msvcrt_get_thread_data(); thread_data_t *data = msvcrt_get_thread_data();
if (data->terminate_handler) data->terminate_handler(); if (data->terminate_handler) data->terminate_handler();
...@@ -1014,7 +1014,7 @@ void MSVCRT_terminate(void) ...@@ -1014,7 +1014,7 @@ void MSVCRT_terminate(void)
/****************************************************************** /******************************************************************
* ?unexpected@@YAXXZ (MSVCRT.@) * ?unexpected@@YAXXZ (MSVCRT.@)
*/ */
void MSVCRT_unexpected(void) void CDECL MSVCRT_unexpected(void)
{ {
thread_data_t *data = msvcrt_get_thread_data(); thread_data_t *data = msvcrt_get_thread_data();
if (data->unexpected_handler) data->unexpected_handler(); if (data->unexpected_handler) data->unexpected_handler();
...@@ -1040,7 +1040,7 @@ void MSVCRT_unexpected(void) ...@@ -1040,7 +1040,7 @@ void MSVCRT_unexpected(void)
* This function is usually called by compiler generated code as a result * This function is usually called by compiler generated code as a result
* of using one of the C++ dynamic cast statements. * of using one of the C++ dynamic cast statements.
*/ */
const type_info* MSVCRT___RTtypeid(void *cppobj) const type_info* CDECL MSVCRT___RTtypeid(void *cppobj)
{ {
const type_info *ret; const type_info *ret;
...@@ -1090,9 +1090,9 @@ const type_info* MSVCRT___RTtypeid(void *cppobj) ...@@ -1090,9 +1090,9 @@ const type_info* MSVCRT___RTtypeid(void *cppobj)
* This function is usually called by compiler generated code as a result * This function is usually called by compiler generated code as a result
* of using one of the C++ dynamic cast statements. * of using one of the C++ dynamic cast statements.
*/ */
void* MSVCRT___RTDynamicCast(void *cppobj, int unknown, void* CDECL MSVCRT___RTDynamicCast(void *cppobj, int unknown,
type_info *src, type_info *dst, type_info *src, type_info *dst,
int do_throw) int do_throw)
{ {
void *ret; void *ret;
...@@ -1170,7 +1170,7 @@ void* MSVCRT___RTDynamicCast(void *cppobj, int unknown, ...@@ -1170,7 +1170,7 @@ void* MSVCRT___RTDynamicCast(void *cppobj, int unknown,
* This function is usually called by compiler generated code as a result * This function is usually called by compiler generated code as a result
* of using one of the C++ dynamic cast statements. * of using one of the C++ dynamic cast statements.
*/ */
void* MSVCRT___RTCastToVoid(void *cppobj) void* CDECL MSVCRT___RTCastToVoid(void *cppobj)
{ {
void *ret; void *ret;
......
...@@ -43,10 +43,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(seh); ...@@ -43,10 +43,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(seh);
#ifdef __i386__ /* CxxFrameHandler is not supported on non-i386 */ #ifdef __i386__ /* CxxFrameHandler is not supported on non-i386 */
DWORD cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame, DWORD CDECL cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame,
PCONTEXT context, EXCEPTION_REGISTRATION_RECORD** dispatch, PCONTEXT context, EXCEPTION_REGISTRATION_RECORD** dispatch,
cxx_function_descr *descr, EXCEPTION_REGISTRATION_RECORD* nested_frame, cxx_function_descr *descr, EXCEPTION_REGISTRATION_RECORD* nested_frame,
int nested_trylevel ); int nested_trylevel );
/* call a function with a given ebp */ /* call a function with a given ebp */
inline static void *call_ebp_func( void *func, void *ebp ) inline static void *call_ebp_func( void *func, void *ebp )
...@@ -355,10 +355,10 @@ inline static void call_catch_block( PEXCEPTION_RECORD rec, cxx_exception_frame ...@@ -355,10 +355,10 @@ inline static void call_catch_block( PEXCEPTION_RECORD rec, cxx_exception_frame
* *
* Implementation of __CxxFrameHandler. * Implementation of __CxxFrameHandler.
*/ */
DWORD cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame, DWORD CDECL cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame,
PCONTEXT context, EXCEPTION_REGISTRATION_RECORD** dispatch, PCONTEXT context, EXCEPTION_REGISTRATION_RECORD** dispatch,
cxx_function_descr *descr, EXCEPTION_REGISTRATION_RECORD* nested_frame, cxx_function_descr *descr, EXCEPTION_REGISTRATION_RECORD* nested_frame,
int nested_trylevel ) int nested_trylevel )
{ {
cxx_exception_type *exc_type; cxx_exception_type *exc_type;
...@@ -408,8 +408,8 @@ DWORD cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame, ...@@ -408,8 +408,8 @@ DWORD cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame,
/********************************************************************* /*********************************************************************
* __CxxFrameHandler (MSVCRT.@) * __CxxFrameHandler (MSVCRT.@)
*/ */
extern DWORD __CxxFrameHandler( PEXCEPTION_RECORD rec, EXCEPTION_REGISTRATION_RECORD* frame, extern DWORD CDECL __CxxFrameHandler( PEXCEPTION_RECORD rec, EXCEPTION_REGISTRATION_RECORD* frame,
PCONTEXT context, EXCEPTION_REGISTRATION_RECORD** dispatch ); PCONTEXT context, EXCEPTION_REGISTRATION_RECORD** dispatch );
__ASM_GLOBAL_FUNC( __CxxFrameHandler, __ASM_GLOBAL_FUNC( __CxxFrameHandler,
"pushl $0\n\t" /* nested_trylevel */ "pushl $0\n\t" /* nested_trylevel */
"pushl $0\n\t" /* nested_frame */ "pushl $0\n\t" /* nested_frame */
...@@ -427,7 +427,7 @@ __ASM_GLOBAL_FUNC( __CxxFrameHandler, ...@@ -427,7 +427,7 @@ __ASM_GLOBAL_FUNC( __CxxFrameHandler,
/********************************************************************* /*********************************************************************
* _CxxThrowException (MSVCRT.@) * _CxxThrowException (MSVCRT.@)
*/ */
void _CxxThrowException( exception *object, const cxx_exception_type *type ) void CDECL _CxxThrowException( exception *object, const cxx_exception_type *type )
{ {
ULONG_PTR args[3]; ULONG_PTR args[3];
...@@ -440,7 +440,7 @@ void _CxxThrowException( exception *object, const cxx_exception_type *type ) ...@@ -440,7 +440,7 @@ void _CxxThrowException( exception *object, const cxx_exception_type *type )
/********************************************************************* /*********************************************************************
* __CxxDetectRethrow (MSVCRT.@) * __CxxDetectRethrow (MSVCRT.@)
*/ */
BOOL __CxxDetectRethrow(PEXCEPTION_POINTERS ptrs) BOOL CDECL __CxxDetectRethrow(PEXCEPTION_POINTERS ptrs)
{ {
PEXCEPTION_RECORD rec; PEXCEPTION_RECORD rec;
...@@ -463,7 +463,7 @@ BOOL __CxxDetectRethrow(PEXCEPTION_POINTERS ptrs) ...@@ -463,7 +463,7 @@ BOOL __CxxDetectRethrow(PEXCEPTION_POINTERS ptrs)
/********************************************************************* /*********************************************************************
* __CxxQueryExceptionSize (MSVCRT.@) * __CxxQueryExceptionSize (MSVCRT.@)
*/ */
unsigned int __CxxQueryExceptionSize(void) unsigned int CDECL __CxxQueryExceptionSize(void)
{ {
return sizeof(cxx_exception_type); return sizeof(cxx_exception_type);
} }
...@@ -68,7 +68,7 @@ extern LCID MSVCRT_current_lc_all_lcid; ...@@ -68,7 +68,7 @@ extern LCID MSVCRT_current_lc_all_lcid;
/********************************************************************* /*********************************************************************
* __p__pctype (MSVCRT.@) * __p__pctype (MSVCRT.@)
*/ */
WORD** __p__pctype(void) WORD** CDECL __p__pctype(void)
{ {
return &MSVCRT__pctype; return &MSVCRT__pctype;
} }
...@@ -76,7 +76,7 @@ WORD** __p__pctype(void) ...@@ -76,7 +76,7 @@ WORD** __p__pctype(void)
/********************************************************************* /*********************************************************************
* _isctype (MSVCRT.@) * _isctype (MSVCRT.@)
*/ */
int _isctype(int c, int type) int CDECL _isctype(int c, int type)
{ {
if (c >= -1 && c <= 255) if (c >= -1 && c <= 255)
return MSVCRT__pctype[c] & type; return MSVCRT__pctype[c] & type;
...@@ -102,7 +102,7 @@ int _isctype(int c, int type) ...@@ -102,7 +102,7 @@ int _isctype(int c, int type)
/********************************************************************* /*********************************************************************
* isalnum (MSVCRT.@) * isalnum (MSVCRT.@)
*/ */
int MSVCRT_isalnum(int c) int CDECL MSVCRT_isalnum(int c)
{ {
return _isctype( c, MSVCRT__ALPHA | MSVCRT__DIGIT ); return _isctype( c, MSVCRT__ALPHA | MSVCRT__DIGIT );
} }
...@@ -110,7 +110,7 @@ int MSVCRT_isalnum(int c) ...@@ -110,7 +110,7 @@ int MSVCRT_isalnum(int c)
/********************************************************************* /*********************************************************************
* isalpha (MSVCRT.@) * isalpha (MSVCRT.@)
*/ */
int MSVCRT_isalpha(int c) int CDECL MSVCRT_isalpha(int c)
{ {
return _isctype( c, MSVCRT__ALPHA ); return _isctype( c, MSVCRT__ALPHA );
} }
...@@ -118,7 +118,7 @@ int MSVCRT_isalpha(int c) ...@@ -118,7 +118,7 @@ int MSVCRT_isalpha(int c)
/********************************************************************* /*********************************************************************
* iscntrl (MSVCRT.@) * iscntrl (MSVCRT.@)
*/ */
int MSVCRT_iscntrl(int c) int CDECL MSVCRT_iscntrl(int c)
{ {
return _isctype( c, MSVCRT__CONTROL ); return _isctype( c, MSVCRT__CONTROL );
} }
...@@ -126,7 +126,7 @@ int MSVCRT_iscntrl(int c) ...@@ -126,7 +126,7 @@ int MSVCRT_iscntrl(int c)
/********************************************************************* /*********************************************************************
* isdigit (MSVCRT.@) * isdigit (MSVCRT.@)
*/ */
int MSVCRT_isdigit(int c) int CDECL MSVCRT_isdigit(int c)
{ {
return _isctype( c, MSVCRT__DIGIT ); return _isctype( c, MSVCRT__DIGIT );
} }
...@@ -134,7 +134,7 @@ int MSVCRT_isdigit(int c) ...@@ -134,7 +134,7 @@ int MSVCRT_isdigit(int c)
/********************************************************************* /*********************************************************************
* isgraph (MSVCRT.@) * isgraph (MSVCRT.@)
*/ */
int MSVCRT_isgraph(int c) int CDECL MSVCRT_isgraph(int c)
{ {
return _isctype( c, MSVCRT__ALPHA | MSVCRT__DIGIT | MSVCRT__PUNCT ); return _isctype( c, MSVCRT__ALPHA | MSVCRT__DIGIT | MSVCRT__PUNCT );
} }
...@@ -142,7 +142,7 @@ int MSVCRT_isgraph(int c) ...@@ -142,7 +142,7 @@ int MSVCRT_isgraph(int c)
/********************************************************************* /*********************************************************************
* isleadbyte (MSVCRT.@) * isleadbyte (MSVCRT.@)
*/ */
int MSVCRT_isleadbyte(int c) int CDECL MSVCRT_isleadbyte(int c)
{ {
return _isctype( c, MSVCRT__LEADBYTE ); return _isctype( c, MSVCRT__LEADBYTE );
} }
...@@ -150,7 +150,7 @@ int MSVCRT_isleadbyte(int c) ...@@ -150,7 +150,7 @@ int MSVCRT_isleadbyte(int c)
/********************************************************************* /*********************************************************************
* islower (MSVCRT.@) * islower (MSVCRT.@)
*/ */
int MSVCRT_islower(int c) int CDECL MSVCRT_islower(int c)
{ {
return _isctype( c, MSVCRT__LOWER ); return _isctype( c, MSVCRT__LOWER );
} }
...@@ -158,7 +158,7 @@ int MSVCRT_islower(int c) ...@@ -158,7 +158,7 @@ int MSVCRT_islower(int c)
/********************************************************************* /*********************************************************************
* isprint (MSVCRT.@) * isprint (MSVCRT.@)
*/ */
int MSVCRT_isprint(int c) int CDECL MSVCRT_isprint(int c)
{ {
return _isctype( c, MSVCRT__ALPHA | MSVCRT__DIGIT | MSVCRT__BLANK | MSVCRT__PUNCT ); return _isctype( c, MSVCRT__ALPHA | MSVCRT__DIGIT | MSVCRT__BLANK | MSVCRT__PUNCT );
} }
...@@ -166,7 +166,7 @@ int MSVCRT_isprint(int c) ...@@ -166,7 +166,7 @@ int MSVCRT_isprint(int c)
/********************************************************************* /*********************************************************************
* ispunct (MSVCRT.@) * ispunct (MSVCRT.@)
*/ */
int MSVCRT_ispunct(int c) int CDECL MSVCRT_ispunct(int c)
{ {
return _isctype( c, MSVCRT__PUNCT ); return _isctype( c, MSVCRT__PUNCT );
} }
...@@ -174,7 +174,7 @@ int MSVCRT_ispunct(int c) ...@@ -174,7 +174,7 @@ int MSVCRT_ispunct(int c)
/********************************************************************* /*********************************************************************
* isspace (MSVCRT.@) * isspace (MSVCRT.@)
*/ */
int MSVCRT_isspace(int c) int CDECL MSVCRT_isspace(int c)
{ {
return _isctype( c, MSVCRT__SPACE ); return _isctype( c, MSVCRT__SPACE );
} }
...@@ -182,7 +182,7 @@ int MSVCRT_isspace(int c) ...@@ -182,7 +182,7 @@ int MSVCRT_isspace(int c)
/********************************************************************* /*********************************************************************
* isupper (MSVCRT.@) * isupper (MSVCRT.@)
*/ */
int MSVCRT_isupper(int c) int CDECL MSVCRT_isupper(int c)
{ {
return _isctype( c, MSVCRT__UPPER ); return _isctype( c, MSVCRT__UPPER );
} }
...@@ -190,7 +190,7 @@ int MSVCRT_isupper(int c) ...@@ -190,7 +190,7 @@ int MSVCRT_isupper(int c)
/********************************************************************* /*********************************************************************
* isxdigit (MSVCRT.@) * isxdigit (MSVCRT.@)
*/ */
int MSVCRT_isxdigit(int c) int CDECL MSVCRT_isxdigit(int c)
{ {
return _isctype( c, MSVCRT__HEX ); return _isctype( c, MSVCRT__HEX );
} }
...@@ -198,7 +198,7 @@ int MSVCRT_isxdigit(int c) ...@@ -198,7 +198,7 @@ int MSVCRT_isxdigit(int c)
/********************************************************************* /*********************************************************************
* __isascii (MSVCRT.@) * __isascii (MSVCRT.@)
*/ */
int MSVCRT___isascii(int c) int CDECL MSVCRT___isascii(int c)
{ {
return isascii((unsigned)c); return isascii((unsigned)c);
} }
...@@ -206,7 +206,7 @@ int MSVCRT___isascii(int c) ...@@ -206,7 +206,7 @@ int MSVCRT___isascii(int c)
/********************************************************************* /*********************************************************************
* __toascii (MSVCRT.@) * __toascii (MSVCRT.@)
*/ */
int MSVCRT___toascii(int c) int CDECL MSVCRT___toascii(int c)
{ {
return (unsigned)c & 0x7f; return (unsigned)c & 0x7f;
} }
...@@ -215,7 +215,7 @@ int MSVCRT___toascii(int c) ...@@ -215,7 +215,7 @@ int MSVCRT___toascii(int c)
* iswascii (MSVCRT.@) * iswascii (MSVCRT.@)
* *
*/ */
int MSVCRT_iswascii(MSVCRT_wchar_t c) int CDECL MSVCRT_iswascii(MSVCRT_wchar_t c)
{ {
return ((unsigned)c < 0x80); return ((unsigned)c < 0x80);
} }
...@@ -223,7 +223,7 @@ int MSVCRT_iswascii(MSVCRT_wchar_t c) ...@@ -223,7 +223,7 @@ int MSVCRT_iswascii(MSVCRT_wchar_t c)
/********************************************************************* /*********************************************************************
* __iscsym (MSVCRT.@) * __iscsym (MSVCRT.@)
*/ */
int MSVCRT___iscsym(int c) int CDECL MSVCRT___iscsym(int c)
{ {
return (c < 127 && (isalnum(c) || c == '_')); return (c < 127 && (isalnum(c) || c == '_'));
} }
...@@ -231,7 +231,7 @@ int MSVCRT___iscsym(int c) ...@@ -231,7 +231,7 @@ int MSVCRT___iscsym(int c)
/********************************************************************* /*********************************************************************
* __iscsymf (MSVCRT.@) * __iscsymf (MSVCRT.@)
*/ */
int MSVCRT___iscsymf(int c) int CDECL MSVCRT___iscsymf(int c)
{ {
return (c < 127 && (isalpha(c) || c == '_')); return (c < 127 && (isalpha(c) || c == '_'));
} }
...@@ -239,7 +239,7 @@ int MSVCRT___iscsymf(int c) ...@@ -239,7 +239,7 @@ int MSVCRT___iscsymf(int c)
/********************************************************************* /*********************************************************************
* _toupper (MSVCRT.@) * _toupper (MSVCRT.@)
*/ */
int MSVCRT__toupper(int c) int CDECL MSVCRT__toupper(int c)
{ {
return c - 0x20; /* sic */ return c - 0x20; /* sic */
} }
...@@ -247,7 +247,7 @@ int MSVCRT__toupper(int c) ...@@ -247,7 +247,7 @@ int MSVCRT__toupper(int c)
/********************************************************************* /*********************************************************************
* _tolower (MSVCRT.@) * _tolower (MSVCRT.@)
*/ */
int MSVCRT__tolower(int c) int CDECL MSVCRT__tolower(int c)
{ {
return c + 0x20; /* sic */ return c + 0x20; /* sic */
} }
...@@ -135,73 +135,73 @@ typedef void (*_INITTERMFUN)(void); ...@@ -135,73 +135,73 @@ typedef void (*_INITTERMFUN)(void);
/*********************************************************************** /***********************************************************************
* __p___argc (MSVCRT.@) * __p___argc (MSVCRT.@)
*/ */
int* __p___argc(void) { return &MSVCRT___argc; } int* CDECL __p___argc(void) { return &MSVCRT___argc; }
/*********************************************************************** /***********************************************************************
* __p__commode (MSVCRT.@) * __p__commode (MSVCRT.@)
*/ */
unsigned int* __p__commode(void) { return &MSVCRT__commode; } unsigned int* CDECL __p__commode(void) { return &MSVCRT__commode; }
/*********************************************************************** /***********************************************************************
* __p__pgmptr (MSVCRT.@) * __p__pgmptr (MSVCRT.@)
*/ */
char** __p__pgmptr(void) { return &MSVCRT__pgmptr; } char** CDECL __p__pgmptr(void) { return &MSVCRT__pgmptr; }
/*********************************************************************** /***********************************************************************
* __p__wpgmptr (MSVCRT.@) * __p__wpgmptr (MSVCRT.@)
*/ */
WCHAR** __p__wpgmptr(void) { return &MSVCRT__wpgmptr; } WCHAR** CDECL __p__wpgmptr(void) { return &MSVCRT__wpgmptr; }
/*********************************************************************** /***********************************************************************
* __p__fmode (MSVCRT.@) * __p__fmode (MSVCRT.@)
*/ */
unsigned int* __p__fmode(void) { return &MSVCRT__fmode; } unsigned int* CDECL __p__fmode(void) { return &MSVCRT__fmode; }
/*********************************************************************** /***********************************************************************
* __p__osver (MSVCRT.@) * __p__osver (MSVCRT.@)
*/ */
unsigned int* __p__osver(void) { return &MSVCRT__osver; } unsigned int* CDECL __p__osver(void) { return &MSVCRT__osver; }
/*********************************************************************** /***********************************************************************
* __p__winmajor (MSVCRT.@) * __p__winmajor (MSVCRT.@)
*/ */
unsigned int* __p__winmajor(void) { return &MSVCRT__winmajor; } unsigned int* CDECL __p__winmajor(void) { return &MSVCRT__winmajor; }
/*********************************************************************** /***********************************************************************
* __p__winminor (MSVCRT.@) * __p__winminor (MSVCRT.@)
*/ */
unsigned int* __p__winminor(void) { return &MSVCRT__winminor; } unsigned int* CDECL __p__winminor(void) { return &MSVCRT__winminor; }
/*********************************************************************** /***********************************************************************
* __p__winver (MSVCRT.@) * __p__winver (MSVCRT.@)
*/ */
unsigned int* __p__winver(void) { return &MSVCRT__winver; } unsigned int* CDECL __p__winver(void) { return &MSVCRT__winver; }
/********************************************************************* /*********************************************************************
* __p__acmdln (MSVCRT.@) * __p__acmdln (MSVCRT.@)
*/ */
char** __p__acmdln(void) { return &MSVCRT__acmdln; } char** CDECL __p__acmdln(void) { return &MSVCRT__acmdln; }
/********************************************************************* /*********************************************************************
* __p__wcmdln (MSVCRT.@) * __p__wcmdln (MSVCRT.@)
*/ */
MSVCRT_wchar_t** __p__wcmdln(void) { return &MSVCRT__wcmdln; } MSVCRT_wchar_t** CDECL __p__wcmdln(void) { return &MSVCRT__wcmdln; }
/********************************************************************* /*********************************************************************
* __p___argv (MSVCRT.@) * __p___argv (MSVCRT.@)
*/ */
char*** __p___argv(void) { return &MSVCRT___argv; } char*** CDECL __p___argv(void) { return &MSVCRT___argv; }
/********************************************************************* /*********************************************************************
* __p___wargv (MSVCRT.@) * __p___wargv (MSVCRT.@)
*/ */
MSVCRT_wchar_t*** __p___wargv(void) { return &MSVCRT___wargv; } MSVCRT_wchar_t*** CDECL __p___wargv(void) { return &MSVCRT___wargv; }
/********************************************************************* /*********************************************************************
* __p__environ (MSVCRT.@) * __p__environ (MSVCRT.@)
*/ */
char*** __p__environ(void) char*** CDECL __p__environ(void)
{ {
if (!_environ) if (!_environ)
_environ = msvcrt_SnapshotOfEnvironmentA(NULL); _environ = msvcrt_SnapshotOfEnvironmentA(NULL);
...@@ -211,7 +211,7 @@ char*** __p__environ(void) ...@@ -211,7 +211,7 @@ char*** __p__environ(void)
/********************************************************************* /*********************************************************************
* __p__wenviron (MSVCRT.@) * __p__wenviron (MSVCRT.@)
*/ */
MSVCRT_wchar_t*** __p__wenviron(void) MSVCRT_wchar_t*** CDECL __p__wenviron(void)
{ {
if (!_wenviron) if (!_wenviron)
_wenviron = msvcrt_SnapshotOfEnvironmentW(NULL); _wenviron = msvcrt_SnapshotOfEnvironmentW(NULL);
...@@ -221,12 +221,12 @@ MSVCRT_wchar_t*** __p__wenviron(void) ...@@ -221,12 +221,12 @@ MSVCRT_wchar_t*** __p__wenviron(void)
/********************************************************************* /*********************************************************************
* __p___initenv (MSVCRT.@) * __p___initenv (MSVCRT.@)
*/ */
char*** __p___initenv(void) { return &MSVCRT___initenv; } char*** CDECL __p___initenv(void) { return &MSVCRT___initenv; }
/********************************************************************* /*********************************************************************
* __p___winitenv (MSVCRT.@) * __p___winitenv (MSVCRT.@)
*/ */
MSVCRT_wchar_t*** __p___winitenv(void) { return &MSVCRT___winitenv; } MSVCRT_wchar_t*** CDECL __p___winitenv(void) { return &MSVCRT___winitenv; }
/* INTERNAL: Create a wide string from an ascii string */ /* INTERNAL: Create a wide string from an ascii string */
static MSVCRT_wchar_t *wstrdupa(const char *str) static MSVCRT_wchar_t *wstrdupa(const char *str)
...@@ -311,8 +311,8 @@ void msvcrt_free_args(void) ...@@ -311,8 +311,8 @@ void msvcrt_free_args(void)
/********************************************************************* /*********************************************************************
* __getmainargs (MSVCRT.@) * __getmainargs (MSVCRT.@)
*/ */
void __getmainargs(int *argc, char** *argv, char** *envp, void CDECL __getmainargs(int *argc, char** *argv, char** *envp,
int expand_wildcards, int *new_mode) int expand_wildcards, int *new_mode)
{ {
TRACE("(%p,%p,%p,%d,%p).\n", argc, argv, envp, expand_wildcards, new_mode); TRACE("(%p,%p,%p,%d,%p).\n", argc, argv, envp, expand_wildcards, new_mode);
*argc = MSVCRT___argc; *argc = MSVCRT___argc;
...@@ -325,8 +325,8 @@ void __getmainargs(int *argc, char** *argv, char** *envp, ...@@ -325,8 +325,8 @@ void __getmainargs(int *argc, char** *argv, char** *envp,
/********************************************************************* /*********************************************************************
* __wgetmainargs (MSVCRT.@) * __wgetmainargs (MSVCRT.@)
*/ */
void __wgetmainargs(int *argc, MSVCRT_wchar_t** *wargv, MSVCRT_wchar_t** *wenvp, void CDECL __wgetmainargs(int *argc, MSVCRT_wchar_t** *wargv, MSVCRT_wchar_t** *wenvp,
int expand_wildcards, int *new_mode) int expand_wildcards, int *new_mode)
{ {
TRACE("(%p,%p,%p,%d,%p).\n", argc, wargv, wenvp, expand_wildcards, new_mode); TRACE("(%p,%p,%p,%d,%p).\n", argc, wargv, wenvp, expand_wildcards, new_mode);
*argc = MSVCRT___argc; *argc = MSVCRT___argc;
...@@ -339,7 +339,7 @@ void __wgetmainargs(int *argc, MSVCRT_wchar_t** *wargv, MSVCRT_wchar_t** *wenvp, ...@@ -339,7 +339,7 @@ void __wgetmainargs(int *argc, MSVCRT_wchar_t** *wargv, MSVCRT_wchar_t** *wenvp,
/********************************************************************* /*********************************************************************
* _initterm (MSVCRT.@) * _initterm (MSVCRT.@)
*/ */
unsigned int _initterm(_INITTERMFUN *start,_INITTERMFUN *end) unsigned int CDECL _initterm(_INITTERMFUN *start,_INITTERMFUN *end)
{ {
_INITTERMFUN* current = start; _INITTERMFUN* current = start;
...@@ -360,7 +360,7 @@ unsigned int _initterm(_INITTERMFUN *start,_INITTERMFUN *end) ...@@ -360,7 +360,7 @@ unsigned int _initterm(_INITTERMFUN *start,_INITTERMFUN *end)
/********************************************************************* /*********************************************************************
* __set_app_type (MSVCRT.@) * __set_app_type (MSVCRT.@)
*/ */
void MSVCRT___set_app_type(int app_type) void CDECL MSVCRT___set_app_type(int app_type)
{ {
TRACE("(%d) %s application\n", app_type, app_type == 2 ? "Gui" : "Console"); TRACE("(%d) %s application\n", app_type, app_type == 2 ? "Gui" : "Console");
MSVCRT_app_type = app_type; MSVCRT_app_type = app_type;
......
...@@ -132,7 +132,7 @@ static void msvcrt_wfttofdi64( const WIN32_FIND_DATAW *fd, struct MSVCRT__wfindd ...@@ -132,7 +132,7 @@ static void msvcrt_wfttofdi64( const WIN32_FIND_DATAW *fd, struct MSVCRT__wfindd
* NOTES * NOTES
* See SetCurrentDirectoryA. * See SetCurrentDirectoryA.
*/ */
int _chdir(const char * newdir) int CDECL _chdir(const char * newdir)
{ {
if (!SetCurrentDirectoryA(newdir)) if (!SetCurrentDirectoryA(newdir))
{ {
...@@ -147,7 +147,7 @@ int _chdir(const char * newdir) ...@@ -147,7 +147,7 @@ int _chdir(const char * newdir)
* *
* Unicode version of _chdir. * Unicode version of _chdir.
*/ */
int _wchdir(const MSVCRT_wchar_t * newdir) int CDECL _wchdir(const MSVCRT_wchar_t * newdir)
{ {
if (!SetCurrentDirectoryW(newdir)) if (!SetCurrentDirectoryW(newdir))
{ {
...@@ -172,7 +172,7 @@ int _wchdir(const MSVCRT_wchar_t * newdir) ...@@ -172,7 +172,7 @@ int _wchdir(const MSVCRT_wchar_t * newdir)
* NOTES * NOTES
* See SetCurrentDirectoryA. * See SetCurrentDirectoryA.
*/ */
int _chdrive(int newdrive) int CDECL _chdrive(int newdrive)
{ {
WCHAR buffer[3] = {'A', ':', 0}; WCHAR buffer[3] = {'A', ':', 0};
...@@ -202,7 +202,7 @@ int _chdrive(int newdrive) ...@@ -202,7 +202,7 @@ int _chdrive(int newdrive)
* NOTES * NOTES
* See FindClose. * See FindClose.
*/ */
int MSVCRT__findclose(long hand) int CDECL MSVCRT__findclose(long hand)
{ {
TRACE(":handle %ld\n",hand); TRACE(":handle %ld\n",hand);
if (!FindClose((HANDLE)hand)) if (!FindClose((HANDLE)hand))
...@@ -230,7 +230,7 @@ int MSVCRT__findclose(long hand) ...@@ -230,7 +230,7 @@ int MSVCRT__findclose(long hand)
* NOTES * NOTES
* See FindFirstFileA. * See FindFirstFileA.
*/ */
long MSVCRT__findfirst(const char * fspec, struct MSVCRT__finddata_t* ft) long CDECL MSVCRT__findfirst(const char * fspec, struct MSVCRT__finddata_t* ft)
{ {
WIN32_FIND_DATAA find_data; WIN32_FIND_DATAA find_data;
HANDLE hfind; HANDLE hfind;
...@@ -251,7 +251,7 @@ long MSVCRT__findfirst(const char * fspec, struct MSVCRT__finddata_t* ft) ...@@ -251,7 +251,7 @@ long MSVCRT__findfirst(const char * fspec, struct MSVCRT__finddata_t* ft)
* *
* Unicode version of _findfirst. * Unicode version of _findfirst.
*/ */
long MSVCRT__wfindfirst(const MSVCRT_wchar_t * fspec, struct MSVCRT__wfinddata_t* ft) long CDECL MSVCRT__wfindfirst(const MSVCRT_wchar_t * fspec, struct MSVCRT__wfinddata_t* ft)
{ {
WIN32_FIND_DATAW find_data; WIN32_FIND_DATAW find_data;
HANDLE hfind; HANDLE hfind;
...@@ -272,7 +272,7 @@ long MSVCRT__wfindfirst(const MSVCRT_wchar_t * fspec, struct MSVCRT__wfinddata_t ...@@ -272,7 +272,7 @@ long MSVCRT__wfindfirst(const MSVCRT_wchar_t * fspec, struct MSVCRT__wfinddata_t
* *
* 64-bit version of _findfirst. * 64-bit version of _findfirst.
*/ */
long MSVCRT__findfirsti64(const char * fspec, struct MSVCRT__finddatai64_t* ft) long CDECL MSVCRT__findfirsti64(const char * fspec, struct MSVCRT__finddatai64_t* ft)
{ {
WIN32_FIND_DATAA find_data; WIN32_FIND_DATAA find_data;
HANDLE hfind; HANDLE hfind;
...@@ -293,7 +293,7 @@ long MSVCRT__findfirsti64(const char * fspec, struct MSVCRT__finddatai64_t* ft) ...@@ -293,7 +293,7 @@ long MSVCRT__findfirsti64(const char * fspec, struct MSVCRT__finddatai64_t* ft)
* *
* Unicode version of _findfirsti64. * Unicode version of _findfirsti64.
*/ */
long MSVCRT__wfindfirsti64(const MSVCRT_wchar_t * fspec, struct MSVCRT__wfinddatai64_t* ft) long CDECL MSVCRT__wfindfirsti64(const MSVCRT_wchar_t * fspec, struct MSVCRT__wfinddatai64_t* ft)
{ {
WIN32_FIND_DATAW find_data; WIN32_FIND_DATAW find_data;
HANDLE hfind; HANDLE hfind;
...@@ -325,7 +325,7 @@ long MSVCRT__wfindfirsti64(const MSVCRT_wchar_t * fspec, struct MSVCRT__wfinddat ...@@ -325,7 +325,7 @@ long MSVCRT__wfindfirsti64(const MSVCRT_wchar_t * fspec, struct MSVCRT__wfinddat
* NOTES * NOTES
* See FindNextFileA. * See FindNextFileA.
*/ */
int MSVCRT__findnext(long hand, struct MSVCRT__finddata_t * ft) int CDECL MSVCRT__findnext(long hand, struct MSVCRT__finddata_t * ft)
{ {
WIN32_FIND_DATAA find_data; WIN32_FIND_DATAA find_data;
...@@ -344,7 +344,7 @@ int MSVCRT__findnext(long hand, struct MSVCRT__finddata_t * ft) ...@@ -344,7 +344,7 @@ int MSVCRT__findnext(long hand, struct MSVCRT__finddata_t * ft)
* *
* Unicode version of _findnext. * Unicode version of _findnext.
*/ */
int MSVCRT__wfindnext(long hand, struct MSVCRT__wfinddata_t * ft) int CDECL MSVCRT__wfindnext(long hand, struct MSVCRT__wfinddata_t * ft)
{ {
WIN32_FIND_DATAW find_data; WIN32_FIND_DATAW find_data;
...@@ -363,7 +363,7 @@ int MSVCRT__wfindnext(long hand, struct MSVCRT__wfinddata_t * ft) ...@@ -363,7 +363,7 @@ int MSVCRT__wfindnext(long hand, struct MSVCRT__wfinddata_t * ft)
* *
* 64-bit version of _findnext. * 64-bit version of _findnext.
*/ */
int MSVCRT__findnexti64(long hand, struct MSVCRT__finddatai64_t * ft) int CDECL MSVCRT__findnexti64(long hand, struct MSVCRT__finddatai64_t * ft)
{ {
WIN32_FIND_DATAA find_data; WIN32_FIND_DATAA find_data;
...@@ -382,7 +382,7 @@ int MSVCRT__findnexti64(long hand, struct MSVCRT__finddatai64_t * ft) ...@@ -382,7 +382,7 @@ int MSVCRT__findnexti64(long hand, struct MSVCRT__finddatai64_t * ft)
* *
* Unicode version of _findnexti64. * Unicode version of _findnexti64.
*/ */
int MSVCRT__wfindnexti64(long hand, struct MSVCRT__wfinddatai64_t * ft) int CDECL MSVCRT__wfindnexti64(long hand, struct MSVCRT__wfinddatai64_t * ft)
{ {
WIN32_FIND_DATAW find_data; WIN32_FIND_DATAW find_data;
...@@ -410,7 +410,7 @@ int MSVCRT__wfindnexti64(long hand, struct MSVCRT__wfinddatai64_t * ft) ...@@ -410,7 +410,7 @@ int MSVCRT__wfindnexti64(long hand, struct MSVCRT__wfinddatai64_t * ft)
* Otherwise populates buf with the path and returns it. * Otherwise populates buf with the path and returns it.
* Failure: NULL. errno indicates the error. * Failure: NULL. errno indicates the error.
*/ */
char* _getcwd(char * buf, int size) char* CDECL _getcwd(char * buf, int size)
{ {
char dir[MAX_PATH]; char dir[MAX_PATH];
int dir_len = GetCurrentDirectoryA(MAX_PATH,dir); int dir_len = GetCurrentDirectoryA(MAX_PATH,dir);
...@@ -438,7 +438,7 @@ char* _getcwd(char * buf, int size) ...@@ -438,7 +438,7 @@ char* _getcwd(char * buf, int size)
* *
* Unicode version of _getcwd. * Unicode version of _getcwd.
*/ */
MSVCRT_wchar_t* _wgetcwd(MSVCRT_wchar_t * buf, int size) MSVCRT_wchar_t* CDECL _wgetcwd(MSVCRT_wchar_t * buf, int size)
{ {
MSVCRT_wchar_t dir[MAX_PATH]; MSVCRT_wchar_t dir[MAX_PATH];
int dir_len = GetCurrentDirectoryW(MAX_PATH,dir); int dir_len = GetCurrentDirectoryW(MAX_PATH,dir);
...@@ -473,7 +473,7 @@ MSVCRT_wchar_t* _wgetcwd(MSVCRT_wchar_t * buf, int size) ...@@ -473,7 +473,7 @@ MSVCRT_wchar_t* _wgetcwd(MSVCRT_wchar_t * buf, int size)
* Success: The drive letter number from 1 to 26 ("A:" to "Z:"). * Success: The drive letter number from 1 to 26 ("A:" to "Z:").
* Failure: 0. * Failure: 0.
*/ */
int _getdrive(void) int CDECL _getdrive(void)
{ {
WCHAR buffer[MAX_PATH]; WCHAR buffer[MAX_PATH];
if (GetCurrentDirectoryW( MAX_PATH, buffer ) && if (GetCurrentDirectoryW( MAX_PATH, buffer ) &&
...@@ -497,7 +497,7 @@ int _getdrive(void) ...@@ -497,7 +497,7 @@ int _getdrive(void)
* Otherwise populates drive with the path and returns it. * Otherwise populates drive with the path and returns it.
* Failure: NULL. errno indicates the error. * Failure: NULL. errno indicates the error.
*/ */
char* _getdcwd(int drive, char * buf, int size) char* CDECL _getdcwd(int drive, char * buf, int size)
{ {
static char* dummy; static char* dummy;
...@@ -539,7 +539,7 @@ char* _getdcwd(int drive, char * buf, int size) ...@@ -539,7 +539,7 @@ char* _getdcwd(int drive, char * buf, int size)
* *
* Unicode version of _wgetdcwd. * Unicode version of _wgetdcwd.
*/ */
MSVCRT_wchar_t* _wgetdcwd(int drive, MSVCRT_wchar_t * buf, int size) MSVCRT_wchar_t* CDECL _wgetdcwd(int drive, MSVCRT_wchar_t * buf, int size)
{ {
static MSVCRT_wchar_t* dummy; static MSVCRT_wchar_t* dummy;
...@@ -591,7 +591,7 @@ MSVCRT_wchar_t* _wgetdcwd(int drive, MSVCRT_wchar_t * buf, int size) ...@@ -591,7 +591,7 @@ MSVCRT_wchar_t* _wgetdcwd(int drive, MSVCRT_wchar_t * buf, int size)
* NOTES * NOTES
* See GetLastError(). * See GetLastError().
*/ */
unsigned int MSVCRT__getdiskfree(unsigned int disk, struct MSVCRT__diskfree_t * d) unsigned int CDECL MSVCRT__getdiskfree(unsigned int disk, struct MSVCRT__diskfree_t * d)
{ {
WCHAR drivespec[4] = {'@', ':', '\\', 0}; WCHAR drivespec[4] = {'@', ':', '\\', 0};
DWORD ret[4]; DWORD ret[4];
...@@ -630,7 +630,7 @@ unsigned int MSVCRT__getdiskfree(unsigned int disk, struct MSVCRT__diskfree_t * ...@@ -630,7 +630,7 @@ unsigned int MSVCRT__getdiskfree(unsigned int disk, struct MSVCRT__diskfree_t *
* NOTES * NOTES
* See CreateDirectoryA. * See CreateDirectoryA.
*/ */
int _mkdir(const char * newdir) int CDECL _mkdir(const char * newdir)
{ {
if (CreateDirectoryA(newdir,NULL)) if (CreateDirectoryA(newdir,NULL))
return 0; return 0;
...@@ -643,7 +643,7 @@ int _mkdir(const char * newdir) ...@@ -643,7 +643,7 @@ int _mkdir(const char * newdir)
* *
* Unicode version of _mkdir. * Unicode version of _mkdir.
*/ */
int _wmkdir(const MSVCRT_wchar_t* newdir) int CDECL _wmkdir(const MSVCRT_wchar_t* newdir)
{ {
if (CreateDirectoryW(newdir,NULL)) if (CreateDirectoryW(newdir,NULL))
return 0; return 0;
...@@ -666,7 +666,7 @@ int _wmkdir(const MSVCRT_wchar_t* newdir) ...@@ -666,7 +666,7 @@ int _wmkdir(const MSVCRT_wchar_t* newdir)
* NOTES * NOTES
* See RemoveDirectoryA. * See RemoveDirectoryA.
*/ */
int _rmdir(const char * dir) int CDECL _rmdir(const char * dir)
{ {
if (RemoveDirectoryA(dir)) if (RemoveDirectoryA(dir))
return 0; return 0;
...@@ -679,7 +679,7 @@ int _rmdir(const char * dir) ...@@ -679,7 +679,7 @@ int _rmdir(const char * dir)
* *
* Unicode version of _rmdir. * Unicode version of _rmdir.
*/ */
int _wrmdir(const MSVCRT_wchar_t * dir) int CDECL _wrmdir(const MSVCRT_wchar_t * dir)
{ {
if (RemoveDirectoryW(dir)) if (RemoveDirectoryW(dir))
return 0; return 0;
...@@ -692,8 +692,8 @@ int _wrmdir(const MSVCRT_wchar_t * dir) ...@@ -692,8 +692,8 @@ int _wrmdir(const MSVCRT_wchar_t * dir)
* *
* Unicode version of _splitpath. * Unicode version of _splitpath.
*/ */
void _wsplitpath(const MSVCRT_wchar_t *inpath, MSVCRT_wchar_t *drv, MSVCRT_wchar_t *dir, void CDECL _wsplitpath(const MSVCRT_wchar_t *inpath, MSVCRT_wchar_t *drv, MSVCRT_wchar_t *dir,
MSVCRT_wchar_t *fname, MSVCRT_wchar_t *ext ) MSVCRT_wchar_t *fname, MSVCRT_wchar_t *ext )
{ {
const MSVCRT_wchar_t *p, *end; const MSVCRT_wchar_t *p, *end;
...@@ -743,7 +743,7 @@ void _wsplitpath(const MSVCRT_wchar_t *inpath, MSVCRT_wchar_t *drv, MSVCRT_wchar ...@@ -743,7 +743,7 @@ void _wsplitpath(const MSVCRT_wchar_t *inpath, MSVCRT_wchar_t *drv, MSVCRT_wchar
* *
* Unicode version of _fullpath. * Unicode version of _fullpath.
*/ */
MSVCRT_wchar_t *_wfullpath(MSVCRT_wchar_t * absPath, const MSVCRT_wchar_t* relPath, MSVCRT_size_t size) MSVCRT_wchar_t * CDECL _wfullpath(MSVCRT_wchar_t * absPath, const MSVCRT_wchar_t* relPath, MSVCRT_size_t size)
{ {
DWORD rc; DWORD rc;
WCHAR* buffer; WCHAR* buffer;
...@@ -797,7 +797,7 @@ MSVCRT_wchar_t *_wfullpath(MSVCRT_wchar_t * absPath, const MSVCRT_wchar_t* relPa ...@@ -797,7 +797,7 @@ MSVCRT_wchar_t *_wfullpath(MSVCRT_wchar_t * absPath, const MSVCRT_wchar_t* relPa
* Otherwise populates absPath with the path and returns it. * Otherwise populates absPath with the path and returns it.
* Failure: NULL. errno indicates the error. * Failure: NULL. errno indicates the error.
*/ */
char *_fullpath(char * absPath, const char* relPath, unsigned int size) char * CDECL _fullpath(char * absPath, const char* relPath, unsigned int size)
{ {
DWORD rc; DWORD rc;
char* lastpart; char* lastpart;
...@@ -852,9 +852,9 @@ char *_fullpath(char * absPath, const char* relPath, unsigned int size) ...@@ -852,9 +852,9 @@ char *_fullpath(char * absPath, const char* relPath, unsigned int size)
* Nothing. If path is not large enough to hold the resulting pathname, * Nothing. If path is not large enough to hold the resulting pathname,
* random process memory will be overwritten. * random process memory will be overwritten.
*/ */
VOID _makepath(char * path, const char * drive, VOID CDECL _makepath(char * path, const char * drive,
const char *directory, const char * filename, const char *directory, const char * filename,
const char * extension) const char * extension)
{ {
char ch; char ch;
...@@ -896,8 +896,8 @@ VOID _makepath(char * path, const char * drive, ...@@ -896,8 +896,8 @@ VOID _makepath(char * path, const char * drive,
* *
* Unicode version of _wmakepath. * Unicode version of _wmakepath.
*/ */
VOID _wmakepath(MSVCRT_wchar_t *path, const MSVCRT_wchar_t *drive, const MSVCRT_wchar_t *directory, VOID CDECL _wmakepath(MSVCRT_wchar_t *path, const MSVCRT_wchar_t *drive, const MSVCRT_wchar_t *directory,
const MSVCRT_wchar_t *filename, const MSVCRT_wchar_t *extension) const MSVCRT_wchar_t *filename, const MSVCRT_wchar_t *extension)
{ {
MSVCRT_wchar_t ch; MSVCRT_wchar_t ch;
TRACE("%s %s %s %s\n", debugstr_w(drive), debugstr_w(directory), TRACE("%s %s %s %s\n", debugstr_w(drive), debugstr_w(directory),
...@@ -954,7 +954,7 @@ VOID _wmakepath(MSVCRT_wchar_t *path, const MSVCRT_wchar_t *drive, const MSVCRT_ ...@@ -954,7 +954,7 @@ VOID _wmakepath(MSVCRT_wchar_t *path, const MSVCRT_wchar_t *drive, const MSVCRT_
* Nothing. If the file is not found, buf will contain an empty string * Nothing. If the file is not found, buf will contain an empty string
* and errno is set. * and errno is set.
*/ */
void _searchenv(const char* file, const char* env, char *buf) void CDECL _searchenv(const char* file, const char* env, char *buf)
{ {
char*envVal, *penv; char*envVal, *penv;
char curPath[MAX_PATH]; char curPath[MAX_PATH];
......
...@@ -29,7 +29,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); ...@@ -29,7 +29,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
/********************************************************************* /*********************************************************************
* getenv (MSVCRT.@) * getenv (MSVCRT.@)
*/ */
char *MSVCRT_getenv(const char *name) char * CDECL MSVCRT_getenv(const char *name)
{ {
char **environ; char **environ;
unsigned int length=strlen(name); unsigned int length=strlen(name);
...@@ -50,7 +50,7 @@ char *MSVCRT_getenv(const char *name) ...@@ -50,7 +50,7 @@ char *MSVCRT_getenv(const char *name)
/********************************************************************* /*********************************************************************
* _wgetenv (MSVCRT.@) * _wgetenv (MSVCRT.@)
*/ */
MSVCRT_wchar_t *_wgetenv(const MSVCRT_wchar_t *name) MSVCRT_wchar_t * CDECL _wgetenv(const MSVCRT_wchar_t *name)
{ {
MSVCRT_wchar_t **environ; MSVCRT_wchar_t **environ;
unsigned int length=strlenW(name); unsigned int length=strlenW(name);
...@@ -71,7 +71,7 @@ MSVCRT_wchar_t *_wgetenv(const MSVCRT_wchar_t *name) ...@@ -71,7 +71,7 @@ MSVCRT_wchar_t *_wgetenv(const MSVCRT_wchar_t *name)
/********************************************************************* /*********************************************************************
* _putenv (MSVCRT.@) * _putenv (MSVCRT.@)
*/ */
int _putenv(const char *str) int CDECL _putenv(const char *str)
{ {
char *name, *value; char *name, *value;
char *dst; char *dst;
...@@ -118,7 +118,7 @@ finish: ...@@ -118,7 +118,7 @@ finish:
/********************************************************************* /*********************************************************************
* _wputenv (MSVCRT.@) * _wputenv (MSVCRT.@)
*/ */
int _wputenv(const MSVCRT_wchar_t *str) int CDECL _wputenv(const MSVCRT_wchar_t *str)
{ {
MSVCRT_wchar_t *name, *value; MSVCRT_wchar_t *name, *value;
MSVCRT_wchar_t *dst; MSVCRT_wchar_t *dst;
......
...@@ -181,7 +181,7 @@ void msvcrt_set_errno(int err) ...@@ -181,7 +181,7 @@ void msvcrt_set_errno(int err)
/********************************************************************* /*********************************************************************
* _errno (MSVCRT.@) * _errno (MSVCRT.@)
*/ */
int* MSVCRT__errno(void) int* CDECL MSVCRT__errno(void)
{ {
return &msvcrt_get_thread_data()->thread_errno; return &msvcrt_get_thread_data()->thread_errno;
} }
...@@ -189,7 +189,7 @@ int* MSVCRT__errno(void) ...@@ -189,7 +189,7 @@ int* MSVCRT__errno(void)
/********************************************************************* /*********************************************************************
* __doserrno (MSVCRT.@) * __doserrno (MSVCRT.@)
*/ */
unsigned long* MSVCRT___doserrno(void) unsigned long* CDECL MSVCRT___doserrno(void)
{ {
return &msvcrt_get_thread_data()->thread_doserrno; return &msvcrt_get_thread_data()->thread_doserrno;
} }
...@@ -197,7 +197,7 @@ unsigned long* MSVCRT___doserrno(void) ...@@ -197,7 +197,7 @@ unsigned long* MSVCRT___doserrno(void)
/********************************************************************* /*********************************************************************
* strerror (MSVCRT.@) * strerror (MSVCRT.@)
*/ */
char* MSVCRT_strerror(int err) char* CDECL MSVCRT_strerror(int err)
{ {
thread_data_t *data = msvcrt_get_thread_data(); thread_data_t *data = msvcrt_get_thread_data();
...@@ -212,7 +212,7 @@ char* MSVCRT_strerror(int err) ...@@ -212,7 +212,7 @@ char* MSVCRT_strerror(int err)
/********************************************************************** /**********************************************************************
* _strerror (MSVCRT.@) * _strerror (MSVCRT.@)
*/ */
char* _strerror(const char* str) char* CDECL _strerror(const char* str)
{ {
thread_data_t *data = msvcrt_get_thread_data(); thread_data_t *data = msvcrt_get_thread_data();
int err; int err;
...@@ -234,7 +234,7 @@ char* _strerror(const char* str) ...@@ -234,7 +234,7 @@ char* _strerror(const char* str)
/********************************************************************* /*********************************************************************
* perror (MSVCRT.@) * perror (MSVCRT.@)
*/ */
void MSVCRT_perror(const char* str) void CDECL MSVCRT_perror(const char* str)
{ {
int err = *MSVCRT__errno(); int err = *MSVCRT__errno();
if (err < 0 || err > MSVCRT__sys_nerr) err = MSVCRT__sys_nerr; if (err < 0 || err > MSVCRT__sys_nerr) err = MSVCRT__sys_nerr;
...@@ -264,7 +264,7 @@ void MSVCRT_perror(const char* str) ...@@ -264,7 +264,7 @@ void MSVCRT_perror(const char* str)
* This function does not have a proper implementation; the error mode is * This function does not have a proper implementation; the error mode is
* never used. * never used.
*/ */
int _set_error_mode(int mode) int CDECL _set_error_mode(int mode)
{ {
static int current_mode = MSVCRT__OUT_TO_DEFAULT; static int current_mode = MSVCRT__OUT_TO_DEFAULT;
...@@ -280,7 +280,7 @@ int _set_error_mode(int mode) ...@@ -280,7 +280,7 @@ int _set_error_mode(int mode)
/****************************************************************************** /******************************************************************************
* _seterrormode (MSVCRT.@) * _seterrormode (MSVCRT.@)
*/ */
void _seterrormode(int mode) void CDECL _seterrormode(int mode)
{ {
SetErrorMode( mode ); SetErrorMode( mode );
} }
...@@ -115,7 +115,7 @@ __ASM_GLOBAL_FUNC(_EH_prolog, ...@@ -115,7 +115,7 @@ __ASM_GLOBAL_FUNC(_EH_prolog,
/******************************************************************* /*******************************************************************
* _global_unwind2 (MSVCRT.@) * _global_unwind2 (MSVCRT.@)
*/ */
void _global_unwind2(EXCEPTION_REGISTRATION_RECORD* frame) void CDECL _global_unwind2(EXCEPTION_REGISTRATION_RECORD* frame)
{ {
TRACE("(%p)\n",frame); TRACE("(%p)\n",frame);
RtlUnwind( frame, 0, 0, 0 ); RtlUnwind( frame, 0, 0, 0 );
...@@ -124,7 +124,7 @@ void _global_unwind2(EXCEPTION_REGISTRATION_RECORD* frame) ...@@ -124,7 +124,7 @@ void _global_unwind2(EXCEPTION_REGISTRATION_RECORD* frame)
/******************************************************************* /*******************************************************************
* _local_unwind2 (MSVCRT.@) * _local_unwind2 (MSVCRT.@)
*/ */
void _local_unwind2(MSVCRT_EXCEPTION_FRAME* frame, int trylevel) void CDECL _local_unwind2(MSVCRT_EXCEPTION_FRAME* frame, int trylevel)
{ {
MSVCRT_EXCEPTION_FRAME *curframe = frame; MSVCRT_EXCEPTION_FRAME *curframe = frame;
EXCEPTION_REGISTRATION_RECORD reg; EXCEPTION_REGISTRATION_RECORD reg;
...@@ -156,10 +156,10 @@ void _local_unwind2(MSVCRT_EXCEPTION_FRAME* frame, int trylevel) ...@@ -156,10 +156,10 @@ void _local_unwind2(MSVCRT_EXCEPTION_FRAME* frame, int trylevel)
/********************************************************************* /*********************************************************************
* _except_handler2 (MSVCRT.@) * _except_handler2 (MSVCRT.@)
*/ */
int _except_handler2(PEXCEPTION_RECORD rec, int CDECL _except_handler2(PEXCEPTION_RECORD rec,
EXCEPTION_REGISTRATION_RECORD* frame, EXCEPTION_REGISTRATION_RECORD* frame,
PCONTEXT context, PCONTEXT context,
EXCEPTION_REGISTRATION_RECORD** dispatcher) EXCEPTION_REGISTRATION_RECORD** dispatcher)
{ {
FIXME("exception %lx flags=%lx at %p handler=%p %p %p stub\n", FIXME("exception %lx flags=%lx at %p handler=%p %p %p stub\n",
rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress, rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress,
...@@ -170,9 +170,9 @@ int _except_handler2(PEXCEPTION_RECORD rec, ...@@ -170,9 +170,9 @@ int _except_handler2(PEXCEPTION_RECORD rec,
/********************************************************************* /*********************************************************************
* _except_handler3 (MSVCRT.@) * _except_handler3 (MSVCRT.@)
*/ */
int _except_handler3(PEXCEPTION_RECORD rec, int CDECL _except_handler3(PEXCEPTION_RECORD rec,
MSVCRT_EXCEPTION_FRAME* frame, MSVCRT_EXCEPTION_FRAME* frame,
PCONTEXT context, void* dispatcher) PCONTEXT context, void* dispatcher)
{ {
#if defined(__GNUC__) && defined(__i386__) #if defined(__GNUC__) && defined(__i386__)
long retval; long retval;
...@@ -247,7 +247,7 @@ int _except_handler3(PEXCEPTION_RECORD rec, ...@@ -247,7 +247,7 @@ int _except_handler3(PEXCEPTION_RECORD rec,
/********************************************************************* /*********************************************************************
* _abnormal_termination (MSVCRT.@) * _abnormal_termination (MSVCRT.@)
*/ */
int _abnormal_termination(void) int CDECL _abnormal_termination(void)
{ {
FIXME("(void)stub\n"); FIXME("(void)stub\n");
return 0; return 0;
...@@ -298,7 +298,7 @@ __ASM_GLOBAL_FUNC( longjmp_set_regs, ...@@ -298,7 +298,7 @@ __ASM_GLOBAL_FUNC( longjmp_set_regs,
* _setjmp (MSVCRT.@) * _setjmp (MSVCRT.@)
*/ */
DEFINE_SETJMP_ENTRYPOINT(MSVCRT__setjmp); DEFINE_SETJMP_ENTRYPOINT(MSVCRT__setjmp);
int __regs_MSVCRT__setjmp(struct MSVCRT___JUMP_BUFFER *jmp) int CDECL __regs_MSVCRT__setjmp(struct MSVCRT___JUMP_BUFFER *jmp)
{ {
jmp->Registration = (unsigned long)NtCurrentTeb()->Tib.ExceptionList; jmp->Registration = (unsigned long)NtCurrentTeb()->Tib.ExceptionList;
if (jmp->Registration == TRYLEVEL_END) if (jmp->Registration == TRYLEVEL_END)
...@@ -315,7 +315,7 @@ int __regs_MSVCRT__setjmp(struct MSVCRT___JUMP_BUFFER *jmp) ...@@ -315,7 +315,7 @@ int __regs_MSVCRT__setjmp(struct MSVCRT___JUMP_BUFFER *jmp)
* _setjmp3 (MSVCRT.@) * _setjmp3 (MSVCRT.@)
*/ */
DEFINE_SETJMP_ENTRYPOINT( MSVCRT__setjmp3 ); DEFINE_SETJMP_ENTRYPOINT( MSVCRT__setjmp3 );
int __regs_MSVCRT__setjmp3(struct MSVCRT___JUMP_BUFFER *jmp, int nb_args) int CDECL __regs_MSVCRT__setjmp3(struct MSVCRT___JUMP_BUFFER *jmp, int nb_args)
{ {
jmp->Cookie = MSVCRT_JMP_MAGIC; jmp->Cookie = MSVCRT_JMP_MAGIC;
jmp->UnwindFunc = 0; jmp->UnwindFunc = 0;
...@@ -346,7 +346,7 @@ int __regs_MSVCRT__setjmp3(struct MSVCRT___JUMP_BUFFER *jmp, int nb_args) ...@@ -346,7 +346,7 @@ int __regs_MSVCRT__setjmp3(struct MSVCRT___JUMP_BUFFER *jmp, int nb_args)
/********************************************************************* /*********************************************************************
* longjmp (MSVCRT.@) * longjmp (MSVCRT.@)
*/ */
int MSVCRT_longjmp(struct MSVCRT___JUMP_BUFFER *jmp, int retval) int CDECL MSVCRT_longjmp(struct MSVCRT___JUMP_BUFFER *jmp, int retval)
{ {
unsigned long cur_frame = 0; unsigned long cur_frame = 0;
...@@ -506,7 +506,7 @@ void msvcrt_free_signals(void) ...@@ -506,7 +506,7 @@ void msvcrt_free_signals(void)
* Some signals may never be generated except through an explicit call to * Some signals may never be generated except through an explicit call to
* raise. * raise.
*/ */
MSVCRT___sighandler_t MSVCRT_signal(int sig, MSVCRT___sighandler_t func) MSVCRT___sighandler_t CDECL MSVCRT_signal(int sig, MSVCRT___sighandler_t func)
{ {
MSVCRT___sighandler_t ret = MSVCRT_SIG_ERR; MSVCRT___sighandler_t ret = MSVCRT_SIG_ERR;
...@@ -537,7 +537,7 @@ MSVCRT___sighandler_t MSVCRT_signal(int sig, MSVCRT___sighandler_t func) ...@@ -537,7 +537,7 @@ MSVCRT___sighandler_t MSVCRT_signal(int sig, MSVCRT___sighandler_t func)
/********************************************************************* /*********************************************************************
* _XcptFilter (MSVCRT.@) * _XcptFilter (MSVCRT.@)
*/ */
int _XcptFilter(NTSTATUS ex, PEXCEPTION_POINTERS ptr) int CDECL _XcptFilter(NTSTATUS ex, PEXCEPTION_POINTERS ptr)
{ {
TRACE("(%08lx,%p)\n", ex, ptr); TRACE("(%08lx,%p)\n", ex, ptr);
/* I assume ptr->ExceptionRecord->ExceptionCode is the same as ex */ /* I assume ptr->ExceptionRecord->ExceptionCode is the same as ex */
......
...@@ -59,7 +59,7 @@ void __MSVCRT__call_atexit(void) ...@@ -59,7 +59,7 @@ void __MSVCRT__call_atexit(void)
/********************************************************************* /*********************************************************************
* __dllonexit (MSVCRT.@) * __dllonexit (MSVCRT.@)
*/ */
MSVCRT__onexit_t __dllonexit(MSVCRT__onexit_t func, MSVCRT__onexit_t **start, MSVCRT__onexit_t **end) MSVCRT__onexit_t CDECL __dllonexit(MSVCRT__onexit_t func, MSVCRT__onexit_t **start, MSVCRT__onexit_t **end)
{ {
MSVCRT__onexit_t *tmp; MSVCRT__onexit_t *tmp;
int len; int len;
...@@ -92,7 +92,7 @@ MSVCRT__onexit_t __dllonexit(MSVCRT__onexit_t func, MSVCRT__onexit_t **start, MS ...@@ -92,7 +92,7 @@ MSVCRT__onexit_t __dllonexit(MSVCRT__onexit_t func, MSVCRT__onexit_t **start, MS
/********************************************************************* /*********************************************************************
* _exit (MSVCRT.@) * _exit (MSVCRT.@)
*/ */
void MSVCRT__exit(int exitcode) void CDECL MSVCRT__exit(int exitcode)
{ {
TRACE("(%d)\n", exitcode); TRACE("(%d)\n", exitcode);
ExitProcess(exitcode); ExitProcess(exitcode);
...@@ -128,7 +128,7 @@ static void DoMessageBox(LPCSTR lead, LPCSTR message) ...@@ -128,7 +128,7 @@ static void DoMessageBox(LPCSTR lead, LPCSTR message)
/********************************************************************* /*********************************************************************
* _amsg_exit (MSVCRT.@) * _amsg_exit (MSVCRT.@)
*/ */
void _amsg_exit(int errnum) void CDECL _amsg_exit(int errnum)
{ {
TRACE("(%d)\n", errnum); TRACE("(%d)\n", errnum);
/* FIXME: text for the error number. */ /* FIXME: text for the error number. */
...@@ -146,7 +146,7 @@ void _amsg_exit(int errnum) ...@@ -146,7 +146,7 @@ void _amsg_exit(int errnum)
/********************************************************************* /*********************************************************************
* abort (MSVCRT.@) * abort (MSVCRT.@)
*/ */
void MSVCRT_abort(void) void CDECL MSVCRT_abort(void)
{ {
TRACE("()\n"); TRACE("()\n");
if (MSVCRT_app_type == 2) if (MSVCRT_app_type == 2)
...@@ -161,7 +161,7 @@ void MSVCRT_abort(void) ...@@ -161,7 +161,7 @@ void MSVCRT_abort(void)
/********************************************************************* /*********************************************************************
* _assert (MSVCRT.@) * _assert (MSVCRT.@)
*/ */
void MSVCRT__assert(const char* str, const char* file, unsigned int line) void CDECL MSVCRT__assert(const char* str, const char* file, unsigned int line)
{ {
TRACE("(%s,%s,%d)\n",str,file,line); TRACE("(%s,%s,%d)\n",str,file,line);
if (MSVCRT_app_type == 2) if (MSVCRT_app_type == 2)
...@@ -178,7 +178,7 @@ void MSVCRT__assert(const char* str, const char* file, unsigned int line) ...@@ -178,7 +178,7 @@ void MSVCRT__assert(const char* str, const char* file, unsigned int line)
/********************************************************************* /*********************************************************************
* _c_exit (MSVCRT.@) * _c_exit (MSVCRT.@)
*/ */
void MSVCRT__c_exit(void) void CDECL MSVCRT__c_exit(void)
{ {
TRACE("(void)\n"); TRACE("(void)\n");
/* All cleanup is done on DLL detach; Return to caller */ /* All cleanup is done on DLL detach; Return to caller */
...@@ -187,7 +187,7 @@ void MSVCRT__c_exit(void) ...@@ -187,7 +187,7 @@ void MSVCRT__c_exit(void)
/********************************************************************* /*********************************************************************
* _cexit (MSVCRT.@) * _cexit (MSVCRT.@)
*/ */
void MSVCRT__cexit(void) void CDECL MSVCRT__cexit(void)
{ {
TRACE("(void)\n"); TRACE("(void)\n");
LOCK_EXIT; LOCK_EXIT;
...@@ -198,7 +198,7 @@ void MSVCRT__cexit(void) ...@@ -198,7 +198,7 @@ void MSVCRT__cexit(void)
/********************************************************************* /*********************************************************************
* _onexit (MSVCRT.@) * _onexit (MSVCRT.@)
*/ */
MSVCRT__onexit_t MSVCRT__onexit(MSVCRT__onexit_t func) MSVCRT__onexit_t CDECL MSVCRT__onexit(MSVCRT__onexit_t func)
{ {
TRACE("(%p)\n",func); TRACE("(%p)\n",func);
...@@ -232,7 +232,7 @@ MSVCRT__onexit_t MSVCRT__onexit(MSVCRT__onexit_t func) ...@@ -232,7 +232,7 @@ MSVCRT__onexit_t MSVCRT__onexit(MSVCRT__onexit_t func)
/********************************************************************* /*********************************************************************
* exit (MSVCRT.@) * exit (MSVCRT.@)
*/ */
void MSVCRT_exit(int exitcode) void CDECL MSVCRT_exit(int exitcode)
{ {
TRACE("(%d)\n",exitcode); TRACE("(%d)\n",exitcode);
MSVCRT__cexit(); MSVCRT__cexit();
...@@ -242,7 +242,7 @@ void MSVCRT_exit(int exitcode) ...@@ -242,7 +242,7 @@ void MSVCRT_exit(int exitcode)
/********************************************************************* /*********************************************************************
* atexit (MSVCRT.@) * atexit (MSVCRT.@)
*/ */
int MSVCRT_atexit(void (*func)(void)) int CDECL MSVCRT_atexit(void (*func)(void))
{ {
TRACE("(%p)\n", func); TRACE("(%p)\n", func);
return MSVCRT__onexit((MSVCRT__onexit_t)func) == (MSVCRT__onexit_t)func ? 0 : -1; return MSVCRT__onexit((MSVCRT__onexit_t)func) == (MSVCRT__onexit_t)func ? 0 : -1;
...@@ -252,7 +252,7 @@ int MSVCRT_atexit(void (*func)(void)) ...@@ -252,7 +252,7 @@ int MSVCRT_atexit(void (*func)(void))
/********************************************************************* /*********************************************************************
* _purecall (MSVCRT.@) * _purecall (MSVCRT.@)
*/ */
void _purecall(void) void CDECL _purecall(void)
{ {
TRACE("(void)\n"); TRACE("(void)\n");
_amsg_exit( 25 ); _amsg_exit( 25 );
......
...@@ -45,7 +45,7 @@ static size_t MSVCRT_sbh_threshold = 0; ...@@ -45,7 +45,7 @@ static size_t MSVCRT_sbh_threshold = 0;
/********************************************************************* /*********************************************************************
* ??2@YAPAXI@Z (MSVCRT.@) * ??2@YAPAXI@Z (MSVCRT.@)
*/ */
void* MSVCRT_operator_new(unsigned long size) void* CDECL MSVCRT_operator_new(unsigned long size)
{ {
void *retval = HeapAlloc(GetProcessHeap(), 0, size); void *retval = HeapAlloc(GetProcessHeap(), 0, size);
TRACE("(%ld) returning %p\n", size, retval); TRACE("(%ld) returning %p\n", size, retval);
...@@ -59,7 +59,7 @@ void* MSVCRT_operator_new(unsigned long size) ...@@ -59,7 +59,7 @@ void* MSVCRT_operator_new(unsigned long size)
/********************************************************************* /*********************************************************************
* ??3@YAXPAX@Z (MSVCRT.@) * ??3@YAXPAX@Z (MSVCRT.@)
*/ */
void MSVCRT_operator_delete(void *mem) void CDECL MSVCRT_operator_delete(void *mem)
{ {
TRACE("(%p)\n", mem); TRACE("(%p)\n", mem);
HeapFree(GetProcessHeap(), 0, mem); HeapFree(GetProcessHeap(), 0, mem);
...@@ -69,7 +69,7 @@ void MSVCRT_operator_delete(void *mem) ...@@ -69,7 +69,7 @@ void MSVCRT_operator_delete(void *mem)
/********************************************************************* /*********************************************************************
* ?_query_new_handler@@YAP6AHI@ZXZ (MSVCRT.@) * ?_query_new_handler@@YAP6AHI@ZXZ (MSVCRT.@)
*/ */
MSVCRT_new_handler_func MSVCRT__query_new_handler(void) MSVCRT_new_handler_func CDECL MSVCRT__query_new_handler(void)
{ {
return MSVCRT_new_handler; return MSVCRT_new_handler;
} }
...@@ -78,7 +78,7 @@ MSVCRT_new_handler_func MSVCRT__query_new_handler(void) ...@@ -78,7 +78,7 @@ MSVCRT_new_handler_func MSVCRT__query_new_handler(void)
/********************************************************************* /*********************************************************************
* ?_query_new_mode@@YAHXZ (MSVCRT.@) * ?_query_new_mode@@YAHXZ (MSVCRT.@)
*/ */
int MSVCRT__query_new_mode(void) int CDECL MSVCRT__query_new_mode(void)
{ {
return MSVCRT_new_mode; return MSVCRT_new_mode;
} }
...@@ -86,7 +86,7 @@ int MSVCRT__query_new_mode(void) ...@@ -86,7 +86,7 @@ int MSVCRT__query_new_mode(void)
/********************************************************************* /*********************************************************************
* ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z (MSVCRT.@) * ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z (MSVCRT.@)
*/ */
MSVCRT_new_handler_func MSVCRT__set_new_handler(MSVCRT_new_handler_func func) MSVCRT_new_handler_func CDECL MSVCRT__set_new_handler(MSVCRT_new_handler_func func)
{ {
MSVCRT_new_handler_func old_handler; MSVCRT_new_handler_func old_handler;
LOCK_HEAP; LOCK_HEAP;
...@@ -99,7 +99,7 @@ MSVCRT_new_handler_func MSVCRT__set_new_handler(MSVCRT_new_handler_func func) ...@@ -99,7 +99,7 @@ MSVCRT_new_handler_func MSVCRT__set_new_handler(MSVCRT_new_handler_func func)
/********************************************************************* /*********************************************************************
* ?set_new_handler@@YAP6AXXZP6AXXZ@Z (MSVCRT.@) * ?set_new_handler@@YAP6AXXZP6AXXZ@Z (MSVCRT.@)
*/ */
MSVCRT_new_handler_func MSVCRT_set_new_handler(void *func) MSVCRT_new_handler_func CDECL MSVCRT_set_new_handler(void *func)
{ {
TRACE("(%p)\n",func); TRACE("(%p)\n",func);
MSVCRT__set_new_handler(NULL); MSVCRT__set_new_handler(NULL);
...@@ -109,7 +109,7 @@ MSVCRT_new_handler_func MSVCRT_set_new_handler(void *func) ...@@ -109,7 +109,7 @@ MSVCRT_new_handler_func MSVCRT_set_new_handler(void *func)
/********************************************************************* /*********************************************************************
* ?_set_new_mode@@YAHH@Z (MSVCRT.@) * ?_set_new_mode@@YAHH@Z (MSVCRT.@)
*/ */
int MSVCRT__set_new_mode(int mode) int CDECL MSVCRT__set_new_mode(int mode)
{ {
int old_mode; int old_mode;
LOCK_HEAP; LOCK_HEAP;
...@@ -122,7 +122,7 @@ int MSVCRT__set_new_mode(int mode) ...@@ -122,7 +122,7 @@ int MSVCRT__set_new_mode(int mode)
/********************************************************************* /*********************************************************************
* _callnewh (MSVCRT.@) * _callnewh (MSVCRT.@)
*/ */
int _callnewh(unsigned long size) int CDECL _callnewh(unsigned long size)
{ {
if(MSVCRT_new_handler) if(MSVCRT_new_handler)
(*MSVCRT_new_handler)(size); (*MSVCRT_new_handler)(size);
...@@ -132,7 +132,7 @@ int _callnewh(unsigned long size) ...@@ -132,7 +132,7 @@ int _callnewh(unsigned long size)
/********************************************************************* /*********************************************************************
* _expand (MSVCRT.@) * _expand (MSVCRT.@)
*/ */
void* _expand(void* mem, MSVCRT_size_t size) void* CDECL _expand(void* mem, MSVCRT_size_t size)
{ {
return HeapReAlloc(GetProcessHeap(), HEAP_REALLOC_IN_PLACE_ONLY, mem, size); return HeapReAlloc(GetProcessHeap(), HEAP_REALLOC_IN_PLACE_ONLY, mem, size);
} }
...@@ -140,7 +140,7 @@ void* _expand(void* mem, MSVCRT_size_t size) ...@@ -140,7 +140,7 @@ void* _expand(void* mem, MSVCRT_size_t size)
/********************************************************************* /*********************************************************************
* _heapchk (MSVCRT.@) * _heapchk (MSVCRT.@)
*/ */
int _heapchk(void) int CDECL _heapchk(void)
{ {
if (!HeapValidate( GetProcessHeap(), 0, NULL)) if (!HeapValidate( GetProcessHeap(), 0, NULL))
{ {
...@@ -153,7 +153,7 @@ int _heapchk(void) ...@@ -153,7 +153,7 @@ int _heapchk(void)
/********************************************************************* /*********************************************************************
* _heapmin (MSVCRT.@) * _heapmin (MSVCRT.@)
*/ */
int _heapmin(void) int CDECL _heapmin(void)
{ {
if (!HeapCompact( GetProcessHeap(), 0 )) if (!HeapCompact( GetProcessHeap(), 0 ))
{ {
...@@ -167,7 +167,7 @@ int _heapmin(void) ...@@ -167,7 +167,7 @@ int _heapmin(void)
/********************************************************************* /*********************************************************************
* _heapwalk (MSVCRT.@) * _heapwalk (MSVCRT.@)
*/ */
int _heapwalk(struct MSVCRT__heapinfo* next) int CDECL _heapwalk(struct MSVCRT__heapinfo* next)
{ {
PROCESS_HEAP_ENTRY phe; PROCESS_HEAP_ENTRY phe;
...@@ -208,7 +208,7 @@ int _heapwalk(struct MSVCRT__heapinfo* next) ...@@ -208,7 +208,7 @@ int _heapwalk(struct MSVCRT__heapinfo* next)
/********************************************************************* /*********************************************************************
* _heapset (MSVCRT.@) * _heapset (MSVCRT.@)
*/ */
int _heapset(unsigned int value) int CDECL _heapset(unsigned int value)
{ {
int retval; int retval;
struct MSVCRT__heapinfo heap; struct MSVCRT__heapinfo heap;
...@@ -227,7 +227,7 @@ int _heapset(unsigned int value) ...@@ -227,7 +227,7 @@ int _heapset(unsigned int value)
/********************************************************************* /*********************************************************************
* _heapadd (MSVCRT.@) * _heapadd (MSVCRT.@)
*/ */
int _heapadd(void* mem, MSVCRT_size_t size) int CDECL _heapadd(void* mem, MSVCRT_size_t size)
{ {
TRACE("(%p,%d) unsupported in Win32\n", mem,size); TRACE("(%p,%d) unsupported in Win32\n", mem,size);
*MSVCRT__errno() = MSVCRT_ENOSYS; *MSVCRT__errno() = MSVCRT_ENOSYS;
...@@ -237,7 +237,7 @@ int _heapadd(void* mem, MSVCRT_size_t size) ...@@ -237,7 +237,7 @@ int _heapadd(void* mem, MSVCRT_size_t size)
/********************************************************************* /*********************************************************************
* _msize (MSVCRT.@) * _msize (MSVCRT.@)
*/ */
MSVCRT_size_t _msize(void* mem) MSVCRT_size_t CDECL _msize(void* mem)
{ {
long size = HeapSize(GetProcessHeap(),0,mem); long size = HeapSize(GetProcessHeap(),0,mem);
if (size == -1) if (size == -1)
...@@ -251,7 +251,7 @@ MSVCRT_size_t _msize(void* mem) ...@@ -251,7 +251,7 @@ MSVCRT_size_t _msize(void* mem)
/********************************************************************* /*********************************************************************
* calloc (MSVCRT.@) * calloc (MSVCRT.@)
*/ */
void* MSVCRT_calloc(MSVCRT_size_t size, MSVCRT_size_t count) void* CDECL MSVCRT_calloc(MSVCRT_size_t size, MSVCRT_size_t count)
{ {
return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, size * count ); return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, size * count );
} }
...@@ -259,7 +259,7 @@ void* MSVCRT_calloc(MSVCRT_size_t size, MSVCRT_size_t count) ...@@ -259,7 +259,7 @@ void* MSVCRT_calloc(MSVCRT_size_t size, MSVCRT_size_t count)
/********************************************************************* /*********************************************************************
* free (MSVCRT.@) * free (MSVCRT.@)
*/ */
void MSVCRT_free(void* ptr) void CDECL MSVCRT_free(void* ptr)
{ {
HeapFree(GetProcessHeap(),0,ptr); HeapFree(GetProcessHeap(),0,ptr);
} }
...@@ -267,7 +267,7 @@ void MSVCRT_free(void* ptr) ...@@ -267,7 +267,7 @@ void MSVCRT_free(void* ptr)
/********************************************************************* /*********************************************************************
* malloc (MSVCRT.@) * malloc (MSVCRT.@)
*/ */
void* MSVCRT_malloc(MSVCRT_size_t size) void* CDECL MSVCRT_malloc(MSVCRT_size_t size)
{ {
void *ret = HeapAlloc(GetProcessHeap(),0,size); void *ret = HeapAlloc(GetProcessHeap(),0,size);
if (!ret) if (!ret)
...@@ -278,7 +278,7 @@ void* MSVCRT_malloc(MSVCRT_size_t size) ...@@ -278,7 +278,7 @@ void* MSVCRT_malloc(MSVCRT_size_t size)
/********************************************************************* /*********************************************************************
* realloc (MSVCRT.@) * realloc (MSVCRT.@)
*/ */
void* MSVCRT_realloc(void* ptr, MSVCRT_size_t size) void* CDECL MSVCRT_realloc(void* ptr, MSVCRT_size_t size)
{ {
if (!ptr) return MSVCRT_malloc(size); if (!ptr) return MSVCRT_malloc(size);
if (size) return HeapReAlloc(GetProcessHeap(), 0, ptr, size); if (size) return HeapReAlloc(GetProcessHeap(), 0, ptr, size);
...@@ -289,7 +289,7 @@ void* MSVCRT_realloc(void* ptr, MSVCRT_size_t size) ...@@ -289,7 +289,7 @@ void* MSVCRT_realloc(void* ptr, MSVCRT_size_t size)
/********************************************************************* /*********************************************************************
* __p__amblksiz (MSVCRT.@) * __p__amblksiz (MSVCRT.@)
*/ */
unsigned int* __p__amblksiz(void) unsigned int* CDECL __p__amblksiz(void)
{ {
return &MSVCRT_amblksiz; return &MSVCRT_amblksiz;
} }
...@@ -297,7 +297,7 @@ unsigned int* __p__amblksiz(void) ...@@ -297,7 +297,7 @@ unsigned int* __p__amblksiz(void)
/********************************************************************* /*********************************************************************
* _get_sbh_threshold (MSVCRT.@) * _get_sbh_threshold (MSVCRT.@)
*/ */
size_t _get_sbh_threshold(void) size_t CDECL _get_sbh_threshold(void)
{ {
return MSVCRT_sbh_threshold; return MSVCRT_sbh_threshold;
} }
...@@ -305,7 +305,7 @@ size_t _get_sbh_threshold(void) ...@@ -305,7 +305,7 @@ size_t _get_sbh_threshold(void)
/********************************************************************* /*********************************************************************
* _set_sbh_threshold (MSVCRT.@) * _set_sbh_threshold (MSVCRT.@)
*/ */
int _set_sbh_threshold(size_t threshold) int CDECL _set_sbh_threshold(size_t threshold)
{ {
if(threshold > 1016) if(threshold > 1016)
return 0; return 0;
......
...@@ -304,7 +304,7 @@ static void msvcrt_set_ctype(unsigned int codepage, LCID lcid) ...@@ -304,7 +304,7 @@ static void msvcrt_set_ctype(unsigned int codepage, LCID lcid)
/********************************************************************* /*********************************************************************
* setlocale (MSVCRT.@) * setlocale (MSVCRT.@)
*/ */
char* MSVCRT_setlocale(int category, const char* locale) char* CDECL MSVCRT_setlocale(int category, const char* locale)
{ {
LCID lcid = 0; LCID lcid = 0;
locale_search_t lc; locale_search_t lc;
...@@ -467,7 +467,7 @@ char* MSVCRT_setlocale(int category, const char* locale) ...@@ -467,7 +467,7 @@ char* MSVCRT_setlocale(int category, const char* locale)
/********************************************************************* /*********************************************************************
* setlocale (MSVCRT.@) * setlocale (MSVCRT.@)
*/ */
MSVCRT_wchar_t* MSVCRT__wsetlocale(int category, const MSVCRT_wchar_t* locale) MSVCRT_wchar_t* CDECL MSVCRT__wsetlocale(int category, const MSVCRT_wchar_t* locale)
{ {
static MSVCRT_wchar_t fake[] = { static MSVCRT_wchar_t fake[] = {
'E','n','g','l','i','s','h','_','U','n','i','t','e','d',' ', 'E','n','g','l','i','s','h','_','U','n','i','t','e','d',' ',
...@@ -481,7 +481,7 @@ MSVCRT_wchar_t* MSVCRT__wsetlocale(int category, const MSVCRT_wchar_t* locale) ...@@ -481,7 +481,7 @@ MSVCRT_wchar_t* MSVCRT__wsetlocale(int category, const MSVCRT_wchar_t* locale)
/********************************************************************* /*********************************************************************
* _Getdays (MSVCRT.@) * _Getdays (MSVCRT.@)
*/ */
const char* _Getdays(void) const char* CDECL _Getdays(void)
{ {
static const char *MSVCRT_days = ":Sun:Sunday:Mon:Monday:Tue:Tuesday:Wed:" static const char *MSVCRT_days = ":Sun:Sunday:Mon:Monday:Tue:Tuesday:Wed:"
"Wednesday:Thu:Thursday:Fri:Friday:Sat:Saturday"; "Wednesday:Thu:Thursday:Fri:Friday:Sat:Saturday";
...@@ -493,7 +493,7 @@ const char* _Getdays(void) ...@@ -493,7 +493,7 @@ const char* _Getdays(void)
/********************************************************************* /*********************************************************************
* _Getmonths (MSVCRT.@) * _Getmonths (MSVCRT.@)
*/ */
const char* _Getmonths(void) const char* CDECL _Getmonths(void)
{ {
static const char *MSVCRT_months = ":Jan:January:Feb:February:Mar:March:Apr:" static const char *MSVCRT_months = ":Jan:January:Feb:February:Mar:March:Apr:"
"April:May:May:Jun:June:Jul:July:Aug:August:Sep:September:Oct:" "April:May:May:Jun:June:Jul:July:Aug:August:Sep:September:Oct:"
...@@ -506,7 +506,7 @@ const char* _Getmonths(void) ...@@ -506,7 +506,7 @@ const char* _Getmonths(void)
/********************************************************************* /*********************************************************************
* _Gettnames (MSVCRT.@) * _Gettnames (MSVCRT.@)
*/ */
const char* _Gettnames(void) const char* CDECL _Gettnames(void)
{ {
/* FIXME: */ /* FIXME: */
TRACE("(void) stub\n"); TRACE("(void) stub\n");
...@@ -516,8 +516,8 @@ const char* _Gettnames(void) ...@@ -516,8 +516,8 @@ const char* _Gettnames(void)
/********************************************************************* /*********************************************************************
* _Strftime (MSVCRT.@) * _Strftime (MSVCRT.@)
*/ */
const char* _Strftime(char *out, unsigned int len, const char *fmt, const char* CDECL _Strftime(char *out, unsigned int len, const char *fmt,
const void *tm, void *foo) const void *tm, void *foo)
{ {
/* FIXME: */ /* FIXME: */
TRACE("(%p %d %s %p %p) stub\n", out, len, fmt, tm, foo); TRACE("(%p %d %s %p %p) stub\n", out, len, fmt, tm, foo);
...@@ -529,7 +529,7 @@ const char* _Strftime(char *out, unsigned int len, const char *fmt, ...@@ -529,7 +529,7 @@ const char* _Strftime(char *out, unsigned int len, const char *fmt,
/********************************************************************* /*********************************************************************
* _setmbcp (MSVCRT.@) * _setmbcp (MSVCRT.@)
*/ */
int _setmbcp(int cp) int CDECL _setmbcp(int cp)
{ {
LOCK_LOCALE; LOCK_LOCALE;
if ( cp > _MB_CP_SBCS) if ( cp > _MB_CP_SBCS)
...@@ -567,7 +567,7 @@ int _setmbcp(int cp) ...@@ -567,7 +567,7 @@ int _setmbcp(int cp)
/********************************************************************* /*********************************************************************
* _getmbcp (MSVCRT.@) * _getmbcp (MSVCRT.@)
*/ */
int _getmbcp(void) int CDECL _getmbcp(void)
{ {
return msvcrt_current_lc_all_cp; return msvcrt_current_lc_all_cp;
} }
...@@ -575,7 +575,7 @@ int _getmbcp(void) ...@@ -575,7 +575,7 @@ int _getmbcp(void)
/********************************************************************* /*********************************************************************
* __crtLCMapStringA (MSVCRT.@) * __crtLCMapStringA (MSVCRT.@)
*/ */
int __crtLCMapStringA( int CDECL __crtLCMapStringA(
LCID lcid, DWORD mapflags, const char* src, int srclen, char* dst, LCID lcid, DWORD mapflags, const char* src, int srclen, char* dst,
int dstlen, unsigned int codepage, int xflag int dstlen, unsigned int codepage, int xflag
) { ) {
...@@ -590,7 +590,7 @@ int __crtLCMapStringA( ...@@ -590,7 +590,7 @@ int __crtLCMapStringA(
/********************************************************************* /*********************************************************************
* localeconv (MSVCRT.@) * localeconv (MSVCRT.@)
*/ */
struct MSVCRT_lconv *MSVCRT_localeconv(void) { struct MSVCRT_lconv * CDECL MSVCRT_localeconv(void) {
struct lconv *ylconv; struct lconv *ylconv;
static struct MSVCRT_lconv xlconv; static struct MSVCRT_lconv xlconv;
...@@ -622,7 +622,7 @@ struct MSVCRT_lconv *MSVCRT_localeconv(void) { ...@@ -622,7 +622,7 @@ struct MSVCRT_lconv *MSVCRT_localeconv(void) {
/********************************************************************* /*********************************************************************
* __lconv_init (MSVCRT.@) * __lconv_init (MSVCRT.@)
*/ */
void __lconv_init(void) void CDECL __lconv_init(void)
{ {
FIXME(" stub\n"); FIXME(" stub\n");
} }
...@@ -101,7 +101,7 @@ void msvcrt_free_mt_locks(void) ...@@ -101,7 +101,7 @@ void msvcrt_free_mt_locks(void)
/********************************************************************** /**********************************************************************
* _lock (MSVCRT.@) * _lock (MSVCRT.@)
*/ */
void _lock( int locknum ) void CDECL _lock( int locknum )
{ {
TRACE( "(%d)\n", locknum ); TRACE( "(%d)\n", locknum );
...@@ -130,7 +130,7 @@ void _lock( int locknum ) ...@@ -130,7 +130,7 @@ void _lock( int locknum )
* *
* NOTE: There is no error detection to make sure the lock exists and is acquired. * NOTE: There is no error detection to make sure the lock exists and is acquired.
*/ */
void _unlock( int locknum ) void CDECL _unlock( int locknum )
{ {
TRACE( "(%d)\n", locknum ); TRACE( "(%d)\n", locknum );
......
...@@ -123,7 +123,7 @@ const char* msvcrt_get_reason(DWORD reason) ...@@ -123,7 +123,7 @@ const char* msvcrt_get_reason(DWORD reason)
* $I10_OUTPUT (MSVCRT.@) * $I10_OUTPUT (MSVCRT.@)
* Function not really understood but needed to make the DLL work * Function not really understood but needed to make the DLL work
*/ */
void MSVCRT_I10_OUTPUT(void) void CDECL MSVCRT_I10_OUTPUT(void)
{ {
/* FIXME: This is probably data, not a function */ /* FIXME: This is probably data, not a function */
/* no it is a function. I10 is an Int of 10 bytes */ /* no it is a function. I10 is an Int of 10 bytes */
......
...@@ -32,7 +32,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); ...@@ -32,7 +32,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
/********************************************************************* /*********************************************************************
* _beep (MSVCRT.@) * _beep (MSVCRT.@)
*/ */
void _beep( unsigned int freq, unsigned int duration) void CDECL _beep( unsigned int freq, unsigned int duration)
{ {
TRACE(":Freq %d, Duration %d\n",freq,duration); TRACE(":Freq %d, Duration %d\n",freq,duration);
Beep(freq, duration); Beep(freq, duration);
...@@ -41,7 +41,7 @@ void _beep( unsigned int freq, unsigned int duration) ...@@ -41,7 +41,7 @@ void _beep( unsigned int freq, unsigned int duration)
/********************************************************************* /*********************************************************************
* srand (MSVCRT.@) * srand (MSVCRT.@)
*/ */
void MSVCRT_srand( unsigned int seed ) void CDECL MSVCRT_srand( unsigned int seed )
{ {
thread_data_t *data = msvcrt_get_thread_data(); thread_data_t *data = msvcrt_get_thread_data();
data->random_seed = seed; data->random_seed = seed;
...@@ -50,7 +50,7 @@ void MSVCRT_srand( unsigned int seed ) ...@@ -50,7 +50,7 @@ void MSVCRT_srand( unsigned int seed )
/********************************************************************* /*********************************************************************
* rand (MSVCRT.@) * rand (MSVCRT.@)
*/ */
int MSVCRT_rand(void) int CDECL MSVCRT_rand(void)
{ {
thread_data_t *data = msvcrt_get_thread_data(); thread_data_t *data = msvcrt_get_thread_data();
...@@ -63,7 +63,7 @@ int MSVCRT_rand(void) ...@@ -63,7 +63,7 @@ int MSVCRT_rand(void)
/********************************************************************* /*********************************************************************
* _sleep (MSVCRT.@) * _sleep (MSVCRT.@)
*/ */
void _sleep(unsigned long timeout) void CDECL _sleep(unsigned long timeout)
{ {
TRACE("_sleep for %ld milliseconds\n",timeout); TRACE("_sleep for %ld milliseconds\n",timeout);
Sleep((timeout)?timeout:1); Sleep((timeout)?timeout:1);
...@@ -72,9 +72,9 @@ void _sleep(unsigned long timeout) ...@@ -72,9 +72,9 @@ void _sleep(unsigned long timeout)
/********************************************************************* /*********************************************************************
* _lfind (MSVCRT.@) * _lfind (MSVCRT.@)
*/ */
void* _lfind(const void* match, const void* start, void* CDECL _lfind(const void* match, const void* start,
unsigned int* array_size, unsigned int elem_size, unsigned int* array_size, unsigned int elem_size,
int (*cf)(const void*,const void*) ) int (*cf)(const void*,const void*) )
{ {
unsigned int size = *array_size; unsigned int size = *array_size;
if (size) if (size)
...@@ -90,9 +90,9 @@ void* _lfind(const void* match, const void* start, ...@@ -90,9 +90,9 @@ void* _lfind(const void* match, const void* start,
/********************************************************************* /*********************************************************************
* _lsearch (MSVCRT.@) * _lsearch (MSVCRT.@)
*/ */
void* _lsearch(const void* match, void* start, void* CDECL _lsearch(const void* match, void* start,
unsigned int* array_size, unsigned int elem_size, unsigned int* array_size, unsigned int elem_size,
int (*cf)(const void*,const void*) ) int (*cf)(const void*,const void*) )
{ {
unsigned int size = *array_size; unsigned int size = *array_size;
if (size) if (size)
...@@ -150,7 +150,7 @@ __ASM_GLOBAL_FUNC(_chkesp, ...@@ -150,7 +150,7 @@ __ASM_GLOBAL_FUNC(_chkesp,
"leave\n\t" "leave\n\t"
"ret"); "ret");
void MSVCRT_chkesp_fail(void) void CDECL MSVCRT_chkesp_fail(void)
{ {
ERR("Stack pointer incorrect after last function call - Bad prototype/spec entry?\n"); ERR("Stack pointer incorrect after last function call - Bad prototype/spec entry?\n");
DebugBreak(); DebugBreak();
...@@ -160,7 +160,7 @@ void MSVCRT_chkesp_fail(void) ...@@ -160,7 +160,7 @@ void MSVCRT_chkesp_fail(void)
/**********************************************************************/ /**********************************************************************/
void _chkesp(void) void CDECL _chkesp(void)
{ {
} }
......
...@@ -183,7 +183,7 @@ static char* msvcrt_valisttos(const char* arg0, va_list alist, char delim) ...@@ -183,7 +183,7 @@ static char* msvcrt_valisttos(const char* arg0, va_list alist, char delim)
/********************************************************************* /*********************************************************************
* _cwait (MSVCRT.@) * _cwait (MSVCRT.@)
*/ */
MSVCRT_intptr_t _cwait(int *status, MSVCRT_intptr_t pid, int action) MSVCRT_intptr_t CDECL _cwait(int *status, MSVCRT_intptr_t pid, int action)
{ {
HANDLE hPid = (HANDLE)pid; HANDLE hPid = (HANDLE)pid;
int doserrno; int doserrno;
...@@ -219,7 +219,7 @@ MSVCRT_intptr_t _cwait(int *status, MSVCRT_intptr_t pid, int action) ...@@ -219,7 +219,7 @@ MSVCRT_intptr_t _cwait(int *status, MSVCRT_intptr_t pid, int action)
* Like on Windows, this function does not handle arguments with spaces * Like on Windows, this function does not handle arguments with spaces
* or double-quotes. * or double-quotes.
*/ */
MSVCRT_intptr_t _execl(const char* name, const char* arg0, ...) MSVCRT_intptr_t CDECL _execl(const char* name, const char* arg0, ...)
{ {
va_list ap; va_list ap;
char * args; char * args;
...@@ -238,7 +238,7 @@ MSVCRT_intptr_t _execl(const char* name, const char* arg0, ...) ...@@ -238,7 +238,7 @@ MSVCRT_intptr_t _execl(const char* name, const char* arg0, ...)
/********************************************************************* /*********************************************************************
* _execle (MSVCRT.@) * _execle (MSVCRT.@)
*/ */
MSVCRT_intptr_t _execle(const char* name, const char* arg0, ...) MSVCRT_intptr_t CDECL _execle(const char* name, const char* arg0, ...)
{ {
FIXME("stub\n"); FIXME("stub\n");
return -1; return -1;
...@@ -250,7 +250,7 @@ MSVCRT_intptr_t _execle(const char* name, const char* arg0, ...) ...@@ -250,7 +250,7 @@ MSVCRT_intptr_t _execle(const char* name, const char* arg0, ...)
* Like on Windows, this function does not handle arguments with spaces * Like on Windows, this function does not handle arguments with spaces
* or double-quotes. * or double-quotes.
*/ */
MSVCRT_intptr_t _execlp(const char* name, const char* arg0, ...) MSVCRT_intptr_t CDECL _execlp(const char* name, const char* arg0, ...)
{ {
va_list ap; va_list ap;
char * args; char * args;
...@@ -272,7 +272,7 @@ MSVCRT_intptr_t _execlp(const char* name, const char* arg0, ...) ...@@ -272,7 +272,7 @@ MSVCRT_intptr_t _execlp(const char* name, const char* arg0, ...)
/********************************************************************* /*********************************************************************
* _execlpe (MSVCRT.@) * _execlpe (MSVCRT.@)
*/ */
MSVCRT_intptr_t _execlpe(const char* name, const char* arg0, ...) MSVCRT_intptr_t CDECL _execlpe(const char* name, const char* arg0, ...)
{ {
FIXME("stub\n"); FIXME("stub\n");
return -1; return -1;
...@@ -284,7 +284,7 @@ MSVCRT_intptr_t _execlpe(const char* name, const char* arg0, ...) ...@@ -284,7 +284,7 @@ MSVCRT_intptr_t _execlpe(const char* name, const char* arg0, ...)
* Like on Windows, this function does not handle arguments with spaces * Like on Windows, this function does not handle arguments with spaces
* or double-quotes. * or double-quotes.
*/ */
MSVCRT_intptr_t _execv(const char* name, char* const* argv) MSVCRT_intptr_t CDECL _execv(const char* name, char* const* argv)
{ {
return _spawnve(MSVCRT__P_OVERLAY, name, (const char* const*) argv, NULL); return _spawnve(MSVCRT__P_OVERLAY, name, (const char* const*) argv, NULL);
} }
...@@ -295,7 +295,7 @@ MSVCRT_intptr_t _execv(const char* name, char* const* argv) ...@@ -295,7 +295,7 @@ MSVCRT_intptr_t _execv(const char* name, char* const* argv)
* Like on Windows, this function does not handle arguments with spaces * Like on Windows, this function does not handle arguments with spaces
* or double-quotes. * or double-quotes.
*/ */
MSVCRT_intptr_t _execve(const char* name, char* const* argv, const char* const* envv) MSVCRT_intptr_t CDECL _execve(const char* name, char* const* argv, const char* const* envv)
{ {
return _spawnve(MSVCRT__P_OVERLAY, name, (const char* const*) argv, envv); return _spawnve(MSVCRT__P_OVERLAY, name, (const char* const*) argv, envv);
} }
...@@ -306,7 +306,7 @@ MSVCRT_intptr_t _execve(const char* name, char* const* argv, const char* const* ...@@ -306,7 +306,7 @@ MSVCRT_intptr_t _execve(const char* name, char* const* argv, const char* const*
* Like on Windows, this function does not handle arguments with spaces * Like on Windows, this function does not handle arguments with spaces
* or double-quotes. * or double-quotes.
*/ */
MSVCRT_intptr_t _execvpe(const char* name, char* const* argv, const char* const* envv) MSVCRT_intptr_t CDECL _execvpe(const char* name, char* const* argv, const char* const* envv)
{ {
char fullname[MAX_PATH]; char fullname[MAX_PATH];
...@@ -321,7 +321,7 @@ MSVCRT_intptr_t _execvpe(const char* name, char* const* argv, const char* const* ...@@ -321,7 +321,7 @@ MSVCRT_intptr_t _execvpe(const char* name, char* const* argv, const char* const*
* Like on Windows, this function does not handle arguments with spaces * Like on Windows, this function does not handle arguments with spaces
* or double-quotes. * or double-quotes.
*/ */
MSVCRT_intptr_t _execvp(const char* name, char* const* argv) MSVCRT_intptr_t CDECL _execvp(const char* name, char* const* argv)
{ {
return _execvpe(name, argv, NULL); return _execvpe(name, argv, NULL);
} }
...@@ -332,7 +332,7 @@ MSVCRT_intptr_t _execvp(const char* name, char* const* argv) ...@@ -332,7 +332,7 @@ MSVCRT_intptr_t _execvp(const char* name, char* const* argv)
* Like on Windows, this function does not handle arguments with spaces * Like on Windows, this function does not handle arguments with spaces
* or double-quotes. * or double-quotes.
*/ */
MSVCRT_intptr_t _spawnl(int flags, const char* name, const char* arg0, ...) MSVCRT_intptr_t CDECL _spawnl(int flags, const char* name, const char* arg0, ...)
{ {
va_list ap; va_list ap;
char * args; char * args;
...@@ -351,7 +351,7 @@ MSVCRT_intptr_t _spawnl(int flags, const char* name, const char* arg0, ...) ...@@ -351,7 +351,7 @@ MSVCRT_intptr_t _spawnl(int flags, const char* name, const char* arg0, ...)
/********************************************************************* /*********************************************************************
* _spawnle (MSVCRT.@) * _spawnle (MSVCRT.@)
*/ */
MSVCRT_intptr_t _spawnle(int flags, const char* name, const char* arg0, ...) MSVCRT_intptr_t CDECL _spawnle(int flags, const char* name, const char* arg0, ...)
{ {
va_list ap; va_list ap;
char *args, *envs = NULL; char *args, *envs = NULL;
...@@ -382,7 +382,7 @@ MSVCRT_intptr_t _spawnle(int flags, const char* name, const char* arg0, ...) ...@@ -382,7 +382,7 @@ MSVCRT_intptr_t _spawnle(int flags, const char* name, const char* arg0, ...)
* Like on Windows, this function does not handle arguments with spaces * Like on Windows, this function does not handle arguments with spaces
* or double-quotes. * or double-quotes.
*/ */
MSVCRT_intptr_t _spawnlp(int flags, const char* name, const char* arg0, ...) MSVCRT_intptr_t CDECL _spawnlp(int flags, const char* name, const char* arg0, ...)
{ {
va_list ap; va_list ap;
char * args; char * args;
...@@ -404,7 +404,7 @@ MSVCRT_intptr_t _spawnlp(int flags, const char* name, const char* arg0, ...) ...@@ -404,7 +404,7 @@ MSVCRT_intptr_t _spawnlp(int flags, const char* name, const char* arg0, ...)
/********************************************************************* /*********************************************************************
* _spawnlpe (MSVCRT.@) * _spawnlpe (MSVCRT.@)
*/ */
MSVCRT_intptr_t _spawnlpe(int flags, const char* name, const char* arg0, ...) MSVCRT_intptr_t CDECL _spawnlpe(int flags, const char* name, const char* arg0, ...)
{ {
va_list ap; va_list ap;
char *args, *envs = NULL; char *args, *envs = NULL;
...@@ -437,8 +437,8 @@ MSVCRT_intptr_t _spawnlpe(int flags, const char* name, const char* arg0, ...) ...@@ -437,8 +437,8 @@ MSVCRT_intptr_t _spawnlpe(int flags, const char* name, const char* arg0, ...)
* Like on Windows, this function does not handle arguments with spaces * Like on Windows, this function does not handle arguments with spaces
* or double-quotes. * or double-quotes.
*/ */
MSVCRT_intptr_t _spawnve(int flags, const char* name, const char* const* argv, MSVCRT_intptr_t CDECL _spawnve(int flags, const char* name, const char* const* argv,
const char* const* envv) const char* const* envv)
{ {
char * args = msvcrt_argvtos(argv,' '); char * args = msvcrt_argvtos(argv,' ');
char * envs = msvcrt_argvtos(envv,0); char * envs = msvcrt_argvtos(envv,0);
...@@ -494,7 +494,7 @@ MSVCRT_intptr_t _spawnve(int flags, const char* name, const char* const* argv, ...@@ -494,7 +494,7 @@ MSVCRT_intptr_t _spawnve(int flags, const char* name, const char* const* argv,
* Like on Windows, this function does not handle arguments with spaces * Like on Windows, this function does not handle arguments with spaces
* or double-quotes. * or double-quotes.
*/ */
MSVCRT_intptr_t _spawnv(int flags, const char* name, const char* const* argv) MSVCRT_intptr_t CDECL _spawnv(int flags, const char* name, const char* const* argv)
{ {
return _spawnve(flags, name, argv, NULL); return _spawnve(flags, name, argv, NULL);
} }
...@@ -505,8 +505,8 @@ MSVCRT_intptr_t _spawnv(int flags, const char* name, const char* const* argv) ...@@ -505,8 +505,8 @@ MSVCRT_intptr_t _spawnv(int flags, const char* name, const char* const* argv)
* Like on Windows, this function does not handle arguments with spaces * Like on Windows, this function does not handle arguments with spaces
* or double-quotes. * or double-quotes.
*/ */
MSVCRT_intptr_t _spawnvpe(int flags, const char* name, const char* const* argv, MSVCRT_intptr_t CDECL _spawnvpe(int flags, const char* name, const char* const* argv,
const char* const* envv) const char* const* envv)
{ {
char fullname[MAX_PATH]; char fullname[MAX_PATH];
_searchenv(name, "PATH", fullname); _searchenv(name, "PATH", fullname);
...@@ -519,7 +519,7 @@ MSVCRT_intptr_t _spawnvpe(int flags, const char* name, const char* const* argv, ...@@ -519,7 +519,7 @@ MSVCRT_intptr_t _spawnvpe(int flags, const char* name, const char* const* argv,
* Like on Windows, this function does not handle arguments with spaces * Like on Windows, this function does not handle arguments with spaces
* or double-quotes. * or double-quotes.
*/ */
MSVCRT_intptr_t _spawnvp(int flags, const char* name, const char* const* argv) MSVCRT_intptr_t CDECL _spawnvp(int flags, const char* name, const char* const* argv)
{ {
return _spawnvpe(flags, name, argv, NULL); return _spawnvpe(flags, name, argv, NULL);
} }
...@@ -530,7 +530,7 @@ MSVCRT_intptr_t _spawnvp(int flags, const char* name, const char* const* argv) ...@@ -530,7 +530,7 @@ MSVCRT_intptr_t _spawnvp(int flags, const char* name, const char* const* argv)
* would have to convert the command back to ANSI to call msvcrt_spawn, * would have to convert the command back to ANSI to call msvcrt_spawn,
* less than ideal. * less than ideal.
*/ */
MSVCRT_FILE* MSVCRT__popen(const char* command, const char* mode) MSVCRT_FILE* CDECL MSVCRT__popen(const char* command, const char* mode)
{ {
static const char wcmd[] = "wcmd", cmdFlag[] = " /C ", comSpec[] = "COMSPEC"; static const char wcmd[] = "wcmd", cmdFlag[] = " /C ", comSpec[] = "COMSPEC";
MSVCRT_FILE *ret; MSVCRT_FILE *ret;
...@@ -627,7 +627,7 @@ error: ...@@ -627,7 +627,7 @@ error:
/********************************************************************* /*********************************************************************
* _wpopen (MSVCRT.@) * _wpopen (MSVCRT.@)
*/ */
MSVCRT_FILE* MSVCRT__wpopen(const MSVCRT_wchar_t* command, const MSVCRT_wchar_t* mode) MSVCRT_FILE* CDECL MSVCRT__wpopen(const MSVCRT_wchar_t* command, const MSVCRT_wchar_t* mode)
{ {
FIXME("(command=%s, mode=%s): stub\n", debugstr_w(command), debugstr_w(mode)); FIXME("(command=%s, mode=%s): stub\n", debugstr_w(command), debugstr_w(mode));
return NULL; return NULL;
...@@ -636,7 +636,7 @@ MSVCRT_FILE* MSVCRT__wpopen(const MSVCRT_wchar_t* command, const MSVCRT_wchar_t* ...@@ -636,7 +636,7 @@ MSVCRT_FILE* MSVCRT__wpopen(const MSVCRT_wchar_t* command, const MSVCRT_wchar_t*
/********************************************************************* /*********************************************************************
* _pclose (MSVCRT.@) * _pclose (MSVCRT.@)
*/ */
int MSVCRT__pclose(MSVCRT_FILE* file) int CDECL MSVCRT__pclose(MSVCRT_FILE* file)
{ {
return MSVCRT_fclose(file); return MSVCRT_fclose(file);
} }
...@@ -644,7 +644,7 @@ int MSVCRT__pclose(MSVCRT_FILE* file) ...@@ -644,7 +644,7 @@ int MSVCRT__pclose(MSVCRT_FILE* file)
/********************************************************************* /*********************************************************************
* system (MSVCRT.@) * system (MSVCRT.@)
*/ */
int MSVCRT_system(const char* cmd) int CDECL MSVCRT_system(const char* cmd)
{ {
char* cmdcopy; char* cmdcopy;
int res; int res;
...@@ -660,7 +660,7 @@ int MSVCRT_system(const char* cmd) ...@@ -660,7 +660,7 @@ int MSVCRT_system(const char* cmd)
/********************************************************************* /*********************************************************************
* _loaddll (MSVCRT.@) * _loaddll (MSVCRT.@)
*/ */
MSVCRT_intptr_t _loaddll(const char* dllname) MSVCRT_intptr_t CDECL _loaddll(const char* dllname)
{ {
return (MSVCRT_intptr_t)LoadLibraryA(dllname); return (MSVCRT_intptr_t)LoadLibraryA(dllname);
} }
...@@ -668,7 +668,7 @@ MSVCRT_intptr_t _loaddll(const char* dllname) ...@@ -668,7 +668,7 @@ MSVCRT_intptr_t _loaddll(const char* dllname)
/********************************************************************* /*********************************************************************
* _unloaddll (MSVCRT.@) * _unloaddll (MSVCRT.@)
*/ */
int _unloaddll(MSVCRT_intptr_t dll) int CDECL _unloaddll(MSVCRT_intptr_t dll)
{ {
if (FreeLibrary((HMODULE)dll)) if (FreeLibrary((HMODULE)dll))
return 0; return 0;
...@@ -683,7 +683,7 @@ int _unloaddll(MSVCRT_intptr_t dll) ...@@ -683,7 +683,7 @@ int _unloaddll(MSVCRT_intptr_t dll)
/********************************************************************* /*********************************************************************
* _getdllprocaddr (MSVCRT.@) * _getdllprocaddr (MSVCRT.@)
*/ */
void *_getdllprocaddr(MSVCRT_intptr_t dll, const char *name, int ordinal) void * CDECL _getdllprocaddr(MSVCRT_intptr_t dll, const char *name, int ordinal)
{ {
if (name) if (name)
{ {
......
...@@ -92,7 +92,7 @@ static int wchar2digit(MSVCRT_wchar_t c, int base) { ...@@ -92,7 +92,7 @@ static int wchar2digit(MSVCRT_wchar_t c, int base) {
/********************************************************************* /*********************************************************************
* fscanf (MSVCRT.@) * fscanf (MSVCRT.@)
*/ */
int MSVCRT_fscanf(MSVCRT_FILE *file, const char *format, ...) int CDECL MSVCRT_fscanf(MSVCRT_FILE *file, const char *format, ...)
{ {
va_list valist; va_list valist;
int res; int res;
...@@ -106,7 +106,7 @@ int MSVCRT_fscanf(MSVCRT_FILE *file, const char *format, ...) ...@@ -106,7 +106,7 @@ int MSVCRT_fscanf(MSVCRT_FILE *file, const char *format, ...)
/********************************************************************* /*********************************************************************
* scanf (MSVCRT.@) * scanf (MSVCRT.@)
*/ */
int MSVCRT_scanf(const char *format, ...) int CDECL MSVCRT_scanf(const char *format, ...)
{ {
va_list valist; va_list valist;
int res; int res;
...@@ -120,7 +120,7 @@ int MSVCRT_scanf(const char *format, ...) ...@@ -120,7 +120,7 @@ int MSVCRT_scanf(const char *format, ...)
/********************************************************************* /*********************************************************************
* fwscanf (MSVCRT.@) * fwscanf (MSVCRT.@)
*/ */
int MSVCRT_fwscanf(MSVCRT_FILE *file, const MSVCRT_wchar_t *format, ...) int CDECL MSVCRT_fwscanf(MSVCRT_FILE *file, const MSVCRT_wchar_t *format, ...)
{ {
va_list valist; va_list valist;
int res; int res;
...@@ -135,7 +135,7 @@ int MSVCRT_fwscanf(MSVCRT_FILE *file, const MSVCRT_wchar_t *format, ...) ...@@ -135,7 +135,7 @@ int MSVCRT_fwscanf(MSVCRT_FILE *file, const MSVCRT_wchar_t *format, ...)
/********************************************************************* /*********************************************************************
* wscanf (MSVCRT.@) * wscanf (MSVCRT.@)
*/ */
int MSVCRT_wscanf(const MSVCRT_wchar_t *format, ...) int CDECL MSVCRT_wscanf(const MSVCRT_wchar_t *format, ...)
{ {
va_list valist; va_list valist;
int res; int res;
...@@ -150,7 +150,7 @@ int MSVCRT_wscanf(const MSVCRT_wchar_t *format, ...) ...@@ -150,7 +150,7 @@ int MSVCRT_wscanf(const MSVCRT_wchar_t *format, ...)
/********************************************************************* /*********************************************************************
* sscanf (MSVCRT.@) * sscanf (MSVCRT.@)
*/ */
int MSVCRT_sscanf(const char *str, const char *format, ...) int CDECL MSVCRT_sscanf(const char *str, const char *format, ...)
{ {
va_list valist; va_list valist;
int res; int res;
...@@ -165,7 +165,7 @@ int MSVCRT_sscanf(const char *str, const char *format, ...) ...@@ -165,7 +165,7 @@ int MSVCRT_sscanf(const char *str, const char *format, ...)
/********************************************************************* /*********************************************************************
* swscanf (MSVCRT.@) * swscanf (MSVCRT.@)
*/ */
int MSVCRT_swscanf(const MSVCRT_wchar_t *str, const MSVCRT_wchar_t *format, ...) int CDECL MSVCRT_swscanf(const MSVCRT_wchar_t *str, const MSVCRT_wchar_t *format, ...)
{ {
va_list valist; va_list valist;
int res; int res;
...@@ -180,7 +180,7 @@ int MSVCRT_swscanf(const MSVCRT_wchar_t *str, const MSVCRT_wchar_t *format, ...) ...@@ -180,7 +180,7 @@ int MSVCRT_swscanf(const MSVCRT_wchar_t *str, const MSVCRT_wchar_t *format, ...)
/********************************************************************* /*********************************************************************
* _cscanf (MSVCRT.@) * _cscanf (MSVCRT.@)
*/ */
int _cscanf(const char *format, ...) int CDECL _cscanf(const char *format, ...)
{ {
va_list valist; va_list valist;
int res; int res;
......
...@@ -48,7 +48,7 @@ char* msvcrt_strndup(const char* buf, unsigned int size) ...@@ -48,7 +48,7 @@ char* msvcrt_strndup(const char* buf, unsigned int size)
* _mbsdup (MSVCRT.@) * _mbsdup (MSVCRT.@)
* _strdup (MSVCRT.@) * _strdup (MSVCRT.@)
*/ */
char* _strdup(const char* str) char* CDECL _strdup(const char* str)
{ {
char * ret = MSVCRT_malloc(strlen(str)+1); char * ret = MSVCRT_malloc(strlen(str)+1);
if (ret) strcpy( ret, str ); if (ret) strcpy( ret, str );
...@@ -58,7 +58,7 @@ char* _strdup(const char* str) ...@@ -58,7 +58,7 @@ char* _strdup(const char* str)
/********************************************************************* /*********************************************************************
* _strnset (MSVCRT.@) * _strnset (MSVCRT.@)
*/ */
char* _strnset(char* str, int value, MSVCRT_size_t len) char* CDECL _strnset(char* str, int value, MSVCRT_size_t len)
{ {
if (len > 0 && str) if (len > 0 && str)
while (*str && len--) while (*str && len--)
...@@ -69,7 +69,7 @@ char* _strnset(char* str, int value, MSVCRT_size_t len) ...@@ -69,7 +69,7 @@ char* _strnset(char* str, int value, MSVCRT_size_t len)
/********************************************************************* /*********************************************************************
* _strrev (MSVCRT.@) * _strrev (MSVCRT.@)
*/ */
char* _strrev(char* str) char* CDECL _strrev(char* str)
{ {
char * p1; char * p1;
char * p2; char * p2;
...@@ -88,7 +88,7 @@ char* _strrev(char* str) ...@@ -88,7 +88,7 @@ char* _strrev(char* str)
/********************************************************************* /*********************************************************************
* _strset (MSVCRT.@) * _strset (MSVCRT.@)
*/ */
char* _strset(char* str, int value) char* CDECL _strset(char* str, int value)
{ {
char *ptr = str; char *ptr = str;
while (*ptr) while (*ptr)
...@@ -100,7 +100,7 @@ char* _strset(char* str, int value) ...@@ -100,7 +100,7 @@ char* _strset(char* str, int value)
/********************************************************************* /*********************************************************************
* strtok (MSVCRT.@) * strtok (MSVCRT.@)
*/ */
char *MSVCRT_strtok( char *str, const char *delim ) char * CDECL MSVCRT_strtok( char *str, const char *delim )
{ {
thread_data_t *data = msvcrt_get_thread_data(); thread_data_t *data = msvcrt_get_thread_data();
char *ret; char *ret;
...@@ -121,7 +121,7 @@ char *MSVCRT_strtok( char *str, const char *delim ) ...@@ -121,7 +121,7 @@ char *MSVCRT_strtok( char *str, const char *delim )
/********************************************************************* /*********************************************************************
* _swab (MSVCRT.@) * _swab (MSVCRT.@)
*/ */
void MSVCRT__swab(char* src, char* dst, int len) void CDECL MSVCRT__swab(char* src, char* dst, int len)
{ {
if (len > 1) if (len > 1)
{ {
...@@ -140,7 +140,7 @@ void MSVCRT__swab(char* src, char* dst, int len) ...@@ -140,7 +140,7 @@ void MSVCRT__swab(char* src, char* dst, int len)
/********************************************************************* /*********************************************************************
* atof (MSVCRT.@) * atof (MSVCRT.@)
*/ */
double MSVCRT_atof( const char *str ) double CDECL MSVCRT_atof( const char *str )
{ {
return atof( str ); return atof( str );
} }
...@@ -148,7 +148,7 @@ double MSVCRT_atof( const char *str ) ...@@ -148,7 +148,7 @@ double MSVCRT_atof( const char *str )
/********************************************************************* /*********************************************************************
* strtod (MSVCRT.@) * strtod (MSVCRT.@)
*/ */
double MSVCRT_strtod( const char *str, char **end ) double CDECL MSVCRT_strtod( const char *str, char **end )
{ {
return strtod( str, end ); return strtod( str, end );
} }
...@@ -156,7 +156,7 @@ double MSVCRT_strtod( const char *str, char **end ) ...@@ -156,7 +156,7 @@ double MSVCRT_strtod( const char *str, char **end )
/********************************************************************* /*********************************************************************
* strcoll (MSVCRT.@) * strcoll (MSVCRT.@)
*/ */
int MSVCRT_strcoll( const char* str1, const char* str2 ) int CDECL MSVCRT_strcoll( const char* str1, const char* str2 )
{ {
/* FIXME: handle Windows locale */ /* FIXME: handle Windows locale */
return strcoll( str1, str2 ); return strcoll( str1, str2 );
...@@ -165,7 +165,7 @@ int MSVCRT_strcoll( const char* str1, const char* str2 ) ...@@ -165,7 +165,7 @@ int MSVCRT_strcoll( const char* str1, const char* str2 )
/********************************************************************* /*********************************************************************
* strxfrm (MSVCRT.@) * strxfrm (MSVCRT.@)
*/ */
MSVCRT_size_t MSVCRT_strxfrm( char *dest, const char *src, MSVCRT_size_t len ) MSVCRT_size_t CDECL MSVCRT_strxfrm( char *dest, const char *src, MSVCRT_size_t len )
{ {
/* FIXME: handle Windows locale */ /* FIXME: handle Windows locale */
return strxfrm( dest, src, len ); return strxfrm( dest, src, len );
...@@ -174,7 +174,7 @@ MSVCRT_size_t MSVCRT_strxfrm( char *dest, const char *src, MSVCRT_size_t len ) ...@@ -174,7 +174,7 @@ MSVCRT_size_t MSVCRT_strxfrm( char *dest, const char *src, MSVCRT_size_t len )
/********************************************************************* /*********************************************************************
* _stricoll (MSVCRT.@) * _stricoll (MSVCRT.@)
*/ */
INT MSVCRT__stricoll( const char* str1, const char* str2 ) int CDECL MSVCRT__stricoll( const char* str1, const char* str2 )
{ {
/* FIXME: handle collates */ /* FIXME: handle collates */
TRACE("str1 %s str2 %s\n", debugstr_a(str1), debugstr_a(str2)); TRACE("str1 %s str2 %s\n", debugstr_a(str1), debugstr_a(str2));
......
...@@ -71,7 +71,7 @@ static DWORD CALLBACK _beginthread_trampoline(LPVOID arg) ...@@ -71,7 +71,7 @@ static DWORD CALLBACK _beginthread_trampoline(LPVOID arg)
/********************************************************************* /*********************************************************************
* _beginthread (MSVCRT.@) * _beginthread (MSVCRT.@)
*/ */
MSVCRT_uintptr_t _beginthread( MSVCRT_uintptr_t CDECL _beginthread(
MSVCRT__beginthread_start_routine_t start_address, /* [in] Start address of routine that begins execution of new thread */ MSVCRT__beginthread_start_routine_t start_address, /* [in] Start address of routine that begins execution of new thread */
unsigned int stack_size, /* [in] Stack size for new thread or 0 */ unsigned int stack_size, /* [in] Stack size for new thread or 0 */
void *arglist) /* [in] Argument list to be passed to new thread or NULL */ void *arglist) /* [in] Argument list to be passed to new thread or NULL */
...@@ -96,7 +96,7 @@ MSVCRT_uintptr_t _beginthread( ...@@ -96,7 +96,7 @@ MSVCRT_uintptr_t _beginthread(
/********************************************************************* /*********************************************************************
* _beginthreadex (MSVCRT.@) * _beginthreadex (MSVCRT.@)
*/ */
MSVCRT_uintptr_t _beginthreadex( MSVCRT_uintptr_t CDECL _beginthreadex(
void *security, /* [in] Security descriptor for new thread; must be NULL for Windows 9x applications */ void *security, /* [in] Security descriptor for new thread; must be NULL for Windows 9x applications */
unsigned int stack_size, /* [in] Stack size for new thread or 0 */ unsigned int stack_size, /* [in] Stack size for new thread or 0 */
MSVCRT__beginthreadex_start_routine_t start_address, /* [in] Start address of routine that begins execution of new thread */ MSVCRT__beginthreadex_start_routine_t start_address, /* [in] Start address of routine that begins execution of new thread */
...@@ -115,7 +115,7 @@ MSVCRT_uintptr_t _beginthreadex( ...@@ -115,7 +115,7 @@ MSVCRT_uintptr_t _beginthreadex(
/********************************************************************* /*********************************************************************
* _endthread (MSVCRT.@) * _endthread (MSVCRT.@)
*/ */
void _endthread(void) void CDECL _endthread(void)
{ {
TRACE("(void)\n"); TRACE("(void)\n");
...@@ -126,7 +126,7 @@ void _endthread(void) ...@@ -126,7 +126,7 @@ void _endthread(void)
/********************************************************************* /*********************************************************************
* _endthreadex (MSVCRT.@) * _endthreadex (MSVCRT.@)
*/ */
void _endthreadex( void CDECL _endthreadex(
unsigned int retval) /* [in] Thread exit code */ unsigned int retval) /* [in] Thread exit code */
{ {
TRACE("(%d)\n", retval); TRACE("(%d)\n", retval);
......
...@@ -71,7 +71,7 @@ static inline void msvcrt_tm_to_unix( struct tm *dest, const struct MSVCRT_tm *s ...@@ -71,7 +71,7 @@ static inline void msvcrt_tm_to_unix( struct tm *dest, const struct MSVCRT_tm *s
/********************************************************************** /**********************************************************************
* mktime (MSVCRT.@) * mktime (MSVCRT.@)
*/ */
MSVCRT_time_t MSVCRT_mktime(struct MSVCRT_tm *t) MSVCRT_time_t CDECL MSVCRT_mktime(struct MSVCRT_tm *t)
{ {
MSVCRT_time_t secs; MSVCRT_time_t secs;
FILETIME lft, uft; FILETIME lft, uft;
...@@ -144,7 +144,7 @@ MSVCRT_time_t MSVCRT_mktime(struct MSVCRT_tm *t) ...@@ -144,7 +144,7 @@ MSVCRT_time_t MSVCRT_mktime(struct MSVCRT_tm *t)
/********************************************************************* /*********************************************************************
* localtime (MSVCRT.@) * localtime (MSVCRT.@)
*/ */
struct MSVCRT_tm* MSVCRT_localtime(const MSVCRT_time_t* secs) struct MSVCRT_tm* CDECL MSVCRT_localtime(const MSVCRT_time_t* secs)
{ {
thread_data_t * const data = msvcrt_get_thread_data(); thread_data_t * const data = msvcrt_get_thread_data();
int i; int i;
...@@ -192,7 +192,7 @@ struct MSVCRT_tm* MSVCRT_localtime(const MSVCRT_time_t* secs) ...@@ -192,7 +192,7 @@ struct MSVCRT_tm* MSVCRT_localtime(const MSVCRT_time_t* secs)
/********************************************************************* /*********************************************************************
* gmtime (MSVCRT.@) * gmtime (MSVCRT.@)
*/ */
struct MSVCRT_tm* MSVCRT_gmtime(const MSVCRT_time_t* secs) struct MSVCRT_tm* CDECL MSVCRT_gmtime(const MSVCRT_time_t* secs)
{ {
thread_data_t * const data = msvcrt_get_thread_data(); thread_data_t * const data = msvcrt_get_thread_data();
int i; int i;
...@@ -228,7 +228,7 @@ struct MSVCRT_tm* MSVCRT_gmtime(const MSVCRT_time_t* secs) ...@@ -228,7 +228,7 @@ struct MSVCRT_tm* MSVCRT_gmtime(const MSVCRT_time_t* secs)
/********************************************************************** /**********************************************************************
* _strdate (MSVCRT.@) * _strdate (MSVCRT.@)
*/ */
char* _strdate(char* date) char* CDECL _strdate(char* date)
{ {
LPCSTR format = "MM'/'dd'/'yy"; LPCSTR format = "MM'/'dd'/'yy";
...@@ -240,7 +240,7 @@ char* _strdate(char* date) ...@@ -240,7 +240,7 @@ char* _strdate(char* date)
/********************************************************************** /**********************************************************************
* _wstrdate (MSVCRT.@) * _wstrdate (MSVCRT.@)
*/ */
MSVCRT_wchar_t* _wstrdate(MSVCRT_wchar_t* date) MSVCRT_wchar_t* CDECL _wstrdate(MSVCRT_wchar_t* date)
{ {
static const WCHAR format[] = { 'M','M','\'','/','\'','d','d','\'','/','\'','y','y',0 }; static const WCHAR format[] = { 'M','M','\'','/','\'','d','d','\'','/','\'','y','y',0 };
...@@ -252,7 +252,7 @@ MSVCRT_wchar_t* _wstrdate(MSVCRT_wchar_t* date) ...@@ -252,7 +252,7 @@ MSVCRT_wchar_t* _wstrdate(MSVCRT_wchar_t* date)
/********************************************************************* /*********************************************************************
* _strtime (MSVCRT.@) * _strtime (MSVCRT.@)
*/ */
char* _strtime(char* time) char* CDECL _strtime(char* time)
{ {
LPCSTR format = "HH':'mm':'ss"; LPCSTR format = "HH':'mm':'ss";
...@@ -264,7 +264,7 @@ char* _strtime(char* time) ...@@ -264,7 +264,7 @@ char* _strtime(char* time)
/********************************************************************* /*********************************************************************
* _wstrtime (MSVCRT.@) * _wstrtime (MSVCRT.@)
*/ */
MSVCRT_wchar_t* _wstrtime(MSVCRT_wchar_t* time) MSVCRT_wchar_t* CDECL _wstrtime(MSVCRT_wchar_t* time)
{ {
static const WCHAR format[] = { 'H','H','\'',':','\'','m','m','\'',':','\'','s','s',0 }; static const WCHAR format[] = { 'H','H','\'',':','\'','m','m','\'',':','\'','s','s',0 };
...@@ -276,7 +276,7 @@ MSVCRT_wchar_t* _wstrtime(MSVCRT_wchar_t* time) ...@@ -276,7 +276,7 @@ MSVCRT_wchar_t* _wstrtime(MSVCRT_wchar_t* time)
/********************************************************************* /*********************************************************************
* clock (MSVCRT.@) * clock (MSVCRT.@)
*/ */
MSVCRT_clock_t MSVCRT_clock(void) MSVCRT_clock_t CDECL MSVCRT_clock(void)
{ {
FILETIME ftc, fte, ftk, ftu; FILETIME ftc, fte, ftk, ftu;
ULONGLONG utime, ktime; ULONGLONG utime, ktime;
...@@ -296,7 +296,7 @@ MSVCRT_clock_t MSVCRT_clock(void) ...@@ -296,7 +296,7 @@ MSVCRT_clock_t MSVCRT_clock(void)
/********************************************************************* /*********************************************************************
* difftime (MSVCRT.@) * difftime (MSVCRT.@)
*/ */
double MSVCRT_difftime(MSVCRT_time_t time1, MSVCRT_time_t time2) double CDECL MSVCRT_difftime(MSVCRT_time_t time1, MSVCRT_time_t time2)
{ {
return (double)(time1 - time2); return (double)(time1 - time2);
} }
...@@ -304,7 +304,7 @@ double MSVCRT_difftime(MSVCRT_time_t time1, MSVCRT_time_t time2) ...@@ -304,7 +304,7 @@ double MSVCRT_difftime(MSVCRT_time_t time1, MSVCRT_time_t time2)
/********************************************************************* /*********************************************************************
* _ftime (MSVCRT.@) * _ftime (MSVCRT.@)
*/ */
void _ftime(struct MSVCRT__timeb *buf) void CDECL _ftime(struct MSVCRT__timeb *buf)
{ {
TIME_ZONE_INFORMATION tzinfo; TIME_ZONE_INFORMATION tzinfo;
FILETIME ft; FILETIME ft;
...@@ -326,7 +326,7 @@ void _ftime(struct MSVCRT__timeb *buf) ...@@ -326,7 +326,7 @@ void _ftime(struct MSVCRT__timeb *buf)
/********************************************************************* /*********************************************************************
* time (MSVCRT.@) * time (MSVCRT.@)
*/ */
MSVCRT_time_t MSVCRT_time(MSVCRT_time_t* buf) MSVCRT_time_t CDECL MSVCRT_time(MSVCRT_time_t* buf)
{ {
MSVCRT_time_t curtime; MSVCRT_time_t curtime;
struct MSVCRT__timeb tb; struct MSVCRT__timeb tb;
...@@ -345,7 +345,7 @@ int MSVCRT___daylight = 0; ...@@ -345,7 +345,7 @@ int MSVCRT___daylight = 0;
/********************************************************************* /*********************************************************************
* __p_daylight (MSVCRT.@) * __p_daylight (MSVCRT.@)
*/ */
int *MSVCRT___p__daylight(void) int * CDECL MSVCRT___p__daylight(void)
{ {
return &MSVCRT___daylight; return &MSVCRT___daylight;
} }
...@@ -358,7 +358,7 @@ int MSVCRT__dstbias = 0; ...@@ -358,7 +358,7 @@ int MSVCRT__dstbias = 0;
/********************************************************************* /*********************************************************************
* __p_dstbias (MSVCRT.@) * __p_dstbias (MSVCRT.@)
*/ */
int *__p__dstbias(void) int * CDECL __p__dstbias(void)
{ {
return &MSVCRT__dstbias; return &MSVCRT__dstbias;
} }
...@@ -371,7 +371,7 @@ long MSVCRT___timezone = 0; ...@@ -371,7 +371,7 @@ long MSVCRT___timezone = 0;
/********************************************************************* /*********************************************************************
* __p_timezone (MSVCRT.@) * __p_timezone (MSVCRT.@)
*/ */
long *MSVCRT___p__timezone(void) long * CDECL MSVCRT___p__timezone(void)
{ {
return &MSVCRT___timezone; return &MSVCRT___timezone;
} }
...@@ -390,7 +390,7 @@ char *MSVCRT__tzname[2] = { tzname_std, tzname_dst }; ...@@ -390,7 +390,7 @@ char *MSVCRT__tzname[2] = { tzname_std, tzname_dst };
/********************************************************************* /*********************************************************************
* __p_tzname (MSVCRT.@) * __p_tzname (MSVCRT.@)
*/ */
char **__p__tzname(void) char ** CDECL __p__tzname(void)
{ {
return MSVCRT__tzname; return MSVCRT__tzname;
} }
...@@ -398,7 +398,7 @@ char **__p__tzname(void) ...@@ -398,7 +398,7 @@ char **__p__tzname(void)
/********************************************************************* /*********************************************************************
* _tzset (MSVCRT.@) * _tzset (MSVCRT.@)
*/ */
void MSVCRT__tzset(void) void CDECL MSVCRT__tzset(void)
{ {
tzset(); tzset();
#if defined(HAVE_TIMEZONE) && defined(HAVE_DAYLIGHT) #if defined(HAVE_TIMEZONE) && defined(HAVE_DAYLIGHT)
...@@ -430,8 +430,8 @@ void MSVCRT__tzset(void) ...@@ -430,8 +430,8 @@ void MSVCRT__tzset(void)
/********************************************************************* /*********************************************************************
* strftime (MSVCRT.@) * strftime (MSVCRT.@)
*/ */
MSVCRT_size_t MSVCRT_strftime( char *str, MSVCRT_size_t max, const char *format, MSVCRT_size_t CDECL MSVCRT_strftime( char *str, MSVCRT_size_t max, const char *format,
const struct MSVCRT_tm *mstm ) const struct MSVCRT_tm *mstm )
{ {
struct tm tm; struct tm tm;
...@@ -442,8 +442,8 @@ MSVCRT_size_t MSVCRT_strftime( char *str, MSVCRT_size_t max, const char *format, ...@@ -442,8 +442,8 @@ MSVCRT_size_t MSVCRT_strftime( char *str, MSVCRT_size_t max, const char *format,
/********************************************************************* /*********************************************************************
* wcsftime (MSVCRT.@) * wcsftime (MSVCRT.@)
*/ */
MSVCRT_size_t MSVCRT_wcsftime( MSVCRT_wchar_t *str, MSVCRT_size_t max, MSVCRT_size_t CDECL MSVCRT_wcsftime( MSVCRT_wchar_t *str, MSVCRT_size_t max,
const MSVCRT_wchar_t *format, const struct MSVCRT_tm *mstm ) const MSVCRT_wchar_t *format, const struct MSVCRT_tm *mstm )
{ {
char *s, *fmt; char *s, *fmt;
MSVCRT_size_t len; MSVCRT_size_t len;
...@@ -472,7 +472,7 @@ MSVCRT_size_t MSVCRT_wcsftime( MSVCRT_wchar_t *str, MSVCRT_size_t max, ...@@ -472,7 +472,7 @@ MSVCRT_size_t MSVCRT_wcsftime( MSVCRT_wchar_t *str, MSVCRT_size_t max,
/********************************************************************* /*********************************************************************
* asctime (MSVCRT.@) * asctime (MSVCRT.@)
*/ */
char *MSVCRT_asctime(const struct MSVCRT_tm *mstm) char * CDECL MSVCRT_asctime(const struct MSVCRT_tm *mstm)
{ {
thread_data_t *data = msvcrt_get_thread_data(); thread_data_t *data = msvcrt_get_thread_data();
struct tm tm; struct tm tm;
...@@ -494,7 +494,7 @@ char *MSVCRT_asctime(const struct MSVCRT_tm *mstm) ...@@ -494,7 +494,7 @@ char *MSVCRT_asctime(const struct MSVCRT_tm *mstm)
/********************************************************************* /*********************************************************************
* _wasctime (MSVCRT.@) * _wasctime (MSVCRT.@)
*/ */
MSVCRT_wchar_t *MSVCRT__wasctime(const struct MSVCRT_tm *mstm) MSVCRT_wchar_t * CDECL MSVCRT__wasctime(const struct MSVCRT_tm *mstm)
{ {
thread_data_t *data = msvcrt_get_thread_data(); thread_data_t *data = msvcrt_get_thread_data();
struct tm tm; struct tm tm;
...@@ -516,7 +516,7 @@ MSVCRT_wchar_t *MSVCRT__wasctime(const struct MSVCRT_tm *mstm) ...@@ -516,7 +516,7 @@ MSVCRT_wchar_t *MSVCRT__wasctime(const struct MSVCRT_tm *mstm)
/********************************************************************* /*********************************************************************
* ctime (MSVCRT.@) * ctime (MSVCRT.@)
*/ */
char *MSVCRT_ctime(const MSVCRT_time_t *time) char * CDECL MSVCRT_ctime(const MSVCRT_time_t *time)
{ {
return MSVCRT_asctime( MSVCRT_localtime(time) ); return MSVCRT_asctime( MSVCRT_localtime(time) );
} }
...@@ -524,7 +524,7 @@ char *MSVCRT_ctime(const MSVCRT_time_t *time) ...@@ -524,7 +524,7 @@ char *MSVCRT_ctime(const MSVCRT_time_t *time)
/********************************************************************* /*********************************************************************
* _wctime (MSVCRT.@) * _wctime (MSVCRT.@)
*/ */
MSVCRT_wchar_t *MSVCRT__wctime(const MSVCRT_time_t *time) MSVCRT_wchar_t * CDECL MSVCRT__wctime(const MSVCRT_time_t *time)
{ {
return MSVCRT__wasctime( MSVCRT_localtime(time) ); return MSVCRT__wasctime( MSVCRT_localtime(time) );
} }
...@@ -1206,9 +1206,9 @@ done: ...@@ -1206,9 +1206,9 @@ done:
* Success: A string pointing to the unmangled name, allocated with memget. * Success: A string pointing to the unmangled name, allocated with memget.
* Failure: NULL. * Failure: NULL.
*/ */
char* __unDNameEx(char* buffer, const char* mangled, int buflen, char* CDECL __unDNameEx(char* buffer, const char* mangled, int buflen,
malloc_func_t memget, free_func_t memfree, malloc_func_t memget, free_func_t memfree,
void* unknown, unsigned short int flags) void* unknown, unsigned short int flags)
{ {
struct parsed_symbol sym; struct parsed_symbol sym;
const char* result; const char* result;
...@@ -1251,9 +1251,9 @@ char* __unDNameEx(char* buffer, const char* mangled, int buflen, ...@@ -1251,9 +1251,9 @@ char* __unDNameEx(char* buffer, const char* mangled, int buflen,
/********************************************************************* /*********************************************************************
* __unDName (MSVCRT.@) * __unDName (MSVCRT.@)
*/ */
char* __unDName(char* buffer, const char* mangled, int buflen, char* CDECL __unDName(char* buffer, const char* mangled, int buflen,
malloc_func_t memget, free_func_t memfree, malloc_func_t memget, free_func_t memfree,
unsigned short int flags) unsigned short int flags)
{ {
return __unDNameEx(buffer, mangled, buflen, memget, memfree, NULL, flags); return __unDNameEx(buffer, mangled, buflen, memget, memfree, NULL, flags);
} }
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