mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 08:55:06 +00:00
msvcrt: Explicitly specify CDECL calling convention on exported functions.
This commit is contained in:
parent
28bbdf116c
commit
24beabfd4e
|
@ -64,7 +64,7 @@ void msvcrt_free_console(void)
|
|||
/*********************************************************************
|
||||
* _cputs (MSVCRT.@)
|
||||
*/
|
||||
int _cputs(const char* str)
|
||||
int CDECL _cputs(const char* str)
|
||||
{
|
||||
DWORD count;
|
||||
int retval = MSVCRT_EOF;
|
||||
|
@ -80,7 +80,7 @@ int _cputs(const char* str)
|
|||
/*********************************************************************
|
||||
* _getch (MSVCRT.@)
|
||||
*/
|
||||
int _getch(void)
|
||||
int CDECL _getch(void)
|
||||
{
|
||||
int retval = MSVCRT_EOF;
|
||||
|
||||
|
@ -125,7 +125,7 @@ int _getch(void)
|
|||
/*********************************************************************
|
||||
* _putch (MSVCRT.@)
|
||||
*/
|
||||
int _putch(int c)
|
||||
int CDECL _putch(int c)
|
||||
{
|
||||
int retval = MSVCRT_EOF;
|
||||
DWORD count;
|
||||
|
@ -139,7 +139,7 @@ int _putch(int c)
|
|||
/*********************************************************************
|
||||
* _getche (MSVCRT.@)
|
||||
*/
|
||||
int _getche(void)
|
||||
int CDECL _getche(void)
|
||||
{
|
||||
int retval;
|
||||
LOCK_CONSOLE;
|
||||
|
@ -153,7 +153,7 @@ int _getche(void)
|
|||
/*********************************************************************
|
||||
* _cgets (MSVCRT.@)
|
||||
*/
|
||||
char* _cgets(char* str)
|
||||
char* CDECL _cgets(char* str)
|
||||
{
|
||||
char *buf = str + 2;
|
||||
DWORD got;
|
||||
|
@ -191,7 +191,7 @@ char* _cgets(char* str)
|
|||
/*********************************************************************
|
||||
* _ungetch (MSVCRT.@)
|
||||
*/
|
||||
int _ungetch(int c)
|
||||
int CDECL _ungetch(int c)
|
||||
{
|
||||
int retval = MSVCRT_EOF;
|
||||
LOCK_CONSOLE;
|
||||
|
@ -204,7 +204,7 @@ int _ungetch(int c)
|
|||
/*********************************************************************
|
||||
* _kbhit (MSVCRT.@)
|
||||
*/
|
||||
int _kbhit(void)
|
||||
int CDECL _kbhit(void)
|
||||
{
|
||||
int retval = 0;
|
||||
|
||||
|
@ -242,7 +242,7 @@ int _kbhit(void)
|
|||
/*********************************************************************
|
||||
* _cprintf (MSVCRT.@)
|
||||
*/
|
||||
int _cprintf(const char* format, ...)
|
||||
int CDECL _cprintf(const char* format, ...)
|
||||
{
|
||||
char buf[2048], *mem = buf;
|
||||
int written, resize = sizeof(buf), retval;
|
||||
|
|
|
@ -950,7 +950,7 @@ static const cxx_exception_type __non_rtti_object_exception_type =
|
|||
* RETURNS
|
||||
* 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();
|
||||
MSVCRT_terminate_function previous = data->terminate_handler;
|
||||
|
@ -970,7 +970,7 @@ MSVCRT_terminate_function MSVCRT_set_terminate(MSVCRT_terminate_function func)
|
|||
* RETURNS
|
||||
* 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();
|
||||
MSVCRT_unexpected_function previous = data->unexpected_handler;
|
||||
|
@ -982,7 +982,7 @@ MSVCRT_unexpected_function MSVCRT_set_unexpected(MSVCRT_unexpected_function func
|
|||
/******************************************************************
|
||||
* ?_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();
|
||||
MSVCRT__se_translator_function previous = data->se_translator;
|
||||
|
@ -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()
|
||||
* is called.
|
||||
*/
|
||||
void MSVCRT_terminate(void)
|
||||
void CDECL MSVCRT_terminate(void)
|
||||
{
|
||||
thread_data_t *data = msvcrt_get_thread_data();
|
||||
if (data->terminate_handler) data->terminate_handler();
|
||||
|
@ -1014,7 +1014,7 @@ void MSVCRT_terminate(void)
|
|||
/******************************************************************
|
||||
* ?unexpected@@YAXXZ (MSVCRT.@)
|
||||
*/
|
||||
void MSVCRT_unexpected(void)
|
||||
void CDECL MSVCRT_unexpected(void)
|
||||
{
|
||||
thread_data_t *data = msvcrt_get_thread_data();
|
||||
if (data->unexpected_handler) data->unexpected_handler();
|
||||
|
@ -1040,7 +1040,7 @@ void MSVCRT_unexpected(void)
|
|||
* This function is usually called by compiler generated code as a result
|
||||
* 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;
|
||||
|
||||
|
@ -1090,9 +1090,9 @@ const type_info* MSVCRT___RTtypeid(void *cppobj)
|
|||
* This function is usually called by compiler generated code as a result
|
||||
* of using one of the C++ dynamic cast statements.
|
||||
*/
|
||||
void* MSVCRT___RTDynamicCast(void *cppobj, int unknown,
|
||||
type_info *src, type_info *dst,
|
||||
int do_throw)
|
||||
void* CDECL MSVCRT___RTDynamicCast(void *cppobj, int unknown,
|
||||
type_info *src, type_info *dst,
|
||||
int do_throw)
|
||||
{
|
||||
void *ret;
|
||||
|
||||
|
@ -1170,7 +1170,7 @@ void* MSVCRT___RTDynamicCast(void *cppobj, int unknown,
|
|||
* This function is usually called by compiler generated code as a result
|
||||
* of using one of the C++ dynamic cast statements.
|
||||
*/
|
||||
void* MSVCRT___RTCastToVoid(void *cppobj)
|
||||
void* CDECL MSVCRT___RTCastToVoid(void *cppobj)
|
||||
{
|
||||
void *ret;
|
||||
|
||||
|
|
|
@ -43,10 +43,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(seh);
|
|||
|
||||
#ifdef __i386__ /* CxxFrameHandler is not supported on non-i386 */
|
||||
|
||||
DWORD cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame,
|
||||
PCONTEXT context, EXCEPTION_REGISTRATION_RECORD** dispatch,
|
||||
cxx_function_descr *descr, EXCEPTION_REGISTRATION_RECORD* nested_frame,
|
||||
int nested_trylevel );
|
||||
DWORD CDECL cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame,
|
||||
PCONTEXT context, EXCEPTION_REGISTRATION_RECORD** dispatch,
|
||||
cxx_function_descr *descr, EXCEPTION_REGISTRATION_RECORD* nested_frame,
|
||||
int nested_trylevel );
|
||||
|
||||
/* call a function with a given 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
|
|||
*
|
||||
* Implementation of __CxxFrameHandler.
|
||||
*/
|
||||
DWORD cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame,
|
||||
PCONTEXT context, EXCEPTION_REGISTRATION_RECORD** dispatch,
|
||||
cxx_function_descr *descr, EXCEPTION_REGISTRATION_RECORD* nested_frame,
|
||||
int nested_trylevel )
|
||||
DWORD CDECL cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame,
|
||||
PCONTEXT context, EXCEPTION_REGISTRATION_RECORD** dispatch,
|
||||
cxx_function_descr *descr, EXCEPTION_REGISTRATION_RECORD* nested_frame,
|
||||
int nested_trylevel )
|
||||
{
|
||||
cxx_exception_type *exc_type;
|
||||
|
||||
|
@ -408,8 +408,8 @@ DWORD cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame,
|
|||
/*********************************************************************
|
||||
* __CxxFrameHandler (MSVCRT.@)
|
||||
*/
|
||||
extern DWORD __CxxFrameHandler( PEXCEPTION_RECORD rec, EXCEPTION_REGISTRATION_RECORD* frame,
|
||||
PCONTEXT context, EXCEPTION_REGISTRATION_RECORD** dispatch );
|
||||
extern DWORD CDECL __CxxFrameHandler( PEXCEPTION_RECORD rec, EXCEPTION_REGISTRATION_RECORD* frame,
|
||||
PCONTEXT context, EXCEPTION_REGISTRATION_RECORD** dispatch );
|
||||
__ASM_GLOBAL_FUNC( __CxxFrameHandler,
|
||||
"pushl $0\n\t" /* nested_trylevel */
|
||||
"pushl $0\n\t" /* nested_frame */
|
||||
|
@ -427,7 +427,7 @@ __ASM_GLOBAL_FUNC( __CxxFrameHandler,
|
|||
/*********************************************************************
|
||||
* _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];
|
||||
|
||||
|
@ -440,7 +440,7 @@ void _CxxThrowException( exception *object, const cxx_exception_type *type )
|
|||
/*********************************************************************
|
||||
* __CxxDetectRethrow (MSVCRT.@)
|
||||
*/
|
||||
BOOL __CxxDetectRethrow(PEXCEPTION_POINTERS ptrs)
|
||||
BOOL CDECL __CxxDetectRethrow(PEXCEPTION_POINTERS ptrs)
|
||||
{
|
||||
PEXCEPTION_RECORD rec;
|
||||
|
||||
|
@ -463,7 +463,7 @@ BOOL __CxxDetectRethrow(PEXCEPTION_POINTERS ptrs)
|
|||
/*********************************************************************
|
||||
* __CxxQueryExceptionSize (MSVCRT.@)
|
||||
*/
|
||||
unsigned int __CxxQueryExceptionSize(void)
|
||||
unsigned int CDECL __CxxQueryExceptionSize(void)
|
||||
{
|
||||
return sizeof(cxx_exception_type);
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ extern LCID MSVCRT_current_lc_all_lcid;
|
|||
/*********************************************************************
|
||||
* __p__pctype (MSVCRT.@)
|
||||
*/
|
||||
WORD** __p__pctype(void)
|
||||
WORD** CDECL __p__pctype(void)
|
||||
{
|
||||
return &MSVCRT__pctype;
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ WORD** __p__pctype(void)
|
|||
/*********************************************************************
|
||||
* _isctype (MSVCRT.@)
|
||||
*/
|
||||
int _isctype(int c, int type)
|
||||
int CDECL _isctype(int c, int type)
|
||||
{
|
||||
if (c >= -1 && c <= 255)
|
||||
return MSVCRT__pctype[c] & type;
|
||||
|
@ -102,7 +102,7 @@ int _isctype(int c, int type)
|
|||
/*********************************************************************
|
||||
* isalnum (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_isalnum(int c)
|
||||
int CDECL MSVCRT_isalnum(int c)
|
||||
{
|
||||
return _isctype( c, MSVCRT__ALPHA | MSVCRT__DIGIT );
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ int MSVCRT_isalnum(int c)
|
|||
/*********************************************************************
|
||||
* isalpha (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_isalpha(int c)
|
||||
int CDECL MSVCRT_isalpha(int c)
|
||||
{
|
||||
return _isctype( c, MSVCRT__ALPHA );
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ int MSVCRT_isalpha(int c)
|
|||
/*********************************************************************
|
||||
* iscntrl (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_iscntrl(int c)
|
||||
int CDECL MSVCRT_iscntrl(int c)
|
||||
{
|
||||
return _isctype( c, MSVCRT__CONTROL );
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ int MSVCRT_iscntrl(int c)
|
|||
/*********************************************************************
|
||||
* isdigit (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_isdigit(int c)
|
||||
int CDECL MSVCRT_isdigit(int c)
|
||||
{
|
||||
return _isctype( c, MSVCRT__DIGIT );
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ int MSVCRT_isdigit(int c)
|
|||
/*********************************************************************
|
||||
* isgraph (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_isgraph(int c)
|
||||
int CDECL MSVCRT_isgraph(int c)
|
||||
{
|
||||
return _isctype( c, MSVCRT__ALPHA | MSVCRT__DIGIT | MSVCRT__PUNCT );
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ int MSVCRT_isgraph(int c)
|
|||
/*********************************************************************
|
||||
* isleadbyte (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_isleadbyte(int c)
|
||||
int CDECL MSVCRT_isleadbyte(int c)
|
||||
{
|
||||
return _isctype( c, MSVCRT__LEADBYTE );
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ int MSVCRT_isleadbyte(int c)
|
|||
/*********************************************************************
|
||||
* islower (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_islower(int c)
|
||||
int CDECL MSVCRT_islower(int c)
|
||||
{
|
||||
return _isctype( c, MSVCRT__LOWER );
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ int MSVCRT_islower(int c)
|
|||
/*********************************************************************
|
||||
* isprint (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_isprint(int c)
|
||||
int CDECL MSVCRT_isprint(int c)
|
||||
{
|
||||
return _isctype( c, MSVCRT__ALPHA | MSVCRT__DIGIT | MSVCRT__BLANK | MSVCRT__PUNCT );
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ int MSVCRT_isprint(int c)
|
|||
/*********************************************************************
|
||||
* ispunct (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_ispunct(int c)
|
||||
int CDECL MSVCRT_ispunct(int c)
|
||||
{
|
||||
return _isctype( c, MSVCRT__PUNCT );
|
||||
}
|
||||
|
@ -174,7 +174,7 @@ int MSVCRT_ispunct(int c)
|
|||
/*********************************************************************
|
||||
* isspace (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_isspace(int c)
|
||||
int CDECL MSVCRT_isspace(int c)
|
||||
{
|
||||
return _isctype( c, MSVCRT__SPACE );
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ int MSVCRT_isspace(int c)
|
|||
/*********************************************************************
|
||||
* isupper (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_isupper(int c)
|
||||
int CDECL MSVCRT_isupper(int c)
|
||||
{
|
||||
return _isctype( c, MSVCRT__UPPER );
|
||||
}
|
||||
|
@ -190,7 +190,7 @@ int MSVCRT_isupper(int c)
|
|||
/*********************************************************************
|
||||
* isxdigit (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_isxdigit(int c)
|
||||
int CDECL MSVCRT_isxdigit(int c)
|
||||
{
|
||||
return _isctype( c, MSVCRT__HEX );
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ int MSVCRT_isxdigit(int c)
|
|||
/*********************************************************************
|
||||
* __isascii (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT___isascii(int c)
|
||||
int CDECL MSVCRT___isascii(int c)
|
||||
{
|
||||
return isascii((unsigned)c);
|
||||
}
|
||||
|
@ -206,7 +206,7 @@ int MSVCRT___isascii(int c)
|
|||
/*********************************************************************
|
||||
* __toascii (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT___toascii(int c)
|
||||
int CDECL MSVCRT___toascii(int c)
|
||||
{
|
||||
return (unsigned)c & 0x7f;
|
||||
}
|
||||
|
@ -215,7 +215,7 @@ int MSVCRT___toascii(int c)
|
|||
* iswascii (MSVCRT.@)
|
||||
*
|
||||
*/
|
||||
int MSVCRT_iswascii(MSVCRT_wchar_t c)
|
||||
int CDECL MSVCRT_iswascii(MSVCRT_wchar_t c)
|
||||
{
|
||||
return ((unsigned)c < 0x80);
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ int MSVCRT_iswascii(MSVCRT_wchar_t c)
|
|||
/*********************************************************************
|
||||
* __iscsym (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT___iscsym(int c)
|
||||
int CDECL MSVCRT___iscsym(int c)
|
||||
{
|
||||
return (c < 127 && (isalnum(c) || c == '_'));
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ int MSVCRT___iscsym(int c)
|
|||
/*********************************************************************
|
||||
* __iscsymf (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT___iscsymf(int c)
|
||||
int CDECL MSVCRT___iscsymf(int c)
|
||||
{
|
||||
return (c < 127 && (isalpha(c) || c == '_'));
|
||||
}
|
||||
|
@ -239,7 +239,7 @@ int MSVCRT___iscsymf(int c)
|
|||
/*********************************************************************
|
||||
* _toupper (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT__toupper(int c)
|
||||
int CDECL MSVCRT__toupper(int c)
|
||||
{
|
||||
return c - 0x20; /* sic */
|
||||
}
|
||||
|
@ -247,7 +247,7 @@ int MSVCRT__toupper(int c)
|
|||
/*********************************************************************
|
||||
* _tolower (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT__tolower(int c)
|
||||
int CDECL MSVCRT__tolower(int c)
|
||||
{
|
||||
return c + 0x20; /* sic */
|
||||
}
|
||||
|
|
|
@ -135,73 +135,73 @@ typedef void (*_INITTERMFUN)(void);
|
|||
/***********************************************************************
|
||||
* __p___argc (MSVCRT.@)
|
||||
*/
|
||||
int* __p___argc(void) { return &MSVCRT___argc; }
|
||||
int* CDECL __p___argc(void) { return &MSVCRT___argc; }
|
||||
|
||||
/***********************************************************************
|
||||
* __p__commode (MSVCRT.@)
|
||||
*/
|
||||
unsigned int* __p__commode(void) { return &MSVCRT__commode; }
|
||||
unsigned int* CDECL __p__commode(void) { return &MSVCRT__commode; }
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* __p__pgmptr (MSVCRT.@)
|
||||
*/
|
||||
char** __p__pgmptr(void) { return &MSVCRT__pgmptr; }
|
||||
char** CDECL __p__pgmptr(void) { return &MSVCRT__pgmptr; }
|
||||
|
||||
/***********************************************************************
|
||||
* __p__wpgmptr (MSVCRT.@)
|
||||
*/
|
||||
WCHAR** __p__wpgmptr(void) { return &MSVCRT__wpgmptr; }
|
||||
WCHAR** CDECL __p__wpgmptr(void) { return &MSVCRT__wpgmptr; }
|
||||
|
||||
/***********************************************************************
|
||||
* __p__fmode (MSVCRT.@)
|
||||
*/
|
||||
unsigned int* __p__fmode(void) { return &MSVCRT__fmode; }
|
||||
unsigned int* CDECL __p__fmode(void) { return &MSVCRT__fmode; }
|
||||
|
||||
/***********************************************************************
|
||||
* __p__osver (MSVCRT.@)
|
||||
*/
|
||||
unsigned int* __p__osver(void) { return &MSVCRT__osver; }
|
||||
unsigned int* CDECL __p__osver(void) { return &MSVCRT__osver; }
|
||||
|
||||
/***********************************************************************
|
||||
* __p__winmajor (MSVCRT.@)
|
||||
*/
|
||||
unsigned int* __p__winmajor(void) { return &MSVCRT__winmajor; }
|
||||
unsigned int* CDECL __p__winmajor(void) { return &MSVCRT__winmajor; }
|
||||
|
||||
/***********************************************************************
|
||||
* __p__winminor (MSVCRT.@)
|
||||
*/
|
||||
unsigned int* __p__winminor(void) { return &MSVCRT__winminor; }
|
||||
unsigned int* CDECL __p__winminor(void) { return &MSVCRT__winminor; }
|
||||
|
||||
/***********************************************************************
|
||||
* __p__winver (MSVCRT.@)
|
||||
*/
|
||||
unsigned int* __p__winver(void) { return &MSVCRT__winver; }
|
||||
unsigned int* CDECL __p__winver(void) { return &MSVCRT__winver; }
|
||||
|
||||
/*********************************************************************
|
||||
* __p__acmdln (MSVCRT.@)
|
||||
*/
|
||||
char** __p__acmdln(void) { return &MSVCRT__acmdln; }
|
||||
char** CDECL __p__acmdln(void) { return &MSVCRT__acmdln; }
|
||||
|
||||
/*********************************************************************
|
||||
* __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.@)
|
||||
*/
|
||||
char*** __p___argv(void) { return &MSVCRT___argv; }
|
||||
char*** CDECL __p___argv(void) { return &MSVCRT___argv; }
|
||||
|
||||
/*********************************************************************
|
||||
* __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.@)
|
||||
*/
|
||||
char*** __p__environ(void)
|
||||
char*** CDECL __p__environ(void)
|
||||
{
|
||||
if (!_environ)
|
||||
_environ = msvcrt_SnapshotOfEnvironmentA(NULL);
|
||||
|
@ -211,7 +211,7 @@ char*** __p__environ(void)
|
|||
/*********************************************************************
|
||||
* __p__wenviron (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_wchar_t*** __p__wenviron(void)
|
||||
MSVCRT_wchar_t*** CDECL __p__wenviron(void)
|
||||
{
|
||||
if (!_wenviron)
|
||||
_wenviron = msvcrt_SnapshotOfEnvironmentW(NULL);
|
||||
|
@ -221,12 +221,12 @@ MSVCRT_wchar_t*** __p__wenviron(void)
|
|||
/*********************************************************************
|
||||
* __p___initenv (MSVCRT.@)
|
||||
*/
|
||||
char*** __p___initenv(void) { return &MSVCRT___initenv; }
|
||||
char*** CDECL __p___initenv(void) { return &MSVCRT___initenv; }
|
||||
|
||||
/*********************************************************************
|
||||
* __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 */
|
||||
static MSVCRT_wchar_t *wstrdupa(const char *str)
|
||||
|
@ -311,8 +311,8 @@ void msvcrt_free_args(void)
|
|||
/*********************************************************************
|
||||
* __getmainargs (MSVCRT.@)
|
||||
*/
|
||||
void __getmainargs(int *argc, char** *argv, char** *envp,
|
||||
int expand_wildcards, int *new_mode)
|
||||
void CDECL __getmainargs(int *argc, char** *argv, char** *envp,
|
||||
int expand_wildcards, int *new_mode)
|
||||
{
|
||||
TRACE("(%p,%p,%p,%d,%p).\n", argc, argv, envp, expand_wildcards, new_mode);
|
||||
*argc = MSVCRT___argc;
|
||||
|
@ -325,8 +325,8 @@ void __getmainargs(int *argc, char** *argv, char** *envp,
|
|||
/*********************************************************************
|
||||
* __wgetmainargs (MSVCRT.@)
|
||||
*/
|
||||
void __wgetmainargs(int *argc, MSVCRT_wchar_t** *wargv, MSVCRT_wchar_t** *wenvp,
|
||||
int expand_wildcards, int *new_mode)
|
||||
void CDECL __wgetmainargs(int *argc, MSVCRT_wchar_t** *wargv, MSVCRT_wchar_t** *wenvp,
|
||||
int expand_wildcards, int *new_mode)
|
||||
{
|
||||
TRACE("(%p,%p,%p,%d,%p).\n", argc, wargv, wenvp, expand_wildcards, new_mode);
|
||||
*argc = MSVCRT___argc;
|
||||
|
@ -339,7 +339,7 @@ void __wgetmainargs(int *argc, MSVCRT_wchar_t** *wargv, MSVCRT_wchar_t** *wenvp,
|
|||
/*********************************************************************
|
||||
* _initterm (MSVCRT.@)
|
||||
*/
|
||||
unsigned int _initterm(_INITTERMFUN *start,_INITTERMFUN *end)
|
||||
unsigned int CDECL _initterm(_INITTERMFUN *start,_INITTERMFUN *end)
|
||||
{
|
||||
_INITTERMFUN* current = start;
|
||||
|
||||
|
@ -360,7 +360,7 @@ unsigned int _initterm(_INITTERMFUN *start,_INITTERMFUN *end)
|
|||
/*********************************************************************
|
||||
* __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");
|
||||
MSVCRT_app_type = app_type;
|
||||
|
|
|
@ -132,7 +132,7 @@ static void msvcrt_wfttofdi64( const WIN32_FIND_DATAW *fd, struct MSVCRT__wfindd
|
|||
* NOTES
|
||||
* See SetCurrentDirectoryA.
|
||||
*/
|
||||
int _chdir(const char * newdir)
|
||||
int CDECL _chdir(const char * newdir)
|
||||
{
|
||||
if (!SetCurrentDirectoryA(newdir))
|
||||
{
|
||||
|
@ -147,7 +147,7 @@ int _chdir(const char * newdir)
|
|||
*
|
||||
* Unicode version of _chdir.
|
||||
*/
|
||||
int _wchdir(const MSVCRT_wchar_t * newdir)
|
||||
int CDECL _wchdir(const MSVCRT_wchar_t * newdir)
|
||||
{
|
||||
if (!SetCurrentDirectoryW(newdir))
|
||||
{
|
||||
|
@ -172,7 +172,7 @@ int _wchdir(const MSVCRT_wchar_t * newdir)
|
|||
* NOTES
|
||||
* See SetCurrentDirectoryA.
|
||||
*/
|
||||
int _chdrive(int newdrive)
|
||||
int CDECL _chdrive(int newdrive)
|
||||
{
|
||||
WCHAR buffer[3] = {'A', ':', 0};
|
||||
|
||||
|
@ -202,7 +202,7 @@ int _chdrive(int newdrive)
|
|||
* NOTES
|
||||
* See FindClose.
|
||||
*/
|
||||
int MSVCRT__findclose(long hand)
|
||||
int CDECL MSVCRT__findclose(long hand)
|
||||
{
|
||||
TRACE(":handle %ld\n",hand);
|
||||
if (!FindClose((HANDLE)hand))
|
||||
|
@ -230,7 +230,7 @@ int MSVCRT__findclose(long hand)
|
|||
* NOTES
|
||||
* 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;
|
||||
HANDLE hfind;
|
||||
|
@ -251,7 +251,7 @@ long MSVCRT__findfirst(const char * fspec, struct MSVCRT__finddata_t* ft)
|
|||
*
|
||||
* 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;
|
||||
HANDLE hfind;
|
||||
|
@ -272,7 +272,7 @@ long MSVCRT__wfindfirst(const MSVCRT_wchar_t * fspec, struct MSVCRT__wfinddata_t
|
|||
*
|
||||
* 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;
|
||||
HANDLE hfind;
|
||||
|
@ -293,7 +293,7 @@ long MSVCRT__findfirsti64(const char * fspec, struct MSVCRT__finddatai64_t* ft)
|
|||
*
|
||||
* 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;
|
||||
HANDLE hfind;
|
||||
|
@ -325,7 +325,7 @@ long MSVCRT__wfindfirsti64(const MSVCRT_wchar_t * fspec, struct MSVCRT__wfinddat
|
|||
* NOTES
|
||||
* 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;
|
||||
|
||||
|
@ -344,7 +344,7 @@ int MSVCRT__findnext(long hand, struct MSVCRT__finddata_t * ft)
|
|||
*
|
||||
* 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;
|
||||
|
||||
|
@ -363,7 +363,7 @@ int MSVCRT__wfindnext(long hand, struct MSVCRT__wfinddata_t * ft)
|
|||
*
|
||||
* 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;
|
||||
|
||||
|
@ -382,7 +382,7 @@ int MSVCRT__findnexti64(long hand, struct MSVCRT__finddatai64_t * ft)
|
|||
*
|
||||
* 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;
|
||||
|
||||
|
@ -410,7 +410,7 @@ int MSVCRT__wfindnexti64(long hand, struct MSVCRT__wfinddatai64_t * ft)
|
|||
* Otherwise populates buf with the path and returns it.
|
||||
* Failure: NULL. errno indicates the error.
|
||||
*/
|
||||
char* _getcwd(char * buf, int size)
|
||||
char* CDECL _getcwd(char * buf, int size)
|
||||
{
|
||||
char dir[MAX_PATH];
|
||||
int dir_len = GetCurrentDirectoryA(MAX_PATH,dir);
|
||||
|
@ -438,7 +438,7 @@ char* _getcwd(char * buf, int size)
|
|||
*
|
||||
* 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];
|
||||
int dir_len = GetCurrentDirectoryW(MAX_PATH,dir);
|
||||
|
@ -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:").
|
||||
* Failure: 0.
|
||||
*/
|
||||
int _getdrive(void)
|
||||
int CDECL _getdrive(void)
|
||||
{
|
||||
WCHAR buffer[MAX_PATH];
|
||||
if (GetCurrentDirectoryW( MAX_PATH, buffer ) &&
|
||||
|
@ -497,7 +497,7 @@ int _getdrive(void)
|
|||
* Otherwise populates drive with the path and returns it.
|
||||
* 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;
|
||||
|
||||
|
@ -539,7 +539,7 @@ char* _getdcwd(int drive, char * buf, int size)
|
|||
*
|
||||
* 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;
|
||||
|
||||
|
@ -591,7 +591,7 @@ MSVCRT_wchar_t* _wgetdcwd(int drive, MSVCRT_wchar_t * buf, int size)
|
|||
* NOTES
|
||||
* 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};
|
||||
DWORD ret[4];
|
||||
|
@ -630,7 +630,7 @@ unsigned int MSVCRT__getdiskfree(unsigned int disk, struct MSVCRT__diskfree_t *
|
|||
* NOTES
|
||||
* See CreateDirectoryA.
|
||||
*/
|
||||
int _mkdir(const char * newdir)
|
||||
int CDECL _mkdir(const char * newdir)
|
||||
{
|
||||
if (CreateDirectoryA(newdir,NULL))
|
||||
return 0;
|
||||
|
@ -643,7 +643,7 @@ int _mkdir(const char * newdir)
|
|||
*
|
||||
* Unicode version of _mkdir.
|
||||
*/
|
||||
int _wmkdir(const MSVCRT_wchar_t* newdir)
|
||||
int CDECL _wmkdir(const MSVCRT_wchar_t* newdir)
|
||||
{
|
||||
if (CreateDirectoryW(newdir,NULL))
|
||||
return 0;
|
||||
|
@ -666,7 +666,7 @@ int _wmkdir(const MSVCRT_wchar_t* newdir)
|
|||
* NOTES
|
||||
* See RemoveDirectoryA.
|
||||
*/
|
||||
int _rmdir(const char * dir)
|
||||
int CDECL _rmdir(const char * dir)
|
||||
{
|
||||
if (RemoveDirectoryA(dir))
|
||||
return 0;
|
||||
|
@ -679,7 +679,7 @@ int _rmdir(const char * dir)
|
|||
*
|
||||
* Unicode version of _rmdir.
|
||||
*/
|
||||
int _wrmdir(const MSVCRT_wchar_t * dir)
|
||||
int CDECL _wrmdir(const MSVCRT_wchar_t * dir)
|
||||
{
|
||||
if (RemoveDirectoryW(dir))
|
||||
return 0;
|
||||
|
@ -692,8 +692,8 @@ int _wrmdir(const MSVCRT_wchar_t * dir)
|
|||
*
|
||||
* Unicode version of _splitpath.
|
||||
*/
|
||||
void _wsplitpath(const MSVCRT_wchar_t *inpath, MSVCRT_wchar_t *drv, MSVCRT_wchar_t *dir,
|
||||
MSVCRT_wchar_t *fname, MSVCRT_wchar_t *ext )
|
||||
void CDECL _wsplitpath(const MSVCRT_wchar_t *inpath, MSVCRT_wchar_t *drv, MSVCRT_wchar_t *dir,
|
||||
MSVCRT_wchar_t *fname, MSVCRT_wchar_t *ext )
|
||||
{
|
||||
const MSVCRT_wchar_t *p, *end;
|
||||
|
||||
|
@ -743,7 +743,7 @@ void _wsplitpath(const MSVCRT_wchar_t *inpath, MSVCRT_wchar_t *drv, MSVCRT_wchar
|
|||
*
|
||||
* 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;
|
||||
WCHAR* buffer;
|
||||
|
@ -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.
|
||||
* 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;
|
||||
char* lastpart;
|
||||
|
@ -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,
|
||||
* random process memory will be overwritten.
|
||||
*/
|
||||
VOID _makepath(char * path, const char * drive,
|
||||
const char *directory, const char * filename,
|
||||
const char * extension)
|
||||
VOID CDECL _makepath(char * path, const char * drive,
|
||||
const char *directory, const char * filename,
|
||||
const char * extension)
|
||||
{
|
||||
char ch;
|
||||
|
||||
|
@ -896,8 +896,8 @@ VOID _makepath(char * path, const char * drive,
|
|||
*
|
||||
* Unicode version of _wmakepath.
|
||||
*/
|
||||
VOID _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)
|
||||
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)
|
||||
{
|
||||
MSVCRT_wchar_t ch;
|
||||
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_
|
|||
* Nothing. If the file is not found, buf will contain an empty string
|
||||
* 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 curPath[MAX_PATH];
|
||||
|
|
|
@ -29,7 +29,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
|
|||
/*********************************************************************
|
||||
* getenv (MSVCRT.@)
|
||||
*/
|
||||
char *MSVCRT_getenv(const char *name)
|
||||
char * CDECL MSVCRT_getenv(const char *name)
|
||||
{
|
||||
char **environ;
|
||||
unsigned int length=strlen(name);
|
||||
|
@ -50,7 +50,7 @@ char *MSVCRT_getenv(const char *name)
|
|||
/*********************************************************************
|
||||
* _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;
|
||||
unsigned int length=strlenW(name);
|
||||
|
@ -71,7 +71,7 @@ MSVCRT_wchar_t *_wgetenv(const MSVCRT_wchar_t *name)
|
|||
/*********************************************************************
|
||||
* _putenv (MSVCRT.@)
|
||||
*/
|
||||
int _putenv(const char *str)
|
||||
int CDECL _putenv(const char *str)
|
||||
{
|
||||
char *name, *value;
|
||||
char *dst;
|
||||
|
@ -118,7 +118,7 @@ finish:
|
|||
/*********************************************************************
|
||||
* _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 *dst;
|
||||
|
|
|
@ -181,7 +181,7 @@ void msvcrt_set_errno(int err)
|
|||
/*********************************************************************
|
||||
* _errno (MSVCRT.@)
|
||||
*/
|
||||
int* MSVCRT__errno(void)
|
||||
int* CDECL MSVCRT__errno(void)
|
||||
{
|
||||
return &msvcrt_get_thread_data()->thread_errno;
|
||||
}
|
||||
|
@ -189,7 +189,7 @@ int* MSVCRT__errno(void)
|
|||
/*********************************************************************
|
||||
* __doserrno (MSVCRT.@)
|
||||
*/
|
||||
unsigned long* MSVCRT___doserrno(void)
|
||||
unsigned long* CDECL MSVCRT___doserrno(void)
|
||||
{
|
||||
return &msvcrt_get_thread_data()->thread_doserrno;
|
||||
}
|
||||
|
@ -197,7 +197,7 @@ unsigned long* MSVCRT___doserrno(void)
|
|||
/*********************************************************************
|
||||
* strerror (MSVCRT.@)
|
||||
*/
|
||||
char* MSVCRT_strerror(int err)
|
||||
char* CDECL MSVCRT_strerror(int err)
|
||||
{
|
||||
thread_data_t *data = msvcrt_get_thread_data();
|
||||
|
||||
|
@ -212,7 +212,7 @@ char* MSVCRT_strerror(int err)
|
|||
/**********************************************************************
|
||||
* _strerror (MSVCRT.@)
|
||||
*/
|
||||
char* _strerror(const char* str)
|
||||
char* CDECL _strerror(const char* str)
|
||||
{
|
||||
thread_data_t *data = msvcrt_get_thread_data();
|
||||
int err;
|
||||
|
@ -234,7 +234,7 @@ char* _strerror(const char* str)
|
|||
/*********************************************************************
|
||||
* perror (MSVCRT.@)
|
||||
*/
|
||||
void MSVCRT_perror(const char* str)
|
||||
void CDECL MSVCRT_perror(const char* str)
|
||||
{
|
||||
int err = *MSVCRT__errno();
|
||||
if (err < 0 || err > MSVCRT__sys_nerr) err = MSVCRT__sys_nerr;
|
||||
|
@ -264,7 +264,7 @@ void MSVCRT_perror(const char* str)
|
|||
* This function does not have a proper implementation; the error mode is
|
||||
* never used.
|
||||
*/
|
||||
int _set_error_mode(int mode)
|
||||
int CDECL _set_error_mode(int mode)
|
||||
{
|
||||
static int current_mode = MSVCRT__OUT_TO_DEFAULT;
|
||||
|
||||
|
@ -280,7 +280,7 @@ int _set_error_mode(int mode)
|
|||
/******************************************************************************
|
||||
* _seterrormode (MSVCRT.@)
|
||||
*/
|
||||
void _seterrormode(int mode)
|
||||
void CDECL _seterrormode(int mode)
|
||||
{
|
||||
SetErrorMode( mode );
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ __ASM_GLOBAL_FUNC(_EH_prolog,
|
|||
/*******************************************************************
|
||||
* _global_unwind2 (MSVCRT.@)
|
||||
*/
|
||||
void _global_unwind2(EXCEPTION_REGISTRATION_RECORD* frame)
|
||||
void CDECL _global_unwind2(EXCEPTION_REGISTRATION_RECORD* frame)
|
||||
{
|
||||
TRACE("(%p)\n",frame);
|
||||
RtlUnwind( frame, 0, 0, 0 );
|
||||
|
@ -124,7 +124,7 @@ void _global_unwind2(EXCEPTION_REGISTRATION_RECORD* frame)
|
|||
/*******************************************************************
|
||||
* _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;
|
||||
EXCEPTION_REGISTRATION_RECORD reg;
|
||||
|
@ -156,10 +156,10 @@ void _local_unwind2(MSVCRT_EXCEPTION_FRAME* frame, int trylevel)
|
|||
/*********************************************************************
|
||||
* _except_handler2 (MSVCRT.@)
|
||||
*/
|
||||
int _except_handler2(PEXCEPTION_RECORD rec,
|
||||
EXCEPTION_REGISTRATION_RECORD* frame,
|
||||
PCONTEXT context,
|
||||
EXCEPTION_REGISTRATION_RECORD** dispatcher)
|
||||
int CDECL _except_handler2(PEXCEPTION_RECORD rec,
|
||||
EXCEPTION_REGISTRATION_RECORD* frame,
|
||||
PCONTEXT context,
|
||||
EXCEPTION_REGISTRATION_RECORD** dispatcher)
|
||||
{
|
||||
FIXME("exception %lx flags=%lx at %p handler=%p %p %p stub\n",
|
||||
rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress,
|
||||
|
@ -170,9 +170,9 @@ int _except_handler2(PEXCEPTION_RECORD rec,
|
|||
/*********************************************************************
|
||||
* _except_handler3 (MSVCRT.@)
|
||||
*/
|
||||
int _except_handler3(PEXCEPTION_RECORD rec,
|
||||
MSVCRT_EXCEPTION_FRAME* frame,
|
||||
PCONTEXT context, void* dispatcher)
|
||||
int CDECL _except_handler3(PEXCEPTION_RECORD rec,
|
||||
MSVCRT_EXCEPTION_FRAME* frame,
|
||||
PCONTEXT context, void* dispatcher)
|
||||
{
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
long retval;
|
||||
|
@ -247,7 +247,7 @@ int _except_handler3(PEXCEPTION_RECORD rec,
|
|||
/*********************************************************************
|
||||
* _abnormal_termination (MSVCRT.@)
|
||||
*/
|
||||
int _abnormal_termination(void)
|
||||
int CDECL _abnormal_termination(void)
|
||||
{
|
||||
FIXME("(void)stub\n");
|
||||
return 0;
|
||||
|
@ -298,7 +298,7 @@ __ASM_GLOBAL_FUNC( longjmp_set_regs,
|
|||
* _setjmp (MSVCRT.@)
|
||||
*/
|
||||
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;
|
||||
if (jmp->Registration == TRYLEVEL_END)
|
||||
|
@ -315,7 +315,7 @@ int __regs_MSVCRT__setjmp(struct MSVCRT___JUMP_BUFFER *jmp)
|
|||
* _setjmp3 (MSVCRT.@)
|
||||
*/
|
||||
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->UnwindFunc = 0;
|
||||
|
@ -346,7 +346,7 @@ int __regs_MSVCRT__setjmp3(struct MSVCRT___JUMP_BUFFER *jmp, int nb_args)
|
|||
/*********************************************************************
|
||||
* 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;
|
||||
|
||||
|
@ -506,7 +506,7 @@ void msvcrt_free_signals(void)
|
|||
* Some signals may never be generated except through an explicit call to
|
||||
* 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;
|
||||
|
||||
|
@ -537,7 +537,7 @@ MSVCRT___sighandler_t MSVCRT_signal(int sig, MSVCRT___sighandler_t func)
|
|||
/*********************************************************************
|
||||
* _XcptFilter (MSVCRT.@)
|
||||
*/
|
||||
int _XcptFilter(NTSTATUS ex, PEXCEPTION_POINTERS ptr)
|
||||
int CDECL _XcptFilter(NTSTATUS ex, PEXCEPTION_POINTERS ptr)
|
||||
{
|
||||
TRACE("(%08lx,%p)\n", ex, ptr);
|
||||
/* I assume ptr->ExceptionRecord->ExceptionCode is the same as ex */
|
||||
|
|
|
@ -59,7 +59,7 @@ void __MSVCRT__call_atexit(void)
|
|||
/*********************************************************************
|
||||
* __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;
|
||||
int len;
|
||||
|
@ -92,7 +92,7 @@ MSVCRT__onexit_t __dllonexit(MSVCRT__onexit_t func, MSVCRT__onexit_t **start, MS
|
|||
/*********************************************************************
|
||||
* _exit (MSVCRT.@)
|
||||
*/
|
||||
void MSVCRT__exit(int exitcode)
|
||||
void CDECL MSVCRT__exit(int exitcode)
|
||||
{
|
||||
TRACE("(%d)\n", exitcode);
|
||||
ExitProcess(exitcode);
|
||||
|
@ -128,7 +128,7 @@ static void DoMessageBox(LPCSTR lead, LPCSTR message)
|
|||
/*********************************************************************
|
||||
* _amsg_exit (MSVCRT.@)
|
||||
*/
|
||||
void _amsg_exit(int errnum)
|
||||
void CDECL _amsg_exit(int errnum)
|
||||
{
|
||||
TRACE("(%d)\n", errnum);
|
||||
/* FIXME: text for the error number. */
|
||||
|
@ -146,7 +146,7 @@ void _amsg_exit(int errnum)
|
|||
/*********************************************************************
|
||||
* abort (MSVCRT.@)
|
||||
*/
|
||||
void MSVCRT_abort(void)
|
||||
void CDECL MSVCRT_abort(void)
|
||||
{
|
||||
TRACE("()\n");
|
||||
if (MSVCRT_app_type == 2)
|
||||
|
@ -161,7 +161,7 @@ void MSVCRT_abort(void)
|
|||
/*********************************************************************
|
||||
* _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);
|
||||
if (MSVCRT_app_type == 2)
|
||||
|
@ -178,7 +178,7 @@ void MSVCRT__assert(const char* str, const char* file, unsigned int line)
|
|||
/*********************************************************************
|
||||
* _c_exit (MSVCRT.@)
|
||||
*/
|
||||
void MSVCRT__c_exit(void)
|
||||
void CDECL MSVCRT__c_exit(void)
|
||||
{
|
||||
TRACE("(void)\n");
|
||||
/* All cleanup is done on DLL detach; Return to caller */
|
||||
|
@ -187,7 +187,7 @@ void MSVCRT__c_exit(void)
|
|||
/*********************************************************************
|
||||
* _cexit (MSVCRT.@)
|
||||
*/
|
||||
void MSVCRT__cexit(void)
|
||||
void CDECL MSVCRT__cexit(void)
|
||||
{
|
||||
TRACE("(void)\n");
|
||||
LOCK_EXIT;
|
||||
|
@ -198,7 +198,7 @@ void MSVCRT__cexit(void)
|
|||
/*********************************************************************
|
||||
* _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);
|
||||
|
||||
|
@ -232,7 +232,7 @@ MSVCRT__onexit_t MSVCRT__onexit(MSVCRT__onexit_t func)
|
|||
/*********************************************************************
|
||||
* exit (MSVCRT.@)
|
||||
*/
|
||||
void MSVCRT_exit(int exitcode)
|
||||
void CDECL MSVCRT_exit(int exitcode)
|
||||
{
|
||||
TRACE("(%d)\n",exitcode);
|
||||
MSVCRT__cexit();
|
||||
|
@ -242,7 +242,7 @@ void MSVCRT_exit(int exitcode)
|
|||
/*********************************************************************
|
||||
* atexit (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_atexit(void (*func)(void))
|
||||
int CDECL MSVCRT_atexit(void (*func)(void))
|
||||
{
|
||||
TRACE("(%p)\n", func);
|
||||
return MSVCRT__onexit((MSVCRT__onexit_t)func) == (MSVCRT__onexit_t)func ? 0 : -1;
|
||||
|
@ -252,7 +252,7 @@ int MSVCRT_atexit(void (*func)(void))
|
|||
/*********************************************************************
|
||||
* _purecall (MSVCRT.@)
|
||||
*/
|
||||
void _purecall(void)
|
||||
void CDECL _purecall(void)
|
||||
{
|
||||
TRACE("(void)\n");
|
||||
_amsg_exit( 25 );
|
||||
|
|
|
@ -437,7 +437,7 @@ static void msvcrt_int_to_base32(int num, char *str)
|
|||
/*********************************************************************
|
||||
* __p__iob(MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_FILE *__p__iob(void)
|
||||
MSVCRT_FILE * CDECL __p__iob(void)
|
||||
{
|
||||
return &MSVCRT__iob[0];
|
||||
}
|
||||
|
@ -445,7 +445,7 @@ MSVCRT_FILE *__p__iob(void)
|
|||
/*********************************************************************
|
||||
* _access (MSVCRT.@)
|
||||
*/
|
||||
int _access(const char *filename, int mode)
|
||||
int CDECL _access(const char *filename, int mode)
|
||||
{
|
||||
DWORD attr = GetFileAttributesA(filename);
|
||||
|
||||
|
@ -467,7 +467,7 @@ int _access(const char *filename, int mode)
|
|||
/*********************************************************************
|
||||
* _waccess (MSVCRT.@)
|
||||
*/
|
||||
int _waccess(const MSVCRT_wchar_t *filename, int mode)
|
||||
int CDECL _waccess(const MSVCRT_wchar_t *filename, int mode)
|
||||
{
|
||||
DWORD attr = GetFileAttributesW(filename);
|
||||
|
||||
|
@ -489,7 +489,7 @@ int _waccess(const MSVCRT_wchar_t *filename, int mode)
|
|||
/*********************************************************************
|
||||
* _chmod (MSVCRT.@)
|
||||
*/
|
||||
int _chmod(const char *path, int flags)
|
||||
int CDECL _chmod(const char *path, int flags)
|
||||
{
|
||||
DWORD oldFlags = GetFileAttributesA(path);
|
||||
|
||||
|
@ -508,7 +508,7 @@ int _chmod(const char *path, int flags)
|
|||
/*********************************************************************
|
||||
* _wchmod (MSVCRT.@)
|
||||
*/
|
||||
int _wchmod(const MSVCRT_wchar_t *path, int flags)
|
||||
int CDECL _wchmod(const MSVCRT_wchar_t *path, int flags)
|
||||
{
|
||||
DWORD oldFlags = GetFileAttributesW(path);
|
||||
|
||||
|
@ -527,7 +527,7 @@ int _wchmod(const MSVCRT_wchar_t *path, int flags)
|
|||
/*********************************************************************
|
||||
* _unlink (MSVCRT.@)
|
||||
*/
|
||||
int _unlink(const char *path)
|
||||
int CDECL _unlink(const char *path)
|
||||
{
|
||||
TRACE("%s\n",debugstr_a(path));
|
||||
if(DeleteFileA(path))
|
||||
|
@ -540,7 +540,7 @@ int _unlink(const char *path)
|
|||
/*********************************************************************
|
||||
* _wunlink (MSVCRT.@)
|
||||
*/
|
||||
int _wunlink(const MSVCRT_wchar_t *path)
|
||||
int CDECL _wunlink(const MSVCRT_wchar_t *path)
|
||||
{
|
||||
TRACE("(%s)\n",debugstr_w(path));
|
||||
if(DeleteFileW(path))
|
||||
|
@ -551,12 +551,12 @@ int _wunlink(const MSVCRT_wchar_t *path)
|
|||
}
|
||||
|
||||
/* _flushall calls MSVCRT_fflush which calls _flushall */
|
||||
int MSVCRT_fflush(MSVCRT_FILE* file);
|
||||
int CDECL MSVCRT_fflush(MSVCRT_FILE* file);
|
||||
|
||||
/*********************************************************************
|
||||
* _flushall (MSVCRT.@)
|
||||
*/
|
||||
int _flushall(void)
|
||||
int CDECL _flushall(void)
|
||||
{
|
||||
int i, num_flushed = 0;
|
||||
|
||||
|
@ -584,7 +584,7 @@ int _flushall(void)
|
|||
/*********************************************************************
|
||||
* fflush (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_fflush(MSVCRT_FILE* file)
|
||||
int CDECL MSVCRT_fflush(MSVCRT_FILE* file)
|
||||
{
|
||||
if(!file) {
|
||||
_flushall();
|
||||
|
@ -598,7 +598,7 @@ int MSVCRT_fflush(MSVCRT_FILE* file)
|
|||
/*********************************************************************
|
||||
* _close (MSVCRT.@)
|
||||
*/
|
||||
int _close(int fd)
|
||||
int CDECL _close(int fd)
|
||||
{
|
||||
HANDLE hand;
|
||||
int ret;
|
||||
|
@ -627,7 +627,7 @@ int _close(int fd)
|
|||
/*********************************************************************
|
||||
* _commit (MSVCRT.@)
|
||||
*/
|
||||
int _commit(int fd)
|
||||
int CDECL _commit(int fd)
|
||||
{
|
||||
HANDLE hand = msvcrt_fdtoh(fd);
|
||||
|
||||
|
@ -660,7 +660,7 @@ int _commit(int fd)
|
|||
* indicate file descriptors duplicated with _dup and _dup2 are always
|
||||
* inheritable.
|
||||
*/
|
||||
int _dup2(int od, int nd)
|
||||
int CDECL _dup2(int od, int nd)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
@ -707,7 +707,7 @@ int _dup2(int od, int nd)
|
|||
/*********************************************************************
|
||||
* _dup (MSVCRT.@)
|
||||
*/
|
||||
int _dup(int od)
|
||||
int CDECL _dup(int od)
|
||||
{
|
||||
int fd, ret;
|
||||
|
||||
|
@ -724,7 +724,7 @@ int _dup(int od)
|
|||
/*********************************************************************
|
||||
* _eof (MSVCRT.@)
|
||||
*/
|
||||
int _eof(int fd)
|
||||
int CDECL _eof(int fd)
|
||||
{
|
||||
DWORD curpos,endpos;
|
||||
LONG hcurpos,hendpos;
|
||||
|
@ -755,7 +755,7 @@ int _eof(int fd)
|
|||
/*********************************************************************
|
||||
* _fcloseall (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT__fcloseall(void)
|
||||
int CDECL MSVCRT__fcloseall(void)
|
||||
{
|
||||
int num_closed = 0, i;
|
||||
|
||||
|
@ -787,7 +787,7 @@ void msvcrt_free_io(void)
|
|||
/*********************************************************************
|
||||
* _lseeki64 (MSVCRT.@)
|
||||
*/
|
||||
__int64 _lseeki64(int fd, __int64 offset, int whence)
|
||||
__int64 CDECL _lseeki64(int fd, __int64 offset, int whence)
|
||||
{
|
||||
HANDLE hand = msvcrt_fdtoh(fd);
|
||||
LARGE_INTEGER ofs, ret;
|
||||
|
@ -824,7 +824,7 @@ __int64 _lseeki64(int fd, __int64 offset, int whence)
|
|||
/*********************************************************************
|
||||
* _lseek (MSVCRT.@)
|
||||
*/
|
||||
LONG _lseek(int fd, LONG offset, int whence)
|
||||
LONG CDECL _lseek(int fd, LONG offset, int whence)
|
||||
{
|
||||
return _lseeki64(fd, offset, whence);
|
||||
}
|
||||
|
@ -834,7 +834,7 @@ LONG _lseek(int fd, LONG offset, int whence)
|
|||
*
|
||||
* This is untested; the underlying LockFile doesn't work yet.
|
||||
*/
|
||||
int _locking(int fd, int mode, LONG nbytes)
|
||||
int CDECL _locking(int fd, int mode, LONG nbytes)
|
||||
{
|
||||
BOOL ret;
|
||||
DWORD cur_locn;
|
||||
|
@ -886,7 +886,7 @@ int _locking(int fd, int mode, LONG nbytes)
|
|||
/*********************************************************************
|
||||
* fseek (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_fseek(MSVCRT_FILE* file, long offset, int whence)
|
||||
int CDECL MSVCRT_fseek(MSVCRT_FILE* file, long offset, int whence)
|
||||
{
|
||||
/* Flush output if needed */
|
||||
if(file->_flag & MSVCRT__IOWRT)
|
||||
|
@ -908,7 +908,7 @@ int MSVCRT_fseek(MSVCRT_FILE* file, long offset, int whence)
|
|||
/*********************************************************************
|
||||
* _chsize (MSVCRT.@)
|
||||
*/
|
||||
int _chsize(int fd, long size)
|
||||
int CDECL _chsize(int fd, long size)
|
||||
{
|
||||
LONG cur, pos;
|
||||
HANDLE handle;
|
||||
|
@ -944,7 +944,7 @@ int _chsize(int fd, long size)
|
|||
/*********************************************************************
|
||||
* clearerr (MSVCRT.@)
|
||||
*/
|
||||
void MSVCRT_clearerr(MSVCRT_FILE* file)
|
||||
void CDECL MSVCRT_clearerr(MSVCRT_FILE* file)
|
||||
{
|
||||
TRACE(":file (%p) fd (%d)\n",file,file->_file);
|
||||
file->_flag &= ~(MSVCRT__IOERR | MSVCRT__IOEOF);
|
||||
|
@ -953,7 +953,7 @@ void MSVCRT_clearerr(MSVCRT_FILE* file)
|
|||
/*********************************************************************
|
||||
* rewind (MSVCRT.@)
|
||||
*/
|
||||
void MSVCRT_rewind(MSVCRT_FILE* file)
|
||||
void CDECL MSVCRT_rewind(MSVCRT_FILE* file)
|
||||
{
|
||||
TRACE(":file (%p) fd (%d)\n",file,file->_file);
|
||||
MSVCRT_fseek(file, 0L, SEEK_SET);
|
||||
|
@ -1004,7 +1004,7 @@ static int msvcrt_get_flags(const char* mode, int *open_flags, int* stream_flags
|
|||
/*********************************************************************
|
||||
* _fdopen (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_FILE* MSVCRT__fdopen(int fd, const char *mode)
|
||||
MSVCRT_FILE* CDECL MSVCRT__fdopen(int fd, const char *mode)
|
||||
{
|
||||
int open_flags, stream_flags;
|
||||
MSVCRT_FILE* file;
|
||||
|
@ -1028,7 +1028,7 @@ MSVCRT_FILE* MSVCRT__fdopen(int fd, const char *mode)
|
|||
/*********************************************************************
|
||||
* _wfdopen (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_FILE* MSVCRT__wfdopen(int fd, const MSVCRT_wchar_t *mode)
|
||||
MSVCRT_FILE* CDECL MSVCRT__wfdopen(int fd, const MSVCRT_wchar_t *mode)
|
||||
{
|
||||
unsigned mlen = strlenW(mode);
|
||||
char *modea = MSVCRT_calloc(mlen + 1, 1);
|
||||
|
@ -1061,7 +1061,7 @@ MSVCRT_FILE* MSVCRT__wfdopen(int fd, const MSVCRT_wchar_t *mode)
|
|||
/*********************************************************************
|
||||
* _filelength (MSVCRT.@)
|
||||
*/
|
||||
LONG _filelength(int fd)
|
||||
LONG CDECL _filelength(int fd)
|
||||
{
|
||||
LONG curPos = _lseek(fd, 0, SEEK_CUR);
|
||||
if (curPos != -1)
|
||||
|
@ -1080,7 +1080,7 @@ LONG _filelength(int fd)
|
|||
/*********************************************************************
|
||||
* _filelengthi64 (MSVCRT.@)
|
||||
*/
|
||||
__int64 _filelengthi64(int fd)
|
||||
__int64 CDECL _filelengthi64(int fd)
|
||||
{
|
||||
__int64 curPos = _lseeki64(fd, 0, SEEK_CUR);
|
||||
if (curPos != -1)
|
||||
|
@ -1099,7 +1099,7 @@ __int64 _filelengthi64(int fd)
|
|||
/*********************************************************************
|
||||
* _fileno (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT__fileno(MSVCRT_FILE* file)
|
||||
int CDECL MSVCRT__fileno(MSVCRT_FILE* file)
|
||||
{
|
||||
TRACE(":FILE* (%p) fd (%d)\n",file,file->_file);
|
||||
return file->_file;
|
||||
|
@ -1108,7 +1108,7 @@ int MSVCRT__fileno(MSVCRT_FILE* file)
|
|||
/*********************************************************************
|
||||
* _fstati64 (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT__fstati64(int fd, struct MSVCRT__stati64* buf)
|
||||
int CDECL MSVCRT__fstati64(int fd, struct MSVCRT__stati64* buf)
|
||||
{
|
||||
DWORD dw;
|
||||
BY_HANDLE_FILE_INFORMATION hfi;
|
||||
|
@ -1158,7 +1158,7 @@ int MSVCRT__fstati64(int fd, struct MSVCRT__stati64* buf)
|
|||
/*********************************************************************
|
||||
* _fstat (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT__fstat(int fd, struct MSVCRT__stat* buf)
|
||||
int CDECL MSVCRT__fstat(int fd, struct MSVCRT__stat* buf)
|
||||
{ int ret;
|
||||
struct MSVCRT__stati64 bufi64;
|
||||
|
||||
|
@ -1171,7 +1171,7 @@ int MSVCRT__fstat(int fd, struct MSVCRT__stat* buf)
|
|||
/*********************************************************************
|
||||
* _futime (MSVCRT.@)
|
||||
*/
|
||||
int _futime(int fd, struct MSVCRT__utimbuf *t)
|
||||
int CDECL _futime(int fd, struct MSVCRT__utimbuf *t)
|
||||
{
|
||||
HANDLE hand = msvcrt_fdtoh(fd);
|
||||
FILETIME at, wt;
|
||||
|
@ -1203,7 +1203,7 @@ int _futime(int fd, struct MSVCRT__utimbuf *t)
|
|||
/*********************************************************************
|
||||
* _get_osfhandle (MSVCRT.@)
|
||||
*/
|
||||
long _get_osfhandle(int fd)
|
||||
long CDECL _get_osfhandle(int fd)
|
||||
{
|
||||
HANDLE hand = msvcrt_fdtoh(fd);
|
||||
TRACE(":fd (%d) handle (%p)\n",fd,hand);
|
||||
|
@ -1214,7 +1214,7 @@ long _get_osfhandle(int fd)
|
|||
/*********************************************************************
|
||||
* _isatty (MSVCRT.@)
|
||||
*/
|
||||
int _isatty(int fd)
|
||||
int CDECL _isatty(int fd)
|
||||
{
|
||||
HANDLE hand = msvcrt_fdtoh(fd);
|
||||
|
||||
|
@ -1228,7 +1228,7 @@ int _isatty(int fd)
|
|||
/*********************************************************************
|
||||
* _mktemp (MSVCRT.@)
|
||||
*/
|
||||
char *_mktemp(char *pattern)
|
||||
char * CDECL _mktemp(char *pattern)
|
||||
{
|
||||
int numX = 0;
|
||||
char *retVal = pattern;
|
||||
|
@ -1262,7 +1262,7 @@ char *_mktemp(char *pattern)
|
|||
/*********************************************************************
|
||||
* _wmktemp (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_wchar_t *_wmktemp(MSVCRT_wchar_t *pattern)
|
||||
MSVCRT_wchar_t * CDECL _wmktemp(MSVCRT_wchar_t *pattern)
|
||||
{
|
||||
int numX = 0;
|
||||
MSVCRT_wchar_t *retVal = pattern;
|
||||
|
@ -1320,7 +1320,7 @@ static unsigned split_oflags(unsigned oflags)
|
|||
/*********************************************************************
|
||||
* _pipe (MSVCRT.@)
|
||||
*/
|
||||
int _pipe(int *pfds, unsigned int psize, int textmode)
|
||||
int CDECL _pipe(int *pfds, unsigned int psize, int textmode)
|
||||
{
|
||||
int ret = -1;
|
||||
SECURITY_ATTRIBUTES sa;
|
||||
|
@ -1375,7 +1375,7 @@ int _pipe(int *pfds, unsigned int psize, int textmode)
|
|||
/*********************************************************************
|
||||
* _sopen (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT__sopen( const char *path, int oflags, int shflags, ... )
|
||||
int CDECL MSVCRT__sopen( const char *path, int oflags, int shflags, ... )
|
||||
{
|
||||
va_list ap;
|
||||
int pmode;
|
||||
|
@ -1471,7 +1471,7 @@ int MSVCRT__sopen( const char *path, int oflags, int shflags, ... )
|
|||
/*********************************************************************
|
||||
* _wsopen (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT__wsopen( const MSVCRT_wchar_t* path, int oflags, int shflags, ... )
|
||||
int CDECL MSVCRT__wsopen( const MSVCRT_wchar_t* path, int oflags, int shflags, ... )
|
||||
{
|
||||
const unsigned int len = strlenW(path);
|
||||
char *patha = MSVCRT_calloc(len + 1,1);
|
||||
|
@ -1496,7 +1496,7 @@ int MSVCRT__wsopen( const MSVCRT_wchar_t* path, int oflags, int shflags, ... )
|
|||
/*********************************************************************
|
||||
* _open (MSVCRT.@)
|
||||
*/
|
||||
int _open( const char *path, int flags, ... )
|
||||
int CDECL _open( const char *path, int flags, ... )
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
|
@ -1515,7 +1515,7 @@ int _open( const char *path, int flags, ... )
|
|||
/*********************************************************************
|
||||
* _wopen (MSVCRT.@)
|
||||
*/
|
||||
int _wopen(const MSVCRT_wchar_t *path,int flags,...)
|
||||
int CDECL _wopen(const MSVCRT_wchar_t *path,int flags,...)
|
||||
{
|
||||
const unsigned int len = strlenW(path);
|
||||
char *patha = MSVCRT_calloc(len + 1,1);
|
||||
|
@ -1540,7 +1540,7 @@ int _wopen(const MSVCRT_wchar_t *path,int flags,...)
|
|||
/*********************************************************************
|
||||
* _creat (MSVCRT.@)
|
||||
*/
|
||||
int _creat(const char *path, int flags)
|
||||
int CDECL _creat(const char *path, int flags)
|
||||
{
|
||||
int usedFlags = (flags & MSVCRT__O_TEXT)| MSVCRT__O_CREAT| MSVCRT__O_WRONLY| MSVCRT__O_TRUNC;
|
||||
return _open(path, usedFlags);
|
||||
|
@ -1549,7 +1549,7 @@ int _creat(const char *path, int flags)
|
|||
/*********************************************************************
|
||||
* _wcreat (MSVCRT.@)
|
||||
*/
|
||||
int _wcreat(const MSVCRT_wchar_t *path, int flags)
|
||||
int CDECL _wcreat(const MSVCRT_wchar_t *path, int flags)
|
||||
{
|
||||
int usedFlags = (flags & MSVCRT__O_TEXT)| MSVCRT__O_CREAT| MSVCRT__O_WRONLY| MSVCRT__O_TRUNC;
|
||||
return _wopen(path, usedFlags);
|
||||
|
@ -1558,7 +1558,7 @@ int _wcreat(const MSVCRT_wchar_t *path, int flags)
|
|||
/*********************************************************************
|
||||
* _open_osfhandle (MSVCRT.@)
|
||||
*/
|
||||
int _open_osfhandle(long handle, int oflags)
|
||||
int CDECL _open_osfhandle(long handle, int oflags)
|
||||
{
|
||||
int fd;
|
||||
|
||||
|
@ -1581,7 +1581,7 @@ int _open_osfhandle(long handle, int oflags)
|
|||
/*********************************************************************
|
||||
* _rmtmp (MSVCRT.@)
|
||||
*/
|
||||
int _rmtmp(void)
|
||||
int CDECL _rmtmp(void)
|
||||
{
|
||||
int num_removed = 0, i;
|
||||
|
||||
|
@ -1617,7 +1617,7 @@ static unsigned int remove_cr(char *buf, unsigned int count)
|
|||
/*********************************************************************
|
||||
* _read (MSVCRT.@)
|
||||
*/
|
||||
int _read(int fd, void *buf, unsigned int count)
|
||||
int CDECL _read(int fd, void *buf, unsigned int count)
|
||||
{
|
||||
DWORD num_read, all_read = 0;
|
||||
char *bufstart = buf;
|
||||
|
@ -1669,7 +1669,7 @@ int _read(int fd, void *buf, unsigned int count)
|
|||
/*********************************************************************
|
||||
* _getw (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT__getw(MSVCRT_FILE* file)
|
||||
int CDECL MSVCRT__getw(MSVCRT_FILE* file)
|
||||
{
|
||||
int i;
|
||||
switch (_read(file->_file, &i, sizeof(int)))
|
||||
|
@ -1684,7 +1684,7 @@ int MSVCRT__getw(MSVCRT_FILE* file)
|
|||
/*********************************************************************
|
||||
* _setmode (MSVCRT.@)
|
||||
*/
|
||||
int _setmode(int fd,int mode)
|
||||
int CDECL _setmode(int fd,int mode)
|
||||
{
|
||||
int ret = MSVCRT_fdesc[fd].wxflag & WX_TEXT ? MSVCRT__O_TEXT : MSVCRT__O_BINARY;
|
||||
if (mode & (~(MSVCRT__O_TEXT|MSVCRT__O_BINARY)))
|
||||
|
@ -1699,7 +1699,7 @@ int _setmode(int fd,int mode)
|
|||
/*********************************************************************
|
||||
* _stati64 (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT__stati64(const char* path, struct MSVCRT__stati64 * buf)
|
||||
int CDECL MSVCRT__stati64(const char* path, struct MSVCRT__stati64 * buf)
|
||||
{
|
||||
DWORD dw;
|
||||
WIN32_FILE_ATTRIBUTE_DATA hfi;
|
||||
|
@ -1765,7 +1765,7 @@ int MSVCRT__stati64(const char* path, struct MSVCRT__stati64 * buf)
|
|||
/*********************************************************************
|
||||
* _stat (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT__stat(const char* path, struct MSVCRT__stat * buf)
|
||||
int CDECL MSVCRT__stat(const char* path, struct MSVCRT__stat * buf)
|
||||
{ int ret;
|
||||
struct MSVCRT__stati64 bufi64;
|
||||
|
||||
|
@ -1778,7 +1778,7 @@ int MSVCRT__stat(const char* path, struct MSVCRT__stat * buf)
|
|||
/*********************************************************************
|
||||
* _wstati64 (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT__wstati64(const MSVCRT_wchar_t* path, struct MSVCRT__stati64 * buf)
|
||||
int CDECL MSVCRT__wstati64(const MSVCRT_wchar_t* path, struct MSVCRT__stati64 * buf)
|
||||
{
|
||||
DWORD dw;
|
||||
WIN32_FILE_ATTRIBUTE_DATA hfi;
|
||||
|
@ -1840,7 +1840,7 @@ int MSVCRT__wstati64(const MSVCRT_wchar_t* path, struct MSVCRT__stati64 * buf)
|
|||
/*********************************************************************
|
||||
* _wstat (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT__wstat(const MSVCRT_wchar_t* path, struct MSVCRT__stat * buf)
|
||||
int CDECL MSVCRT__wstat(const MSVCRT_wchar_t* path, struct MSVCRT__stat * buf)
|
||||
{
|
||||
int ret;
|
||||
struct MSVCRT__stati64 bufi64;
|
||||
|
@ -1853,7 +1853,7 @@ int MSVCRT__wstat(const MSVCRT_wchar_t* path, struct MSVCRT__stat * buf)
|
|||
/*********************************************************************
|
||||
* _tell (MSVCRT.@)
|
||||
*/
|
||||
long _tell(int fd)
|
||||
long CDECL _tell(int fd)
|
||||
{
|
||||
return _lseek(fd, 0, SEEK_CUR);
|
||||
}
|
||||
|
@ -1861,7 +1861,7 @@ long _tell(int fd)
|
|||
/*********************************************************************
|
||||
* _telli64 (MSVCRT.@)
|
||||
*/
|
||||
__int64 _telli64(int fd)
|
||||
__int64 CDECL _telli64(int fd)
|
||||
{
|
||||
return _lseeki64(fd, 0, SEEK_CUR);
|
||||
}
|
||||
|
@ -1869,7 +1869,7 @@ __int64 _telli64(int fd)
|
|||
/*********************************************************************
|
||||
* _tempnam (MSVCRT.@)
|
||||
*/
|
||||
char *_tempnam(const char *dir, const char *prefix)
|
||||
char * CDECL _tempnam(const char *dir, const char *prefix)
|
||||
{
|
||||
char tmpbuf[MAX_PATH];
|
||||
const char *tmp_dir = MSVCRT_getenv("TMP");
|
||||
|
@ -1890,7 +1890,7 @@ char *_tempnam(const char *dir, const char *prefix)
|
|||
/*********************************************************************
|
||||
* _wtempnam (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_wchar_t *_wtempnam(const MSVCRT_wchar_t *dir, const MSVCRT_wchar_t *prefix)
|
||||
MSVCRT_wchar_t * CDECL _wtempnam(const MSVCRT_wchar_t *dir, const MSVCRT_wchar_t *prefix)
|
||||
{
|
||||
MSVCRT_wchar_t tmpbuf[MAX_PATH];
|
||||
|
||||
|
@ -1908,7 +1908,7 @@ MSVCRT_wchar_t *_wtempnam(const MSVCRT_wchar_t *dir, const MSVCRT_wchar_t *prefi
|
|||
/*********************************************************************
|
||||
* _umask (MSVCRT.@)
|
||||
*/
|
||||
int _umask(int umask)
|
||||
int CDECL _umask(int umask)
|
||||
{
|
||||
int old_umask = MSVCRT_umask;
|
||||
TRACE("(%d)\n",umask);
|
||||
|
@ -1919,7 +1919,7 @@ int _umask(int umask)
|
|||
/*********************************************************************
|
||||
* _utime (MSVCRT.@)
|
||||
*/
|
||||
int _utime(const char* path, struct MSVCRT__utimbuf *t)
|
||||
int CDECL _utime(const char* path, struct MSVCRT__utimbuf *t)
|
||||
{
|
||||
int fd = _open(path, MSVCRT__O_WRONLY | MSVCRT__O_BINARY);
|
||||
|
||||
|
@ -1935,7 +1935,7 @@ int _utime(const char* path, struct MSVCRT__utimbuf *t)
|
|||
/*********************************************************************
|
||||
* _wutime (MSVCRT.@)
|
||||
*/
|
||||
int _wutime(const MSVCRT_wchar_t* path, struct MSVCRT__utimbuf *t)
|
||||
int CDECL _wutime(const MSVCRT_wchar_t* path, struct MSVCRT__utimbuf *t)
|
||||
{
|
||||
int fd = _wopen(path, MSVCRT__O_WRONLY | MSVCRT__O_BINARY);
|
||||
|
||||
|
@ -1951,7 +1951,7 @@ int _wutime(const MSVCRT_wchar_t* path, struct MSVCRT__utimbuf *t)
|
|||
/*********************************************************************
|
||||
* _write (MSVCRT.@)
|
||||
*/
|
||||
int _write(int fd, const void* buf, unsigned int count)
|
||||
int CDECL _write(int fd, const void* buf, unsigned int count)
|
||||
{
|
||||
DWORD num_written;
|
||||
HANDLE hand = msvcrt_fdtoh(fd);
|
||||
|
@ -2039,7 +2039,7 @@ int _write(int fd, const void* buf, unsigned int count)
|
|||
/*********************************************************************
|
||||
* _putw (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT__putw(int val, MSVCRT_FILE* file)
|
||||
int CDECL MSVCRT__putw(int val, MSVCRT_FILE* file)
|
||||
{
|
||||
int len;
|
||||
len = _write(file->_file, &val, sizeof(val));
|
||||
|
@ -2051,7 +2051,7 @@ int MSVCRT__putw(int val, MSVCRT_FILE* file)
|
|||
/*********************************************************************
|
||||
* fclose (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_fclose(MSVCRT_FILE* file)
|
||||
int CDECL MSVCRT_fclose(MSVCRT_FILE* file)
|
||||
{
|
||||
int r, flag;
|
||||
|
||||
|
@ -2077,7 +2077,7 @@ int MSVCRT_fclose(MSVCRT_FILE* file)
|
|||
/*********************************************************************
|
||||
* feof (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_feof(MSVCRT_FILE* file)
|
||||
int CDECL MSVCRT_feof(MSVCRT_FILE* file)
|
||||
{
|
||||
return file->_flag & MSVCRT__IOEOF;
|
||||
}
|
||||
|
@ -2085,7 +2085,7 @@ int MSVCRT_feof(MSVCRT_FILE* file)
|
|||
/*********************************************************************
|
||||
* ferror (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_ferror(MSVCRT_FILE* file)
|
||||
int CDECL MSVCRT_ferror(MSVCRT_FILE* file)
|
||||
{
|
||||
return file->_flag & MSVCRT__IOERR;
|
||||
}
|
||||
|
@ -2093,7 +2093,7 @@ int MSVCRT_ferror(MSVCRT_FILE* file)
|
|||
/*********************************************************************
|
||||
* _filbuf (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT__filbuf(MSVCRT_FILE* file)
|
||||
int CDECL MSVCRT__filbuf(MSVCRT_FILE* file)
|
||||
{
|
||||
/* Allocate buffer if needed */
|
||||
if(file->_bufsiz == 0 && !(file->_flag & MSVCRT__IONBF) ) {
|
||||
|
@ -2130,7 +2130,7 @@ int MSVCRT__filbuf(MSVCRT_FILE* file)
|
|||
/*********************************************************************
|
||||
* fgetc (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_fgetc(MSVCRT_FILE* file)
|
||||
int CDECL MSVCRT_fgetc(MSVCRT_FILE* file)
|
||||
{
|
||||
if (file->_cnt>0) {
|
||||
file->_cnt--;
|
||||
|
@ -2143,7 +2143,7 @@ int MSVCRT_fgetc(MSVCRT_FILE* file)
|
|||
/*********************************************************************
|
||||
* _fgetchar (MSVCRT.@)
|
||||
*/
|
||||
int _fgetchar(void)
|
||||
int CDECL _fgetchar(void)
|
||||
{
|
||||
return MSVCRT_fgetc(MSVCRT_stdin);
|
||||
}
|
||||
|
@ -2151,7 +2151,7 @@ int _fgetchar(void)
|
|||
/*********************************************************************
|
||||
* fgets (MSVCRT.@)
|
||||
*/
|
||||
char *MSVCRT_fgets(char *s, int size, MSVCRT_FILE* file)
|
||||
char * CDECL MSVCRT_fgets(char *s, int size, MSVCRT_FILE* file)
|
||||
{
|
||||
int cc = MSVCRT_EOF;
|
||||
char * buf_start = s;
|
||||
|
@ -2182,7 +2182,7 @@ char *MSVCRT_fgets(char *s, int size, MSVCRT_FILE* file)
|
|||
* In MSVCRT__O_TEXT mode, multibyte characters are read from the file, dropping
|
||||
* the CR from CR/LF combinations
|
||||
*/
|
||||
MSVCRT_wint_t MSVCRT_fgetwc(MSVCRT_FILE* file)
|
||||
MSVCRT_wint_t CDECL MSVCRT_fgetwc(MSVCRT_FILE* file)
|
||||
{
|
||||
char c;
|
||||
|
||||
|
@ -2211,7 +2211,7 @@ MSVCRT_wint_t MSVCRT_fgetwc(MSVCRT_FILE* file)
|
|||
/*********************************************************************
|
||||
* getwc (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_wint_t MSVCRT_getwc(MSVCRT_FILE* file)
|
||||
MSVCRT_wint_t CDECL MSVCRT_getwc(MSVCRT_FILE* file)
|
||||
{
|
||||
return MSVCRT_fgetwc(file);
|
||||
}
|
||||
|
@ -2219,7 +2219,7 @@ MSVCRT_wint_t MSVCRT_getwc(MSVCRT_FILE* file)
|
|||
/*********************************************************************
|
||||
* _fgetwchar (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_wint_t _fgetwchar(void)
|
||||
MSVCRT_wint_t CDECL _fgetwchar(void)
|
||||
{
|
||||
return MSVCRT_fgetwc(MSVCRT_stdin);
|
||||
}
|
||||
|
@ -2227,7 +2227,7 @@ MSVCRT_wint_t _fgetwchar(void)
|
|||
/*********************************************************************
|
||||
* getwchar (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_wint_t MSVCRT_getwchar(void)
|
||||
MSVCRT_wint_t CDECL MSVCRT_getwchar(void)
|
||||
{
|
||||
return _fgetwchar();
|
||||
}
|
||||
|
@ -2235,7 +2235,7 @@ MSVCRT_wint_t MSVCRT_getwchar(void)
|
|||
/*********************************************************************
|
||||
* fgetws (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_wchar_t *MSVCRT_fgetws(MSVCRT_wchar_t *s, int size, MSVCRT_FILE* file)
|
||||
MSVCRT_wchar_t * CDECL MSVCRT_fgetws(MSVCRT_wchar_t *s, int size, MSVCRT_FILE* file)
|
||||
{
|
||||
int cc = MSVCRT_WEOF;
|
||||
MSVCRT_wchar_t * buf_start = s;
|
||||
|
@ -2263,7 +2263,7 @@ MSVCRT_wchar_t *MSVCRT_fgetws(MSVCRT_wchar_t *s, int size, MSVCRT_FILE* file)
|
|||
/*********************************************************************
|
||||
* fwrite (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_size_t MSVCRT_fwrite(const void *ptr, MSVCRT_size_t size, MSVCRT_size_t nmemb, MSVCRT_FILE* file)
|
||||
MSVCRT_size_t CDECL MSVCRT_fwrite(const void *ptr, MSVCRT_size_t size, MSVCRT_size_t nmemb, MSVCRT_FILE* file)
|
||||
{
|
||||
MSVCRT_size_t wrcnt=size * nmemb;
|
||||
int written = 0;
|
||||
|
@ -2302,7 +2302,7 @@ MSVCRT_size_t MSVCRT_fwrite(const void *ptr, MSVCRT_size_t size, MSVCRT_size_t n
|
|||
/*********************************************************************
|
||||
* fputwc (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_wint_t MSVCRT_fputwc(MSVCRT_wint_t wc, MSVCRT_FILE* file)
|
||||
MSVCRT_wint_t CDECL MSVCRT_fputwc(MSVCRT_wint_t wc, MSVCRT_FILE* file)
|
||||
{
|
||||
MSVCRT_wchar_t mwc=wc;
|
||||
if (MSVCRT_fwrite( &mwc, sizeof(mwc), 1, file) != 1)
|
||||
|
@ -2313,7 +2313,7 @@ MSVCRT_wint_t MSVCRT_fputwc(MSVCRT_wint_t wc, MSVCRT_FILE* file)
|
|||
/*********************************************************************
|
||||
* _fputwchar (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_wint_t _fputwchar(MSVCRT_wint_t wc)
|
||||
MSVCRT_wint_t CDECL _fputwchar(MSVCRT_wint_t wc)
|
||||
{
|
||||
return MSVCRT_fputwc(wc, MSVCRT_stdout);
|
||||
}
|
||||
|
@ -2321,7 +2321,7 @@ MSVCRT_wint_t _fputwchar(MSVCRT_wint_t wc)
|
|||
/*********************************************************************
|
||||
* fopen (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_FILE* MSVCRT_fopen(const char *path, const char *mode)
|
||||
MSVCRT_FILE* CDECL MSVCRT_fopen(const char *path, const char *mode)
|
||||
{
|
||||
MSVCRT_FILE* file;
|
||||
int open_flags, stream_flags, fd;
|
||||
|
@ -2355,7 +2355,7 @@ MSVCRT_FILE* MSVCRT_fopen(const char *path, const char *mode)
|
|||
/*********************************************************************
|
||||
* _wfopen (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_FILE *MSVCRT__wfopen(const MSVCRT_wchar_t *path, const MSVCRT_wchar_t *mode)
|
||||
MSVCRT_FILE * CDECL MSVCRT__wfopen(const MSVCRT_wchar_t *path, const MSVCRT_wchar_t *mode)
|
||||
{
|
||||
const unsigned int plen = strlenW(path), mlen = strlenW(mode);
|
||||
char *patha = MSVCRT_calloc(plen + 1, 1);
|
||||
|
@ -2380,7 +2380,7 @@ MSVCRT_FILE *MSVCRT__wfopen(const MSVCRT_wchar_t *path, const MSVCRT_wchar_t *mo
|
|||
/*********************************************************************
|
||||
* _fsopen (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_FILE* MSVCRT__fsopen(const char *path, const char *mode, int share)
|
||||
MSVCRT_FILE* CDECL MSVCRT__fsopen(const char *path, const char *mode, int share)
|
||||
{
|
||||
FIXME(":(%s,%s,%d),ignoring share mode!\n",path,mode,share);
|
||||
return MSVCRT_fopen(path,mode);
|
||||
|
@ -2389,7 +2389,7 @@ MSVCRT_FILE* MSVCRT__fsopen(const char *path, const char *mode, int share)
|
|||
/*********************************************************************
|
||||
* _wfsopen (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_FILE* MSVCRT__wfsopen(const MSVCRT_wchar_t *path, const MSVCRT_wchar_t *mode, int share)
|
||||
MSVCRT_FILE* CDECL MSVCRT__wfsopen(const MSVCRT_wchar_t *path, const MSVCRT_wchar_t *mode, int share)
|
||||
{
|
||||
FIXME(":(%s,%s,%d),ignoring share mode!\n",
|
||||
debugstr_w(path),debugstr_w(mode),share);
|
||||
|
@ -2397,12 +2397,12 @@ MSVCRT_FILE* MSVCRT__wfsopen(const MSVCRT_wchar_t *path, const MSVCRT_wchar_t *
|
|||
}
|
||||
|
||||
/* MSVCRT_fputc calls MSVCRT__flsbuf which calls MSVCRT_fputc */
|
||||
int MSVCRT__flsbuf(int c, MSVCRT_FILE* file);
|
||||
int CDECL MSVCRT__flsbuf(int c, MSVCRT_FILE* file);
|
||||
|
||||
/*********************************************************************
|
||||
* fputc (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_fputc(int c, MSVCRT_FILE* file)
|
||||
int CDECL MSVCRT_fputc(int c, MSVCRT_FILE* file)
|
||||
{
|
||||
if(file->_cnt>0) {
|
||||
*file->_ptr++=c;
|
||||
|
@ -2422,7 +2422,7 @@ int MSVCRT_fputc(int c, MSVCRT_FILE* file)
|
|||
/*********************************************************************
|
||||
* _flsbuf (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT__flsbuf(int c, MSVCRT_FILE* file)
|
||||
int CDECL MSVCRT__flsbuf(int c, MSVCRT_FILE* file)
|
||||
{
|
||||
/* Flush output buffer */
|
||||
if(file->_bufsiz == 0 && !(file->_flag & MSVCRT__IONBF)) {
|
||||
|
@ -2451,7 +2451,7 @@ int MSVCRT__flsbuf(int c, MSVCRT_FILE* file)
|
|||
/*********************************************************************
|
||||
* _fputchar (MSVCRT.@)
|
||||
*/
|
||||
int _fputchar(int c)
|
||||
int CDECL _fputchar(int c)
|
||||
{
|
||||
return MSVCRT_fputc(c, MSVCRT_stdout);
|
||||
}
|
||||
|
@ -2459,7 +2459,7 @@ int _fputchar(int c)
|
|||
/*********************************************************************
|
||||
* fread (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_size_t MSVCRT_fread(void *ptr, MSVCRT_size_t size, MSVCRT_size_t nmemb, MSVCRT_FILE* file)
|
||||
MSVCRT_size_t CDECL MSVCRT_fread(void *ptr, MSVCRT_size_t size, MSVCRT_size_t nmemb, MSVCRT_FILE* file)
|
||||
{ MSVCRT_size_t rcnt=size * nmemb;
|
||||
MSVCRT_size_t read=0;
|
||||
int pread=0;
|
||||
|
@ -2504,7 +2504,7 @@ MSVCRT_size_t MSVCRT_fread(void *ptr, MSVCRT_size_t size, MSVCRT_size_t nmemb, M
|
|||
* freopen (MSVCRT.@)
|
||||
*
|
||||
*/
|
||||
MSVCRT_FILE* MSVCRT_freopen(const char *path, const char *mode,MSVCRT_FILE* file)
|
||||
MSVCRT_FILE* CDECL MSVCRT_freopen(const char *path, const char *mode,MSVCRT_FILE* file)
|
||||
{
|
||||
int open_flags, stream_flags, fd;
|
||||
|
||||
|
@ -2540,7 +2540,7 @@ MSVCRT_FILE* MSVCRT_freopen(const char *path, const char *mode,MSVCRT_FILE* file
|
|||
/*********************************************************************
|
||||
* fsetpos (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_fsetpos(MSVCRT_FILE* file, MSVCRT_fpos_t *pos)
|
||||
int CDECL MSVCRT_fsetpos(MSVCRT_FILE* file, MSVCRT_fpos_t *pos)
|
||||
{
|
||||
/* Note that all this has been lifted 'as is' from fseek */
|
||||
if(file->_flag & MSVCRT__IOWRT)
|
||||
|
@ -2561,7 +2561,7 @@ int MSVCRT_fsetpos(MSVCRT_FILE* file, MSVCRT_fpos_t *pos)
|
|||
/*********************************************************************
|
||||
* ftell (MSVCRT.@)
|
||||
*/
|
||||
LONG MSVCRT_ftell(MSVCRT_FILE* file)
|
||||
LONG CDECL MSVCRT_ftell(MSVCRT_FILE* file)
|
||||
{
|
||||
int off=0;
|
||||
long pos;
|
||||
|
@ -2580,7 +2580,7 @@ LONG MSVCRT_ftell(MSVCRT_FILE* file)
|
|||
/*********************************************************************
|
||||
* fgetpos (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_fgetpos(MSVCRT_FILE* file, MSVCRT_fpos_t *pos)
|
||||
int CDECL MSVCRT_fgetpos(MSVCRT_FILE* file, MSVCRT_fpos_t *pos)
|
||||
{
|
||||
/* This code has been lifted form the MSVCRT_ftell function */
|
||||
int off=0;
|
||||
|
@ -2604,7 +2604,7 @@ int MSVCRT_fgetpos(MSVCRT_FILE* file, MSVCRT_fpos_t *pos)
|
|||
/*********************************************************************
|
||||
* fputs (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_fputs(const char *s, MSVCRT_FILE* file)
|
||||
int CDECL MSVCRT_fputs(const char *s, MSVCRT_FILE* file)
|
||||
{
|
||||
size_t i, len = strlen(s);
|
||||
if (!(MSVCRT_fdesc[file->_file].wxflag & WX_TEXT))
|
||||
|
@ -2618,7 +2618,7 @@ int MSVCRT_fputs(const char *s, MSVCRT_FILE* file)
|
|||
/*********************************************************************
|
||||
* fputws (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_fputws(const MSVCRT_wchar_t *s, MSVCRT_FILE* file)
|
||||
int CDECL MSVCRT_fputws(const MSVCRT_wchar_t *s, MSVCRT_FILE* file)
|
||||
{
|
||||
size_t i, len = strlenW(s);
|
||||
if (!(MSVCRT_fdesc[file->_file].wxflag & WX_TEXT))
|
||||
|
@ -2636,7 +2636,7 @@ int MSVCRT_fputws(const MSVCRT_wchar_t *s, MSVCRT_FILE* file)
|
|||
/*********************************************************************
|
||||
* getchar (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_getchar(void)
|
||||
int CDECL MSVCRT_getchar(void)
|
||||
{
|
||||
return MSVCRT_fgetc(MSVCRT_stdin);
|
||||
}
|
||||
|
@ -2644,7 +2644,7 @@ int MSVCRT_getchar(void)
|
|||
/*********************************************************************
|
||||
* getc (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_getc(MSVCRT_FILE* file)
|
||||
int CDECL MSVCRT_getc(MSVCRT_FILE* file)
|
||||
{
|
||||
return MSVCRT_fgetc(file);
|
||||
}
|
||||
|
@ -2652,7 +2652,7 @@ int MSVCRT_getc(MSVCRT_FILE* file)
|
|||
/*********************************************************************
|
||||
* gets (MSVCRT.@)
|
||||
*/
|
||||
char *MSVCRT_gets(char *buf)
|
||||
char * CDECL MSVCRT_gets(char *buf)
|
||||
{
|
||||
int cc;
|
||||
char * buf_start = buf;
|
||||
|
@ -2670,7 +2670,7 @@ char *MSVCRT_gets(char *buf)
|
|||
/*********************************************************************
|
||||
* _getws (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_wchar_t* MSVCRT__getws(MSVCRT_wchar_t* buf)
|
||||
MSVCRT_wchar_t* CDECL MSVCRT__getws(MSVCRT_wchar_t* buf)
|
||||
{
|
||||
MSVCRT_wint_t cc;
|
||||
MSVCRT_wchar_t* ws = buf;
|
||||
|
@ -2690,7 +2690,7 @@ MSVCRT_wchar_t* MSVCRT__getws(MSVCRT_wchar_t* buf)
|
|||
/*********************************************************************
|
||||
* putc (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_putc(int c, MSVCRT_FILE* file)
|
||||
int CDECL MSVCRT_putc(int c, MSVCRT_FILE* file)
|
||||
{
|
||||
return MSVCRT_fputc(c, file);
|
||||
}
|
||||
|
@ -2698,7 +2698,7 @@ int MSVCRT_putc(int c, MSVCRT_FILE* file)
|
|||
/*********************************************************************
|
||||
* putchar (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_putchar(int c)
|
||||
int CDECL MSVCRT_putchar(int c)
|
||||
{
|
||||
return MSVCRT_fputc(c, MSVCRT_stdout);
|
||||
}
|
||||
|
@ -2706,7 +2706,7 @@ int MSVCRT_putchar(int c)
|
|||
/*********************************************************************
|
||||
* puts (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_puts(const char *s)
|
||||
int CDECL MSVCRT_puts(const char *s)
|
||||
{
|
||||
size_t len = strlen(s);
|
||||
if (MSVCRT_fwrite(s,sizeof(*s),len,MSVCRT_stdout) != len) return MSVCRT_EOF;
|
||||
|
@ -2716,7 +2716,7 @@ int MSVCRT_puts(const char *s)
|
|||
/*********************************************************************
|
||||
* _putws (MSVCRT.@)
|
||||
*/
|
||||
int _putws(const MSVCRT_wchar_t *s)
|
||||
int CDECL _putws(const MSVCRT_wchar_t *s)
|
||||
{
|
||||
static const MSVCRT_wchar_t nl = '\n';
|
||||
size_t len = strlenW(s);
|
||||
|
@ -2727,7 +2727,7 @@ int _putws(const MSVCRT_wchar_t *s)
|
|||
/*********************************************************************
|
||||
* remove (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_remove(const char *path)
|
||||
int CDECL MSVCRT_remove(const char *path)
|
||||
{
|
||||
TRACE("(%s)\n",path);
|
||||
if (DeleteFileA(path))
|
||||
|
@ -2740,7 +2740,7 @@ int MSVCRT_remove(const char *path)
|
|||
/*********************************************************************
|
||||
* _wremove (MSVCRT.@)
|
||||
*/
|
||||
int _wremove(const MSVCRT_wchar_t *path)
|
||||
int CDECL _wremove(const MSVCRT_wchar_t *path)
|
||||
{
|
||||
TRACE("(%s)\n",debugstr_w(path));
|
||||
if (DeleteFileW(path))
|
||||
|
@ -2753,7 +2753,7 @@ int _wremove(const MSVCRT_wchar_t *path)
|
|||
/*********************************************************************
|
||||
* rename (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_rename(const char *oldpath,const char *newpath)
|
||||
int CDECL MSVCRT_rename(const char *oldpath,const char *newpath)
|
||||
{
|
||||
TRACE(":from %s to %s\n",oldpath,newpath);
|
||||
if (MoveFileExA(oldpath, newpath, MOVEFILE_COPY_ALLOWED))
|
||||
|
@ -2766,7 +2766,7 @@ int MSVCRT_rename(const char *oldpath,const char *newpath)
|
|||
/*********************************************************************
|
||||
* _wrename (MSVCRT.@)
|
||||
*/
|
||||
int _wrename(const MSVCRT_wchar_t *oldpath,const MSVCRT_wchar_t *newpath)
|
||||
int CDECL _wrename(const MSVCRT_wchar_t *oldpath,const MSVCRT_wchar_t *newpath)
|
||||
{
|
||||
TRACE(":from %s to %s\n",debugstr_w(oldpath),debugstr_w(newpath));
|
||||
if (MoveFileExW(oldpath, newpath, MOVEFILE_COPY_ALLOWED))
|
||||
|
@ -2779,7 +2779,7 @@ int _wrename(const MSVCRT_wchar_t *oldpath,const MSVCRT_wchar_t *newpath)
|
|||
/*********************************************************************
|
||||
* setvbuf (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_setvbuf(MSVCRT_FILE* file, char *buf, int mode, MSVCRT_size_t size)
|
||||
int CDECL MSVCRT_setvbuf(MSVCRT_FILE* file, char *buf, int mode, MSVCRT_size_t size)
|
||||
{
|
||||
/* TODO: Check if file busy */
|
||||
if(file->_bufsiz) {
|
||||
|
@ -2802,7 +2802,7 @@ int MSVCRT_setvbuf(MSVCRT_FILE* file, char *buf, int mode, MSVCRT_size_t size)
|
|||
/*********************************************************************
|
||||
* setbuf (MSVCRT.@)
|
||||
*/
|
||||
void MSVCRT_setbuf(MSVCRT_FILE* file, char *buf)
|
||||
void CDECL MSVCRT_setbuf(MSVCRT_FILE* file, char *buf)
|
||||
{
|
||||
MSVCRT_setvbuf(file, buf, buf ? MSVCRT__IOFBF : MSVCRT__IONBF, MSVCRT_BUFSIZ);
|
||||
}
|
||||
|
@ -2810,7 +2810,7 @@ void MSVCRT_setbuf(MSVCRT_FILE* file, char *buf)
|
|||
/*********************************************************************
|
||||
* tmpnam (MSVCRT.@)
|
||||
*/
|
||||
char *MSVCRT_tmpnam(char *s)
|
||||
char * CDECL MSVCRT_tmpnam(char *s)
|
||||
{
|
||||
static int unique;
|
||||
char tmpstr[16];
|
||||
|
@ -2834,7 +2834,7 @@ char *MSVCRT_tmpnam(char *s)
|
|||
/*********************************************************************
|
||||
* tmpfile (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_FILE* MSVCRT_tmpfile(void)
|
||||
MSVCRT_FILE* CDECL MSVCRT_tmpfile(void)
|
||||
{
|
||||
char *filename = MSVCRT_tmpnam(NULL);
|
||||
int fd;
|
||||
|
@ -2858,7 +2858,7 @@ MSVCRT_FILE* MSVCRT_tmpfile(void)
|
|||
/*********************************************************************
|
||||
* vfprintf (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_vfprintf(MSVCRT_FILE* file, const char *format, va_list valist)
|
||||
int CDECL MSVCRT_vfprintf(MSVCRT_FILE* file, const char *format, va_list valist)
|
||||
{
|
||||
char buf[2048], *mem = buf;
|
||||
int written, resize = sizeof(buf), retval;
|
||||
|
@ -2888,7 +2888,7 @@ int MSVCRT_vfprintf(MSVCRT_FILE* file, const char *format, va_list valist)
|
|||
* Is final char included in written (then resize is too big) or not
|
||||
* (then we must test for equality too)?
|
||||
*/
|
||||
int MSVCRT_vfwprintf(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, va_list valist)
|
||||
int CDECL MSVCRT_vfwprintf(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, va_list valist)
|
||||
{
|
||||
MSVCRT_wchar_t buf[2048], *mem = buf;
|
||||
int written, resize = sizeof(buf) / sizeof(MSVCRT_wchar_t), retval;
|
||||
|
@ -2911,7 +2911,7 @@ int MSVCRT_vfwprintf(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, va_list va
|
|||
/*********************************************************************
|
||||
* vprintf (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_vprintf(const char *format, va_list valist)
|
||||
int CDECL MSVCRT_vprintf(const char *format, va_list valist)
|
||||
{
|
||||
return MSVCRT_vfprintf(MSVCRT_stdout,format,valist);
|
||||
}
|
||||
|
@ -2919,7 +2919,7 @@ int MSVCRT_vprintf(const char *format, va_list valist)
|
|||
/*********************************************************************
|
||||
* vwprintf (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_vwprintf(const MSVCRT_wchar_t *format, va_list valist)
|
||||
int CDECL MSVCRT_vwprintf(const MSVCRT_wchar_t *format, va_list valist)
|
||||
{
|
||||
return MSVCRT_vfwprintf(MSVCRT_stdout,format,valist);
|
||||
}
|
||||
|
@ -2927,7 +2927,7 @@ int MSVCRT_vwprintf(const MSVCRT_wchar_t *format, va_list valist)
|
|||
/*********************************************************************
|
||||
* fprintf (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_fprintf(MSVCRT_FILE* file, const char *format, ...)
|
||||
int CDECL MSVCRT_fprintf(MSVCRT_FILE* file, const char *format, ...)
|
||||
{
|
||||
va_list valist;
|
||||
int res;
|
||||
|
@ -2940,7 +2940,7 @@ int MSVCRT_fprintf(MSVCRT_FILE* file, const char *format, ...)
|
|||
/*********************************************************************
|
||||
* fwprintf (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_fwprintf(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, ...)
|
||||
int CDECL MSVCRT_fwprintf(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, ...)
|
||||
{
|
||||
va_list valist;
|
||||
int res;
|
||||
|
@ -2953,7 +2953,7 @@ int MSVCRT_fwprintf(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, ...)
|
|||
/*********************************************************************
|
||||
* printf (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_printf(const char *format, ...)
|
||||
int CDECL MSVCRT_printf(const char *format, ...)
|
||||
{
|
||||
va_list valist;
|
||||
int res;
|
||||
|
@ -2966,7 +2966,7 @@ int MSVCRT_printf(const char *format, ...)
|
|||
/*********************************************************************
|
||||
* ungetc (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_ungetc(int c, MSVCRT_FILE * file)
|
||||
int CDECL MSVCRT_ungetc(int c, MSVCRT_FILE * file)
|
||||
{
|
||||
if (c == MSVCRT_EOF)
|
||||
return MSVCRT_EOF;
|
||||
|
@ -2987,7 +2987,7 @@ int MSVCRT_ungetc(int c, MSVCRT_FILE * file)
|
|||
/*********************************************************************
|
||||
* ungetwc (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_wint_t MSVCRT_ungetwc(MSVCRT_wint_t wc, MSVCRT_FILE * file)
|
||||
MSVCRT_wint_t CDECL MSVCRT_ungetwc(MSVCRT_wint_t wc, MSVCRT_FILE * file)
|
||||
{
|
||||
MSVCRT_wchar_t mwc = wc;
|
||||
char * pp = (char *)&mwc;
|
||||
|
@ -3002,7 +3002,7 @@ MSVCRT_wint_t MSVCRT_ungetwc(MSVCRT_wint_t wc, MSVCRT_FILE * file)
|
|||
/*********************************************************************
|
||||
* wprintf (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_wprintf(const MSVCRT_wchar_t *format, ...)
|
||||
int CDECL MSVCRT_wprintf(const MSVCRT_wchar_t *format, ...)
|
||||
{
|
||||
va_list valist;
|
||||
int res;
|
||||
|
|
|
@ -45,7 +45,7 @@ static size_t MSVCRT_sbh_threshold = 0;
|
|||
/*********************************************************************
|
||||
* ??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);
|
||||
TRACE("(%ld) returning %p\n", size, retval);
|
||||
|
@ -59,7 +59,7 @@ void* MSVCRT_operator_new(unsigned long size)
|
|||
/*********************************************************************
|
||||
* ??3@YAXPAX@Z (MSVCRT.@)
|
||||
*/
|
||||
void MSVCRT_operator_delete(void *mem)
|
||||
void CDECL MSVCRT_operator_delete(void *mem)
|
||||
{
|
||||
TRACE("(%p)\n", mem);
|
||||
HeapFree(GetProcessHeap(), 0, mem);
|
||||
|
@ -69,7 +69,7 @@ void MSVCRT_operator_delete(void *mem)
|
|||
/*********************************************************************
|
||||
* ?_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;
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ MSVCRT_new_handler_func MSVCRT__query_new_handler(void)
|
|||
/*********************************************************************
|
||||
* ?_query_new_mode@@YAHXZ (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT__query_new_mode(void)
|
||||
int CDECL MSVCRT__query_new_mode(void)
|
||||
{
|
||||
return MSVCRT_new_mode;
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ int MSVCRT__query_new_mode(void)
|
|||
/*********************************************************************
|
||||
* ?_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;
|
||||
LOCK_HEAP;
|
||||
|
@ -99,7 +99,7 @@ MSVCRT_new_handler_func MSVCRT__set_new_handler(MSVCRT_new_handler_func func)
|
|||
/*********************************************************************
|
||||
* ?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);
|
||||
MSVCRT__set_new_handler(NULL);
|
||||
|
@ -109,7 +109,7 @@ MSVCRT_new_handler_func MSVCRT_set_new_handler(void *func)
|
|||
/*********************************************************************
|
||||
* ?_set_new_mode@@YAHH@Z (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT__set_new_mode(int mode)
|
||||
int CDECL MSVCRT__set_new_mode(int mode)
|
||||
{
|
||||
int old_mode;
|
||||
LOCK_HEAP;
|
||||
|
@ -122,7 +122,7 @@ int MSVCRT__set_new_mode(int mode)
|
|||
/*********************************************************************
|
||||
* _callnewh (MSVCRT.@)
|
||||
*/
|
||||
int _callnewh(unsigned long size)
|
||||
int CDECL _callnewh(unsigned long size)
|
||||
{
|
||||
if(MSVCRT_new_handler)
|
||||
(*MSVCRT_new_handler)(size);
|
||||
|
@ -132,7 +132,7 @@ int _callnewh(unsigned long size)
|
|||
/*********************************************************************
|
||||
* _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);
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ void* _expand(void* mem, MSVCRT_size_t size)
|
|||
/*********************************************************************
|
||||
* _heapchk (MSVCRT.@)
|
||||
*/
|
||||
int _heapchk(void)
|
||||
int CDECL _heapchk(void)
|
||||
{
|
||||
if (!HeapValidate( GetProcessHeap(), 0, NULL))
|
||||
{
|
||||
|
@ -153,7 +153,7 @@ int _heapchk(void)
|
|||
/*********************************************************************
|
||||
* _heapmin (MSVCRT.@)
|
||||
*/
|
||||
int _heapmin(void)
|
||||
int CDECL _heapmin(void)
|
||||
{
|
||||
if (!HeapCompact( GetProcessHeap(), 0 ))
|
||||
{
|
||||
|
@ -167,7 +167,7 @@ int _heapmin(void)
|
|||
/*********************************************************************
|
||||
* _heapwalk (MSVCRT.@)
|
||||
*/
|
||||
int _heapwalk(struct MSVCRT__heapinfo* next)
|
||||
int CDECL _heapwalk(struct MSVCRT__heapinfo* next)
|
||||
{
|
||||
PROCESS_HEAP_ENTRY phe;
|
||||
|
||||
|
@ -208,7 +208,7 @@ int _heapwalk(struct MSVCRT__heapinfo* next)
|
|||
/*********************************************************************
|
||||
* _heapset (MSVCRT.@)
|
||||
*/
|
||||
int _heapset(unsigned int value)
|
||||
int CDECL _heapset(unsigned int value)
|
||||
{
|
||||
int retval;
|
||||
struct MSVCRT__heapinfo heap;
|
||||
|
@ -227,7 +227,7 @@ int _heapset(unsigned int value)
|
|||
/*********************************************************************
|
||||
* _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);
|
||||
*MSVCRT__errno() = MSVCRT_ENOSYS;
|
||||
|
@ -237,7 +237,7 @@ int _heapadd(void* mem, MSVCRT_size_t size)
|
|||
/*********************************************************************
|
||||
* _msize (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_size_t _msize(void* mem)
|
||||
MSVCRT_size_t CDECL _msize(void* mem)
|
||||
{
|
||||
long size = HeapSize(GetProcessHeap(),0,mem);
|
||||
if (size == -1)
|
||||
|
@ -251,7 +251,7 @@ MSVCRT_size_t _msize(void* mem)
|
|||
/*********************************************************************
|
||||
* 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 );
|
||||
}
|
||||
|
@ -259,7 +259,7 @@ void* MSVCRT_calloc(MSVCRT_size_t size, MSVCRT_size_t count)
|
|||
/*********************************************************************
|
||||
* free (MSVCRT.@)
|
||||
*/
|
||||
void MSVCRT_free(void* ptr)
|
||||
void CDECL MSVCRT_free(void* ptr)
|
||||
{
|
||||
HeapFree(GetProcessHeap(),0,ptr);
|
||||
}
|
||||
|
@ -267,7 +267,7 @@ void MSVCRT_free(void* ptr)
|
|||
/*********************************************************************
|
||||
* malloc (MSVCRT.@)
|
||||
*/
|
||||
void* MSVCRT_malloc(MSVCRT_size_t size)
|
||||
void* CDECL MSVCRT_malloc(MSVCRT_size_t size)
|
||||
{
|
||||
void *ret = HeapAlloc(GetProcessHeap(),0,size);
|
||||
if (!ret)
|
||||
|
@ -278,7 +278,7 @@ void* MSVCRT_malloc(MSVCRT_size_t size)
|
|||
/*********************************************************************
|
||||
* 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 (size) return HeapReAlloc(GetProcessHeap(), 0, ptr, size);
|
||||
|
@ -289,7 +289,7 @@ void* MSVCRT_realloc(void* ptr, MSVCRT_size_t size)
|
|||
/*********************************************************************
|
||||
* __p__amblksiz (MSVCRT.@)
|
||||
*/
|
||||
unsigned int* __p__amblksiz(void)
|
||||
unsigned int* CDECL __p__amblksiz(void)
|
||||
{
|
||||
return &MSVCRT_amblksiz;
|
||||
}
|
||||
|
@ -297,7 +297,7 @@ unsigned int* __p__amblksiz(void)
|
|||
/*********************************************************************
|
||||
* _get_sbh_threshold (MSVCRT.@)
|
||||
*/
|
||||
size_t _get_sbh_threshold(void)
|
||||
size_t CDECL _get_sbh_threshold(void)
|
||||
{
|
||||
return MSVCRT_sbh_threshold;
|
||||
}
|
||||
|
@ -305,7 +305,7 @@ size_t _get_sbh_threshold(void)
|
|||
/*********************************************************************
|
||||
* _set_sbh_threshold (MSVCRT.@)
|
||||
*/
|
||||
int _set_sbh_threshold(size_t threshold)
|
||||
int CDECL _set_sbh_threshold(size_t threshold)
|
||||
{
|
||||
if(threshold > 1016)
|
||||
return 0;
|
||||
|
|
|
@ -304,7 +304,7 @@ static void msvcrt_set_ctype(unsigned int codepage, LCID lcid)
|
|||
/*********************************************************************
|
||||
* setlocale (MSVCRT.@)
|
||||
*/
|
||||
char* MSVCRT_setlocale(int category, const char* locale)
|
||||
char* CDECL MSVCRT_setlocale(int category, const char* locale)
|
||||
{
|
||||
LCID lcid = 0;
|
||||
locale_search_t lc;
|
||||
|
@ -467,7 +467,7 @@ char* MSVCRT_setlocale(int category, const char* locale)
|
|||
/*********************************************************************
|
||||
* 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[] = {
|
||||
'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)
|
|||
/*********************************************************************
|
||||
* _Getdays (MSVCRT.@)
|
||||
*/
|
||||
const char* _Getdays(void)
|
||||
const char* CDECL _Getdays(void)
|
||||
{
|
||||
static const char *MSVCRT_days = ":Sun:Sunday:Mon:Monday:Tue:Tuesday:Wed:"
|
||||
"Wednesday:Thu:Thursday:Fri:Friday:Sat:Saturday";
|
||||
|
@ -493,7 +493,7 @@ const char* _Getdays(void)
|
|||
/*********************************************************************
|
||||
* _Getmonths (MSVCRT.@)
|
||||
*/
|
||||
const char* _Getmonths(void)
|
||||
const char* CDECL _Getmonths(void)
|
||||
{
|
||||
static const char *MSVCRT_months = ":Jan:January:Feb:February:Mar:March:Apr:"
|
||||
"April:May:May:Jun:June:Jul:July:Aug:August:Sep:September:Oct:"
|
||||
|
@ -506,7 +506,7 @@ const char* _Getmonths(void)
|
|||
/*********************************************************************
|
||||
* _Gettnames (MSVCRT.@)
|
||||
*/
|
||||
const char* _Gettnames(void)
|
||||
const char* CDECL _Gettnames(void)
|
||||
{
|
||||
/* FIXME: */
|
||||
TRACE("(void) stub\n");
|
||||
|
@ -516,8 +516,8 @@ const char* _Gettnames(void)
|
|||
/*********************************************************************
|
||||
* _Strftime (MSVCRT.@)
|
||||
*/
|
||||
const char* _Strftime(char *out, unsigned int len, const char *fmt,
|
||||
const void *tm, void *foo)
|
||||
const char* CDECL _Strftime(char *out, unsigned int len, const char *fmt,
|
||||
const void *tm, void *foo)
|
||||
{
|
||||
/* FIXME: */
|
||||
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,
|
|||
/*********************************************************************
|
||||
* _setmbcp (MSVCRT.@)
|
||||
*/
|
||||
int _setmbcp(int cp)
|
||||
int CDECL _setmbcp(int cp)
|
||||
{
|
||||
LOCK_LOCALE;
|
||||
if ( cp > _MB_CP_SBCS)
|
||||
|
@ -567,7 +567,7 @@ int _setmbcp(int cp)
|
|||
/*********************************************************************
|
||||
* _getmbcp (MSVCRT.@)
|
||||
*/
|
||||
int _getmbcp(void)
|
||||
int CDECL _getmbcp(void)
|
||||
{
|
||||
return msvcrt_current_lc_all_cp;
|
||||
}
|
||||
|
@ -575,7 +575,7 @@ int _getmbcp(void)
|
|||
/*********************************************************************
|
||||
* __crtLCMapStringA (MSVCRT.@)
|
||||
*/
|
||||
int __crtLCMapStringA(
|
||||
int CDECL __crtLCMapStringA(
|
||||
LCID lcid, DWORD mapflags, const char* src, int srclen, char* dst,
|
||||
int dstlen, unsigned int codepage, int xflag
|
||||
) {
|
||||
|
@ -590,7 +590,7 @@ int __crtLCMapStringA(
|
|||
/*********************************************************************
|
||||
* localeconv (MSVCRT.@)
|
||||
*/
|
||||
struct MSVCRT_lconv *MSVCRT_localeconv(void) {
|
||||
struct MSVCRT_lconv * CDECL MSVCRT_localeconv(void) {
|
||||
|
||||
struct lconv *ylconv;
|
||||
static struct MSVCRT_lconv xlconv;
|
||||
|
@ -622,7 +622,7 @@ struct MSVCRT_lconv *MSVCRT_localeconv(void) {
|
|||
/*********************************************************************
|
||||
* __lconv_init (MSVCRT.@)
|
||||
*/
|
||||
void __lconv_init(void)
|
||||
void CDECL __lconv_init(void)
|
||||
{
|
||||
FIXME(" stub\n");
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ void msvcrt_free_mt_locks(void)
|
|||
/**********************************************************************
|
||||
* _lock (MSVCRT.@)
|
||||
*/
|
||||
void _lock( int locknum )
|
||||
void CDECL _lock( int locknum )
|
||||
{
|
||||
TRACE( "(%d)\n", locknum );
|
||||
|
||||
|
@ -130,7 +130,7 @@ void _lock( int locknum )
|
|||
*
|
||||
* 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 );
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ const char* msvcrt_get_reason(DWORD reason)
|
|||
* $I10_OUTPUT (MSVCRT.@)
|
||||
* 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 */
|
||||
/* no it is a function. I10 is an Int of 10 bytes */
|
||||
|
|
|
@ -54,7 +54,7 @@ static MSVCRT_matherr_func MSVCRT_default_matherr_func = NULL;
|
|||
/*********************************************************************
|
||||
* MSVCRT_acos (MSVCRT.@)
|
||||
*/
|
||||
double MSVCRT_acos( double x )
|
||||
double CDECL MSVCRT_acos( double x )
|
||||
{
|
||||
if (x < -1.0 || x > 1.0 || !finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
|
||||
return acos(x);
|
||||
|
@ -63,7 +63,7 @@ double MSVCRT_acos( double x )
|
|||
/*********************************************************************
|
||||
* MSVCRT_asin (MSVCRT.@)
|
||||
*/
|
||||
double MSVCRT_asin( double x )
|
||||
double CDECL MSVCRT_asin( double x )
|
||||
{
|
||||
if (x < -1.0 || x > 1.0 || !finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
|
||||
return asin(x);
|
||||
|
@ -72,7 +72,7 @@ double MSVCRT_asin( double x )
|
|||
/*********************************************************************
|
||||
* MSVCRT_atan (MSVCRT.@)
|
||||
*/
|
||||
double MSVCRT_atan( double x )
|
||||
double CDECL MSVCRT_atan( double x )
|
||||
{
|
||||
if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
|
||||
return atan(x);
|
||||
|
@ -81,7 +81,7 @@ double MSVCRT_atan( double x )
|
|||
/*********************************************************************
|
||||
* MSVCRT_atan2 (MSVCRT.@)
|
||||
*/
|
||||
double MSVCRT_atan2( double x, double y )
|
||||
double CDECL MSVCRT_atan2( double x, double y )
|
||||
{
|
||||
if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
|
||||
return atan2(x,y);
|
||||
|
@ -90,7 +90,7 @@ double MSVCRT_atan2( double x, double y )
|
|||
/*********************************************************************
|
||||
* MSVCRT_cos (MSVCRT.@)
|
||||
*/
|
||||
double MSVCRT_cos( double x )
|
||||
double CDECL MSVCRT_cos( double x )
|
||||
{
|
||||
if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
|
||||
return cos(x);
|
||||
|
@ -99,7 +99,7 @@ double MSVCRT_cos( double x )
|
|||
/*********************************************************************
|
||||
* MSVCRT_cosh (MSVCRT.@)
|
||||
*/
|
||||
double MSVCRT_cosh( double x )
|
||||
double CDECL MSVCRT_cosh( double x )
|
||||
{
|
||||
if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
|
||||
return cosh(x);
|
||||
|
@ -108,7 +108,7 @@ double MSVCRT_cosh( double x )
|
|||
/*********************************************************************
|
||||
* MSVCRT_exp (MSVCRT.@)
|
||||
*/
|
||||
double MSVCRT_exp( double x )
|
||||
double CDECL MSVCRT_exp( double x )
|
||||
{
|
||||
if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
|
||||
return exp(x);
|
||||
|
@ -117,7 +117,7 @@ double MSVCRT_exp( double x )
|
|||
/*********************************************************************
|
||||
* MSVCRT_fmod (MSVCRT.@)
|
||||
*/
|
||||
double MSVCRT_fmod( double x, double y )
|
||||
double CDECL MSVCRT_fmod( double x, double y )
|
||||
{
|
||||
if (!finite(x) || !finite(y)) *MSVCRT__errno() = MSVCRT_EDOM;
|
||||
return fmod(x,y);
|
||||
|
@ -126,7 +126,7 @@ double MSVCRT_fmod( double x, double y )
|
|||
/*********************************************************************
|
||||
* MSVCRT_log (MSVCRT.@)
|
||||
*/
|
||||
double MSVCRT_log( double x)
|
||||
double CDECL MSVCRT_log( double x)
|
||||
{
|
||||
if (x < 0.0 || !finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
|
||||
if (x == 0.0) *MSVCRT__errno() = MSVCRT_ERANGE;
|
||||
|
@ -136,7 +136,7 @@ double MSVCRT_log( double x)
|
|||
/*********************************************************************
|
||||
* MSVCRT_log10 (MSVCRT.@)
|
||||
*/
|
||||
double MSVCRT_log10( double x )
|
||||
double CDECL MSVCRT_log10( double x )
|
||||
{
|
||||
if (x < 0.0 || !finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
|
||||
if (x == 0.0) *MSVCRT__errno() = MSVCRT_ERANGE;
|
||||
|
@ -146,7 +146,7 @@ double MSVCRT_log10( double x )
|
|||
/*********************************************************************
|
||||
* MSVCRT_pow (MSVCRT.@)
|
||||
*/
|
||||
double MSVCRT_pow( double x, double y )
|
||||
double CDECL MSVCRT_pow( double x, double y )
|
||||
{
|
||||
/* FIXME: If x < 0 and y is not integral, set EDOM */
|
||||
double z = pow(x,y);
|
||||
|
@ -157,7 +157,7 @@ double MSVCRT_pow( double x, double y )
|
|||
/*********************************************************************
|
||||
* MSVCRT_sin (MSVCRT.@)
|
||||
*/
|
||||
double MSVCRT_sin( double x )
|
||||
double CDECL MSVCRT_sin( double x )
|
||||
{
|
||||
if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
|
||||
return sin(x);
|
||||
|
@ -166,7 +166,7 @@ double MSVCRT_sin( double x )
|
|||
/*********************************************************************
|
||||
* MSVCRT_sinh (MSVCRT.@)
|
||||
*/
|
||||
double MSVCRT_sinh( double x )
|
||||
double CDECL MSVCRT_sinh( double x )
|
||||
{
|
||||
if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
|
||||
return sinh(x);
|
||||
|
@ -175,7 +175,7 @@ double MSVCRT_sinh( double x )
|
|||
/*********************************************************************
|
||||
* MSVCRT_sqrt (MSVCRT.@)
|
||||
*/
|
||||
double MSVCRT_sqrt( double x )
|
||||
double CDECL MSVCRT_sqrt( double x )
|
||||
{
|
||||
if (x < 0.0 || !finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
|
||||
return sqrt(x);
|
||||
|
@ -184,7 +184,7 @@ double MSVCRT_sqrt( double x )
|
|||
/*********************************************************************
|
||||
* MSVCRT_tan (MSVCRT.@)
|
||||
*/
|
||||
double MSVCRT_tan( double x )
|
||||
double CDECL MSVCRT_tan( double x )
|
||||
{
|
||||
if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
|
||||
return tan(x);
|
||||
|
@ -193,7 +193,7 @@ double MSVCRT_tan( double x )
|
|||
/*********************************************************************
|
||||
* MSVCRT_tanh (MSVCRT.@)
|
||||
*/
|
||||
double MSVCRT_tanh( double x )
|
||||
double CDECL MSVCRT_tanh( double x )
|
||||
{
|
||||
if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
|
||||
return tanh(x);
|
||||
|
@ -211,7 +211,7 @@ double MSVCRT_tanh( double x )
|
|||
/*********************************************************************
|
||||
* _CIacos (MSVCRT.@)
|
||||
*/
|
||||
double _CIacos(void)
|
||||
double CDECL _CIacos(void)
|
||||
{
|
||||
FPU_DOUBLE(x);
|
||||
return MSVCRT_acos(x);
|
||||
|
@ -220,7 +220,7 @@ double _CIacos(void)
|
|||
/*********************************************************************
|
||||
* _CIasin (MSVCRT.@)
|
||||
*/
|
||||
double _CIasin(void)
|
||||
double CDECL _CIasin(void)
|
||||
{
|
||||
FPU_DOUBLE(x);
|
||||
return MSVCRT_asin(x);
|
||||
|
@ -229,7 +229,7 @@ double _CIasin(void)
|
|||
/*********************************************************************
|
||||
* _CIatan (MSVCRT.@)
|
||||
*/
|
||||
double _CIatan(void)
|
||||
double CDECL _CIatan(void)
|
||||
{
|
||||
FPU_DOUBLE(x);
|
||||
return MSVCRT_atan(x);
|
||||
|
@ -238,7 +238,7 @@ double _CIatan(void)
|
|||
/*********************************************************************
|
||||
* _CIatan2 (MSVCRT.@)
|
||||
*/
|
||||
double _CIatan2(void)
|
||||
double CDECL _CIatan2(void)
|
||||
{
|
||||
FPU_DOUBLES(x,y);
|
||||
return MSVCRT_atan2(x,y);
|
||||
|
@ -247,7 +247,7 @@ double _CIatan2(void)
|
|||
/*********************************************************************
|
||||
* _CIcos (MSVCRT.@)
|
||||
*/
|
||||
double _CIcos(void)
|
||||
double CDECL _CIcos(void)
|
||||
{
|
||||
FPU_DOUBLE(x);
|
||||
return MSVCRT_cos(x);
|
||||
|
@ -256,7 +256,7 @@ double _CIcos(void)
|
|||
/*********************************************************************
|
||||
* _CIcosh (MSVCRT.@)
|
||||
*/
|
||||
double _CIcosh(void)
|
||||
double CDECL _CIcosh(void)
|
||||
{
|
||||
FPU_DOUBLE(x);
|
||||
return MSVCRT_cosh(x);
|
||||
|
@ -265,7 +265,7 @@ double _CIcosh(void)
|
|||
/*********************************************************************
|
||||
* _CIexp (MSVCRT.@)
|
||||
*/
|
||||
double _CIexp(void)
|
||||
double CDECL _CIexp(void)
|
||||
{
|
||||
FPU_DOUBLE(x);
|
||||
return MSVCRT_exp(x);
|
||||
|
@ -274,7 +274,7 @@ double _CIexp(void)
|
|||
/*********************************************************************
|
||||
* _CIfmod (MSVCRT.@)
|
||||
*/
|
||||
double _CIfmod(void)
|
||||
double CDECL _CIfmod(void)
|
||||
{
|
||||
FPU_DOUBLES(x,y);
|
||||
return MSVCRT_fmod(x,y);
|
||||
|
@ -283,7 +283,7 @@ double _CIfmod(void)
|
|||
/*********************************************************************
|
||||
* _CIlog (MSVCRT.@)
|
||||
*/
|
||||
double _CIlog(void)
|
||||
double CDECL _CIlog(void)
|
||||
{
|
||||
FPU_DOUBLE(x);
|
||||
return MSVCRT_log(x);
|
||||
|
@ -292,7 +292,7 @@ double _CIlog(void)
|
|||
/*********************************************************************
|
||||
* _CIlog10 (MSVCRT.@)
|
||||
*/
|
||||
double _CIlog10(void)
|
||||
double CDECL _CIlog10(void)
|
||||
{
|
||||
FPU_DOUBLE(x);
|
||||
return MSVCRT_log10(x);
|
||||
|
@ -301,7 +301,7 @@ double _CIlog10(void)
|
|||
/*********************************************************************
|
||||
* _CIpow (MSVCRT.@)
|
||||
*/
|
||||
double _CIpow(void)
|
||||
double CDECL _CIpow(void)
|
||||
{
|
||||
FPU_DOUBLES(x,y);
|
||||
return MSVCRT_pow(x,y);
|
||||
|
@ -310,7 +310,7 @@ double _CIpow(void)
|
|||
/*********************************************************************
|
||||
* _CIsin (MSVCRT.@)
|
||||
*/
|
||||
double _CIsin(void)
|
||||
double CDECL _CIsin(void)
|
||||
{
|
||||
FPU_DOUBLE(x);
|
||||
return MSVCRT_sin(x);
|
||||
|
@ -319,7 +319,7 @@ double _CIsin(void)
|
|||
/*********************************************************************
|
||||
* _CIsinh (MSVCRT.@)
|
||||
*/
|
||||
double _CIsinh(void)
|
||||
double CDECL _CIsinh(void)
|
||||
{
|
||||
FPU_DOUBLE(x);
|
||||
return MSVCRT_sinh(x);
|
||||
|
@ -328,7 +328,7 @@ double _CIsinh(void)
|
|||
/*********************************************************************
|
||||
* _CIsqrt (MSVCRT.@)
|
||||
*/
|
||||
double _CIsqrt(void)
|
||||
double CDECL _CIsqrt(void)
|
||||
{
|
||||
FPU_DOUBLE(x);
|
||||
return MSVCRT_sqrt(x);
|
||||
|
@ -337,7 +337,7 @@ double _CIsqrt(void)
|
|||
/*********************************************************************
|
||||
* _CItan (MSVCRT.@)
|
||||
*/
|
||||
double _CItan(void)
|
||||
double CDECL _CItan(void)
|
||||
{
|
||||
FPU_DOUBLE(x);
|
||||
return MSVCRT_tan(x);
|
||||
|
@ -346,7 +346,7 @@ double _CItan(void)
|
|||
/*********************************************************************
|
||||
* _CItanh (MSVCRT.@)
|
||||
*/
|
||||
double _CItanh(void)
|
||||
double CDECL _CItanh(void)
|
||||
{
|
||||
FPU_DOUBLE(x);
|
||||
return MSVCRT_tanh(x);
|
||||
|
@ -380,7 +380,7 @@ IX86_ONLY(_CItanh)
|
|||
/*********************************************************************
|
||||
* _fpclass (MSVCRT.@)
|
||||
*/
|
||||
int _fpclass(double num)
|
||||
int CDECL _fpclass(double num)
|
||||
{
|
||||
#if defined(HAVE_FPCLASS) || defined(fpclass)
|
||||
switch (fpclass( num ))
|
||||
|
@ -436,7 +436,7 @@ int _fpclass(double num)
|
|||
/*********************************************************************
|
||||
* _rotl (MSVCRT.@)
|
||||
*/
|
||||
unsigned int _rotl(unsigned int num, int shift)
|
||||
unsigned int CDECL _rotl(unsigned int num, int shift)
|
||||
{
|
||||
shift &= 31;
|
||||
return (num << shift) | (num >> (32-shift));
|
||||
|
@ -445,7 +445,7 @@ unsigned int _rotl(unsigned int num, int shift)
|
|||
/*********************************************************************
|
||||
* _logb (MSVCRT.@)
|
||||
*/
|
||||
double _logb(double num)
|
||||
double CDECL _logb(double num)
|
||||
{
|
||||
if (!finite(num)) *MSVCRT__errno() = MSVCRT_EDOM;
|
||||
return logb(num);
|
||||
|
@ -454,7 +454,7 @@ double _logb(double num)
|
|||
/*********************************************************************
|
||||
* _lrotl (MSVCRT.@)
|
||||
*/
|
||||
unsigned long _lrotl(unsigned long num, int shift)
|
||||
unsigned long CDECL _lrotl(unsigned long num, int shift)
|
||||
{
|
||||
shift &= 0x1f;
|
||||
return (num << shift) | (num >> (32-shift));
|
||||
|
@ -463,7 +463,7 @@ unsigned long _lrotl(unsigned long num, int shift)
|
|||
/*********************************************************************
|
||||
* _lrotr (MSVCRT.@)
|
||||
*/
|
||||
unsigned long _lrotr(unsigned long num, int shift)
|
||||
unsigned long CDECL _lrotr(unsigned long num, int shift)
|
||||
{
|
||||
shift &= 0x1f;
|
||||
return (num >> shift) | (num << (32-shift));
|
||||
|
@ -472,7 +472,7 @@ unsigned long _lrotr(unsigned long num, int shift)
|
|||
/*********************************************************************
|
||||
* _rotr (MSVCRT.@)
|
||||
*/
|
||||
unsigned int _rotr(unsigned int num, int shift)
|
||||
unsigned int CDECL _rotr(unsigned int num, int shift)
|
||||
{
|
||||
shift &= 0x1f;
|
||||
return (num >> shift) | (num << (32-shift));
|
||||
|
@ -481,7 +481,7 @@ unsigned int _rotr(unsigned int num, int shift)
|
|||
/*********************************************************************
|
||||
* _scalb (MSVCRT.@)
|
||||
*/
|
||||
double _scalb(double num, long power)
|
||||
double CDECL _scalb(double num, long power)
|
||||
{
|
||||
/* Note - Can't forward directly as libc expects y as double */
|
||||
double dblpower = (double)power;
|
||||
|
@ -492,7 +492,7 @@ double _scalb(double num, long power)
|
|||
/*********************************************************************
|
||||
* _hypot (MSVCRT.@)
|
||||
*/
|
||||
double _hypot(double x, double y)
|
||||
double CDECL _hypot(double x, double y)
|
||||
{
|
||||
/* FIXME: errno handling */
|
||||
return hypot( x, y );
|
||||
|
@ -501,7 +501,7 @@ double _hypot(double x, double y)
|
|||
/*********************************************************************
|
||||
* ceil (MSVCRT.@)
|
||||
*/
|
||||
double MSVCRT_ceil( double x )
|
||||
double CDECL MSVCRT_ceil( double x )
|
||||
{
|
||||
return ceil(x);
|
||||
}
|
||||
|
@ -509,7 +509,7 @@ double MSVCRT_ceil( double x )
|
|||
/*********************************************************************
|
||||
* floor (MSVCRT.@)
|
||||
*/
|
||||
double MSVCRT_floor( double x )
|
||||
double CDECL MSVCRT_floor( double x )
|
||||
{
|
||||
return floor(x);
|
||||
}
|
||||
|
@ -517,7 +517,7 @@ double MSVCRT_floor( double x )
|
|||
/*********************************************************************
|
||||
* fabs (MSVCRT.@)
|
||||
*/
|
||||
double MSVCRT_fabs( double x )
|
||||
double CDECL MSVCRT_fabs( double x )
|
||||
{
|
||||
return fabs(x);
|
||||
}
|
||||
|
@ -525,7 +525,7 @@ double MSVCRT_fabs( double x )
|
|||
/*********************************************************************
|
||||
* frexp (MSVCRT.@)
|
||||
*/
|
||||
double MSVCRT_frexp( double x, int *exp )
|
||||
double CDECL MSVCRT_frexp( double x, int *exp )
|
||||
{
|
||||
return frexp( x, exp );
|
||||
}
|
||||
|
@ -533,7 +533,7 @@ double MSVCRT_frexp( double x, int *exp )
|
|||
/*********************************************************************
|
||||
* modf (MSVCRT.@)
|
||||
*/
|
||||
double MSVCRT_modf( double x, double *iptr )
|
||||
double CDECL MSVCRT_modf( double x, double *iptr )
|
||||
{
|
||||
return modf( x, iptr );
|
||||
}
|
||||
|
@ -541,7 +541,7 @@ double MSVCRT_modf( double x, double *iptr )
|
|||
/*********************************************************************
|
||||
* _matherr (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT__matherr(struct MSVCRT__exception *e)
|
||||
int CDECL MSVCRT__matherr(struct MSVCRT__exception *e)
|
||||
{
|
||||
if (e)
|
||||
TRACE("(%p = %d, %s, %g %g %g)\n",e, e->type, e->name, e->arg1, e->arg2,
|
||||
|
@ -557,7 +557,7 @@ int MSVCRT__matherr(struct MSVCRT__exception *e)
|
|||
/*********************************************************************
|
||||
* __setusermatherr (MSVCRT.@)
|
||||
*/
|
||||
void MSVCRT___setusermatherr(MSVCRT_matherr_func func)
|
||||
void CDECL MSVCRT___setusermatherr(MSVCRT_matherr_func func)
|
||||
{
|
||||
MSVCRT_default_matherr_func = func;
|
||||
TRACE(":new matherr handler %p\n", func);
|
||||
|
@ -566,7 +566,7 @@ void MSVCRT___setusermatherr(MSVCRT_matherr_func func)
|
|||
/**********************************************************************
|
||||
* _statusfp (MSVCRT.@)
|
||||
*/
|
||||
unsigned int _statusfp(void)
|
||||
unsigned int CDECL _statusfp(void)
|
||||
{
|
||||
unsigned int retVal = 0;
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
|
@ -588,7 +588,7 @@ unsigned int _statusfp(void)
|
|||
/*********************************************************************
|
||||
* _clearfp (MSVCRT.@)
|
||||
*/
|
||||
unsigned int _clearfp(void)
|
||||
unsigned int CDECL _clearfp(void)
|
||||
{
|
||||
unsigned int retVal = _statusfp();
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
|
@ -602,7 +602,7 @@ unsigned int _clearfp(void)
|
|||
/*********************************************************************
|
||||
* __fpecode (MSVCRT.@)
|
||||
*/
|
||||
int *__fpecode(void)
|
||||
int * CDECL __fpecode(void)
|
||||
{
|
||||
return &msvcrt_get_thread_data()->fpecode;
|
||||
}
|
||||
|
@ -610,7 +610,7 @@ int *__fpecode(void)
|
|||
/*********************************************************************
|
||||
* ldexp (MSVCRT.@)
|
||||
*/
|
||||
double MSVCRT_ldexp(double num, long exp)
|
||||
double CDECL MSVCRT_ldexp(double num, long exp)
|
||||
{
|
||||
double z = ldexp(num,exp);
|
||||
|
||||
|
@ -624,7 +624,7 @@ double MSVCRT_ldexp(double num, long exp)
|
|||
/*********************************************************************
|
||||
* _cabs (MSVCRT.@)
|
||||
*/
|
||||
double MSVCRT__cabs(struct MSVCRT__complex num)
|
||||
double CDECL MSVCRT__cabs(struct MSVCRT__complex num)
|
||||
{
|
||||
return sqrt(num.x * num.x + num.y * num.y);
|
||||
}
|
||||
|
@ -632,7 +632,7 @@ double MSVCRT__cabs(struct MSVCRT__complex num)
|
|||
/*********************************************************************
|
||||
* _chgsign (MSVCRT.@)
|
||||
*/
|
||||
double _chgsign(double num)
|
||||
double CDECL _chgsign(double num)
|
||||
{
|
||||
/* FIXME: +-infinity,Nan not tested */
|
||||
return -num;
|
||||
|
@ -641,7 +641,7 @@ double _chgsign(double num)
|
|||
/*********************************************************************
|
||||
* _control87 (MSVCRT.@)
|
||||
*/
|
||||
unsigned int _control87(unsigned int newval, unsigned int mask)
|
||||
unsigned int CDECL _control87(unsigned int newval, unsigned int mask)
|
||||
{
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
unsigned int fpword = 0;
|
||||
|
@ -711,7 +711,7 @@ unsigned int _control87(unsigned int newval, unsigned int mask)
|
|||
/*********************************************************************
|
||||
* _controlfp (MSVCRT.@)
|
||||
*/
|
||||
unsigned int _controlfp(unsigned int newval, unsigned int mask)
|
||||
unsigned int CDECL _controlfp(unsigned int newval, unsigned int mask)
|
||||
{
|
||||
#ifdef __i386__
|
||||
return _control87( newval, mask & ~MSVCRT__EM_DENORMAL );
|
||||
|
@ -724,7 +724,7 @@ unsigned int _controlfp(unsigned int newval, unsigned int mask)
|
|||
/*********************************************************************
|
||||
* _copysign (MSVCRT.@)
|
||||
*/
|
||||
double _copysign(double num, double sign)
|
||||
double CDECL _copysign(double num, double sign)
|
||||
{
|
||||
/* FIXME: Behaviour for Nan/Inf? */
|
||||
if (sign < 0.0)
|
||||
|
@ -735,7 +735,7 @@ double _copysign(double num, double sign)
|
|||
/*********************************************************************
|
||||
* _finite (MSVCRT.@)
|
||||
*/
|
||||
int _finite(double num)
|
||||
int CDECL _finite(double num)
|
||||
{
|
||||
return (finite(num)?1:0); /* See comment for _isnan() */
|
||||
}
|
||||
|
@ -743,7 +743,7 @@ int _finite(double num)
|
|||
/*********************************************************************
|
||||
* _fpreset (MSVCRT.@)
|
||||
*/
|
||||
void _fpreset(void)
|
||||
void CDECL _fpreset(void)
|
||||
{
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
__asm__ __volatile__( "fninit" );
|
||||
|
@ -755,7 +755,7 @@ void _fpreset(void)
|
|||
/*********************************************************************
|
||||
* _isnan (MSVCRT.@)
|
||||
*/
|
||||
INT _isnan(double num)
|
||||
INT CDECL _isnan(double num)
|
||||
{
|
||||
/* Some implementations return -1 for true(glibc), msvcrt/crtdll return 1.
|
||||
* Do the same, as the result may be used in calculations
|
||||
|
@ -766,7 +766,7 @@ INT _isnan(double num)
|
|||
/*********************************************************************
|
||||
* _j0 (MSVCRT.@)
|
||||
*/
|
||||
double _j0(double num)
|
||||
double CDECL _j0(double num)
|
||||
{
|
||||
/* FIXME: errno handling */
|
||||
return j0(num);
|
||||
|
@ -775,7 +775,7 @@ double _j0(double num)
|
|||
/*********************************************************************
|
||||
* _j1 (MSVCRT.@)
|
||||
*/
|
||||
double _j1(double num)
|
||||
double CDECL _j1(double num)
|
||||
{
|
||||
/* FIXME: errno handling */
|
||||
return j1(num);
|
||||
|
@ -784,7 +784,7 @@ double _j1(double num)
|
|||
/*********************************************************************
|
||||
* jn (MSVCRT.@)
|
||||
*/
|
||||
double _jn(int n, double num)
|
||||
double CDECL _jn(int n, double num)
|
||||
{
|
||||
/* FIXME: errno handling */
|
||||
return jn(n, num);
|
||||
|
@ -793,7 +793,7 @@ double _jn(int n, double num)
|
|||
/*********************************************************************
|
||||
* _y0 (MSVCRT.@)
|
||||
*/
|
||||
double _y0(double num)
|
||||
double CDECL _y0(double num)
|
||||
{
|
||||
double retval;
|
||||
if (!finite(num)) *MSVCRT__errno() = MSVCRT_EDOM;
|
||||
|
@ -809,7 +809,7 @@ double _y0(double num)
|
|||
/*********************************************************************
|
||||
* _y1 (MSVCRT.@)
|
||||
*/
|
||||
double _y1(double num)
|
||||
double CDECL _y1(double num)
|
||||
{
|
||||
double retval;
|
||||
if (!finite(num)) *MSVCRT__errno() = MSVCRT_EDOM;
|
||||
|
@ -825,7 +825,7 @@ double _y1(double num)
|
|||
/*********************************************************************
|
||||
* _yn (MSVCRT.@)
|
||||
*/
|
||||
double _yn(int order, double num)
|
||||
double CDECL _yn(int order, double num)
|
||||
{
|
||||
double retval;
|
||||
if (!finite(num)) *MSVCRT__errno() = MSVCRT_EDOM;
|
||||
|
@ -841,7 +841,7 @@ double _yn(int order, double num)
|
|||
/*********************************************************************
|
||||
* _nextafter (MSVCRT.@)
|
||||
*/
|
||||
double _nextafter(double num, double next)
|
||||
double CDECL _nextafter(double num, double next)
|
||||
{
|
||||
double retval;
|
||||
if (!finite(num) || !finite(next)) *MSVCRT__errno() = MSVCRT_EDOM;
|
||||
|
@ -852,7 +852,7 @@ double _nextafter(double num, double next)
|
|||
/*********************************************************************
|
||||
* _ecvt (MSVCRT.@)
|
||||
*/
|
||||
char *_ecvt( double number, int ndigits, int *decpt, int *sign )
|
||||
char * CDECL _ecvt( double number, int ndigits, int *decpt, int *sign )
|
||||
{
|
||||
thread_data_t *data = msvcrt_get_thread_data();
|
||||
char *dec;
|
||||
|
@ -870,7 +870,7 @@ char *_ecvt( double number, int ndigits, int *decpt, int *sign )
|
|||
/***********************************************************************
|
||||
* _fcvt (MSVCRT.@)
|
||||
*/
|
||||
char *_fcvt( double number, int ndigits, int *decpt, int *sign )
|
||||
char * CDECL _fcvt( double number, int ndigits, int *decpt, int *sign )
|
||||
{
|
||||
thread_data_t *data = msvcrt_get_thread_data();
|
||||
char *dec;
|
||||
|
@ -890,7 +890,7 @@ char *_fcvt( double number, int ndigits, int *decpt, int *sign )
|
|||
*
|
||||
* FIXME: uses both E and F.
|
||||
*/
|
||||
char *_gcvt( double number, int ndigit, char *buff )
|
||||
char * CDECL _gcvt( double number, int ndigit, char *buff )
|
||||
{
|
||||
sprintf(buff, "%.*E", ndigit, number);
|
||||
return buff;
|
||||
|
@ -904,7 +904,7 @@ char *_gcvt( double number, int ndigit, char *buff )
|
|||
* [i386] Windows binary compatible - returns the struct in eax/edx.
|
||||
*/
|
||||
#ifdef __i386__
|
||||
unsigned __int64 MSVCRT_div(int num, int denom)
|
||||
unsigned __int64 CDECL MSVCRT_div(int num, int denom)
|
||||
{
|
||||
div_t dt = div(num,denom);
|
||||
return ((unsigned __int64)dt.rem << 32) | (unsigned int)dt.quot;
|
||||
|
@ -915,7 +915,7 @@ unsigned __int64 MSVCRT_div(int num, int denom)
|
|||
* VERSION
|
||||
* [!i386] Non-x86 can't run win32 apps so we don't need binary compatibility
|
||||
*/
|
||||
MSVCRT_div_t MSVCRT_div(int num, int denom)
|
||||
MSVCRT_div_t CDECL MSVCRT_div(int num, int denom)
|
||||
{
|
||||
div_t dt = div(num,denom);
|
||||
MSVCRT_div_t ret;
|
||||
|
@ -934,7 +934,7 @@ MSVCRT_div_t MSVCRT_div(int num, int denom)
|
|||
* [i386] Windows binary compatible - returns the struct in eax/edx.
|
||||
*/
|
||||
#ifdef __i386__
|
||||
unsigned __int64 MSVCRT_ldiv(long num, long denom)
|
||||
unsigned __int64 CDECL MSVCRT_ldiv(long num, long denom)
|
||||
{
|
||||
ldiv_t ldt = ldiv(num,denom);
|
||||
return ((unsigned __int64)ldt.rem << 32) | (unsigned long)ldt.quot;
|
||||
|
@ -945,7 +945,7 @@ unsigned __int64 MSVCRT_ldiv(long num, long denom)
|
|||
* VERSION
|
||||
* [!i386] Non-x86 can't run win32 apps so we don't need binary compatibility
|
||||
*/
|
||||
MSVCRT_ldiv_t MSVCRT_ldiv(long num, long denom)
|
||||
MSVCRT_ldiv_t CDECL MSVCRT_ldiv(long num, long denom)
|
||||
{
|
||||
ldiv_t result = ldiv(num,denom);
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ static inline size_t u_strcspn( const unsigned char *s, const unsigned char *rej
|
|||
/*********************************************************************
|
||||
* __p__mbctype (MSVCRT.@)
|
||||
*/
|
||||
unsigned char* __p__mbctype(void)
|
||||
unsigned char* CDECL __p__mbctype(void)
|
||||
{
|
||||
return MSVCRT_mbctype;
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ unsigned char* __p__mbctype(void)
|
|||
/*********************************************************************
|
||||
* __p___mb_cur_max(MSVCRT.@)
|
||||
*/
|
||||
int* __p___mb_cur_max(void)
|
||||
int* CDECL __p___mb_cur_max(void)
|
||||
{
|
||||
return &MSVCRT___mb_cur_max;
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ int* __p___mb_cur_max(void)
|
|||
/*********************************************************************
|
||||
* _mbsnextc(MSVCRT.@)
|
||||
*/
|
||||
unsigned int _mbsnextc(const unsigned char* str)
|
||||
unsigned int CDECL _mbsnextc(const unsigned char* str)
|
||||
{
|
||||
if(MSVCRT___mb_cur_max > 1 && MSVCRT_isleadbyte(*str))
|
||||
return *str << 8 | str[1];
|
||||
|
@ -143,7 +143,7 @@ unsigned int _mbsnextc(const unsigned char* str)
|
|||
/*********************************************************************
|
||||
* _mbctolower(MSVCRT.@)
|
||||
*/
|
||||
unsigned int _mbctolower(unsigned int c)
|
||||
unsigned int CDECL _mbctolower(unsigned int c)
|
||||
{
|
||||
if (MSVCRT_isleadbyte(c))
|
||||
{
|
||||
|
@ -156,7 +156,7 @@ unsigned int _mbctolower(unsigned int c)
|
|||
/*********************************************************************
|
||||
* _mbctoupper(MSVCRT.@)
|
||||
*/
|
||||
unsigned int _mbctoupper(unsigned int c)
|
||||
unsigned int CDECL _mbctoupper(unsigned int c)
|
||||
{
|
||||
if (MSVCRT_isleadbyte(c))
|
||||
{
|
||||
|
@ -169,7 +169,7 @@ unsigned int _mbctoupper(unsigned int c)
|
|||
/*********************************************************************
|
||||
* _mbsdec(MSVCRT.@)
|
||||
*/
|
||||
unsigned char* _mbsdec(const unsigned char* start, const unsigned char* cur)
|
||||
unsigned char* CDECL _mbsdec(const unsigned char* start, const unsigned char* cur)
|
||||
{
|
||||
if(MSVCRT___mb_cur_max > 1)
|
||||
return (unsigned char *)(_ismbstrail(start,cur-1) ? cur - 2 : cur -1);
|
||||
|
@ -180,7 +180,7 @@ unsigned char* _mbsdec(const unsigned char* start, const unsigned char* cur)
|
|||
/*********************************************************************
|
||||
* _mbsinc(MSVCRT.@)
|
||||
*/
|
||||
unsigned char* _mbsinc(const unsigned char* str)
|
||||
unsigned char* CDECL _mbsinc(const unsigned char* str)
|
||||
{
|
||||
if(MSVCRT___mb_cur_max > 1 && MSVCRT_isleadbyte(*str))
|
||||
return (unsigned char*)str + 2; /* MB char */
|
||||
|
@ -191,7 +191,7 @@ unsigned char* _mbsinc(const unsigned char* str)
|
|||
/*********************************************************************
|
||||
* _mbsninc(MSVCRT.@)
|
||||
*/
|
||||
unsigned char* _mbsninc(const unsigned char* str, MSVCRT_size_t num)
|
||||
unsigned char* CDECL _mbsninc(const unsigned char* str, MSVCRT_size_t num)
|
||||
{
|
||||
if(!str || num < 1)
|
||||
return NULL;
|
||||
|
@ -207,7 +207,7 @@ unsigned char* _mbsninc(const unsigned char* str, MSVCRT_size_t num)
|
|||
/*********************************************************************
|
||||
* _mbclen(MSVCRT.@)
|
||||
*/
|
||||
unsigned int _mbclen(const unsigned char* str)
|
||||
unsigned int CDECL _mbclen(const unsigned char* str)
|
||||
{
|
||||
return MSVCRT_isleadbyte(*str) ? 2 : 1;
|
||||
}
|
||||
|
@ -215,7 +215,7 @@ unsigned int _mbclen(const unsigned char* str)
|
|||
/*********************************************************************
|
||||
* mblen(MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_mblen(const char* str, MSVCRT_size_t size)
|
||||
int CDECL MSVCRT_mblen(const char* str, MSVCRT_size_t size)
|
||||
{
|
||||
if (str && *str && size)
|
||||
{
|
||||
|
@ -230,7 +230,7 @@ int MSVCRT_mblen(const char* str, MSVCRT_size_t size)
|
|||
/*********************************************************************
|
||||
* _mbslen(MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_size_t _mbslen(const unsigned char* str)
|
||||
MSVCRT_size_t CDECL _mbslen(const unsigned char* str)
|
||||
{
|
||||
if(MSVCRT___mb_cur_max > 1)
|
||||
{
|
||||
|
@ -248,7 +248,7 @@ MSVCRT_size_t _mbslen(const unsigned char* str)
|
|||
/*********************************************************************
|
||||
* _mbstrlen(MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_size_t _mbstrlen(const char* str)
|
||||
MSVCRT_size_t CDECL _mbstrlen(const char* str)
|
||||
{
|
||||
if(MSVCRT___mb_cur_max > 1)
|
||||
{
|
||||
|
@ -269,7 +269,7 @@ MSVCRT_size_t _mbstrlen(const char* str)
|
|||
/*********************************************************************
|
||||
* _mbccpy(MSVCRT.@)
|
||||
*/
|
||||
void _mbccpy(unsigned char* dest, const unsigned char* src)
|
||||
void CDECL _mbccpy(unsigned char* dest, const unsigned char* src)
|
||||
{
|
||||
*dest = *src;
|
||||
if(MSVCRT___mb_cur_max > 1 && MSVCRT_isleadbyte(*src))
|
||||
|
@ -279,7 +279,7 @@ void _mbccpy(unsigned char* dest, const unsigned char* src)
|
|||
/*********************************************************************
|
||||
* _mbsncpy(MSVCRT.@)
|
||||
*/
|
||||
unsigned char* _mbsncpy(unsigned char* dst, const unsigned char* src, MSVCRT_size_t n)
|
||||
unsigned char* CDECL _mbsncpy(unsigned char* dst, const unsigned char* src, MSVCRT_size_t n)
|
||||
{
|
||||
unsigned char* ret = dst;
|
||||
if(!n)
|
||||
|
@ -309,7 +309,7 @@ unsigned char* _mbsncpy(unsigned char* dst, const unsigned char* src, MSVCRT_siz
|
|||
/*********************************************************************
|
||||
* _mbsnbcpy(MSVCRT.@)
|
||||
*/
|
||||
unsigned char* _mbsnbcpy(unsigned char* dst, const unsigned char* src, MSVCRT_size_t n)
|
||||
unsigned char* CDECL _mbsnbcpy(unsigned char* dst, const unsigned char* src, MSVCRT_size_t n)
|
||||
{
|
||||
unsigned char* ret = dst;
|
||||
if(!n)
|
||||
|
@ -350,7 +350,7 @@ unsigned char* _mbsnbcpy(unsigned char* dst, const unsigned char* src, MSVCRT_si
|
|||
/*********************************************************************
|
||||
* _mbscmp(MSVCRT.@)
|
||||
*/
|
||||
int _mbscmp(const unsigned char* str, const unsigned char* cmp)
|
||||
int CDECL _mbscmp(const unsigned char* str, const unsigned char* cmp)
|
||||
{
|
||||
if(MSVCRT___mb_cur_max > 1)
|
||||
{
|
||||
|
@ -375,7 +375,7 @@ int _mbscmp(const unsigned char* str, const unsigned char* cmp)
|
|||
* _mbsicoll(MSVCRT.@)
|
||||
* FIXME: handle locales.
|
||||
*/
|
||||
int _mbsicoll(const unsigned char* str, const unsigned char* cmp)
|
||||
int CDECL _mbsicoll(const unsigned char* str, const unsigned char* cmp)
|
||||
{
|
||||
if(MSVCRT___mb_cur_max > 1)
|
||||
{
|
||||
|
@ -403,7 +403,7 @@ int _mbsicoll(const unsigned char* str, const unsigned char* cmp)
|
|||
* _NLSCMPERROR if error
|
||||
* FIXME: handle locales.
|
||||
*/
|
||||
int _mbscoll(const unsigned char* str, const unsigned char* cmp)
|
||||
int CDECL _mbscoll(const unsigned char* str, const unsigned char* cmp)
|
||||
{
|
||||
if(MSVCRT___mb_cur_max > 1)
|
||||
{
|
||||
|
@ -428,7 +428,7 @@ int _mbscoll(const unsigned char* str, const unsigned char* cmp)
|
|||
/*********************************************************************
|
||||
* _mbsicmp(MSVCRT.@)
|
||||
*/
|
||||
int _mbsicmp(const unsigned char* str, const unsigned char* cmp)
|
||||
int CDECL _mbsicmp(const unsigned char* str, const unsigned char* cmp)
|
||||
{
|
||||
if(MSVCRT___mb_cur_max > 1)
|
||||
{
|
||||
|
@ -452,7 +452,7 @@ int _mbsicmp(const unsigned char* str, const unsigned char* cmp)
|
|||
/*********************************************************************
|
||||
* _mbsncmp(MSVCRT.@)
|
||||
*/
|
||||
int _mbsncmp(const unsigned char* str, const unsigned char* cmp, MSVCRT_size_t len)
|
||||
int CDECL _mbsncmp(const unsigned char* str, const unsigned char* cmp, MSVCRT_size_t len)
|
||||
{
|
||||
if(!len)
|
||||
return 0;
|
||||
|
@ -483,7 +483,7 @@ int _mbsncmp(const unsigned char* str, const unsigned char* cmp, MSVCRT_size_t l
|
|||
/*********************************************************************
|
||||
* _mbsnbcmp(MSVCRT.@)
|
||||
*/
|
||||
int _mbsnbcmp(const unsigned char* str, const unsigned char* cmp, MSVCRT_size_t len)
|
||||
int CDECL _mbsnbcmp(const unsigned char* str, const unsigned char* cmp, MSVCRT_size_t len)
|
||||
{
|
||||
if (!len)
|
||||
return 0;
|
||||
|
@ -527,7 +527,7 @@ int _mbsnbcmp(const unsigned char* str, const unsigned char* cmp, MSVCRT_size_t
|
|||
*
|
||||
* Compare two multibyte strings case insensitively to 'len' characters.
|
||||
*/
|
||||
int _mbsnicmp(const unsigned char* str, const unsigned char* cmp, MSVCRT_size_t len)
|
||||
int CDECL _mbsnicmp(const unsigned char* str, const unsigned char* cmp, MSVCRT_size_t len)
|
||||
{
|
||||
/* FIXME: No tolower() for mb strings yet */
|
||||
if(MSVCRT___mb_cur_max > 1)
|
||||
|
@ -554,7 +554,7 @@ int _mbsnicmp(const unsigned char* str, const unsigned char* cmp, MSVCRT_size_t
|
|||
/*********************************************************************
|
||||
* _mbsnbicmp(MSVCRT.@)
|
||||
*/
|
||||
int _mbsnbicmp(const unsigned char* str, const unsigned char* cmp, MSVCRT_size_t len)
|
||||
int CDECL _mbsnbicmp(const unsigned char* str, const unsigned char* cmp, MSVCRT_size_t len)
|
||||
{
|
||||
if (!len)
|
||||
return 0;
|
||||
|
@ -598,7 +598,7 @@ int _mbsnbicmp(const unsigned char* str, const unsigned char* cmp, MSVCRT_size_t
|
|||
/*********************************************************************
|
||||
* _mbscat (MSVCRT.@)
|
||||
*/
|
||||
unsigned char *_mbscat( unsigned char *dst, const unsigned char *src )
|
||||
unsigned char * CDECL _mbscat( unsigned char *dst, const unsigned char *src )
|
||||
{
|
||||
strcat( (char *)dst, (const char *)src );
|
||||
return dst;
|
||||
|
@ -607,7 +607,7 @@ unsigned char *_mbscat( unsigned char *dst, const unsigned char *src )
|
|||
/*********************************************************************
|
||||
* _mbscpy (MSVCRT.@)
|
||||
*/
|
||||
unsigned char* _mbscpy( unsigned char *dst, const unsigned char *src )
|
||||
unsigned char* CDECL _mbscpy( unsigned char *dst, const unsigned char *src )
|
||||
{
|
||||
strcpy( (char *)dst, (const char *)src );
|
||||
return dst;
|
||||
|
@ -616,7 +616,7 @@ unsigned char* _mbscpy( unsigned char *dst, const unsigned char *src )
|
|||
/*********************************************************************
|
||||
* _mbsstr (MSVCRT.@)
|
||||
*/
|
||||
unsigned char *_mbsstr(const unsigned char *haystack, const unsigned char *needle)
|
||||
unsigned char * CDECL _mbsstr(const unsigned char *haystack, const unsigned char *needle)
|
||||
{
|
||||
return (unsigned char *)strstr( (const char *)haystack, (const char *)needle );
|
||||
}
|
||||
|
@ -626,7 +626,7 @@ unsigned char *_mbsstr(const unsigned char *haystack, const unsigned char *needl
|
|||
*
|
||||
* Find a multibyte character in a multibyte string.
|
||||
*/
|
||||
unsigned char* _mbschr(const unsigned char* s, unsigned int x)
|
||||
unsigned char* CDECL _mbschr(const unsigned char* s, unsigned int x)
|
||||
{
|
||||
if(MSVCRT___mb_cur_max > 1)
|
||||
{
|
||||
|
@ -647,7 +647,7 @@ unsigned char* _mbschr(const unsigned char* s, unsigned int x)
|
|||
/*********************************************************************
|
||||
* _mbsrchr(MSVCRT.@)
|
||||
*/
|
||||
unsigned char* _mbsrchr(const unsigned char* s, unsigned int x)
|
||||
unsigned char* CDECL _mbsrchr(const unsigned char* s, unsigned int x)
|
||||
{
|
||||
if(MSVCRT___mb_cur_max > 1)
|
||||
{
|
||||
|
@ -672,7 +672,7 @@ unsigned char* _mbsrchr(const unsigned char* s, unsigned int x)
|
|||
*
|
||||
* Find and extract tokens from strings
|
||||
*/
|
||||
unsigned char* _mbstok(unsigned char *str, const unsigned char *delim)
|
||||
unsigned char* CDECL _mbstok(unsigned char *str, const unsigned char *delim)
|
||||
{
|
||||
thread_data_t *data = msvcrt_get_thread_data();
|
||||
unsigned char *ret;
|
||||
|
@ -705,7 +705,7 @@ unsigned char* _mbstok(unsigned char *str, const unsigned char *delim)
|
|||
/*********************************************************************
|
||||
* mbtowc(MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_mbtowc(MSVCRT_wchar_t *dst, const char* str, MSVCRT_size_t n)
|
||||
int CDECL MSVCRT_mbtowc(MSVCRT_wchar_t *dst, const char* str, MSVCRT_size_t n)
|
||||
{
|
||||
/* temp var needed because MultiByteToWideChar wants non NULL destination */
|
||||
MSVCRT_wchar_t tmpdst = '\0';
|
||||
|
@ -727,7 +727,7 @@ int MSVCRT_mbtowc(MSVCRT_wchar_t *dst, const char* str, MSVCRT_size_t n)
|
|||
/*********************************************************************
|
||||
* _mbbtombc(MSVCRT.@)
|
||||
*/
|
||||
unsigned int _mbbtombc(unsigned int c)
|
||||
unsigned int CDECL _mbbtombc(unsigned int c)
|
||||
{
|
||||
if(MSVCRT___mb_cur_max > 1 &&
|
||||
((c >= 0x20 && c <=0x7e) ||(c >= 0xa1 && c <= 0xdf)))
|
||||
|
@ -742,7 +742,7 @@ unsigned int _mbbtombc(unsigned int c)
|
|||
/*********************************************************************
|
||||
* _ismbbkana(MSVCRT.@)
|
||||
*/
|
||||
int _ismbbkana(unsigned int c)
|
||||
int CDECL _ismbbkana(unsigned int c)
|
||||
{
|
||||
/* FIXME: use lc_ctype when supported, not lc_all */
|
||||
if(msvcrt_current_lc_all_cp == 932)
|
||||
|
@ -756,7 +756,7 @@ int _ismbbkana(unsigned int c)
|
|||
/*********************************************************************
|
||||
* _ismbcdigit(MSVCRT.@)
|
||||
*/
|
||||
int _ismbcdigit(unsigned int ch)
|
||||
int CDECL _ismbcdigit(unsigned int ch)
|
||||
{
|
||||
MSVCRT_wchar_t wch = msvcrt_mbc_to_wc( ch );
|
||||
return (get_char_typeW( wch ) & C1_DIGIT);
|
||||
|
@ -765,7 +765,7 @@ int _ismbcdigit(unsigned int ch)
|
|||
/*********************************************************************
|
||||
* _ismbcgraph(MSVCRT.@)
|
||||
*/
|
||||
int _ismbcgraph(unsigned int ch)
|
||||
int CDECL _ismbcgraph(unsigned int ch)
|
||||
{
|
||||
MSVCRT_wchar_t wch = msvcrt_mbc_to_wc( ch );
|
||||
return (get_char_typeW( wch ) & (C1_UPPER | C1_LOWER | C1_DIGIT | C1_PUNCT | C1_ALPHA));
|
||||
|
@ -774,7 +774,7 @@ int _ismbcgraph(unsigned int ch)
|
|||
/*********************************************************************
|
||||
* _ismbcalpha (MSVCRT.@)
|
||||
*/
|
||||
int _ismbcalpha(unsigned int ch)
|
||||
int CDECL _ismbcalpha(unsigned int ch)
|
||||
{
|
||||
MSVCRT_wchar_t wch = msvcrt_mbc_to_wc( ch );
|
||||
return (get_char_typeW( wch ) & C1_ALPHA);
|
||||
|
@ -783,7 +783,7 @@ int _ismbcalpha(unsigned int ch)
|
|||
/*********************************************************************
|
||||
* _ismbclower (MSVCRT.@)
|
||||
*/
|
||||
int _ismbclower(unsigned int ch)
|
||||
int CDECL _ismbclower(unsigned int ch)
|
||||
{
|
||||
MSVCRT_wchar_t wch = msvcrt_mbc_to_wc( ch );
|
||||
return (get_char_typeW( wch ) & C1_UPPER);
|
||||
|
@ -792,7 +792,7 @@ int _ismbclower(unsigned int ch)
|
|||
/*********************************************************************
|
||||
* _ismbcupper (MSVCRT.@)
|
||||
*/
|
||||
int _ismbcupper(unsigned int ch)
|
||||
int CDECL _ismbcupper(unsigned int ch)
|
||||
{
|
||||
MSVCRT_wchar_t wch = msvcrt_mbc_to_wc( ch );
|
||||
return (get_char_typeW( wch ) & C1_LOWER);
|
||||
|
@ -801,7 +801,7 @@ int _ismbcupper(unsigned int ch)
|
|||
/*********************************************************************
|
||||
* _ismbcsymbol(MSVCRT.@)
|
||||
*/
|
||||
int _ismbcsymbol(unsigned int ch)
|
||||
int CDECL _ismbcsymbol(unsigned int ch)
|
||||
{
|
||||
MSVCRT_wchar_t wch = msvcrt_mbc_to_wc( ch );
|
||||
WORD ctype;
|
||||
|
@ -816,7 +816,7 @@ int _ismbcsymbol(unsigned int ch)
|
|||
/*********************************************************************
|
||||
* _ismbcalnum (MSVCRT.@)
|
||||
*/
|
||||
int _ismbcalnum(unsigned int ch)
|
||||
int CDECL _ismbcalnum(unsigned int ch)
|
||||
{
|
||||
MSVCRT_wchar_t wch = msvcrt_mbc_to_wc( ch );
|
||||
return (get_char_typeW( wch ) & (C1_ALPHA | C1_DIGIT));
|
||||
|
@ -825,7 +825,7 @@ int _ismbcalnum(unsigned int ch)
|
|||
/*********************************************************************
|
||||
* _ismbcspace (MSVCRT.@)
|
||||
*/
|
||||
int _ismbcspace(unsigned int ch)
|
||||
int CDECL _ismbcspace(unsigned int ch)
|
||||
{
|
||||
MSVCRT_wchar_t wch = msvcrt_mbc_to_wc( ch );
|
||||
return (get_char_typeW( wch ) & C1_SPACE);
|
||||
|
@ -834,7 +834,7 @@ int _ismbcspace(unsigned int ch)
|
|||
/*********************************************************************
|
||||
* _ismbcprint (MSVCRT.@)
|
||||
*/
|
||||
int _ismbcprint(unsigned int ch)
|
||||
int CDECL _ismbcprint(unsigned int ch)
|
||||
{
|
||||
MSVCRT_wchar_t wch = msvcrt_mbc_to_wc( ch );
|
||||
return (get_char_typeW( wch ) & (C1_UPPER | C1_LOWER | C1_DIGIT | C1_PUNCT | C1_ALPHA | C1_SPACE));
|
||||
|
@ -843,7 +843,7 @@ int _ismbcprint(unsigned int ch)
|
|||
/*********************************************************************
|
||||
* _ismbcpunct(MSVCRT.@)
|
||||
*/
|
||||
int _ismbcpunct(unsigned int ch)
|
||||
int CDECL _ismbcpunct(unsigned int ch)
|
||||
{
|
||||
MSVCRT_wchar_t wch = msvcrt_mbc_to_wc( ch );
|
||||
return (get_char_typeW( wch ) & C1_PUNCT);
|
||||
|
@ -852,7 +852,7 @@ int _ismbcpunct(unsigned int ch)
|
|||
/*********************************************************************
|
||||
* _ismbchira(MSVCRT.@)
|
||||
*/
|
||||
int _ismbchira(unsigned int c)
|
||||
int CDECL _ismbchira(unsigned int c)
|
||||
{
|
||||
/* FIXME: use lc_ctype when supported, not lc_all */
|
||||
if(msvcrt_current_lc_all_cp == 932)
|
||||
|
@ -866,7 +866,7 @@ int _ismbchira(unsigned int c)
|
|||
/*********************************************************************
|
||||
* _ismbckata(MSVCRT.@)
|
||||
*/
|
||||
int _ismbckata(unsigned int c)
|
||||
int CDECL _ismbckata(unsigned int c)
|
||||
{
|
||||
/* FIXME: use lc_ctype when supported, not lc_all */
|
||||
if(msvcrt_current_lc_all_cp == 932)
|
||||
|
@ -882,7 +882,7 @@ int _ismbckata(unsigned int c)
|
|||
/*********************************************************************
|
||||
* _ismbblead(MSVCRT.@)
|
||||
*/
|
||||
int _ismbblead(unsigned int c)
|
||||
int CDECL _ismbblead(unsigned int c)
|
||||
{
|
||||
/* FIXME: should reference MSVCRT_mbctype */
|
||||
return MSVCRT___mb_cur_max > 1 && MSVCRT_isleadbyte(c);
|
||||
|
@ -892,7 +892,7 @@ int _ismbblead(unsigned int c)
|
|||
/*********************************************************************
|
||||
* _ismbbtrail(MSVCRT.@)
|
||||
*/
|
||||
int _ismbbtrail(unsigned int c)
|
||||
int CDECL _ismbbtrail(unsigned int c)
|
||||
{
|
||||
/* FIXME: should reference MSVCRT_mbctype */
|
||||
return !_ismbblead(c);
|
||||
|
@ -901,7 +901,7 @@ int _ismbbtrail(unsigned int c)
|
|||
/*********************************************************************
|
||||
* _ismbslead(MSVCRT.@)
|
||||
*/
|
||||
int _ismbslead(const unsigned char* start, const unsigned char* str)
|
||||
int CDECL _ismbslead(const unsigned char* start, const unsigned char* str)
|
||||
{
|
||||
/* Lead bytes can also be trail bytes if caller messed up
|
||||
* iterating through the string...
|
||||
|
@ -920,7 +920,7 @@ int _ismbslead(const unsigned char* start, const unsigned char* str)
|
|||
/*********************************************************************
|
||||
* _ismbstrail(MSVCRT.@)
|
||||
*/
|
||||
int _ismbstrail(const unsigned char* start, const unsigned char* str)
|
||||
int CDECL _ismbstrail(const unsigned char* start, const unsigned char* str)
|
||||
{
|
||||
/* Must not be a lead, and must be preceded by one */
|
||||
return !_ismbslead(start, str) && MSVCRT_isleadbyte(str[-1]);
|
||||
|
@ -929,7 +929,7 @@ int _ismbstrail(const unsigned char* start, const unsigned char* str)
|
|||
/*********************************************************************
|
||||
* _mbsset(MSVCRT.@)
|
||||
*/
|
||||
unsigned char* _mbsset(unsigned char* str, unsigned int c)
|
||||
unsigned char* CDECL _mbsset(unsigned char* str, unsigned int c)
|
||||
{
|
||||
unsigned char* ret = str;
|
||||
|
||||
|
@ -952,7 +952,7 @@ unsigned char* _mbsset(unsigned char* str, unsigned int c)
|
|||
/*********************************************************************
|
||||
* _mbsnbset(MSVCRT.@)
|
||||
*/
|
||||
unsigned char* _mbsnbset(unsigned char *str, unsigned int c, MSVCRT_size_t len)
|
||||
unsigned char* CDECL _mbsnbset(unsigned char *str, unsigned int c, MSVCRT_size_t len)
|
||||
{
|
||||
unsigned char *ret = str;
|
||||
|
||||
|
@ -982,7 +982,7 @@ unsigned char* _mbsnbset(unsigned char *str, unsigned int c, MSVCRT_size_t len)
|
|||
/*********************************************************************
|
||||
* _mbsnset(MSVCRT.@)
|
||||
*/
|
||||
unsigned char* _mbsnset(unsigned char* str, unsigned int c, MSVCRT_size_t len)
|
||||
unsigned char* CDECL _mbsnset(unsigned char* str, unsigned int c, MSVCRT_size_t len)
|
||||
{
|
||||
unsigned char *ret = str;
|
||||
|
||||
|
@ -1009,7 +1009,7 @@ unsigned char* _mbsnset(unsigned char* str, unsigned int c, MSVCRT_size_t len)
|
|||
* _mbsnccnt(MSVCRT.@)
|
||||
* 'c' is for 'character'.
|
||||
*/
|
||||
MSVCRT_size_t _mbsnccnt(const unsigned char* str, MSVCRT_size_t len)
|
||||
MSVCRT_size_t CDECL _mbsnccnt(const unsigned char* str, MSVCRT_size_t len)
|
||||
{
|
||||
MSVCRT_size_t ret;
|
||||
if(MSVCRT___mb_cur_max > 1)
|
||||
|
@ -1037,7 +1037,7 @@ MSVCRT_size_t _mbsnccnt(const unsigned char* str, MSVCRT_size_t len)
|
|||
* _mbsnbcnt(MSVCRT.@)
|
||||
* 'b' is for byte count.
|
||||
*/
|
||||
MSVCRT_size_t _mbsnbcnt(const unsigned char* str, MSVCRT_size_t len)
|
||||
MSVCRT_size_t CDECL _mbsnbcnt(const unsigned char* str, MSVCRT_size_t len)
|
||||
{
|
||||
MSVCRT_size_t ret;
|
||||
if(MSVCRT___mb_cur_max > 1)
|
||||
|
@ -1057,7 +1057,7 @@ MSVCRT_size_t _mbsnbcnt(const unsigned char* str, MSVCRT_size_t len)
|
|||
/*********************************************************************
|
||||
* _mbsnbcat(MSVCRT.@)
|
||||
*/
|
||||
unsigned char* _mbsnbcat(unsigned char* dst, const unsigned char* src, MSVCRT_size_t len)
|
||||
unsigned char* CDECL _mbsnbcat(unsigned char* dst, const unsigned char* src, MSVCRT_size_t len)
|
||||
{
|
||||
if(MSVCRT___mb_cur_max > 1)
|
||||
{
|
||||
|
@ -1084,7 +1084,7 @@ unsigned char* _mbsnbcat(unsigned char* dst, const unsigned char* src, MSVCRT_si
|
|||
/*********************************************************************
|
||||
* _mbsncat(MSVCRT.@)
|
||||
*/
|
||||
unsigned char* _mbsncat(unsigned char* dst, const unsigned char* src, MSVCRT_size_t len)
|
||||
unsigned char* CDECL _mbsncat(unsigned char* dst, const unsigned char* src, MSVCRT_size_t len)
|
||||
{
|
||||
if(MSVCRT___mb_cur_max > 1)
|
||||
{
|
||||
|
@ -1110,7 +1110,7 @@ unsigned char* _mbsncat(unsigned char* dst, const unsigned char* src, MSVCRT_siz
|
|||
/*********************************************************************
|
||||
* _mbslwr(MSVCRT.@)
|
||||
*/
|
||||
unsigned char* _mbslwr(unsigned char* s)
|
||||
unsigned char* CDECL _mbslwr(unsigned char* s)
|
||||
{
|
||||
unsigned char *ret = s;
|
||||
if (!s)
|
||||
|
@ -1138,7 +1138,7 @@ unsigned char* _mbslwr(unsigned char* s)
|
|||
/*********************************************************************
|
||||
* _mbsupr(MSVCRT.@)
|
||||
*/
|
||||
unsigned char* _mbsupr(unsigned char* s)
|
||||
unsigned char* CDECL _mbsupr(unsigned char* s)
|
||||
{
|
||||
unsigned char *ret = s;
|
||||
if (!s)
|
||||
|
@ -1166,7 +1166,7 @@ unsigned char* _mbsupr(unsigned char* s)
|
|||
/*********************************************************************
|
||||
* _mbsspn (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_size_t _mbsspn(const unsigned char* string, const unsigned char* set)
|
||||
MSVCRT_size_t CDECL _mbsspn(const unsigned char* string, const unsigned char* set)
|
||||
{
|
||||
const unsigned char *p, *q;
|
||||
|
||||
|
@ -1198,7 +1198,7 @@ MSVCRT_size_t _mbsspn(const unsigned char* string, const unsigned char* set)
|
|||
/*********************************************************************
|
||||
* _mbscspn(MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_size_t _mbscspn(const unsigned char* str, const unsigned char* cmp)
|
||||
MSVCRT_size_t CDECL _mbscspn(const unsigned char* str, const unsigned char* cmp)
|
||||
{
|
||||
if (MSVCRT___mb_cur_max > 1)
|
||||
FIXME("don't handle double character case\n");
|
||||
|
@ -1208,7 +1208,7 @@ MSVCRT_size_t _mbscspn(const unsigned char* str, const unsigned char* cmp)
|
|||
/*********************************************************************
|
||||
* _mbsrev (MSVCRT.@)
|
||||
*/
|
||||
unsigned char* _mbsrev(unsigned char* str)
|
||||
unsigned char* CDECL _mbsrev(unsigned char* str)
|
||||
{
|
||||
int i, len = _mbslen(str);
|
||||
unsigned char *p, *temp=MSVCRT_malloc(len*2);
|
||||
|
@ -1255,7 +1255,7 @@ unsigned char* _mbsrev(unsigned char* str)
|
|||
/*********************************************************************
|
||||
* _mbspbrk (MSVCRT.@)
|
||||
*/
|
||||
unsigned char* _mbspbrk(const unsigned char* str, const unsigned char* accept)
|
||||
unsigned char* CDECL _mbspbrk(const unsigned char* str, const unsigned char* accept)
|
||||
{
|
||||
const unsigned char* p;
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(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);
|
||||
Beep(freq, duration);
|
||||
|
@ -41,7 +41,7 @@ void _beep( unsigned int freq, unsigned int duration)
|
|||
/*********************************************************************
|
||||
* srand (MSVCRT.@)
|
||||
*/
|
||||
void MSVCRT_srand( unsigned int seed )
|
||||
void CDECL MSVCRT_srand( unsigned int seed )
|
||||
{
|
||||
thread_data_t *data = msvcrt_get_thread_data();
|
||||
data->random_seed = seed;
|
||||
|
@ -50,7 +50,7 @@ void MSVCRT_srand( unsigned int seed )
|
|||
/*********************************************************************
|
||||
* rand (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_rand(void)
|
||||
int CDECL MSVCRT_rand(void)
|
||||
{
|
||||
thread_data_t *data = msvcrt_get_thread_data();
|
||||
|
||||
|
@ -63,7 +63,7 @@ int MSVCRT_rand(void)
|
|||
/*********************************************************************
|
||||
* _sleep (MSVCRT.@)
|
||||
*/
|
||||
void _sleep(unsigned long timeout)
|
||||
void CDECL _sleep(unsigned long timeout)
|
||||
{
|
||||
TRACE("_sleep for %ld milliseconds\n",timeout);
|
||||
Sleep((timeout)?timeout:1);
|
||||
|
@ -72,9 +72,9 @@ void _sleep(unsigned long timeout)
|
|||
/*********************************************************************
|
||||
* _lfind (MSVCRT.@)
|
||||
*/
|
||||
void* _lfind(const void* match, const void* start,
|
||||
unsigned int* array_size, unsigned int elem_size,
|
||||
int (*cf)(const void*,const void*) )
|
||||
void* CDECL _lfind(const void* match, const void* start,
|
||||
unsigned int* array_size, unsigned int elem_size,
|
||||
int (*cf)(const void*,const void*) )
|
||||
{
|
||||
unsigned int size = *array_size;
|
||||
if (size)
|
||||
|
@ -90,9 +90,9 @@ void* _lfind(const void* match, const void* start,
|
|||
/*********************************************************************
|
||||
* _lsearch (MSVCRT.@)
|
||||
*/
|
||||
void* _lsearch(const void* match, void* start,
|
||||
unsigned int* array_size, unsigned int elem_size,
|
||||
int (*cf)(const void*,const void*) )
|
||||
void* CDECL _lsearch(const void* match, void* start,
|
||||
unsigned int* array_size, unsigned int elem_size,
|
||||
int (*cf)(const void*,const void*) )
|
||||
{
|
||||
unsigned int size = *array_size;
|
||||
if (size)
|
||||
|
@ -150,7 +150,7 @@ __ASM_GLOBAL_FUNC(_chkesp,
|
|||
"leave\n\t"
|
||||
"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");
|
||||
DebugBreak();
|
||||
|
@ -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)
|
|||
/*********************************************************************
|
||||
* _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;
|
||||
int doserrno;
|
||||
|
@ -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
|
||||
* 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;
|
||||
char * args;
|
||||
|
@ -238,7 +238,7 @@ MSVCRT_intptr_t _execl(const char* name, const char* arg0, ...)
|
|||
/*********************************************************************
|
||||
* _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");
|
||||
return -1;
|
||||
|
@ -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
|
||||
* 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;
|
||||
char * args;
|
||||
|
@ -272,7 +272,7 @@ MSVCRT_intptr_t _execlp(const char* name, const char* arg0, ...)
|
|||
/*********************************************************************
|
||||
* _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");
|
||||
return -1;
|
||||
|
@ -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
|
||||
* 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);
|
||||
}
|
||||
|
@ -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
|
||||
* 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);
|
||||
}
|
||||
|
@ -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
|
||||
* 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];
|
||||
|
||||
|
@ -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
|
||||
* 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);
|
||||
}
|
||||
|
@ -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
|
||||
* 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;
|
||||
char * args;
|
||||
|
@ -351,7 +351,7 @@ MSVCRT_intptr_t _spawnl(int flags, const char* name, const char* arg0, ...)
|
|||
/*********************************************************************
|
||||
* _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;
|
||||
char *args, *envs = NULL;
|
||||
|
@ -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
|
||||
* 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;
|
||||
char * args;
|
||||
|
@ -404,7 +404,7 @@ MSVCRT_intptr_t _spawnlp(int flags, const char* name, const char* arg0, ...)
|
|||
/*********************************************************************
|
||||
* _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;
|
||||
char *args, *envs = NULL;
|
||||
|
@ -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
|
||||
* or double-quotes.
|
||||
*/
|
||||
MSVCRT_intptr_t _spawnve(int flags, const char* name, const char* const* argv,
|
||||
const char* const* envv)
|
||||
MSVCRT_intptr_t CDECL _spawnve(int flags, const char* name, const char* const* argv,
|
||||
const char* const* envv)
|
||||
{
|
||||
char * args = msvcrt_argvtos(argv,' ');
|
||||
char * envs = msvcrt_argvtos(envv,0);
|
||||
|
@ -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
|
||||
* 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);
|
||||
}
|
||||
|
@ -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
|
||||
* or double-quotes.
|
||||
*/
|
||||
MSVCRT_intptr_t _spawnvpe(int flags, const char* name, const char* const* argv,
|
||||
const char* const* envv)
|
||||
MSVCRT_intptr_t CDECL _spawnvpe(int flags, const char* name, const char* const* argv,
|
||||
const char* const* envv)
|
||||
{
|
||||
char fullname[MAX_PATH];
|
||||
_searchenv(name, "PATH", fullname);
|
||||
|
@ -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
|
||||
* 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);
|
||||
}
|
||||
|
@ -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,
|
||||
* 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";
|
||||
MSVCRT_FILE *ret;
|
||||
|
@ -627,7 +627,7 @@ error:
|
|||
/*********************************************************************
|
||||
* _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));
|
||||
return NULL;
|
||||
|
@ -636,7 +636,7 @@ MSVCRT_FILE* MSVCRT__wpopen(const MSVCRT_wchar_t* command, const MSVCRT_wchar_t*
|
|||
/*********************************************************************
|
||||
* _pclose (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT__pclose(MSVCRT_FILE* file)
|
||||
int CDECL MSVCRT__pclose(MSVCRT_FILE* file)
|
||||
{
|
||||
return MSVCRT_fclose(file);
|
||||
}
|
||||
|
@ -644,7 +644,7 @@ int MSVCRT__pclose(MSVCRT_FILE* file)
|
|||
/*********************************************************************
|
||||
* system (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_system(const char* cmd)
|
||||
int CDECL MSVCRT_system(const char* cmd)
|
||||
{
|
||||
char* cmdcopy;
|
||||
int res;
|
||||
|
@ -660,7 +660,7 @@ int MSVCRT_system(const char* cmd)
|
|||
/*********************************************************************
|
||||
* _loaddll (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_intptr_t _loaddll(const char* dllname)
|
||||
MSVCRT_intptr_t CDECL _loaddll(const char* dllname)
|
||||
{
|
||||
return (MSVCRT_intptr_t)LoadLibraryA(dllname);
|
||||
}
|
||||
|
@ -668,7 +668,7 @@ MSVCRT_intptr_t _loaddll(const char* dllname)
|
|||
/*********************************************************************
|
||||
* _unloaddll (MSVCRT.@)
|
||||
*/
|
||||
int _unloaddll(MSVCRT_intptr_t dll)
|
||||
int CDECL _unloaddll(MSVCRT_intptr_t dll)
|
||||
{
|
||||
if (FreeLibrary((HMODULE)dll))
|
||||
return 0;
|
||||
|
@ -683,7 +683,7 @@ int _unloaddll(MSVCRT_intptr_t dll)
|
|||
/*********************************************************************
|
||||
* _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)
|
||||
{
|
||||
|
|
|
@ -92,7 +92,7 @@ static int wchar2digit(MSVCRT_wchar_t c, int base) {
|
|||
/*********************************************************************
|
||||
* fscanf (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_fscanf(MSVCRT_FILE *file, const char *format, ...)
|
||||
int CDECL MSVCRT_fscanf(MSVCRT_FILE *file, const char *format, ...)
|
||||
{
|
||||
va_list valist;
|
||||
int res;
|
||||
|
@ -106,7 +106,7 @@ int MSVCRT_fscanf(MSVCRT_FILE *file, const char *format, ...)
|
|||
/*********************************************************************
|
||||
* scanf (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_scanf(const char *format, ...)
|
||||
int CDECL MSVCRT_scanf(const char *format, ...)
|
||||
{
|
||||
va_list valist;
|
||||
int res;
|
||||
|
@ -120,7 +120,7 @@ int MSVCRT_scanf(const char *format, ...)
|
|||
/*********************************************************************
|
||||
* 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;
|
||||
int res;
|
||||
|
@ -135,7 +135,7 @@ int MSVCRT_fwscanf(MSVCRT_FILE *file, const MSVCRT_wchar_t *format, ...)
|
|||
/*********************************************************************
|
||||
* wscanf (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_wscanf(const MSVCRT_wchar_t *format, ...)
|
||||
int CDECL MSVCRT_wscanf(const MSVCRT_wchar_t *format, ...)
|
||||
{
|
||||
va_list valist;
|
||||
int res;
|
||||
|
@ -150,7 +150,7 @@ int MSVCRT_wscanf(const MSVCRT_wchar_t *format, ...)
|
|||
/*********************************************************************
|
||||
* sscanf (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_sscanf(const char *str, const char *format, ...)
|
||||
int CDECL MSVCRT_sscanf(const char *str, const char *format, ...)
|
||||
{
|
||||
va_list valist;
|
||||
int res;
|
||||
|
@ -165,7 +165,7 @@ int MSVCRT_sscanf(const char *str, const char *format, ...)
|
|||
/*********************************************************************
|
||||
* 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;
|
||||
int res;
|
||||
|
@ -180,7 +180,7 @@ int MSVCRT_swscanf(const MSVCRT_wchar_t *str, const MSVCRT_wchar_t *format, ...)
|
|||
/*********************************************************************
|
||||
* _cscanf (MSVCRT.@)
|
||||
*/
|
||||
int _cscanf(const char *format, ...)
|
||||
int CDECL _cscanf(const char *format, ...)
|
||||
{
|
||||
va_list valist;
|
||||
int res;
|
||||
|
|
|
@ -48,7 +48,7 @@ char* msvcrt_strndup(const char* buf, unsigned int size)
|
|||
* _mbsdup (MSVCRT.@)
|
||||
* _strdup (MSVCRT.@)
|
||||
*/
|
||||
char* _strdup(const char* str)
|
||||
char* CDECL _strdup(const char* str)
|
||||
{
|
||||
char * ret = MSVCRT_malloc(strlen(str)+1);
|
||||
if (ret) strcpy( ret, str );
|
||||
|
@ -58,7 +58,7 @@ char* _strdup(const char* str)
|
|||
/*********************************************************************
|
||||
* _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)
|
||||
while (*str && len--)
|
||||
|
@ -69,7 +69,7 @@ char* _strnset(char* str, int value, MSVCRT_size_t len)
|
|||
/*********************************************************************
|
||||
* _strrev (MSVCRT.@)
|
||||
*/
|
||||
char* _strrev(char* str)
|
||||
char* CDECL _strrev(char* str)
|
||||
{
|
||||
char * p1;
|
||||
char * p2;
|
||||
|
@ -88,7 +88,7 @@ char* _strrev(char* str)
|
|||
/*********************************************************************
|
||||
* _strset (MSVCRT.@)
|
||||
*/
|
||||
char* _strset(char* str, int value)
|
||||
char* CDECL _strset(char* str, int value)
|
||||
{
|
||||
char *ptr = str;
|
||||
while (*ptr)
|
||||
|
@ -100,7 +100,7 @@ char* _strset(char* str, int value)
|
|||
/*********************************************************************
|
||||
* 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();
|
||||
char *ret;
|
||||
|
@ -121,7 +121,7 @@ char *MSVCRT_strtok( char *str, const char *delim )
|
|||
/*********************************************************************
|
||||
* _swab (MSVCRT.@)
|
||||
*/
|
||||
void MSVCRT__swab(char* src, char* dst, int len)
|
||||
void CDECL MSVCRT__swab(char* src, char* dst, int len)
|
||||
{
|
||||
if (len > 1)
|
||||
{
|
||||
|
@ -140,7 +140,7 @@ void MSVCRT__swab(char* src, char* dst, int len)
|
|||
/*********************************************************************
|
||||
* atof (MSVCRT.@)
|
||||
*/
|
||||
double MSVCRT_atof( const char *str )
|
||||
double CDECL MSVCRT_atof( const char *str )
|
||||
{
|
||||
return atof( str );
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ double MSVCRT_atof( const char *str )
|
|||
/*********************************************************************
|
||||
* strtod (MSVCRT.@)
|
||||
*/
|
||||
double MSVCRT_strtod( const char *str, char **end )
|
||||
double CDECL MSVCRT_strtod( const char *str, char **end )
|
||||
{
|
||||
return strtod( str, end );
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ double MSVCRT_strtod( const char *str, char **end )
|
|||
/*********************************************************************
|
||||
* 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 */
|
||||
return strcoll( str1, str2 );
|
||||
|
@ -165,7 +165,7 @@ int MSVCRT_strcoll( const char* str1, const char* str2 )
|
|||
/*********************************************************************
|
||||
* 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 */
|
||||
return strxfrm( dest, src, len );
|
||||
|
@ -174,7 +174,7 @@ MSVCRT_size_t MSVCRT_strxfrm( char *dest, const char *src, MSVCRT_size_t len )
|
|||
/*********************************************************************
|
||||
* _stricoll (MSVCRT.@)
|
||||
*/
|
||||
INT MSVCRT__stricoll( const char* str1, const char* str2 )
|
||||
int CDECL MSVCRT__stricoll( const char* str1, const char* str2 )
|
||||
{
|
||||
/* FIXME: handle collates */
|
||||
TRACE("str1 %s str2 %s\n", debugstr_a(str1), debugstr_a(str2));
|
||||
|
|
|
@ -71,7 +71,7 @@ static DWORD CALLBACK _beginthread_trampoline(LPVOID arg)
|
|||
/*********************************************************************
|
||||
* _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 */
|
||||
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 */
|
||||
|
@ -96,7 +96,7 @@ MSVCRT_uintptr_t _beginthread(
|
|||
/*********************************************************************
|
||||
* _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 */
|
||||
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 */
|
||||
|
@ -115,7 +115,7 @@ MSVCRT_uintptr_t _beginthreadex(
|
|||
/*********************************************************************
|
||||
* _endthread (MSVCRT.@)
|
||||
*/
|
||||
void _endthread(void)
|
||||
void CDECL _endthread(void)
|
||||
{
|
||||
TRACE("(void)\n");
|
||||
|
||||
|
@ -126,7 +126,7 @@ void _endthread(void)
|
|||
/*********************************************************************
|
||||
* _endthreadex (MSVCRT.@)
|
||||
*/
|
||||
void _endthreadex(
|
||||
void CDECL _endthreadex(
|
||||
unsigned int retval) /* [in] Thread exit code */
|
||||
{
|
||||
TRACE("(%d)\n", retval);
|
||||
|
|
|
@ -71,7 +71,7 @@ static inline void msvcrt_tm_to_unix( struct tm *dest, const struct MSVCRT_tm *s
|
|||
/**********************************************************************
|
||||
* 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;
|
||||
FILETIME lft, uft;
|
||||
|
@ -144,7 +144,7 @@ MSVCRT_time_t MSVCRT_mktime(struct MSVCRT_tm *t)
|
|||
/*********************************************************************
|
||||
* 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();
|
||||
int i;
|
||||
|
@ -192,7 +192,7 @@ struct MSVCRT_tm* MSVCRT_localtime(const MSVCRT_time_t* secs)
|
|||
/*********************************************************************
|
||||
* 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();
|
||||
int i;
|
||||
|
@ -228,7 +228,7 @@ struct MSVCRT_tm* MSVCRT_gmtime(const MSVCRT_time_t* secs)
|
|||
/**********************************************************************
|
||||
* _strdate (MSVCRT.@)
|
||||
*/
|
||||
char* _strdate(char* date)
|
||||
char* CDECL _strdate(char* date)
|
||||
{
|
||||
LPCSTR format = "MM'/'dd'/'yy";
|
||||
|
||||
|
@ -240,7 +240,7 @@ char* _strdate(char* date)
|
|||
/**********************************************************************
|
||||
* _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 };
|
||||
|
||||
|
@ -252,7 +252,7 @@ MSVCRT_wchar_t* _wstrdate(MSVCRT_wchar_t* date)
|
|||
/*********************************************************************
|
||||
* _strtime (MSVCRT.@)
|
||||
*/
|
||||
char* _strtime(char* time)
|
||||
char* CDECL _strtime(char* time)
|
||||
{
|
||||
LPCSTR format = "HH':'mm':'ss";
|
||||
|
||||
|
@ -264,7 +264,7 @@ char* _strtime(char* time)
|
|||
/*********************************************************************
|
||||
* _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 };
|
||||
|
||||
|
@ -276,7 +276,7 @@ MSVCRT_wchar_t* _wstrtime(MSVCRT_wchar_t* time)
|
|||
/*********************************************************************
|
||||
* clock (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_clock_t MSVCRT_clock(void)
|
||||
MSVCRT_clock_t CDECL MSVCRT_clock(void)
|
||||
{
|
||||
FILETIME ftc, fte, ftk, ftu;
|
||||
ULONGLONG utime, ktime;
|
||||
|
@ -296,7 +296,7 @@ MSVCRT_clock_t MSVCRT_clock(void)
|
|||
/*********************************************************************
|
||||
* 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);
|
||||
}
|
||||
|
@ -304,7 +304,7 @@ double MSVCRT_difftime(MSVCRT_time_t time1, MSVCRT_time_t time2)
|
|||
/*********************************************************************
|
||||
* _ftime (MSVCRT.@)
|
||||
*/
|
||||
void _ftime(struct MSVCRT__timeb *buf)
|
||||
void CDECL _ftime(struct MSVCRT__timeb *buf)
|
||||
{
|
||||
TIME_ZONE_INFORMATION tzinfo;
|
||||
FILETIME ft;
|
||||
|
@ -326,7 +326,7 @@ void _ftime(struct MSVCRT__timeb *buf)
|
|||
/*********************************************************************
|
||||
* 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;
|
||||
struct MSVCRT__timeb tb;
|
||||
|
@ -345,7 +345,7 @@ int MSVCRT___daylight = 0;
|
|||
/*********************************************************************
|
||||
* __p_daylight (MSVCRT.@)
|
||||
*/
|
||||
int *MSVCRT___p__daylight(void)
|
||||
int * CDECL MSVCRT___p__daylight(void)
|
||||
{
|
||||
return &MSVCRT___daylight;
|
||||
}
|
||||
|
@ -358,7 +358,7 @@ int MSVCRT__dstbias = 0;
|
|||
/*********************************************************************
|
||||
* __p_dstbias (MSVCRT.@)
|
||||
*/
|
||||
int *__p__dstbias(void)
|
||||
int * CDECL __p__dstbias(void)
|
||||
{
|
||||
return &MSVCRT__dstbias;
|
||||
}
|
||||
|
@ -371,7 +371,7 @@ long MSVCRT___timezone = 0;
|
|||
/*********************************************************************
|
||||
* __p_timezone (MSVCRT.@)
|
||||
*/
|
||||
long *MSVCRT___p__timezone(void)
|
||||
long * CDECL MSVCRT___p__timezone(void)
|
||||
{
|
||||
return &MSVCRT___timezone;
|
||||
}
|
||||
|
@ -390,7 +390,7 @@ char *MSVCRT__tzname[2] = { tzname_std, tzname_dst };
|
|||
/*********************************************************************
|
||||
* __p_tzname (MSVCRT.@)
|
||||
*/
|
||||
char **__p__tzname(void)
|
||||
char ** CDECL __p__tzname(void)
|
||||
{
|
||||
return MSVCRT__tzname;
|
||||
}
|
||||
|
@ -398,7 +398,7 @@ char **__p__tzname(void)
|
|||
/*********************************************************************
|
||||
* _tzset (MSVCRT.@)
|
||||
*/
|
||||
void MSVCRT__tzset(void)
|
||||
void CDECL MSVCRT__tzset(void)
|
||||
{
|
||||
tzset();
|
||||
#if defined(HAVE_TIMEZONE) && defined(HAVE_DAYLIGHT)
|
||||
|
@ -430,8 +430,8 @@ void MSVCRT__tzset(void)
|
|||
/*********************************************************************
|
||||
* strftime (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_size_t MSVCRT_strftime( char *str, MSVCRT_size_t max, const char *format,
|
||||
const struct MSVCRT_tm *mstm )
|
||||
MSVCRT_size_t CDECL MSVCRT_strftime( char *str, MSVCRT_size_t max, const char *format,
|
||||
const struct MSVCRT_tm *mstm )
|
||||
{
|
||||
struct tm tm;
|
||||
|
||||
|
@ -442,8 +442,8 @@ MSVCRT_size_t MSVCRT_strftime( char *str, MSVCRT_size_t max, const char *format,
|
|||
/*********************************************************************
|
||||
* wcsftime (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_size_t MSVCRT_wcsftime( MSVCRT_wchar_t *str, MSVCRT_size_t max,
|
||||
const MSVCRT_wchar_t *format, const struct MSVCRT_tm *mstm )
|
||||
MSVCRT_size_t CDECL MSVCRT_wcsftime( MSVCRT_wchar_t *str, MSVCRT_size_t max,
|
||||
const MSVCRT_wchar_t *format, const struct MSVCRT_tm *mstm )
|
||||
{
|
||||
char *s, *fmt;
|
||||
MSVCRT_size_t len;
|
||||
|
@ -472,7 +472,7 @@ MSVCRT_size_t MSVCRT_wcsftime( MSVCRT_wchar_t *str, MSVCRT_size_t max,
|
|||
/*********************************************************************
|
||||
* 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();
|
||||
struct tm tm;
|
||||
|
@ -494,7 +494,7 @@ char *MSVCRT_asctime(const struct MSVCRT_tm *mstm)
|
|||
/*********************************************************************
|
||||
* _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();
|
||||
struct tm tm;
|
||||
|
@ -516,7 +516,7 @@ MSVCRT_wchar_t *MSVCRT__wasctime(const struct MSVCRT_tm *mstm)
|
|||
/*********************************************************************
|
||||
* 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) );
|
||||
}
|
||||
|
@ -524,7 +524,7 @@ char *MSVCRT_ctime(const MSVCRT_time_t *time)
|
|||
/*********************************************************************
|
||||
* _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) );
|
||||
}
|
||||
|
|
|
@ -1206,9 +1206,9 @@ done:
|
|||
* Success: A string pointing to the unmangled name, allocated with memget.
|
||||
* Failure: NULL.
|
||||
*/
|
||||
char* __unDNameEx(char* buffer, const char* mangled, int buflen,
|
||||
malloc_func_t memget, free_func_t memfree,
|
||||
void* unknown, unsigned short int flags)
|
||||
char* CDECL __unDNameEx(char* buffer, const char* mangled, int buflen,
|
||||
malloc_func_t memget, free_func_t memfree,
|
||||
void* unknown, unsigned short int flags)
|
||||
{
|
||||
struct parsed_symbol sym;
|
||||
const char* result;
|
||||
|
@ -1251,9 +1251,9 @@ char* __unDNameEx(char* buffer, const char* mangled, int buflen,
|
|||
/*********************************************************************
|
||||
* __unDName (MSVCRT.@)
|
||||
*/
|
||||
char* __unDName(char* buffer, const char* mangled, int buflen,
|
||||
malloc_func_t memget, free_func_t memfree,
|
||||
unsigned short int flags)
|
||||
char* CDECL __unDName(char* buffer, const char* mangled, int buflen,
|
||||
malloc_func_t memget, free_func_t memfree,
|
||||
unsigned short int flags)
|
||||
{
|
||||
return __unDNameEx(buffer, mangled, buflen, memget, memfree, NULL, flags);
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ MSVCRT_wchar_t* msvcrt_wstrndup(const MSVCRT_wchar_t *buf, unsigned int size)
|
|||
/*********************************************************************
|
||||
* _wcsdup (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_wchar_t* _wcsdup( const MSVCRT_wchar_t* str )
|
||||
MSVCRT_wchar_t* CDECL _wcsdup( const MSVCRT_wchar_t* str )
|
||||
{
|
||||
MSVCRT_wchar_t* ret = NULL;
|
||||
if (str)
|
||||
|
@ -65,7 +65,7 @@ MSVCRT_wchar_t* _wcsdup( const MSVCRT_wchar_t* str )
|
|||
/*********************************************************************
|
||||
* _wcsicoll (MSVCRT.@)
|
||||
*/
|
||||
INT _wcsicoll( const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2 )
|
||||
INT CDECL _wcsicoll( const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2 )
|
||||
{
|
||||
/* FIXME: handle collates */
|
||||
return strcmpiW( str1, str2 );
|
||||
|
@ -74,7 +74,7 @@ INT _wcsicoll( const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2 )
|
|||
/*********************************************************************
|
||||
* _wcsnset (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_wchar_t* _wcsnset( MSVCRT_wchar_t* str, MSVCRT_wchar_t c, MSVCRT_size_t n )
|
||||
MSVCRT_wchar_t* CDECL _wcsnset( MSVCRT_wchar_t* str, MSVCRT_wchar_t c, MSVCRT_size_t n )
|
||||
{
|
||||
MSVCRT_wchar_t* ret = str;
|
||||
while ((n-- > 0) && *str) *str++ = c;
|
||||
|
@ -84,7 +84,7 @@ MSVCRT_wchar_t* _wcsnset( MSVCRT_wchar_t* str, MSVCRT_wchar_t c, MSVCRT_size_t n
|
|||
/*********************************************************************
|
||||
* _wcsrev (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_wchar_t* _wcsrev( MSVCRT_wchar_t* str )
|
||||
MSVCRT_wchar_t* CDECL _wcsrev( MSVCRT_wchar_t* str )
|
||||
{
|
||||
MSVCRT_wchar_t* ret = str;
|
||||
MSVCRT_wchar_t* end = str + strlenW(str) - 1;
|
||||
|
@ -100,7 +100,7 @@ MSVCRT_wchar_t* _wcsrev( MSVCRT_wchar_t* str )
|
|||
/*********************************************************************
|
||||
* _wcsset (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_wchar_t* _wcsset( MSVCRT_wchar_t* str, MSVCRT_wchar_t c )
|
||||
MSVCRT_wchar_t* CDECL _wcsset( MSVCRT_wchar_t* str, MSVCRT_wchar_t c )
|
||||
{
|
||||
MSVCRT_wchar_t* ret = str;
|
||||
while (*str) *str++ = c;
|
||||
|
@ -110,7 +110,7 @@ MSVCRT_wchar_t* _wcsset( MSVCRT_wchar_t* str, MSVCRT_wchar_t c )
|
|||
/*********************************************************************
|
||||
* wcstod (MSVCRT.@)
|
||||
*/
|
||||
double MSVCRT_wcstod(const MSVCRT_wchar_t* lpszStr, MSVCRT_wchar_t** end)
|
||||
double CDECL MSVCRT_wcstod(const MSVCRT_wchar_t* lpszStr, MSVCRT_wchar_t** end)
|
||||
{
|
||||
const MSVCRT_wchar_t* str = lpszStr;
|
||||
int negative = 0;
|
||||
|
@ -707,8 +707,8 @@ static int pf_vsnprintf( pf_output *out, const WCHAR *format, va_list valist )
|
|||
/*********************************************************************
|
||||
* _vsnprintf (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_vsnprintf( char *str, unsigned int len,
|
||||
const char *format, va_list valist )
|
||||
int CDECL MSVCRT_vsnprintf( char *str, unsigned int len,
|
||||
const char *format, va_list valist )
|
||||
{
|
||||
DWORD sz;
|
||||
LPWSTR formatW = NULL;
|
||||
|
@ -737,7 +737,7 @@ int MSVCRT_vsnprintf( char *str, unsigned int len,
|
|||
/*********************************************************************
|
||||
* _snprintf (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT__snprintf(char *str, unsigned int len, const char *format, ...)
|
||||
int CDECL MSVCRT__snprintf(char *str, unsigned int len, const char *format, ...)
|
||||
{
|
||||
int retval;
|
||||
va_list valist;
|
||||
|
@ -750,8 +750,8 @@ int MSVCRT__snprintf(char *str, unsigned int len, const char *format, ...)
|
|||
/*********************************************************************
|
||||
* _vsnwsprintf (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_vsnwprintf( MSVCRT_wchar_t *str, unsigned int len,
|
||||
const MSVCRT_wchar_t *format, va_list valist )
|
||||
int CDECL MSVCRT_vsnwprintf( MSVCRT_wchar_t *str, unsigned int len,
|
||||
const MSVCRT_wchar_t *format, va_list valist )
|
||||
{
|
||||
pf_output out;
|
||||
|
||||
|
@ -766,7 +766,7 @@ int MSVCRT_vsnwprintf( MSVCRT_wchar_t *str, unsigned int len,
|
|||
/*********************************************************************
|
||||
* _snwprintf (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT__snwprintf( MSVCRT_wchar_t *str, unsigned int len, const MSVCRT_wchar_t *format, ...)
|
||||
int CDECL MSVCRT__snwprintf( MSVCRT_wchar_t *str, unsigned int len, const MSVCRT_wchar_t *format, ...)
|
||||
{
|
||||
int retval;
|
||||
va_list valist;
|
||||
|
@ -779,7 +779,7 @@ int MSVCRT__snwprintf( MSVCRT_wchar_t *str, unsigned int len, const MSVCRT_wchar
|
|||
/*********************************************************************
|
||||
* sprintf (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_sprintf( char *str, const char *format, ... )
|
||||
int CDECL MSVCRT_sprintf( char *str, const char *format, ... )
|
||||
{
|
||||
va_list ap;
|
||||
int r;
|
||||
|
@ -793,7 +793,7 @@ int MSVCRT_sprintf( char *str, const char *format, ... )
|
|||
/*********************************************************************
|
||||
* swprintf (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_swprintf( MSVCRT_wchar_t *str, const MSVCRT_wchar_t *format, ... )
|
||||
int CDECL MSVCRT_swprintf( MSVCRT_wchar_t *str, const MSVCRT_wchar_t *format, ... )
|
||||
{
|
||||
va_list ap;
|
||||
int r;
|
||||
|
@ -807,7 +807,7 @@ int MSVCRT_swprintf( MSVCRT_wchar_t *str, const MSVCRT_wchar_t *format, ... )
|
|||
/*********************************************************************
|
||||
* vswprintf (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_vswprintf( MSVCRT_wchar_t* str, const MSVCRT_wchar_t* format, va_list args )
|
||||
int CDECL MSVCRT_vswprintf( MSVCRT_wchar_t* str, const MSVCRT_wchar_t* format, va_list args )
|
||||
{
|
||||
return MSVCRT_vsnwprintf( str, INT_MAX, format, args );
|
||||
}
|
||||
|
@ -815,7 +815,7 @@ int MSVCRT_vswprintf( MSVCRT_wchar_t* str, const MSVCRT_wchar_t* format, va_list
|
|||
/*********************************************************************
|
||||
* wcscoll (MSVCRT.@)
|
||||
*/
|
||||
int MSVCRT_wcscoll( const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2 )
|
||||
int CDECL MSVCRT_wcscoll( const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2 )
|
||||
{
|
||||
/* FIXME: handle collates */
|
||||
return strcmpW( str1, str2 );
|
||||
|
@ -824,7 +824,7 @@ int MSVCRT_wcscoll( const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2 )
|
|||
/*********************************************************************
|
||||
* wcspbrk (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_wchar_t* MSVCRT_wcspbrk( const MSVCRT_wchar_t* str, const MSVCRT_wchar_t* accept )
|
||||
MSVCRT_wchar_t* CDECL MSVCRT_wcspbrk( const MSVCRT_wchar_t* str, const MSVCRT_wchar_t* accept )
|
||||
{
|
||||
const MSVCRT_wchar_t* p;
|
||||
while (*str)
|
||||
|
@ -838,7 +838,7 @@ MSVCRT_wchar_t* MSVCRT_wcspbrk( const MSVCRT_wchar_t* str, const MSVCRT_wchar_t*
|
|||
/*********************************************************************
|
||||
* wcstok (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_wchar_t *MSVCRT_wcstok( MSVCRT_wchar_t *str, const MSVCRT_wchar_t *delim )
|
||||
MSVCRT_wchar_t * CDECL MSVCRT_wcstok( MSVCRT_wchar_t *str, const MSVCRT_wchar_t *delim )
|
||||
{
|
||||
thread_data_t *data = msvcrt_get_thread_data();
|
||||
MSVCRT_wchar_t *ret;
|
||||
|
@ -859,7 +859,7 @@ MSVCRT_wchar_t *MSVCRT_wcstok( MSVCRT_wchar_t *str, const MSVCRT_wchar_t *delim
|
|||
/*********************************************************************
|
||||
* wctomb (MSVCRT.@)
|
||||
*/
|
||||
INT MSVCRT_wctomb( char *dst, MSVCRT_wchar_t ch )
|
||||
INT CDECL MSVCRT_wctomb( char *dst, MSVCRT_wchar_t ch )
|
||||
{
|
||||
return WideCharToMultiByte( CP_ACP, 0, &ch, 1, dst, 6, NULL, NULL );
|
||||
}
|
||||
|
@ -867,7 +867,7 @@ INT MSVCRT_wctomb( char *dst, MSVCRT_wchar_t ch )
|
|||
/*********************************************************************
|
||||
* iswalnum (MSVCRT.@)
|
||||
*/
|
||||
INT MSVCRT_iswalnum( MSVCRT_wchar_t wc )
|
||||
INT CDECL MSVCRT_iswalnum( MSVCRT_wchar_t wc )
|
||||
{
|
||||
return isalnumW( wc );
|
||||
}
|
||||
|
@ -875,7 +875,7 @@ INT MSVCRT_iswalnum( MSVCRT_wchar_t wc )
|
|||
/*********************************************************************
|
||||
* iswalpha (MSVCRT.@)
|
||||
*/
|
||||
INT MSVCRT_iswalpha( MSVCRT_wchar_t wc )
|
||||
INT CDECL MSVCRT_iswalpha( MSVCRT_wchar_t wc )
|
||||
{
|
||||
return isalphaW( wc );
|
||||
}
|
||||
|
@ -883,7 +883,7 @@ INT MSVCRT_iswalpha( MSVCRT_wchar_t wc )
|
|||
/*********************************************************************
|
||||
* iswcntrl (MSVCRT.@)
|
||||
*/
|
||||
INT MSVCRT_iswcntrl( MSVCRT_wchar_t wc )
|
||||
INT CDECL MSVCRT_iswcntrl( MSVCRT_wchar_t wc )
|
||||
{
|
||||
return iscntrlW( wc );
|
||||
}
|
||||
|
@ -891,7 +891,7 @@ INT MSVCRT_iswcntrl( MSVCRT_wchar_t wc )
|
|||
/*********************************************************************
|
||||
* iswdigit (MSVCRT.@)
|
||||
*/
|
||||
INT MSVCRT_iswdigit( MSVCRT_wchar_t wc )
|
||||
INT CDECL MSVCRT_iswdigit( MSVCRT_wchar_t wc )
|
||||
{
|
||||
return isdigitW( wc );
|
||||
}
|
||||
|
@ -899,7 +899,7 @@ INT MSVCRT_iswdigit( MSVCRT_wchar_t wc )
|
|||
/*********************************************************************
|
||||
* iswgraph (MSVCRT.@)
|
||||
*/
|
||||
INT MSVCRT_iswgraph( MSVCRT_wchar_t wc )
|
||||
INT CDECL MSVCRT_iswgraph( MSVCRT_wchar_t wc )
|
||||
{
|
||||
return isgraphW( wc );
|
||||
}
|
||||
|
@ -907,7 +907,7 @@ INT MSVCRT_iswgraph( MSVCRT_wchar_t wc )
|
|||
/*********************************************************************
|
||||
* iswlower (MSVCRT.@)
|
||||
*/
|
||||
INT MSVCRT_iswlower( MSVCRT_wchar_t wc )
|
||||
INT CDECL MSVCRT_iswlower( MSVCRT_wchar_t wc )
|
||||
{
|
||||
return islowerW( wc );
|
||||
}
|
||||
|
@ -915,7 +915,7 @@ INT MSVCRT_iswlower( MSVCRT_wchar_t wc )
|
|||
/*********************************************************************
|
||||
* iswprint (MSVCRT.@)
|
||||
*/
|
||||
INT MSVCRT_iswprint( MSVCRT_wchar_t wc )
|
||||
INT CDECL MSVCRT_iswprint( MSVCRT_wchar_t wc )
|
||||
{
|
||||
return isprintW( wc );
|
||||
}
|
||||
|
@ -923,7 +923,7 @@ INT MSVCRT_iswprint( MSVCRT_wchar_t wc )
|
|||
/*********************************************************************
|
||||
* iswpunct (MSVCRT.@)
|
||||
*/
|
||||
INT MSVCRT_iswpunct( MSVCRT_wchar_t wc )
|
||||
INT CDECL MSVCRT_iswpunct( MSVCRT_wchar_t wc )
|
||||
{
|
||||
return ispunctW( wc );
|
||||
}
|
||||
|
@ -931,7 +931,7 @@ INT MSVCRT_iswpunct( MSVCRT_wchar_t wc )
|
|||
/*********************************************************************
|
||||
* iswspace (MSVCRT.@)
|
||||
*/
|
||||
INT MSVCRT_iswspace( MSVCRT_wchar_t wc )
|
||||
INT CDECL MSVCRT_iswspace( MSVCRT_wchar_t wc )
|
||||
{
|
||||
return isspaceW( wc );
|
||||
}
|
||||
|
@ -939,7 +939,7 @@ INT MSVCRT_iswspace( MSVCRT_wchar_t wc )
|
|||
/*********************************************************************
|
||||
* iswupper (MSVCRT.@)
|
||||
*/
|
||||
INT MSVCRT_iswupper( MSVCRT_wchar_t wc )
|
||||
INT CDECL MSVCRT_iswupper( MSVCRT_wchar_t wc )
|
||||
{
|
||||
return isupperW( wc );
|
||||
}
|
||||
|
@ -947,7 +947,7 @@ INT MSVCRT_iswupper( MSVCRT_wchar_t wc )
|
|||
/*********************************************************************
|
||||
* iswxdigit (MSVCRT.@)
|
||||
*/
|
||||
INT MSVCRT_iswxdigit( MSVCRT_wchar_t wc )
|
||||
INT CDECL MSVCRT_iswxdigit( MSVCRT_wchar_t wc )
|
||||
{
|
||||
return isxdigitW( wc );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue