From 203a8f8290b890304a272e06346ef311332689c2 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Tue, 10 Apr 2001 21:16:07 +0000 Subject: [PATCH] Adjust the 'MSVCRT_' prefix to match the msvcrt headers Prefix internal methods with 'msvcrt_' instead of 'MSVCRT_', '__MSVCRT_', etc. Remove '_cdecl', it's unnecessary --- dlls/msvcrt/console.c | 60 ++--- dlls/msvcrt/cpp.c | 62 ++--- dlls/msvcrt/ctype.c | 107 +++++---- dlls/msvcrt/data.c | 54 ++--- dlls/msvcrt/dir.c | 112 ++++----- dlls/msvcrt/environ.c | 10 +- dlls/msvcrt/errno.c | 14 +- dlls/msvcrt/except.c | 50 ++-- dlls/msvcrt/exit.c | 34 +-- dlls/msvcrt/file.c | 354 ++++++++++++++-------------- dlls/msvcrt/heap.c | 34 +-- dlls/msvcrt/locale.c | 18 +- dlls/msvcrt/main.c | 60 ++--- dlls/msvcrt/math.c | 140 +++++------ dlls/msvcrt/mbcs.c | 96 ++++---- dlls/msvcrt/misc.c | 22 +- dlls/msvcrt/msvcrt.h | 16 +- dlls/msvcrt/msvcrt.spec | 499 ++++++++++++++++++++-------------------- dlls/msvcrt/process.c | 42 ++-- dlls/msvcrt/string.c | 24 +- dlls/msvcrt/thread.c | 12 +- dlls/msvcrt/time.c | 18 +- dlls/msvcrt/wcs.c | 58 ++--- 23 files changed, 949 insertions(+), 947 deletions(-) diff --git a/dlls/msvcrt/console.c b/dlls/msvcrt/console.c index cd30deade24..aa02a6096fe 100644 --- a/dlls/msvcrt/console.c +++ b/dlls/msvcrt/console.c @@ -21,7 +21,7 @@ static HANDLE MSVCRT_console_out= INVALID_HANDLE_VALUE; static int __MSVCRT_console_buffer = MSVCRT_EOF; /* INTERNAL: Initialise console handles */ -void MSVCRT_init_console(void) +void msvcrt_init_console(void) { TRACE(":Opening console handles\n"); @@ -41,7 +41,7 @@ void MSVCRT_init_console(void) } /* INTERNAL: Free console handles */ -void MSVCRT_free_console(void) +void msvcrt_free_console(void) { TRACE(":Closing console handles\n"); CloseHandle(MSVCRT_console_in); @@ -51,7 +51,7 @@ void MSVCRT_free_console(void) /********************************************************************* * _cputs (MSVCRT.@) */ -int __cdecl MSVCRT__cputs(const char * str) +int _cputs(const char* str) { DWORD count; int retval = MSVCRT_EOF; @@ -67,7 +67,7 @@ int __cdecl MSVCRT__cputs(const char * str) /********************************************************************* * _getch (MSVCRT.@) */ -int __cdecl MSVCRT__getch(void) +int _getch(void) { int retval = MSVCRT_EOF; @@ -112,7 +112,7 @@ int __cdecl MSVCRT__getch(void) /********************************************************************* * _putch (MSVCRT.@) */ -int __cdecl MSVCRT__putch(int c) +int _putch(int c) { int retval = MSVCRT_EOF; DWORD count; @@ -126,13 +126,13 @@ int __cdecl MSVCRT__putch(int c) /********************************************************************* * _getche (MSVCRT.@) */ -int __cdecl MSVCRT__getche(void) +int _getche(void) { int retval; LOCK_CONSOLE; - retval = MSVCRT__getch(); + retval = _getch(); if (retval != MSVCRT_EOF) - retval = MSVCRT__putch(retval); + retval = _putch(retval); UNLOCK_CONSOLE; return retval; } @@ -140,7 +140,7 @@ int __cdecl MSVCRT__getche(void) /********************************************************************* * _cgets (MSVCRT.@) */ -char *__cdecl MSVCRT__cgets(char *str) +char* _cgets(char* str) { char *buf = str + 2; int c; @@ -149,7 +149,7 @@ char *__cdecl MSVCRT__cgets(char *str) LOCK_CONSOLE; do { - if (str[1] >= str[0] || (str[1]++, c = MSVCRT__getche()) == MSVCRT_EOF || c == '\n') + if (str[1] >= str[0] || (str[1]++, c = _getche()) == MSVCRT_EOF || c == '\n') break; *buf++ = c & 0xff; } while (1); @@ -161,7 +161,7 @@ char *__cdecl MSVCRT__cgets(char *str) /********************************************************************* * _ungetch (MSVCRT.@) */ -int __cdecl MSVCRT__ungetch(int c) +int _ungetch(int c) { int retval = MSVCRT_EOF; LOCK_CONSOLE; @@ -174,7 +174,7 @@ int __cdecl MSVCRT__ungetch(int c) /********************************************************************* * _cscanf (MSVCRT.@) */ -int __cdecl MSVCRT__cscanf( const char * format, ... ) +int _cscanf(const char* format, ...) { /* NOTE: If you extend this function, extend MSVCRT_fscanf in file.c too */ int rd = 0; @@ -184,12 +184,12 @@ int __cdecl MSVCRT__cscanf( const char * format, ... ) WARN("\"%s\": semi-stub\n", format); va_start(ap, format); LOCK_CONSOLE; - nch = MSVCRT__getch(); + nch = _getch(); while (*format) { if (*format == ' ') { /* skip whitespace */ while ((nch!=MSVCRT_EOF) && isspace(nch)) - nch = MSVCRT__getch(); + nch = _getch(); } else if (*format == '%') { int st = 0; @@ -200,10 +200,10 @@ int __cdecl MSVCRT__cscanf( const char * format, ... ) int cur = 0; /* skip initial whitespace */ while ((nch!=MSVCRT_EOF) && isspace(nch)) - nch = MSVCRT__getch(); + nch = _getch(); /* get sign and first digit */ if (nch == '-') { - nch = MSVCRT__getch(); + nch = _getch(); if (isdigit(nch)) cur = -(nch - '0'); else break; @@ -212,11 +212,11 @@ int __cdecl MSVCRT__cscanf( const char * format, ... ) cur = nch - '0'; else break; } - nch = MSVCRT__getch(); + nch = _getch(); /* read until no more digits */ while ((nch!=MSVCRT_EOF) && isdigit(nch)) { cur = cur*10 + (nch - '0'); - nch = MSVCRT__getch(); + nch = _getch(); } st = 1; *val = cur; @@ -227,10 +227,10 @@ int __cdecl MSVCRT__cscanf( const char * format, ... ) float cur = 0; /* skip initial whitespace */ while ((nch!=MSVCRT_EOF) && isspace(nch)) - nch = MSVCRT__getch(); + nch = _getch(); /* get sign and first digit */ if (nch == '-') { - nch = MSVCRT__getch(); + nch = _getch(); if (isdigit(nch)) cur = -(nch - '0'); else break; @@ -242,16 +242,16 @@ int __cdecl MSVCRT__cscanf( const char * format, ... ) /* read until no more digits */ while ((nch!=MSVCRT_EOF) && isdigit(nch)) { cur = cur*10 + (nch - '0'); - nch = MSVCRT__getch(); + nch = _getch(); } if (nch == '.') { /* handle decimals */ float dec = 1; - nch = MSVCRT__getch(); + nch = _getch(); while ((nch!=MSVCRT_EOF) && isdigit(nch)) { dec /= 10; cur += dec * (nch - '0'); - nch = MSVCRT__getch(); + nch = _getch(); } } st = 1; @@ -263,11 +263,11 @@ int __cdecl MSVCRT__cscanf( const char * format, ... ) char*sptr = str; /* skip initial whitespace */ while ((nch!=MSVCRT_EOF) && isspace(nch)) - nch = MSVCRT__getch(); + nch = _getch(); /* read until whitespace */ while ((nch!=MSVCRT_EOF) && !isspace(nch)) { *sptr++ = nch; st++; - nch = MSVCRT__getch(); + nch = _getch(); } /* terminate */ *sptr = 0; @@ -282,13 +282,13 @@ int __cdecl MSVCRT__cscanf( const char * format, ... ) else { /* check for character match */ if (nch == *format) - nch = MSVCRT__getch(); + nch = _getch(); else break; } format++; } if (nch != MSVCRT_EOF) - MSVCRT__ungetch(nch); + _ungetch(nch); UNLOCK_CONSOLE; va_end(ap); TRACE("returning %d\n", rd); @@ -298,7 +298,7 @@ int __cdecl MSVCRT__cscanf( const char * format, ... ) /********************************************************************* * _kbhit (MSVCRT.@) */ -int __cdecl MSVCRT__kbhit(void) +int _kbhit(void) { int retval = 0; @@ -338,7 +338,7 @@ extern int snprintf(char *, int, const char *, ...); /********************************************************************* * _cprintf (MSVCRT.@) */ -int __cdecl MSVCRT__cprintf( const char * format, ... ) +int _cprintf(const char* format, ...) { char buf[2048], *mem = buf; int written, resize = sizeof(buf), retval; @@ -362,7 +362,7 @@ int __cdecl MSVCRT__cprintf( const char * format, ... ) } va_end(valist); LOCK_CONSOLE; - retval = MSVCRT__cputs( mem ); + retval = _cputs( mem ); UNLOCK_CONSOLE; if (mem != buf) MSVCRT_free (mem); diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c index bf80ba2b1d9..4d8117ce055 100644 --- a/dlls/msvcrt/cpp.c +++ b/dlls/msvcrt/cpp.c @@ -8,9 +8,9 @@ DEFAULT_DEBUG_CHANNEL(msvcrt); -void __cdecl MSVCRT__purecall(void); +void _purecall(void); -typedef void (__cdecl *v_table_ptr)(); +typedef void (*v_table_ptr)(); static v_table_ptr exception_vtable[2]; static v_table_ptr bad_typeid_vtable[3]; @@ -50,7 +50,7 @@ typedef struct __type_info /****************************************************************** * exception_ctor (MSVCRT.@) */ -void __cdecl MSVCRT_exception_ctor(exception * _this, const char ** name) +void MSVCRT_exception_ctor(exception * _this, const char ** name) { TRACE("(%p %s)\n",_this,*name); _this->vtable = exception_vtable; @@ -62,7 +62,7 @@ void __cdecl MSVCRT_exception_ctor(exception * _this, const char ** name) /****************************************************************** * exception_copy_ctor (MSVCRT.@) */ -void __cdecl MSVCRT_exception_copy_ctor(exception * _this, const exception * rhs) +void MSVCRT_exception_copy_ctor(exception * _this, const exception * rhs) { TRACE("(%p %p)\n",_this,rhs); if (_this != rhs) @@ -73,7 +73,7 @@ void __cdecl MSVCRT_exception_copy_ctor(exception * _this, const exception * rhs /****************************************************************** * exception_default_ctor (MSVCRT.@) */ -void __cdecl MSVCRT_exception_default_ctor(exception * _this) +void MSVCRT_exception_default_ctor(exception * _this) { TRACE("(%p)\n",_this); _this->vtable = exception_vtable; @@ -84,7 +84,7 @@ void __cdecl MSVCRT_exception_default_ctor(exception * _this) /****************************************************************** * exception_dtor (MSVCRT.@) */ -void __cdecl MSVCRT_exception_dtor(exception * _this) +void MSVCRT_exception_dtor(exception * _this) { TRACE("(%p)\n",_this); } @@ -92,7 +92,7 @@ void __cdecl MSVCRT_exception_dtor(exception * _this) /****************************************************************** * exception_opequals (MSVCRT.@) */ -exception * __cdecl MSVCRT_exception_opequals(exception * _this, const exception * rhs) +exception * MSVCRT_exception_opequals(exception * _this, const exception * rhs) { TRACE("(%p %p)\n",_this,rhs); memcpy (_this, rhs, sizeof (*_this)); @@ -103,20 +103,20 @@ exception * __cdecl MSVCRT_exception_opequals(exception * _this, const exception /****************************************************************** * exception__unknown_E (MSVCRT.@) */ -void * __cdecl MSVCRT_exception__unknown_E(exception * _this, unsigned int arg1) +void * MSVCRT_exception__unknown_E(exception * _this, unsigned int arg1) { TRACE("(%p %d)\n",_this,arg1); - MSVCRT__purecall(); + _purecall(); return NULL; } /****************************************************************** * exception__unknown_G (MSVCRT.@) */ -void * __cdecl MSVCRT_exception__unknown_G(exception * _this, unsigned int arg1) +void * MSVCRT_exception__unknown_G(exception * _this, unsigned int arg1) { TRACE("(%p %d)\n",_this,arg1); - MSVCRT__purecall(); + _purecall(); return NULL; } @@ -133,7 +133,7 @@ const char * __stdcall MSVCRT_exception_what(exception * _this) /****************************************************************** * bad_typeid_copy_ctor (MSVCRT.@) */ -void __cdecl MSVCRT_bad_typeid_copy_ctor(bad_typeid * _this, const bad_typeid * rhs) +void MSVCRT_bad_typeid_copy_ctor(bad_typeid * _this, const bad_typeid * rhs) { TRACE("(%p %p)\n",_this,rhs); MSVCRT_exception_copy_ctor(&_this->base,&rhs->base); @@ -142,7 +142,7 @@ void __cdecl MSVCRT_bad_typeid_copy_ctor(bad_typeid * _this, const bad_typeid * /****************************************************************** * bad_typeid_ctor (MSVCRT.@) */ -void __cdecl MSVCRT_bad_typeid_ctor(bad_typeid * _this, const char * name) +void MSVCRT_bad_typeid_ctor(bad_typeid * _this, const char * name) { TRACE("(%p %s)\n",_this,name); MSVCRT_exception_ctor(&_this->base, &name); @@ -152,7 +152,7 @@ void __cdecl MSVCRT_bad_typeid_ctor(bad_typeid * _this, const char * name) /****************************************************************** * bad_typeid_dtor (MSVCRT.@) */ -void __cdecl MSVCRT_bad_typeid_dtor(bad_typeid * _this) +void MSVCRT_bad_typeid_dtor(bad_typeid * _this) { TRACE("(%p)\n",_this); MSVCRT_exception_dtor(&_this->base); @@ -161,7 +161,7 @@ void __cdecl MSVCRT_bad_typeid_dtor(bad_typeid * _this) /****************************************************************** * bad_typeid_opequals (MSVCRT.@) */ -bad_typeid * __cdecl MSVCRT_bad_typeid_opequals(bad_typeid * _this, const bad_typeid * rhs) +bad_typeid * MSVCRT_bad_typeid_opequals(bad_typeid * _this, const bad_typeid * rhs) { TRACE("(%p %p)\n",_this,rhs); MSVCRT_exception_copy_ctor(&_this->base,&rhs->base); @@ -171,7 +171,7 @@ bad_typeid * __cdecl MSVCRT_bad_typeid_opequals(bad_typeid * _this, const bad_ty /****************************************************************** * __non_rtti_object_copy_ctor (MSVCRT.@) */ -void __cdecl MSVCRT___non_rtti_object_copy_ctor(__non_rtti_object * _this, +void MSVCRT___non_rtti_object_copy_ctor(__non_rtti_object * _this, const __non_rtti_object * rhs) { TRACE("(%p %p)\n",_this,rhs); @@ -181,7 +181,7 @@ void __cdecl MSVCRT___non_rtti_object_copy_ctor(__non_rtti_object * _this, /****************************************************************** * __non_rtti_object_ctor (MSVCRT.@) */ -void __cdecl MSVCRT___non_rtti_object_ctor(__non_rtti_object * _this, +void MSVCRT___non_rtti_object_ctor(__non_rtti_object * _this, const char * name) { TRACE("(%p %s)\n",_this,name); @@ -192,7 +192,7 @@ void __cdecl MSVCRT___non_rtti_object_ctor(__non_rtti_object * _this, /****************************************************************** * __non_rtti_object_dtor (MSVCRT.@) */ -void __cdecl MSVCRT___non_rtti_object_dtor(__non_rtti_object * _this) +void MSVCRT___non_rtti_object_dtor(__non_rtti_object * _this) { TRACE("(%p)\n",_this); MSVCRT_bad_typeid_dtor(&_this->base); @@ -201,7 +201,7 @@ void __cdecl MSVCRT___non_rtti_object_dtor(__non_rtti_object * _this) /****************************************************************** * __non_rtti_object_opequals (MSVCRT.@) */ -__non_rtti_object * __cdecl MSVCRT___non_rtti_object_opequals(__non_rtti_object * _this, +__non_rtti_object * MSVCRT___non_rtti_object_opequals(__non_rtti_object * _this, const __non_rtti_object *rhs) { TRACE("(%p %p)\n",_this,rhs); @@ -213,27 +213,27 @@ __non_rtti_object * __cdecl MSVCRT___non_rtti_object_opequals(__non_rtti_object /****************************************************************** * __non_rtti_object__unknown_E (MSVCRT.@) */ -void * __cdecl MSVCRT___non_rtti_object__unknown_E(__non_rtti_object * _this, unsigned int arg1) +void * MSVCRT___non_rtti_object__unknown_E(__non_rtti_object * _this, unsigned int arg1) { TRACE("(%p %d)\n",_this,arg1); - MSVCRT__purecall(); + _purecall(); return NULL; } /****************************************************************** * __non_rtti_object__unknown_G (MSVCRT.@) */ -void * __cdecl MSVCRT___non_rtti_object__unknown_G(__non_rtti_object * _this, unsigned int arg1) +void * MSVCRT___non_rtti_object__unknown_G(__non_rtti_object * _this, unsigned int arg1) { TRACE("(%p %d)\n",_this,arg1); - MSVCRT__purecall(); + _purecall(); return NULL; } /****************************************************************** * bad_cast_ctor (MSVCRT.@) */ -void __cdecl MSVCRT_bad_cast_ctor(bad_cast * _this, const char ** name) +void MSVCRT_bad_cast_ctor(bad_cast * _this, const char ** name) { TRACE("(%p %s)\n",_this,*name); MSVCRT_exception_ctor(&_this->base, name); @@ -243,7 +243,7 @@ void __cdecl MSVCRT_bad_cast_ctor(bad_cast * _this, const char ** name) /****************************************************************** * bad_cast_copy_ctor (MSVCRT.@) */ -void __cdecl MSVCRT_bad_cast_copy_ctor(bad_cast * _this, const bad_cast * rhs) +void MSVCRT_bad_cast_copy_ctor(bad_cast * _this, const bad_cast * rhs) { TRACE("(%p %p)\n",_this,rhs); MSVCRT_exception_copy_ctor(&_this->base,&rhs->base); @@ -252,7 +252,7 @@ void __cdecl MSVCRT_bad_cast_copy_ctor(bad_cast * _this, const bad_cast * rhs) /****************************************************************** * bad_cast_dtor (MSVCRT.@) */ -void __cdecl MSVCRT_bad_cast_dtor(bad_cast * _this) +void MSVCRT_bad_cast_dtor(bad_cast * _this) { TRACE("(%p)\n",_this); MSVCRT_exception_dtor(&_this->base); @@ -261,7 +261,7 @@ void __cdecl MSVCRT_bad_cast_dtor(bad_cast * _this) /****************************************************************** * bad_cast_opequals (MSVCRT.@) */ -bad_cast * __cdecl MSVCRT_bad_cast_opequals(bad_cast * _this, const bad_cast * rhs) +bad_cast * MSVCRT_bad_cast_opequals(bad_cast * _this, const bad_cast * rhs) { TRACE("(%p %p)\n",_this,rhs); MSVCRT_exception_copy_ctor(&_this->base,&rhs->base); @@ -289,7 +289,7 @@ int __stdcall MSVCRT_type_info_opnot_equals(type_info * _this, const type_info * /****************************************************************** * type_info_dtor (MSVCRT.@) */ -void __cdecl MSVCRT_type_info_dtor(type_info * _this) +void MSVCRT_type_info_dtor(type_info * _this) { TRACE("(%p)\n",_this); if (_this->data) @@ -318,14 +318,14 @@ const char * __stdcall MSVCRT_type_info_raw_name(type_info * _this) /* INTERNAL: Set up vtables * FIXME:should be static, cope with versions? */ -void MSVCRT_init_vtables(void) +void msvcrt_init_vtables(void) { exception_vtable[0] = MSVCRT_exception_dtor; exception_vtable[1] = (void*)MSVCRT_exception_what; bad_typeid_vtable[0] = MSVCRT_bad_typeid_dtor; bad_typeid_vtable[1] = exception_vtable[1]; - bad_typeid_vtable[2] = MSVCRT__purecall; /* FIXME */ + bad_typeid_vtable[2] = _purecall; /* FIXME */ __non_rtti_object_vtable[0] = MSVCRT___non_rtti_object_dtor; __non_rtti_object_vtable[1] = bad_typeid_vtable[1]; @@ -333,7 +333,7 @@ void MSVCRT_init_vtables(void) bad_cast_vtable[0] = MSVCRT_bad_cast_dtor; bad_cast_vtable[1] = exception_vtable[1]; - bad_cast_vtable[2] = MSVCRT__purecall; /* FIXME */ + bad_cast_vtable[2] = _purecall; /* FIXME */ type_info_vtable[0] = MSVCRT_type_info_dtor; diff --git a/dlls/msvcrt/ctype.c b/dlls/msvcrt/ctype.c index c1273ec2790..07f4b98c187 100644 --- a/dlls/msvcrt/ctype.c +++ b/dlls/msvcrt/ctype.c @@ -8,29 +8,29 @@ DEFAULT_DEBUG_CHANNEL(msvcrt); /* ASCII char classification table - binary compatible */ -#define MSVCRT_UPPER C1_UPPER -#define MSVCRT_LOWER C1_LOWER -#define MSVCRT_DIGIT C1_DIGIT -#define MSVCRT_SPACE C1_SPACE -#define MSVCRT_PUNCT C1_PUNCT -#define MSVCRT_CONTROL C1_CNTRL -#define MSVCRT_BLANK C1_BLANK -#define MSVCRT_HEX C1_XDIGIT -#define MSVCRT_LEADBYTE 0x8000 -#define MSVCRT_ALPHA (C1_ALPHA|MSVCRT_UPPER|MSVCRT_LOWER) +#define _UPPER C1_UPPER +#define _LOWER C1_LOWER +#define _DIGIT C1_DIGIT +#define _SPACE C1_SPACE +#define _PUNCT C1_PUNCT +#define _CONTROL C1_CNTRL +#define _BLANK C1_BLANK +#define _HEX C1_XDIGIT +#define _LEADBYTE 0x8000 +#define _ALPHA (C1_ALPHA|_UPPER|_LOWER) -#define _C_ MSVCRT_CONTROL -#define _S_ MSVCRT_SPACE -#define _P_ MSVCRT_PUNCT -#define _D_ MSVCRT_DIGIT -#define _H_ MSVCRT_HEX -#define _U_ MSVCRT_UPPER -#define _L_ MSVCRT_LOWER +#define _C_ _CONTROL +#define _S_ _SPACE +#define _P_ _PUNCT +#define _D_ _DIGIT +#define _H_ _HEX +#define _U_ _UPPER +#define _L_ _LOWER WORD MSVCRT__ctype [257] = { 0, _C_, _C_, _C_, _C_, _C_, _C_, _C_, _C_, _C_, _S_|_C_, _S_|_C_, _S_|_C_, _S_|_C_, _S_|_C_, _C_, _C_, _C_, _C_, _C_, _C_, _C_, _C_, - _C_, _C_, _C_, _C_, _C_, _C_, _C_, _C_, _C_, _C_, _S_|MSVCRT_BLANK, + _C_, _C_, _C_, _C_, _C_, _C_, _C_, _C_, _C_, _C_, _S_|_BLANK, _P_, _P_, _P_, _P_, _P_, _P_, _P_, _P_, _P_, _P_, _P_, _P_, _P_, _P_, _P_, _D_|_H_, _D_|_H_, _D_|_H_, _D_|_H_, _D_|_H_, _D_|_H_, _D_|_H_, _D_|_H_, _D_|_H_, _D_|_H_, _P_, _P_, _P_, _P_, _P_, _P_, _P_, _U_|_H_, @@ -62,9 +62,9 @@ extern int MSVCRT___mb_cur_max; extern LCID MSVCRT_current_lc_all_lcid; /********************************************************************* - * MSVCRT___p__pctype (MSVCRT.@) + * __p__pctype (MSVCRT.@) */ -WORD** MSVCRT___p__pctype(void) +WORD** __p__pctype(void) { return &MSVCRT__pctype; } @@ -72,7 +72,7 @@ WORD** MSVCRT___p__pctype(void) /********************************************************************* * _isctype (MSVCRT.@) */ -int __cdecl MSVCRT__isctype(int c, int type) +int _isctype(int c, int type) { if (c >= -1 && c <= 255) return MSVCRT__pctype[c] & type; @@ -83,7 +83,7 @@ int __cdecl MSVCRT__isctype(int c, int type) WORD typeInfo; char convert[3], *pconv = convert; - if (MSVCRT__pctype[(UINT)c >> 8] & MSVCRT_LEADBYTE) + if (MSVCRT__pctype[(UINT)c >> 8] & _LEADBYTE) *pconv++ = (UINT)c >> 8; *pconv++ = c & 0xff; *pconv = 0; @@ -98,104 +98,103 @@ int __cdecl MSVCRT__isctype(int c, int type) /********************************************************************* * isalnum (MSVCRT.@) */ -int __cdecl MSVCRT_isalnum(int c) +int MSVCRT_isalnum(int c) { - return MSVCRT__isctype( c,MSVCRT_ALPHA | MSVCRT_DIGIT ); + return _isctype( c, _ALPHA | _DIGIT ); } /********************************************************************* * isalpha (MSVCRT.@) */ -int __cdecl MSVCRT_isalpha(int c) +int MSVCRT_isalpha(int c) { - return MSVCRT__isctype( c, MSVCRT_ALPHA ); + return _isctype( c, _ALPHA ); } /********************************************************************* * iscntrl (MSVCRT.@) */ -int __cdecl MSVCRT_iscntrl(int c) +int MSVCRT_iscntrl(int c) { - return MSVCRT__isctype( c, MSVCRT_CONTROL ); + return _isctype( c, _CONTROL ); } /********************************************************************* * isdigit (MSVCRT.@) */ -int __cdecl MSVCRT_isdigit(int c) +int MSVCRT_isdigit(int c) { - return MSVCRT__isctype( c, MSVCRT_DIGIT ); + return _isctype( c, _DIGIT ); } /********************************************************************* * isgraph (MSVCRT.@) */ -int __cdecl MSVCRT_isgraph(int c) +int MSVCRT_isgraph(int c) { - return MSVCRT__isctype( c, MSVCRT_ALPHA | MSVCRT_DIGIT | MSVCRT_PUNCT ); + return _isctype( c, _ALPHA | _DIGIT | _PUNCT ); } /********************************************************************* * isleadbyte (MSVCRT.@) */ -int __cdecl MSVCRT_isleadbyte(int c) +int MSVCRT_isleadbyte(int c) { - return MSVCRT__isctype( c, MSVCRT_LEADBYTE ); + return _isctype( c, _LEADBYTE ); } /********************************************************************* * islower (MSVCRT.@) */ -int __cdecl MSVCRT_islower(int c) +int MSVCRT_islower(int c) { - return MSVCRT__isctype( c, MSVCRT_LOWER ); + return _isctype( c, _LOWER ); } /********************************************************************* * isprint (MSVCRT.@) */ -int __cdecl MSVCRT_isprint(int c) +int MSVCRT_isprint(int c) { - return MSVCRT__isctype( c, MSVCRT_ALPHA | MSVCRT_DIGIT | - MSVCRT_BLANK | MSVCRT_PUNCT ); + return _isctype( c, _ALPHA | _DIGIT | _BLANK | _PUNCT ); } /********************************************************************* * ispunct (MSVCRT.@) */ -int __cdecl MSVCRT_ispunct(int c) +int MSVCRT_ispunct(int c) { - return MSVCRT__isctype( c, MSVCRT_PUNCT ); + return _isctype( c, _PUNCT ); } /********************************************************************* * isspace (MSVCRT.@) */ -int __cdecl MSVCRT_isspace(int c) +int MSVCRT_isspace(int c) { - return MSVCRT__isctype( c, MSVCRT_SPACE ); + return _isctype( c, _SPACE ); } /********************************************************************* * isupper (MSVCRT.@) */ -int __cdecl MSVCRT_isupper(int c) +int MSVCRT_isupper(int c) { - return MSVCRT__isctype( c, MSVCRT_UPPER ); + return _isctype( c, _UPPER ); } /********************************************************************* * isxdigit (MSVCRT.@) */ -int __cdecl MSVCRT_isxdigit(int c) +int MSVCRT_isxdigit(int c) { - return MSVCRT__isctype( c, MSVCRT_HEX ); + return _isctype( c, _HEX ); } /********************************************************************* * __isascii (MSVCRT.@) */ -int __cdecl MSVCRT___isascii(int c) +int MSVCRT___isascii(int c) { return isascii((unsigned)c); } @@ -203,7 +202,7 @@ int __cdecl MSVCRT___isascii(int c) /********************************************************************* * __toascii (MSVCRT.@) */ -int __cdecl MSVCRT___toascii(int c) +int MSVCRT___toascii(int c) { return (unsigned)c & 0x7f; } @@ -212,7 +211,7 @@ int __cdecl MSVCRT___toascii(int c) * iswascii (MSVCRT.@) * */ -int __cdecl MSVCRT_iswascii(WCHAR c) +int MSVCRT_iswascii(WCHAR c) { return ((unsigned)c < 0x80); } @@ -220,7 +219,7 @@ int __cdecl MSVCRT_iswascii(WCHAR c) /********************************************************************* * __iscsym (MSVCRT.@) */ -int __cdecl MSVCRT___iscsym(int c) +int MSVCRT___iscsym(int c) { return (c < 127 && (isalnum(c) || c == '_')); } @@ -228,7 +227,7 @@ int __cdecl MSVCRT___iscsym(int c) /********************************************************************* * __iscsymf (MSVCRT.@) */ -int __cdecl MSVCRT___iscsymf(int c) +int MSVCRT___iscsymf(int c) { return (c < 127 && (isalpha(c) || c == '_')); } @@ -236,7 +235,7 @@ int __cdecl MSVCRT___iscsymf(int c) /********************************************************************* * _toupper (MSVCRT.@) */ -int __cdecl MSVCRT__toupper(int c) +int MSVCRT__toupper(int c) { return c - 0x20; /* sic */ } @@ -244,7 +243,7 @@ int __cdecl MSVCRT__toupper(int c) /********************************************************************* * _tolower (MSVCRT.@) */ -int __cdecl MSVCRT__tolower(int c) +int MSVCRT__tolower(int c) { return c + 0x20; /* sic */ } diff --git a/dlls/msvcrt/data.c b/dlls/msvcrt/data.c index e6c641eabec..f7103081e65 100644 --- a/dlls/msvcrt/data.c +++ b/dlls/msvcrt/data.c @@ -37,87 +37,87 @@ WCHAR **MSVCRT___winitenv; int MSVCRT_timezone; int MSVCRT_app_type; -typedef void (__cdecl *MSVCRT__INITTERMFUN)(void); +typedef void (*_INITTERMFUN)(void); /*********************************************************************** * __p___argc (MSVCRT.@) */ -unsigned int *__cdecl MSVCRT___p___argc(void) { return &MSVCRT___argc; } +unsigned int* __p___argc(void) { return &MSVCRT___argc; } /*********************************************************************** * __p__commode (MSVCRT.@) */ -unsigned int *__cdecl MSVCRT___p__commode(void) { return &MSVCRT__commode; } +unsigned int* __p__commode(void) { return &MSVCRT__commode; } /*********************************************************************** * __p__fmode (MSVCRT.@) */ -unsigned int *__cdecl MSVCRT___p__fmode(void) { return &MSVCRT__fmode; } +unsigned int* __p__fmode(void) { return &MSVCRT__fmode; } /*********************************************************************** * __p__osver (MSVCRT.@) */ -unsigned int *__cdecl MSVCRT___p__osver(void) { return &MSVCRT__osver; } +unsigned int* __p__osver(void) { return &MSVCRT__osver; } /*********************************************************************** * __p__winmajor (MSVCRT.@) */ -unsigned int *__cdecl MSVCRT___p__winmajor(void) { return &MSVCRT__winmajor; } +unsigned int* __p__winmajor(void) { return &MSVCRT__winmajor; } /*********************************************************************** * __p__winminor (MSVCRT.@) */ -unsigned int *__cdecl MSVCRT___p__winminor(void) { return &MSVCRT__winminor; } +unsigned int* __p__winminor(void) { return &MSVCRT__winminor; } /*********************************************************************** * __p__winver (MSVCRT.@) */ -unsigned int *__cdecl MSVCRT___p__winver(void) { return &MSVCRT__winver; } +unsigned int* __p__winver(void) { return &MSVCRT__winver; } /********************************************************************* * __p__acmdln (MSVCRT.@) */ -char **__cdecl MSVCRT___p__acmdln(void) { return &MSVCRT__acmdln; } +char** __p__acmdln(void) { return &MSVCRT__acmdln; } /********************************************************************* * __p__wcmdln (MSVCRT.@) */ -WCHAR **__cdecl MSVCRT___p__wcmdln(void) { return &MSVCRT__wcmdln; } +WCHAR** __p__wcmdln(void) { return &MSVCRT__wcmdln; } /********************************************************************* * __p___argv (MSVCRT.@) */ -char ***__cdecl MSVCRT___p___argv(void) { return &MSVCRT___argv; } +char*** __p___argv(void) { return &MSVCRT___argv; } /********************************************************************* * __p___wargv (MSVCRT.@) */ -WCHAR ***__cdecl MSVCRT___p___wargv(void) { return &MSVCRT___wargv; } +WCHAR*** __p___wargv(void) { return &MSVCRT___wargv; } /********************************************************************* * __p__environ (MSVCRT.@) */ -char **__cdecl MSVCRT___p__environ(void) { return &MSVCRT__environ; } +char** __p__environ(void) { return &MSVCRT__environ; } /********************************************************************* * __p__wenviron (MSVCRT.@) */ -WCHAR **__cdecl MSVCRT___p__wenviron(void) { return &MSVCRT__wenviron; } +WCHAR** __p__wenviron(void) { return &MSVCRT__wenviron; } /********************************************************************* * __p___initenv (MSVCRT.@) */ -char ***__cdecl MSVCRT___p___initenv(void) { return &MSVCRT___initenv; } +char*** __p___initenv(void) { return &MSVCRT___initenv; } /********************************************************************* * __p___winitenv (MSVCRT.@) */ -WCHAR ***__cdecl MSVCRT___p___winitenv(void) { return &MSVCRT___winitenv; } +WCHAR*** __p___winitenv(void) { return &MSVCRT___winitenv; } /********************************************************************* * __p__timezone (MSVCRT.@) */ -int *__cdecl MSVCRT___p__timezone(void) { return &MSVCRT_timezone; } +int* __p__timezone(void) { return &MSVCRT_timezone; } /* INTERNAL: Create a wide string from an ascii string */ static WCHAR *wstrdupa(const char *str) @@ -135,19 +135,19 @@ static WCHAR *wstrdupa(const char *str) * program we simply return the data we've already initialised. This also means * you can call multiple times without leaking */ -void MSVCRT_init_args(void) +void msvcrt_init_args(void) { char *cmdline, **xargv = NULL; WCHAR *wcmdline, **wxargv = NULL; int xargc,end,last_arg,afterlastspace; DWORD version; - MSVCRT__acmdln = MSVCRT__strdup( GetCommandLineA() ); + MSVCRT__acmdln = _strdup( GetCommandLineA() ); MSVCRT__wcmdln = wcmdline = wstrdupa(MSVCRT__acmdln); /* Make a copy of MSVCRT__acmdln to be able modify it. We will free it at the end of processing. */ - cmdline = MSVCRT__strdup(MSVCRT__acmdln); + cmdline = _strdup(MSVCRT__acmdln); TRACE("got '%s', wide = '%s'\n", cmdline, debugstr_w(wcmdline)); @@ -187,7 +187,7 @@ void MSVCRT_init_args(void) if (strlen(cmdline+afterlastspace)) { - xargv[xargc] = MSVCRT__strdup(cmdline+afterlastspace); + xargv[xargc] = _strdup(cmdline+afterlastspace); wxargv[xargc] = wstrdupa(xargv[xargc]); xargc++; if (!last_arg) /* need to seek to the next arg ? */ @@ -224,7 +224,7 @@ void MSVCRT_init_args(void) /* INTERNAL: free memory used by args */ -void MSVCRT_free_args(void) +void msvcrt_free_args(void) { /* FIXME */ } @@ -232,7 +232,7 @@ void MSVCRT_free_args(void) /********************************************************************* * __getmainargs (MSVCRT.@) */ -void __cdecl MSVCRT___getmainargs(int *argc, char ***argv, char **environ, +void __getmainargs(int *argc, char ***argv, char **environ, int expand_wildcards, int *new_mode) { TRACE("(%p,%p,%p,%d,%p).\n", argc, argv, environ, expand_wildcards, new_mode); @@ -245,7 +245,7 @@ void __cdecl MSVCRT___getmainargs(int *argc, char ***argv, char **environ, /********************************************************************* * __wgetmainargs (MSVCRT.@) */ -void __cdecl MSVCRT___wgetmainargs(int *argc, WCHAR ***wargv, WCHAR **wenviron, +void __wgetmainargs(int *argc, WCHAR ***wargv, WCHAR **wenviron, int expand_wildcards, int *new_mode) { TRACE("(%p,%p,%p,%d,%p).\n", argc, wargv, wenviron, expand_wildcards, new_mode); @@ -258,9 +258,9 @@ void __cdecl MSVCRT___wgetmainargs(int *argc, WCHAR ***wargv, WCHAR **wenviron, /********************************************************************* * _initterm (MSVCRT.@) */ -unsigned int __cdecl MSVCRT__initterm(MSVCRT__INITTERMFUN *start,MSVCRT__INITTERMFUN *end) +unsigned int _initterm(_INITTERMFUN *start,_INITTERMFUN *end) { - MSVCRT__INITTERMFUN*current = start; + _INITTERMFUN* current = start; TRACE("(%p,%p)\n",start,end); while (currentname, fd->cFileName); } -char * MSVCRT__strndup(const char *, unsigned int); -LPWSTR __cdecl MSVCRT__wcsdup( LPCWSTR ); -LPWSTR __cdecl MSVCRT__wstrndup( LPCWSTR , unsigned int ); -char *__cdecl MSVCRT_getenv(const char *); -WCHAR *__cdecl wcscpy(WCHAR *,const WCHAR *); -WCHAR *__cdecl wcsncpy(WCHAR *,const WCHAR *,unsigned int); -WCHAR *__cdecl wcscat(WCHAR *,const WCHAR *); -WCHAR *__cdecl wcschr(WCHAR *,WCHAR); -WCHAR *__cdecl wcsrchr(WCHAR *,WCHAR); -void __cdecl _splitpath(const char *,char *, char *,char *,char *); +char* msvcrt_strndup(const char*, unsigned int); +LPWSTR _wcsdup( LPCWSTR ); +LPWSTR msvcrt_wstrndup( LPCWSTR , unsigned int ); +char * MSVCRT_getenv(const char *); +WCHAR *wcscpy(WCHAR *,const WCHAR *); +WCHAR *wcsncpy(WCHAR *,const WCHAR *,unsigned int); +WCHAR *wcscat(WCHAR *,const WCHAR *); +WCHAR *wcschr(WCHAR *,WCHAR); +WCHAR *wcsrchr(WCHAR *,WCHAR); +void _splitpath(const char *,char *, char *,char *,char *); /********************************************************************* * _chdir (MSVCRT.@) */ -int __cdecl MSVCRT__chdir(const char * newdir) +int _chdir(const char * newdir) { if (!SetCurrentDirectoryA(newdir)) { @@ -109,7 +109,7 @@ int __cdecl MSVCRT__chdir(const char * newdir) /********************************************************************* * _wchdir (MSVCRT.@) */ -int __cdecl MSVCRT__wchdir(const WCHAR * newdir) +int _wchdir(const WCHAR * newdir) { if (!SetCurrentDirectoryW(newdir)) { @@ -122,7 +122,7 @@ int __cdecl MSVCRT__wchdir(const WCHAR * newdir) /********************************************************************* * _chdrive (MSVCRT.@) */ -int __cdecl MSVCRT__chdrive(int newdrive) +int _chdrive(int newdrive) { char buffer[3] = "A:"; buffer[0] += newdrive - 1; @@ -139,7 +139,7 @@ int __cdecl MSVCRT__chdrive(int newdrive) /********************************************************************* * _findclose (MSVCRT.@) */ -int __cdecl MSVCRT__findclose(DWORD hand) +int _findclose(DWORD hand) { TRACE(":handle %ld\n",hand); if (!FindClose((HANDLE)hand)) @@ -153,7 +153,7 @@ int __cdecl MSVCRT__findclose(DWORD hand) /********************************************************************* * _findfirst (MSVCRT.@) */ -DWORD __cdecl MSVCRT__findfirst(const char * fspec, MSVCRT_finddata_t* ft) +DWORD _findfirst(const char * fspec, MSVCRT_finddata_t* ft) { WIN32_FIND_DATAA find_data; HANDLE hfind; @@ -164,7 +164,7 @@ DWORD __cdecl MSVCRT__findfirst(const char * fspec, MSVCRT_finddata_t* ft) MSVCRT__set_errno(GetLastError()); return -1; } - MSVCRT__fttofd(&find_data,ft); + msvcrt_fttofd(&find_data,ft); TRACE(":got handle %d\n",hfind); return hfind; } @@ -172,7 +172,7 @@ DWORD __cdecl MSVCRT__findfirst(const char * fspec, MSVCRT_finddata_t* ft) /********************************************************************* * _wfindfirst (MSVCRT.@) */ -DWORD __cdecl MSVCRT__wfindfirst(const WCHAR * fspec, MSVCRT_wfinddata_t* ft) +DWORD _wfindfirst(const WCHAR * fspec, MSVCRT_wfinddata_t* ft) { WIN32_FIND_DATAW find_data; HANDLE hfind; @@ -183,7 +183,7 @@ DWORD __cdecl MSVCRT__wfindfirst(const WCHAR * fspec, MSVCRT_wfinddata_t* ft) MSVCRT__set_errno(GetLastError()); return -1; } - MSVCRT__wfttofd(&find_data,ft); + msvcrt_wfttofd(&find_data,ft); TRACE(":got handle %d\n",hfind); return hfind; } @@ -191,7 +191,7 @@ DWORD __cdecl MSVCRT__wfindfirst(const WCHAR * fspec, MSVCRT_wfinddata_t* ft) /********************************************************************* * _findnext (MSVCRT.@) */ -int __cdecl MSVCRT__findnext(DWORD hand, MSVCRT_finddata_t * ft) +int _findnext(DWORD hand, MSVCRT_finddata_t * ft) { WIN32_FIND_DATAA find_data; @@ -201,14 +201,14 @@ int __cdecl MSVCRT__findnext(DWORD hand, MSVCRT_finddata_t * ft) return -1; } - MSVCRT__fttofd(&find_data,ft); + msvcrt_fttofd(&find_data,ft); return 0; } /********************************************************************* * _wfindnext (MSVCRT.@) */ -int __cdecl MSVCRT__wfindnext(DWORD hand, MSVCRT_wfinddata_t * ft) +int _wfindnext(DWORD hand, MSVCRT_wfinddata_t * ft) { WIN32_FIND_DATAW find_data; @@ -218,14 +218,14 @@ int __cdecl MSVCRT__wfindnext(DWORD hand, MSVCRT_wfinddata_t * ft) return -1; } - MSVCRT__wfttofd(&find_data,ft); + msvcrt_wfttofd(&find_data,ft); return 0; } /********************************************************************* * _getcwd (MSVCRT.@) */ -char* __cdecl MSVCRT__getcwd(char * buf, int size) +char* _getcwd(char * buf, int size) { char dir[_MAX_PATH]; int dir_len = GetCurrentDirectoryA(MAX_PATH,dir); @@ -236,8 +236,8 @@ char* __cdecl MSVCRT__getcwd(char * buf, int size) if (!buf) { if (size < 0) - return MSVCRT__strdup(dir); - return MSVCRT__strndup(dir,size); + return _strdup(dir); + return msvcrt_strndup(dir,size); } if (dir_len >= size) { @@ -251,7 +251,7 @@ char* __cdecl MSVCRT__getcwd(char * buf, int size) /********************************************************************* * _wgetcwd (MSVCRT.@) */ -WCHAR* __cdecl MSVCRT__wgetcwd(WCHAR * buf, int size) +WCHAR* _wgetcwd(WCHAR * buf, int size) { WCHAR dir[_MAX_PATH]; int dir_len = GetCurrentDirectoryW(MAX_PATH,dir); @@ -262,8 +262,8 @@ WCHAR* __cdecl MSVCRT__wgetcwd(WCHAR * buf, int size) if (!buf) { if (size < 0) - return MSVCRT__wcsdup(dir); - return MSVCRT__wstrndup(dir,size); + return _wcsdup(dir); + return msvcrt_wstrndup(dir,size); } if (dir_len >= size) { @@ -277,7 +277,7 @@ WCHAR* __cdecl MSVCRT__wgetcwd(WCHAR * buf, int size) /********************************************************************* * _getdrive (MSVCRT.@) */ -int __cdecl MSVCRT__getdrive(void) +int _getdrive(void) { char buffer[MAX_PATH]; if (!GetCurrentDirectoryA( sizeof(buffer), buffer )) return 0; @@ -288,14 +288,14 @@ int __cdecl MSVCRT__getdrive(void) /********************************************************************* * _getdcwd (MSVCRT.@) */ -char* __cdecl MSVCRT__getdcwd(int drive, char * buf, int size) +char* _getdcwd(int drive, char * buf, int size) { static char* dummy; TRACE(":drive %d(%c), size %d\n",drive, drive + 'A' - 1, size); - if (!drive || drive == MSVCRT__getdrive()) - return MSVCRT__getcwd(buf,size); /* current */ + if (!drive || drive == _getdrive()) + return _getcwd(buf,size); /* current */ else { char dir[_MAX_PATH]; @@ -318,7 +318,7 @@ char* __cdecl MSVCRT__getdcwd(int drive, char * buf, int size) TRACE(":returning '%s'\n", dir); if (!buf) - return MSVCRT__strdup(dir); /* allocate */ + return _strdup(dir); /* allocate */ strcpy(buf,dir); } @@ -328,14 +328,14 @@ char* __cdecl MSVCRT__getdcwd(int drive, char * buf, int size) /********************************************************************* * _wgetdcwd (MSVCRT.@) */ -WCHAR* __cdecl MSVCRT__wgetdcwd(int drive, WCHAR * buf, int size) +WCHAR* _wgetdcwd(int drive, WCHAR * buf, int size) { static WCHAR* dummy; TRACE(":drive %d(%c), size %d\n",drive, drive + 'A' - 1, size); - if (!drive || drive == MSVCRT__getdrive()) - return MSVCRT__wgetcwd(buf,size); /* current */ + if (!drive || drive == _getdrive()) + return _wgetcwd(buf,size); /* current */ else { WCHAR dir[_MAX_PATH]; @@ -358,7 +358,7 @@ WCHAR* __cdecl MSVCRT__wgetdcwd(int drive, WCHAR * buf, int size) TRACE(":returning '%s'\n", debugstr_w(dir)); if (!buf) - return MSVCRT__wcsdup(dir); /* allocate */ + return _wcsdup(dir); /* allocate */ strcpyW(buf,dir); } return buf; @@ -367,7 +367,7 @@ WCHAR* __cdecl MSVCRT__wgetdcwd(int drive, WCHAR * buf, int size) /********************************************************************* * _getdiskfree (MSVCRT.@) */ -unsigned int __cdecl MSVCRT__getdiskfree(unsigned int disk, MSVCRT_diskfree_t* d) +unsigned int _getdiskfree(unsigned int disk, MSVCRT_diskfree_t* d) { char drivespec[4] = {'@', ':', '\\', 0}; DWORD ret[4]; @@ -394,7 +394,7 @@ unsigned int __cdecl MSVCRT__getdiskfree(unsigned int disk, MSVCRT_diskfree_t* d /********************************************************************* * _mkdir (MSVCRT.@) */ -int __cdecl MSVCRT__mkdir(const char * newdir) +int _mkdir(const char * newdir) { if (CreateDirectoryA(newdir,NULL)) return 0; @@ -405,7 +405,7 @@ int __cdecl MSVCRT__mkdir(const char * newdir) /********************************************************************* * _wmkdir (MSVCRT.@) */ -int __cdecl MSVCRT__wmkdir(const WCHAR* newdir) +int _wmkdir(const WCHAR* newdir) { if (CreateDirectoryW(newdir,NULL)) return 0; @@ -416,7 +416,7 @@ int __cdecl MSVCRT__wmkdir(const WCHAR* newdir) /********************************************************************* * _rmdir (MSVCRT.@) */ -int __cdecl MSVCRT__rmdir(const char * dir) +int _rmdir(const char * dir) { if (RemoveDirectoryA(dir)) return 0; @@ -427,7 +427,7 @@ int __cdecl MSVCRT__rmdir(const char * dir) /********************************************************************* * _wrmdir (MSVCRT.@) */ -int __cdecl MSVCRT__wrmdir(const WCHAR * dir) +int _wrmdir(const WCHAR * dir) { if (RemoveDirectoryW(dir)) return 0; @@ -438,7 +438,7 @@ int __cdecl MSVCRT__wrmdir(const WCHAR * dir) /********************************************************************* * _wsplitpath (MSVCRT.@) */ -void __cdecl MSVCRT__wsplitpath(const WCHAR *inpath, WCHAR *drv, WCHAR *dir, +void _wsplitpath(const WCHAR *inpath, WCHAR *drv, WCHAR *dir, WCHAR *fname, WCHAR *ext ) { /* Modified PD code from 'snippets' collection. */ @@ -523,7 +523,7 @@ void __cdecl MSVCRT__wsplitpath(const WCHAR *inpath, WCHAR *drv, WCHAR *dir, } /* INTERNAL: Helper for _fullpath. Modified PD code from 'snippets'. */ -static void fln_fix(char *path) +static void msvcrt_fln_fix(char *path) { int dir_flag = 0, root_flag = 0; char *r, *p, *q, *s; @@ -627,7 +627,7 @@ static void fln_fix(char *path) /********************************************************************* * _fullpath (MSVCRT.@) */ -char *__cdecl MSVCRT__fullpath(char * absPath, const char* relPath, unsigned int size) +char *_fullpath(char * absPath, const char* relPath, unsigned int size) { char drive[5],dir[MAX_PATH],file[MAX_PATH],ext[MAX_PATH]; char res[MAX_PATH]; @@ -636,7 +636,7 @@ char *__cdecl MSVCRT__fullpath(char * absPath, const char* relPath, unsigned int res[0] = '\0'; if (!relPath || !*relPath) - return MSVCRT__getcwd(absPath, size); + return _getcwd(absPath, size); if (size < 4) { @@ -652,7 +652,7 @@ char *__cdecl MSVCRT__fullpath(char * absPath, const char* relPath, unsigned int if (!dir[0] || (dir[0] != '/' && dir[0] != '\\')) { /* Relative or no directory given */ - MSVCRT__getdcwd(drive[0] ? toupper(drive[0]) - 'A' + 1 : 0, res, MAX_PATH); + _getdcwd(drive[0] ? toupper(drive[0]) - 'A' + 1 : 0, res, MAX_PATH); strcat(res,"\\"); if (dir[0]) strcat(res,dir); @@ -668,14 +668,14 @@ char *__cdecl MSVCRT__fullpath(char * absPath, const char* relPath, unsigned int strcat(res,"\\"); strcat(res, file); strcat(res, ext); - fln_fix(res); + msvcrt_fln_fix(res); len = strlen(res); if (len >= MAX_PATH || len >= (size_t)size) return NULL; /* FIXME: errno? */ if (!absPath) - return MSVCRT__strdup(res); + return _strdup(res); strcpy(absPath,res); return absPath; } @@ -683,12 +683,12 @@ char *__cdecl MSVCRT__fullpath(char * absPath, const char* relPath, unsigned int /********************************************************************* * _makepath (MSVCRT.@) */ -VOID __cdecl MSVCRT__makepath(char * path, const char * drive, +VOID _makepath(char * path, const char * drive, const char *directory, const char * filename, const char * extension ) { char ch; - TRACE("MSVCRT__makepath got %s %s %s %s\n", drive, directory, + TRACE("_makepath got %s %s %s %s\n", drive, directory, filename, extension); if ( !path ) @@ -719,14 +719,14 @@ VOID __cdecl MSVCRT__makepath(char * path, const char * drive, } } - TRACE("MSVCRT__makepath returns %s\n",path); + TRACE("_makepath returns %s\n",path); } /********************************************************************* * _searchenv (MSVCRT.@) */ -void __cdecl MSVCRT__searchenv(const char* file, const char* env, char *buf) +void _searchenv(const char* file, const char* env, char *buf) { char*envVal, *penv; char curPath[MAX_PATH]; diff --git a/dlls/msvcrt/environ.c b/dlls/msvcrt/environ.c index 03990d13bcc..c1c5e8e7bd2 100644 --- a/dlls/msvcrt/environ.c +++ b/dlls/msvcrt/environ.c @@ -11,12 +11,12 @@ DEFAULT_DEBUG_CHANNEL(msvcrt); -LPWSTR __cdecl wcsrchr( LPWSTR str, WCHAR ch ); +LPWSTR wcsrchr( LPWSTR str, WCHAR ch ); /********************************************************************* * getenv (MSVCRT.@) */ -char *__cdecl MSVCRT_getenv(const char *name) +char *MSVCRT_getenv(const char *name) { char *environ = GetEnvironmentStringsA(); char *pp,*pos = NULL; @@ -43,7 +43,7 @@ char *__cdecl MSVCRT_getenv(const char *name) /********************************************************************* * _wgetenv (MSVCRT.@) */ -WCHAR *__cdecl MSVCRT__wgetenv(const WCHAR *name) +WCHAR *_wgetenv(const WCHAR *name) { WCHAR* environ = GetEnvironmentStringsW(); WCHAR* pp,*pos = NULL; @@ -70,7 +70,7 @@ WCHAR *__cdecl MSVCRT__wgetenv(const WCHAR *name) /********************************************************************* * _putenv (MSVCRT.@) */ -int __cdecl MSVCRT__putenv(const char *str) +int _putenv(const char *str) { char name[256], value[512]; char *dst = name; @@ -95,7 +95,7 @@ int __cdecl MSVCRT__putenv(const char *str) /********************************************************************* * _wputenv (MSVCRT.@) */ -int __cdecl MSVCRT__wputenv(const WCHAR *str) +int _wputenv(const WCHAR *str) { WCHAR name[256], value[512]; WCHAR *dst = name; diff --git a/dlls/msvcrt/errno.c b/dlls/msvcrt/errno.c index 7ba487cf632..31682c641e9 100644 --- a/dlls/msvcrt/errno.c +++ b/dlls/msvcrt/errno.c @@ -73,7 +73,7 @@ void MSVCRT__set_errno(int err) /********************************************************************* * _errno (MSVCRT.@) */ -int *__cdecl MSVCRT__errno(void) +int* MSVCRT__errno(void) { return GET_THREAD_VAR_PTR(errno); } @@ -81,7 +81,7 @@ int *__cdecl MSVCRT__errno(void) /********************************************************************* * __doserrno (MSVCRT.@) */ -int *__cdecl MSVCRT___doserrno(void) +int* __doserrno(void) { return GET_THREAD_VAR_PTR(doserrno); } @@ -91,7 +91,7 @@ char *strerror(int); /********************************************************************* * strerror (MSVCRT.@) */ -char * __cdecl MSVCRT_strerror (int err) +char* MSVCRT_strerror(int err) { return strerror(err); /* FIXME */ } @@ -101,19 +101,19 @@ char * __cdecl MSVCRT_strerror (int err) */ extern int sprintf(char *str, const char *format, ...); -const char *__cdecl MSVCRT__strerror (const char *err) +const char* _strerror(const char* err) { static char strerrbuff[256]; /* FIXME: Per thread, nprintf */ sprintf(strerrbuff,"%s: %s\n",err,MSVCRT_strerror(GET_THREAD_VAR(errno))); return strerrbuff; } -int __cdecl MSVCRT__cprintf( const char * format, ... ); +int _cprintf( const char * format, ... ); /********************************************************************* * perror (MSVCRT.@) */ -void __cdecl MSVCRT_perror (const char *str) +void MSVCRT_perror(const char *str) { - MSVCRT__cprintf("%s: %s\n",str,MSVCRT_strerror(GET_THREAD_VAR(errno))); + _cprintf("%s: %s\n",str,MSVCRT_strerror(GET_THREAD_VAR(errno))); } diff --git a/dlls/msvcrt/except.c b/dlls/msvcrt/except.c index ba261171286..d13c604604a 100644 --- a/dlls/msvcrt/except.c +++ b/dlls/msvcrt/except.c @@ -21,8 +21,8 @@ typedef void (*MSVCRT_sig_handler_func)(void); typedef struct _SCOPETABLE { DWORD previousTryLevel; - int (__cdecl *lpfnFilter)(PEXCEPTION_POINTERS); - int (__cdecl *lpfnHandler)(void); + int (*lpfnFilter)(PEXCEPTION_POINTERS); + int (*lpfnHandler)(void); } SCOPETABLE, *PSCOPETABLE; typedef struct _MSVCRT_EXCEPTION_FRAME @@ -44,10 +44,10 @@ typedef struct _MSVCRT_EXCEPTION_FRAME __asm__ __volatile__ ("movl %0,%%eax; movl %1,%%ebp; call *%%eax" \ : : "g" (code_block), "g" (base_ptr)) -static DWORD __cdecl MSVCRT_nested_handler(PEXCEPTION_RECORD rec, - struct __EXCEPTION_FRAME *frame, - PCONTEXT context WINE_UNUSED, - struct __EXCEPTION_FRAME **dispatch) +static DWORD MSVCRT_nested_handler(PEXCEPTION_RECORD rec, + struct __EXCEPTION_FRAME* frame, + PCONTEXT context WINE_UNUSED, + struct __EXCEPTION_FRAME** dispatch) { if (rec->ExceptionFlags & 0x6) return ExceptionContinueSearch; @@ -60,7 +60,7 @@ static DWORD __cdecl MSVCRT_nested_handler(PEXCEPTION_RECORD rec, /********************************************************************* * _XcptFilter (MSVCRT.@) */ -int __cdecl MSVCRT__XcptFilter(int ex, PEXCEPTION_POINTERS ptr) +int _XcptFilter(int ex, PEXCEPTION_POINTERS ptr) { FIXME("(%d,%p)semi-stub\n", ex, ptr); return UnhandledExceptionFilter(ptr); @@ -71,7 +71,7 @@ int __cdecl MSVCRT__XcptFilter(int ex, PEXCEPTION_POINTERS ptr) */ #ifdef __i386__ /* Provided for VC++ binary compatability only */ -__ASM_GLOBAL_FUNC(MSVCRT__EH_prolog, +__ASM_GLOBAL_FUNC(_EH_prolog, "pushl $0xff\n\t" "pushl %eax\n\t" "pushl %fs:0\n\t" @@ -86,7 +86,7 @@ __ASM_GLOBAL_FUNC(MSVCRT__EH_prolog, /******************************************************************* * _global_unwind2 (MSVCRT.@) */ -void __cdecl MSVCRT__global_unwind2(PEXCEPTION_FRAME frame) +void _global_unwind2(PEXCEPTION_FRAME frame) { TRACE("(%p)\n",frame); RtlUnwind( frame, 0, 0, 0 ); @@ -95,8 +95,8 @@ void __cdecl MSVCRT__global_unwind2(PEXCEPTION_FRAME frame) /******************************************************************* * _local_unwind2 (MSVCRT.@) */ -void __cdecl MSVCRT__local_unwind2(MSVCRT_EXCEPTION_FRAME *frame, - DWORD trylevel) +void _local_unwind2(MSVCRT_EXCEPTION_FRAME* frame, + DWORD trylevel) { MSVCRT_EXCEPTION_FRAME *curframe = frame; DWORD curtrylevel = 0xfe; @@ -129,10 +129,10 @@ void __cdecl MSVCRT__local_unwind2(MSVCRT_EXCEPTION_FRAME *frame, /********************************************************************* * _except_handler2 (MSVCRT.@) */ -int __cdecl MSVCRT__except_handler2(PEXCEPTION_RECORD rec, - PEXCEPTION_FRAME frame, - PCONTEXT context, - PEXCEPTION_FRAME *dispatcher) +int _except_handler2(PEXCEPTION_RECORD rec, + PEXCEPTION_FRAME frame, + PCONTEXT context, + PEXCEPTION_FRAME* dispatcher) { FIXME("exception %lx flags=%lx at %p handler=%p %p %p stub\n", rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress, @@ -143,9 +143,9 @@ int __cdecl MSVCRT__except_handler2(PEXCEPTION_RECORD rec, /********************************************************************* * _except_handler3 (MSVCRT.@) */ -int __cdecl MSVCRT__except_handler3(PEXCEPTION_RECORD rec, - MSVCRT_EXCEPTION_FRAME *frame, - PCONTEXT context,void *dispatcher) +int _except_handler3(PEXCEPTION_RECORD rec, + MSVCRT_EXCEPTION_FRAME* frame, + PCONTEXT context, void* dispatcher) { #if defined(__GNUC__) && defined(__i386__) long retval, trylevel; @@ -161,7 +161,7 @@ int __cdecl MSVCRT__except_handler3(PEXCEPTION_RECORD rec, if (rec->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND)) { /* Unwinding the current frame */ - MSVCRT__local_unwind2(frame, TRYLEVEL_END); + _local_unwind2(frame, TRYLEVEL_END); return ExceptionContinueSearch; } else @@ -191,8 +191,8 @@ int __cdecl MSVCRT__except_handler3(PEXCEPTION_RECORD rec, if (retval == EXCEPTION_EXECUTE_HANDLER) { /* Unwind all higher frames, this one will handle the exception */ - MSVCRT__global_unwind2((PEXCEPTION_FRAME)frame); - MSVCRT__local_unwind2(frame, trylevel); + _global_unwind2((PEXCEPTION_FRAME)frame); + _local_unwind2(frame, trylevel); /* Set our trylevel to the enclosing block, and call the __finally * code, which won't return @@ -217,7 +217,7 @@ int __cdecl MSVCRT__except_handler3(PEXCEPTION_RECORD rec, /********************************************************************* * _abnormal_termination (MSVCRT.@) */ -int __cdecl MSVCRT__abnormal_termination(void) +int _abnormal_termination(void) { FIXME("(void)stub\n"); return 0; @@ -226,7 +226,7 @@ int __cdecl MSVCRT__abnormal_termination(void) /******************************************************************* * _setjmp (MSVCRT.@) */ -int __cdecl MSVCRT__setjmp(LPDWORD *jmpbuf) +int MSVCRT__setjmp(LPDWORD* jmpbuf) { FIXME(":(%p): stub\n",jmpbuf); return 0; @@ -244,7 +244,7 @@ int __cdecl MSVCRT__setjmp3(LPDWORD *jmpbuf, int x) /********************************************************************* * longjmp (MSVCRT.@) */ -void __cdecl MSVCRT_longjmp(jmp_buf env, int val) +void MSVCRT_longjmp(jmp_buf env, int val) { FIXME("MSVCRT_longjmp semistub, expect crash\n"); longjmp(env, val); @@ -253,7 +253,7 @@ void __cdecl MSVCRT_longjmp(jmp_buf env, int val) /********************************************************************* * signal (MSVCRT.@) */ -void * __cdecl MSVCRT_signal(int sig, MSVCRT_sig_handler_func func) +void* MSVCRT_signal(int sig, MSVCRT_sig_handler_func func) { FIXME("(%d %p):stub\n", sig, func); return (void*)-1; diff --git a/dlls/msvcrt/exit.c b/dlls/msvcrt/exit.c index 1c5c194538f..0311117728b 100644 --- a/dlls/msvcrt/exit.c +++ b/dlls/msvcrt/exit.c @@ -12,14 +12,14 @@ extern CRITICAL_SECTION MSVCRT_exit_cs; #define LOCK_EXIT EnterCriticalSection(&MSVCRT_exit_cs) #define UNLOCK_EXIT LeaveCriticalSection(&MSVCRT_exit_cs) -typedef void (__cdecl *MSVCRT_atexit_func)(void); +typedef void (*MSVCRT_atexit_func)(void); static MSVCRT_atexit_func *MSVCRT_atexit_table = NULL; static int MSVCRT_atexit_table_size = 0; static int MSVCRT_atexit_registered = 0; /* Points to free slot */ extern int MSVCRT_app_type; -void *__cdecl MSVCRT_realloc(void *ptr, unsigned int size); +void *MSVCRT_realloc(void *ptr, unsigned int size); /* INTERNAL: call atexit functions */ void __MSVCRT__call_atexit(void) @@ -40,7 +40,7 @@ void __MSVCRT__call_atexit(void) /********************************************************************* * __dllonexit (MSVCRT.@) */ -MSVCRT_atexit_func __cdecl MSVCRT___dllonexit(MSVCRT_atexit_func func, +MSVCRT_atexit_func __dllonexit(MSVCRT_atexit_func func, MSVCRT_atexit_func **start, MSVCRT_atexit_func **end) { @@ -75,7 +75,7 @@ MSVCRT_atexit_func __cdecl MSVCRT___dllonexit(MSVCRT_atexit_func func, /********************************************************************* * _exit (MSVCRT.@) */ -void __cdecl MSVCRT__exit(int exitcode) +void MSVCRT__exit(int exitcode) { TRACE("(%d)\n", exitcode); ExitProcess(exitcode); @@ -84,7 +84,7 @@ void __cdecl MSVCRT__exit(int exitcode) /********************************************************************* * _amsg_exit (MSVCRT.@) */ -void __cdecl MSVCRT__amsg_exit(int errnum) +void MSVCRT__amsg_exit(int errnum) { TRACE("(%d)\n", errnum); /* FIXME: text for the error number. */ @@ -92,42 +92,42 @@ void __cdecl MSVCRT__amsg_exit(int errnum) { /* FIXME: MsgBox */ } - MSVCRT__cprintf("\nruntime error R60%d\n",errnum); + _cprintf("\nruntime error R60%d\n",errnum); MSVCRT__exit(255); } /********************************************************************* * abort (MSVCRT.@) */ -void __cdecl MSVCRT_abort(void) +void MSVCRT_abort(void) { TRACE("(void)\n"); if (MSVCRT_app_type == 2) { /* FIXME: MsgBox */ } - MSVCRT__cputs("\nabnormal program termination\n"); + _cputs("\nabnormal program termination\n"); MSVCRT__exit(3); } /********************************************************************* * _assert (MSVCRT.@) */ -void __cdecl MSVCRT__assert(const char* str, const char* file, unsigned int line) +void MSVCRT__assert(const char* str, const char* file, unsigned int line) { TRACE("(%s,%s,%d)\n",str,file,line); if (MSVCRT_app_type == 2) { /* FIXME: MsgBox */ } - MSVCRT__cprintf("Assertion failed: %s, file %s, line %d\n\n",str,file, line); + _cprintf("Assertion failed: %s, file %s, line %d\n\n",str,file, line); MSVCRT_abort(); } /********************************************************************* * _c_exit (MSVCRT.@) */ -void __cdecl MSVCRT__c_exit(void) +void MSVCRT__c_exit(void) { TRACE("(void)\n"); /* All cleanup is done on DLL detach; Return to caller */ @@ -136,7 +136,7 @@ void __cdecl MSVCRT__c_exit(void) /********************************************************************* * _cexit (MSVCRT.@) */ -void __cdecl MSVCRT__cexit(void) +void MSVCRT__cexit(void) { TRACE("(void)\n"); /* All cleanup is done on DLL detach; Return to caller */ @@ -145,7 +145,7 @@ void __cdecl MSVCRT__cexit(void) /********************************************************************* * _onexit (MSVCRT.@) */ - MSVCRT_atexit_func __cdecl MSVCRT__onexit(MSVCRT_atexit_func func) + MSVCRT_atexit_func _onexit(MSVCRT_atexit_func func) { TRACE("(%p)\n",func); @@ -179,7 +179,7 @@ void __cdecl MSVCRT__cexit(void) /********************************************************************* * exit (MSVCRT.@) */ -void __cdecl MSVCRT_exit(int exitcode) +void MSVCRT_exit(int exitcode) { TRACE("(%d)\n",exitcode); LOCK_EXIT; @@ -191,16 +191,16 @@ void __cdecl MSVCRT_exit(int exitcode) /********************************************************************* * atexit (MSVCRT.@) */ -int __cdecl MSVCRT_atexit(MSVCRT_atexit_func func) +int MSVCRT_atexit(MSVCRT_atexit_func func) { TRACE("(%p)\n", func); - return MSVCRT__onexit(func) == func ? 0 : -1; + return _onexit(func) == func ? 0 : -1; } /********************************************************************* * _purecall (MSVCRT.@) */ -void __cdecl MSVCRT__purecall(void) +void _purecall(void) { TRACE("(void)\n"); MSVCRT__amsg_exit( 25 ); diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 13c3073baa3..e00f12632ea 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -134,17 +134,17 @@ extern CRITICAL_SECTION MSVCRT_file_cs; #define LOCK_FILES EnterCriticalSection(&MSVCRT_file_cs) #define UNLOCK_FILES LeaveCriticalSection(&MSVCRT_file_cs) -time_t __cdecl MSVCRT_time(time_t *); -int __cdecl MSVCRT__getdrive(void); -WCHAR *__cdecl MSVCRT__wcsdup(const WCHAR *); -unsigned int __cdecl wcslen(const WCHAR*); -int __cdecl iswalpha(WCHAR); -int __cdecl towupper(WCHAR); -int __cdecl towlower(WCHAR); -int __cdecl MSVCRT__vsnwprintf(WCHAR *,unsigned int,const WCHAR *,va_list); +time_t MSVCRT_time(time_t *); +int _getdrive(void); +WCHAR *_wcsdup(const WCHAR *); +unsigned int wcslen(const WCHAR*); +int iswalpha(WCHAR); +int towupper(WCHAR); +int towlower(WCHAR); +int _vsnwprintf(WCHAR *,unsigned int,const WCHAR *,va_list); /* INTERNAL: Get the HANDLE for a fd */ -static HANDLE MSVCRT__fdtoh(int fd) +static HANDLE msvcrt_fdtoh(int fd) { if (fd < 0 || fd >= MSVCRT_fdend || MSVCRT_handles[fd] == INVALID_HANDLE_VALUE) @@ -158,7 +158,7 @@ static HANDLE MSVCRT__fdtoh(int fd) } /* INTERNAL: free a file entry fd */ -static void MSVCRT__free_fd(int fd) +static void msvcrt_free_fd(int fd) { MSVCRT_handles[fd] = INVALID_HANDLE_VALUE; MSVCRT_files[fd] = 0; @@ -173,7 +173,7 @@ static void MSVCRT__free_fd(int fd) } /* INTERNAL: Allocate an fd slot from a Win32 HANDLE */ -static int MSVCRT__alloc_fd(HANDLE hand, int flag) +static int msvcrt_alloc_fd(HANDLE hand, int flag) { int fd = MSVCRT_fdstart; @@ -201,7 +201,7 @@ static int MSVCRT__alloc_fd(HANDLE hand, int flag) * This is done lazily to avoid memory wastage for low level open/write * usage when a FILE* is not requested (but may be later). */ -static MSVCRT_FILE* MSVCRT__alloc_fp(int fd) +static MSVCRT_FILE* msvcrt_alloc_fp(int fd) { TRACE(":fd (%d) allocating FILE*\n",fd); if (fd < 0 || fd >= MSVCRT_fdend || @@ -227,7 +227,7 @@ static MSVCRT_FILE* MSVCRT__alloc_fp(int fd) /* INTERNAL: Set up stdin, stderr and stdout */ -void MSVCRT_init_io(void) +void msvcrt_init_io(void) { int i; memset(MSVCRT__iob,0,3*sizeof(MSVCRT_FILE)); @@ -253,7 +253,7 @@ void MSVCRT_init_io(void) /********************************************************************* * __p__iob(MSVCRT.@) */ -MSVCRT_FILE *MSVCRT___p__iob(void) +MSVCRT_FILE *__p__iob(void) { return &MSVCRT__iob[0]; } @@ -261,7 +261,7 @@ MSVCRT_FILE *MSVCRT___p__iob(void) /********************************************************************* * _access (MSVCRT.@) */ -int __cdecl MSVCRT__access(const char *filename, int mode) +int _access(const char *filename, int mode) { DWORD attr = GetFileAttributesA(filename); @@ -283,7 +283,7 @@ int __cdecl MSVCRT__access(const char *filename, int mode) /********************************************************************* * _waccess (MSVCRT.@) */ -int __cdecl MSVCRT__waccess(const WCHAR *filename, int mode) +int _waccess(const WCHAR *filename, int mode) { DWORD attr = GetFileAttributesW(filename); @@ -305,7 +305,7 @@ int __cdecl MSVCRT__waccess(const WCHAR *filename, int mode) /********************************************************************* * _chmod (MSVCRT.@) */ -int __cdecl MSVCRT__chmod(const char *path, int flags) +int _chmod(const char *path, int flags) { DWORD oldFlags = GetFileAttributesA(path); @@ -324,7 +324,7 @@ int __cdecl MSVCRT__chmod(const char *path, int flags) /********************************************************************* * _wchmod (MSVCRT.@) */ -int __cdecl MSVCRT__wchmod(const WCHAR *path, int flags) +int _wchmod(const WCHAR *path, int flags) { DWORD oldFlags = GetFileAttributesW(path); @@ -343,7 +343,7 @@ int __cdecl MSVCRT__wchmod(const WCHAR *path, int flags) /********************************************************************* * _unlink (MSVCRT.@) */ -int __cdecl MSVCRT__unlink(const char *path) +int _unlink(const char *path) { TRACE("(%s)\n",path); if(DeleteFileA(path)) @@ -356,7 +356,7 @@ int __cdecl MSVCRT__unlink(const char *path) /********************************************************************* * _wunlink (MSVCRT.@) */ -int __cdecl MSVCRT__wunlink(const WCHAR *path) +int _wunlink(const WCHAR *path) { TRACE("(%s)\n",debugstr_w(path)); if(DeleteFileW(path)) @@ -369,9 +369,9 @@ int __cdecl MSVCRT__wunlink(const WCHAR *path) /********************************************************************* * _close (MSVCRT.@) */ -int __cdecl MSVCRT__close(int fd) +int _close(int fd) { - HANDLE hand = MSVCRT__fdtoh(fd); + HANDLE hand = msvcrt_fdtoh(fd); TRACE(":fd (%d) handle (%d)\n",fd,hand); if (hand == INVALID_HANDLE_VALUE) @@ -381,7 +381,7 @@ int __cdecl MSVCRT__close(int fd) if (fd > 2 && MSVCRT_files[fd]) MSVCRT_free(MSVCRT_files[fd]); - MSVCRT__free_fd(fd); + msvcrt_free_fd(fd); if (!CloseHandle(hand)) { @@ -392,7 +392,7 @@ int __cdecl MSVCRT__close(int fd) if (MSVCRT_tempfiles[fd]) { TRACE("deleting temporary file '%s'\n",MSVCRT_tempfiles[fd]); - MSVCRT__unlink(MSVCRT_tempfiles[fd]); + _unlink(MSVCRT_tempfiles[fd]); MSVCRT_free(MSVCRT_tempfiles[fd]); MSVCRT_tempfiles[fd] = NULL; } @@ -404,9 +404,9 @@ int __cdecl MSVCRT__close(int fd) /********************************************************************* * _commit (MSVCRT.@) */ -int __cdecl MSVCRT__commit(int fd) +int _commit(int fd) { - HANDLE hand = MSVCRT__fdtoh(fd); + HANDLE hand = msvcrt_fdtoh(fd); TRACE(":fd (%d) handle (%d)\n",fd,hand); if (hand == INVALID_HANDLE_VALUE) @@ -432,10 +432,10 @@ int __cdecl MSVCRT__commit(int fd) /********************************************************************* * _eof (MSVCRT.@) */ -int __cdecl MSVCRT__eof(int fd) +int _eof(int fd) { DWORD curpos,endpos; - HANDLE hand = MSVCRT__fdtoh(fd); + HANDLE hand = msvcrt_fdtoh(fd); TRACE(":fd (%d) handle (%d)\n",fd,hand); @@ -462,14 +462,14 @@ int __cdecl MSVCRT__eof(int fd) /********************************************************************* * _fcloseall (MSVCRT.@) */ -int __cdecl MSVCRT__fcloseall(void) +int _fcloseall(void) { int num_closed = 0, i; for (i = 3; i < MSVCRT_fdend; i++) if (MSVCRT_handles[i] != INVALID_HANDLE_VALUE) { - MSVCRT__close(i); + _close(i); num_closed++; } @@ -480,10 +480,10 @@ int __cdecl MSVCRT__fcloseall(void) /********************************************************************* * _lseek (MSVCRT.@) */ -LONG __cdecl MSVCRT__lseek(int fd, LONG offset, int whence) +LONG _lseek(int fd, LONG offset, int whence) { DWORD ret; - HANDLE hand = MSVCRT__fdtoh(fd); + HANDLE hand = msvcrt_fdtoh(fd); TRACE(":fd (%d) handle (%d)\n",fd,hand); if (hand == INVALID_HANDLE_VALUE) @@ -525,19 +525,19 @@ LONG __cdecl MSVCRT__lseek(int fd, LONG offset, int whence) /********************************************************************* * rewind (MSVCRT.@) */ -void __cdecl MSVCRT_rewind(MSVCRT_FILE* file) +void MSVCRT_rewind(MSVCRT_FILE* file) { TRACE(":file (%p) fd (%d)\n",file,file->_file); - MSVCRT__lseek(file->_file,0,SEEK_SET); + _lseek(file->_file,0,SEEK_SET); file->_flag &= ~(_IOEOF | _IOERR); } /********************************************************************* * _fdopen (MSVCRT.@) */ -MSVCRT_FILE* __cdecl MSVCRT__fdopen(int fd, const char *mode) +MSVCRT_FILE* _fdopen(int fd, const char *mode) { - MSVCRT_FILE* file = MSVCRT__alloc_fp(fd); + MSVCRT_FILE* file = msvcrt_alloc_fp(fd); TRACE(":fd (%d) mode (%s) FILE* (%p)\n",fd,mode,file); if (file) @@ -549,9 +549,9 @@ MSVCRT_FILE* __cdecl MSVCRT__fdopen(int fd, const char *mode) /********************************************************************* * _wfdopen (MSVCRT.@) */ -MSVCRT_FILE* __cdecl MSVCRT__wfdopen(int fd, const WCHAR *mode) +MSVCRT_FILE* _wfdopen(int fd, const WCHAR *mode) { - MSVCRT_FILE* file = MSVCRT__alloc_fp(fd); + MSVCRT_FILE* file = msvcrt_alloc_fp(fd); TRACE(":fd (%d) mode (%s) FILE* (%p)\n",fd,debugstr_w(mode),file); if (file) @@ -563,16 +563,16 @@ MSVCRT_FILE* __cdecl MSVCRT__wfdopen(int fd, const WCHAR *mode) /********************************************************************* * _filelength (MSVCRT.@) */ -LONG __cdecl MSVCRT__filelength(int fd) +LONG _filelength(int fd) { - LONG curPos = MSVCRT__lseek(fd, 0, SEEK_CUR); + LONG curPos = _lseek(fd, 0, SEEK_CUR); if (curPos != -1) { - LONG endPos = MSVCRT__lseek(fd, 0, SEEK_END); + LONG endPos = _lseek(fd, 0, SEEK_END); if (endPos != -1) { if (endPos != curPos) - MSVCRT__lseek(fd, curPos, SEEK_SET); + _lseek(fd, curPos, SEEK_SET); return endPos; } } @@ -582,7 +582,7 @@ LONG __cdecl MSVCRT__filelength(int fd) /********************************************************************* * _fileno (MSVCRT.@) */ -int __cdecl MSVCRT__fileno(MSVCRT_FILE* file) +int _fileno(MSVCRT_FILE* file) { TRACE(":FILE* (%p) fd (%d)\n",file,file->_file); return file->_file; @@ -591,14 +591,14 @@ int __cdecl MSVCRT__fileno(MSVCRT_FILE* file) /********************************************************************* * _flushall (MSVCRT.@) */ -int __cdecl MSVCRT__flushall(void) +int _flushall(void) { int num_flushed = 0, i = 3; while(i < MSVCRT_fdend) if (MSVCRT_handles[i] != INVALID_HANDLE_VALUE) { - if (MSVCRT__commit(i) == -1) + if (_commit(i) == -1) if (MSVCRT_files[i]) MSVCRT_files[i]->_flag |= _IOERR; num_flushed++; @@ -611,11 +611,11 @@ int __cdecl MSVCRT__flushall(void) /********************************************************************* * _fstat (MSVCRT.@) */ -int __cdecl MSVCRT__fstat(int fd, struct _stat* buf) +int _fstat(int fd, struct _stat* buf) { DWORD dw; BY_HANDLE_FILE_INFORMATION hfi; - HANDLE hand = MSVCRT__fdtoh(fd); + HANDLE hand = msvcrt_fdtoh(fd); TRACE(":fd (%d) stat (%p)\n",fd,buf); if (hand == INVALID_HANDLE_VALUE) @@ -649,9 +649,9 @@ int __cdecl MSVCRT__fstat(int fd, struct _stat* buf) /********************************************************************* * _futime (MSVCRT.@) */ -int __cdecl MSVCRT__futime(int fd, struct _utimbuf *t) +int _futime(int fd, struct _utimbuf *t) { - HANDLE hand = MSVCRT__fdtoh(fd); + HANDLE hand = msvcrt_fdtoh(fd); FILETIME at, wt; if (!t) @@ -681,9 +681,9 @@ int __cdecl MSVCRT__futime(int fd, struct _utimbuf *t) /********************************************************************* * _get_osfhandle (MSVCRT.@) */ -HANDLE MSVCRT__get_osfhandle(int fd) +HANDLE _get_osfhandle(int fd) { - HANDLE hand = MSVCRT__fdtoh(fd); + HANDLE hand = msvcrt_fdtoh(fd); HANDLE newhand = hand; TRACE(":fd (%d) handle (%d)\n",fd,hand); @@ -707,9 +707,9 @@ HANDLE MSVCRT__get_osfhandle(int fd) /********************************************************************* * _isatty (MSVCRT.@) */ -int __cdecl MSVCRT__isatty(int fd) +int _isatty(int fd) { - HANDLE hand = MSVCRT__fdtoh(fd); + HANDLE hand = msvcrt_fdtoh(fd); TRACE(":fd (%d) handle (%d)\n",fd,hand); if (hand == INVALID_HANDLE_VALUE) @@ -721,7 +721,7 @@ int __cdecl MSVCRT__isatty(int fd) /********************************************************************* * _mktemp (MSVCRT.@) */ -char *__cdecl MSVCRT__mktemp(char *pattern) +char *_mktemp(char *pattern) { int numX = 0; char *retVal = pattern; @@ -755,7 +755,7 @@ char *__cdecl MSVCRT__mktemp(char *pattern) /********************************************************************* * _wmktemp (MSVCRT.@) */ -WCHAR *__cdecl MSVCRT__wmktemp(WCHAR *pattern) +WCHAR *_wmktemp(WCHAR *pattern) { int numX = 0; WCHAR *retVal = pattern; @@ -789,7 +789,7 @@ WCHAR *__cdecl MSVCRT__wmktemp(WCHAR *pattern) /********************************************************************* * _open (MSVCRT.@) */ -int __cdecl MSVCRT__open(const char *path,int flags) +int _open(const char *path,int flags) { DWORD access = 0, creation = 0; int ioflag = 0, fd; @@ -857,16 +857,16 @@ int __cdecl MSVCRT__open(const char *path,int flags) return -1; } - fd = MSVCRT__alloc_fd(hand, ioflag); + fd = msvcrt_alloc_fd(hand, ioflag); TRACE(":fd (%d) handle (%d)\n",fd, hand); if (fd > 0) { if (flags & _O_TEMPORARY) - MSVCRT_tempfiles[fd] = MSVCRT__strdup(path); + MSVCRT_tempfiles[fd] = _strdup(path); if (ioflag & _IOAPPEND) - MSVCRT__lseek(fd, 0, FILE_END); + _lseek(fd, 0, FILE_END); } return fd; @@ -875,13 +875,13 @@ int __cdecl MSVCRT__open(const char *path,int flags) /********************************************************************* * _wopen (MSVCRT.@) */ -int __cdecl MSVCRT__wopen(const WCHAR *path,int flags) +int _wopen(const WCHAR *path,int flags) { const unsigned int len = wcslen(path); char *patha = MSVCRT_calloc(len + 1,1); if (patha && WideCharToMultiByte(CP_ACP,0,path,len,patha,len,NULL,NULL)) { - int retval = MSVCRT__open(patha,flags); + int retval = _open(patha,flags); MSVCRT_free(patha); return retval; } @@ -893,35 +893,35 @@ int __cdecl MSVCRT__wopen(const WCHAR *path,int flags) /********************************************************************* * _sopen (MSVCRT.@) */ -int __cdecl MSVCRT__sopen(const char *path,int oflags,int shflags) +int MSVCRT__sopen(const char *path,int oflags,int shflags) { - return MSVCRT__open(path, oflags | shflags); + return _open(path, oflags | shflags); } /********************************************************************* * _creat (MSVCRT.@) */ -int __cdecl MSVCRT__creat(const char *path, int flags) +int _creat(const char *path, int flags) { int usedFlags = (flags & _O_TEXT)| _O_CREAT| _O_WRONLY| _O_TRUNC; - return MSVCRT__open(path, usedFlags); + return _open(path, usedFlags); } /********************************************************************* * _wcreat (MSVCRT.@) */ -int __cdecl MSVCRT__wcreat(const WCHAR *path, int flags) +int _wcreat(const WCHAR *path, int flags) { int usedFlags = (flags & _O_TEXT)| _O_CREAT| _O_WRONLY| _O_TRUNC; - return MSVCRT__wopen(path, usedFlags); + return _wopen(path, usedFlags); } /********************************************************************* * _open_osfhandle (MSVCRT.@) */ -int __cdecl MSVCRT__open_osfhandle(HANDLE hand, int flags) +int _open_osfhandle(HANDLE hand, int flags) { - int fd = MSVCRT__alloc_fd(hand,flags); + int fd = msvcrt_alloc_fd(hand,flags); TRACE(":handle (%d) fd (%d)\n",hand,fd); return fd; } @@ -929,14 +929,14 @@ int __cdecl MSVCRT__open_osfhandle(HANDLE hand, int flags) /********************************************************************* * _rmtmp (MSVCRT.@) */ -int __cdecl MSVCRT__rmtmp(void) +int _rmtmp(void) { int num_removed = 0, i; for (i = 3; i < MSVCRT_fdend; i++) if (MSVCRT_tempfiles[i]) { - MSVCRT__close(i); + _close(i); num_removed++; } @@ -948,10 +948,10 @@ int __cdecl MSVCRT__rmtmp(void) /********************************************************************* * _read (MSVCRT.@) */ -int __cdecl MSVCRT__read(int fd, void *buf, unsigned int count) +int _read(int fd, void *buf, unsigned int count) { DWORD num_read; - HANDLE hand = MSVCRT__fdtoh(fd); + HANDLE hand = msvcrt_fdtoh(fd); /* Dont trace small reads, it gets *very* annoying */ if (count > 4) @@ -983,10 +983,10 @@ int __cdecl MSVCRT__read(int fd, void *buf, unsigned int count) /********************************************************************* * _getw (MSVCRT.@) */ -int __cdecl MSVCRT__getw(MSVCRT_FILE* file) +int _getw(MSVCRT_FILE* file) { int i; - if (MSVCRT__read(file->_file, &i, sizeof(int)) != 1) + if (_read(file->_file, &i, sizeof(int)) != 1) return MSVCRT_EOF; return i; } @@ -994,7 +994,7 @@ int __cdecl MSVCRT__getw(MSVCRT_FILE* file) /********************************************************************* * _setmode (MSVCRT.@) */ -int __cdecl MSVCRT__setmode(int fd,int mode) +int _setmode(int fd,int mode) { if (mode & _O_TEXT) FIXME("fd (%d) mode (%d) TEXT not implemented\n",fd,mode); @@ -1004,7 +1004,7 @@ int __cdecl MSVCRT__setmode(int fd,int mode) /********************************************************************* * _stat (MSVCRT.@) */ -int __cdecl MSVCRT__stat(const char* path, struct _stat * buf) +int _stat(const char* path, struct _stat * buf) { DWORD dw; WIN32_FILE_ATTRIBUTE_DATA hfi; @@ -1026,7 +1026,7 @@ int __cdecl MSVCRT__stat(const char* path, struct _stat * buf) if (isalpha(*path)) buf->st_dev = buf->st_rdev = toupper(*path - 'A'); /* drive num */ else - buf->st_dev = buf->st_rdev = MSVCRT__getdrive() - 1; + buf->st_dev = buf->st_rdev = _getdrive() - 1; plen = strlen(path); @@ -1065,7 +1065,7 @@ int __cdecl MSVCRT__stat(const char* path, struct _stat * buf) /********************************************************************* * _wstat (MSVCRT.@) */ -int __cdecl MSVCRT__wstat(const WCHAR* path, struct _stat * buf) +int _wstat(const WCHAR* path, struct _stat * buf) { DWORD dw; WIN32_FILE_ATTRIBUTE_DATA hfi; @@ -1087,7 +1087,7 @@ int __cdecl MSVCRT__wstat(const WCHAR* path, struct _stat * buf) if (iswalpha(*path)) buf->st_dev = buf->st_rdev = towupper(*path - (WCHAR)L'A'); /* drive num */ else - buf->st_dev = buf->st_rdev = MSVCRT__getdrive() - 1; + buf->st_dev = buf->st_rdev = _getdrive() - 1; plen = wcslen(path); @@ -1126,15 +1126,15 @@ int __cdecl MSVCRT__wstat(const WCHAR* path, struct _stat * buf) /********************************************************************* * _tell (MSVCRT.@) */ -LONG __cdecl MSVCRT__tell(int fd) +LONG _tell(int fd) { - return MSVCRT__lseek(fd, 0, SEEK_CUR); + return _lseek(fd, 0, SEEK_CUR); } /********************************************************************* * _tempnam (MSVCRT.@) */ -char *__cdecl MSVCRT__tempnam(const char *dir, const char *prefix) +char *_tempnam(const char *dir, const char *prefix) { char tmpbuf[MAX_PATH]; @@ -1142,7 +1142,7 @@ char *__cdecl MSVCRT__tempnam(const char *dir, const char *prefix) if (GetTempFileNameA(dir,prefix,0,tmpbuf)) { TRACE("got name (%s)\n",tmpbuf); - return MSVCRT__strdup(tmpbuf); + return _strdup(tmpbuf); } TRACE("failed (%ld)\n",GetLastError()); return NULL; @@ -1151,7 +1151,7 @@ char *__cdecl MSVCRT__tempnam(const char *dir, const char *prefix) /********************************************************************* * _wtempnam (MSVCRT.@) */ -WCHAR *__cdecl MSVCRT__wtempnam(const WCHAR *dir, const WCHAR *prefix) +WCHAR *_wtempnam(const WCHAR *dir, const WCHAR *prefix) { WCHAR tmpbuf[MAX_PATH]; @@ -1159,7 +1159,7 @@ WCHAR *__cdecl MSVCRT__wtempnam(const WCHAR *dir, const WCHAR *prefix) if (GetTempFileNameW(dir,prefix,0,tmpbuf)) { TRACE("got name (%s)\n",debugstr_w(tmpbuf)); - return MSVCRT__wcsdup(tmpbuf); + return _wcsdup(tmpbuf); } TRACE("failed (%ld)\n",GetLastError()); return NULL; @@ -1168,7 +1168,7 @@ WCHAR *__cdecl MSVCRT__wtempnam(const WCHAR *dir, const WCHAR *prefix) /********************************************************************* * _umask (MSVCRT.@) */ -int __cdecl MSVCRT__umask(int umask) +int _umask(int umask) { int old_umask = MSVCRT_umask; TRACE("(%d)\n",umask); @@ -1179,14 +1179,14 @@ int __cdecl MSVCRT__umask(int umask) /********************************************************************* * _utime (MSVCRT.@) */ -int __cdecl MSVCRT__utime(const char *path, struct _utimbuf *t) +int _utime(const char* path, struct _utimbuf *t) { - int fd = MSVCRT__open(path, _O_WRONLY | _O_BINARY); + int fd = _open(path, _O_WRONLY | _O_BINARY); if (fd > 0) { - int retVal = MSVCRT__futime(fd, t); - MSVCRT__close(fd); + int retVal = _futime(fd, t); + _close(fd); return retVal; } return -1; @@ -1195,14 +1195,14 @@ int __cdecl MSVCRT__utime(const char *path, struct _utimbuf *t) /********************************************************************* * _wutime (MSVCRT.@) */ -int __cdecl MSVCRT__wutime(const WCHAR *path, struct _utimbuf *t) +int _wutime(const WCHAR* path, struct _utimbuf *t) { - int fd = MSVCRT__wopen(path, _O_WRONLY | _O_BINARY); + int fd = _wopen(path, _O_WRONLY | _O_BINARY); if (fd > 0) { - int retVal = MSVCRT__futime(fd, t); - MSVCRT__close(fd); + int retVal = _futime(fd, t); + _close(fd); return retVal; } return -1; @@ -1211,10 +1211,10 @@ int __cdecl MSVCRT__wutime(const WCHAR *path, struct _utimbuf *t) /********************************************************************* * _write (MSVCRT.@) */ -unsigned int __cdecl MSVCRT__write(int fd, const void *buf, unsigned int count) +unsigned int _write(int fd, const void* buf, unsigned int count) { DWORD num_written; - HANDLE hand = MSVCRT__fdtoh(fd); + HANDLE hand = msvcrt_fdtoh(fd); /* Dont trace small writes, it gets *very* annoying */ // if (count > 32) @@ -1224,7 +1224,7 @@ unsigned int __cdecl MSVCRT__write(int fd, const void *buf, unsigned int count) /* If appending, go to EOF */ if (MSVCRT_flags[fd] & _IOAPPEND) - MSVCRT__lseek(fd, 0, FILE_END); + _lseek(fd, 0, FILE_END); /* Set _cnt to 0 so optimised binaries will call our implementation * of putc/getc. @@ -1246,15 +1246,15 @@ unsigned int __cdecl MSVCRT__write(int fd, const void *buf, unsigned int count) /********************************************************************* * _putw (MSVCRT.@) */ -int __cdecl MSVCRT__putw(int val, MSVCRT_FILE* file) +int _putw(int val, MSVCRT_FILE* file) { - return MSVCRT__write(file->_file, &val, sizeof(val)) == 1? val : MSVCRT_EOF; + return _write(file->_file, &val, sizeof(val)) == 1? val : MSVCRT_EOF; } /********************************************************************* * clearerr (MSVCRT.@) */ -void __cdecl MSVCRT_clearerr(MSVCRT_FILE* file) +void MSVCRT_clearerr(MSVCRT_FILE* file) { TRACE(":file (%p) fd (%d)\n",file,file->_file); file->_flag &= ~(_IOERR | _IOEOF); @@ -1263,15 +1263,15 @@ void __cdecl MSVCRT_clearerr(MSVCRT_FILE* file) /********************************************************************* * fclose (MSVCRT.@) */ -int __cdecl MSVCRT_fclose(MSVCRT_FILE* file) +int MSVCRT_fclose(MSVCRT_FILE* file) { - return MSVCRT__close(file->_file); + return _close(file->_file); } /********************************************************************* * feof (MSVCRT.@) */ -int __cdecl MSVCRT_feof(MSVCRT_FILE* file) +int MSVCRT_feof(MSVCRT_FILE* file) { return file->_flag & _IOEOF; } @@ -1279,7 +1279,7 @@ int __cdecl MSVCRT_feof(MSVCRT_FILE* file) /********************************************************************* * ferror (MSVCRT.@) */ -int __cdecl MSVCRT_ferror(MSVCRT_FILE* file) +int MSVCRT_ferror(MSVCRT_FILE* file) { return file->_flag & _IOERR; } @@ -1287,18 +1287,18 @@ int __cdecl MSVCRT_ferror(MSVCRT_FILE* file) /********************************************************************* * fflush (MSVCRT.@) */ -int __cdecl MSVCRT_fflush(MSVCRT_FILE* file) +int MSVCRT_fflush(MSVCRT_FILE* file) { - return MSVCRT__commit(file->_file); + return _commit(file->_file); } /********************************************************************* * fgetc (MSVCRT.@) */ -int __cdecl MSVCRT_fgetc(MSVCRT_FILE* file) +int MSVCRT_fgetc(MSVCRT_FILE* file) { char c; - if (MSVCRT__read(file->_file,&c,1) != 1) + if (_read(file->_file,&c,1) != 1) return MSVCRT_EOF; return c; } @@ -1306,7 +1306,7 @@ int __cdecl MSVCRT_fgetc(MSVCRT_FILE* file) /********************************************************************* * _fgetchar (MSVCRT.@) */ -int __cdecl MSVCRT__fgetchar(void) +int _fgetchar(void) { return MSVCRT_fgetc(MSVCRT_stdin); } @@ -1314,7 +1314,7 @@ int __cdecl MSVCRT__fgetchar(void) /********************************************************************* * _filbuf (MSVCRT.@) */ -int __cdecl MSVCRT__filbuf(MSVCRT_FILE* file) +int _filbuf(MSVCRT_FILE* file) { return MSVCRT_fgetc(file); } @@ -1322,16 +1322,16 @@ int __cdecl MSVCRT__filbuf(MSVCRT_FILE* file) /********************************************************************* * fgetpos (MSVCRT.@) */ -int __cdecl MSVCRT_fgetpos(MSVCRT_FILE* file, MSVCRT_fpos_t *pos) +int MSVCRT_fgetpos(MSVCRT_FILE* file, MSVCRT_fpos_t *pos) { - *pos = MSVCRT__tell(file->_file); + *pos = _tell(file->_file); return (*pos == -1? -1 : 0); } /********************************************************************* * fgets (MSVCRT.@) */ -char *__cdecl MSVCRT_fgets(char *s, int size, MSVCRT_FILE* file) +char *MSVCRT_fgets(char *s, int size, MSVCRT_FILE* file) { int cc; char * buf_start = s; @@ -1366,10 +1366,10 @@ char *__cdecl MSVCRT_fgets(char *s, int size, MSVCRT_FILE* file) /********************************************************************* * fgetwc (MSVCRT.@) */ -WCHAR __cdecl MSVCRT_fgetwc(MSVCRT_FILE* file) +WCHAR MSVCRT_fgetwc(MSVCRT_FILE* file) { WCHAR wc; - if (MSVCRT__read(file->_file, &wc, sizeof(wc)) != sizeof(wc)) + if (_read(file->_file, &wc, sizeof(wc)) != sizeof(wc)) return MSVCRT_WEOF; return wc; } @@ -1377,7 +1377,7 @@ WCHAR __cdecl MSVCRT_fgetwc(MSVCRT_FILE* file) /********************************************************************* * getwc (MSVCRT.@) */ -WCHAR __cdecl MSVCRT_getwc(MSVCRT_FILE* file) +WCHAR MSVCRT_getwc(MSVCRT_FILE* file) { return MSVCRT_fgetwc(file); } @@ -1385,7 +1385,7 @@ WCHAR __cdecl MSVCRT_getwc(MSVCRT_FILE* file) /********************************************************************* * _fgetwchar (MSVCRT.@) */ -WCHAR __cdecl MSVCRT__fgetwchar(void) +WCHAR _fgetwchar(void) { return MSVCRT_fgetwc(MSVCRT_stdin); } @@ -1393,17 +1393,17 @@ WCHAR __cdecl MSVCRT__fgetwchar(void) /********************************************************************* * getwchar (MSVCRT.@) */ -WCHAR __cdecl MSVCRT_getwchar(void) +WCHAR MSVCRT_getwchar(void) { - return MSVCRT__fgetwchar(); + return _fgetwchar(); } /********************************************************************* * fputwc (MSVCRT.@) */ -WCHAR __cdecl MSVCRT_fputwc(WCHAR wc, MSVCRT_FILE* file) +WCHAR MSVCRT_fputwc(WCHAR wc, MSVCRT_FILE* file) { - if (MSVCRT__write(file->_file, &wc, sizeof(wc)) != sizeof(wc)) + if (_write(file->_file, &wc, sizeof(wc)) != sizeof(wc)) return MSVCRT_WEOF; return wc; } @@ -1411,7 +1411,7 @@ WCHAR __cdecl MSVCRT_fputwc(WCHAR wc, MSVCRT_FILE* file) /********************************************************************* * _fputwchar (MSVCRT.@) */ -WCHAR __cdecl MSVCRT__fputwchar(WCHAR wc) +WCHAR _fputwchar(WCHAR wc) { return MSVCRT_fputwc(wc, MSVCRT_stdout); } @@ -1419,7 +1419,7 @@ WCHAR __cdecl MSVCRT__fputwchar(WCHAR wc) /********************************************************************* * fopen (MSVCRT.@) */ -MSVCRT_FILE* __cdecl MSVCRT_fopen(const char *path, const char *mode) +MSVCRT_FILE* MSVCRT_fopen(const char *path, const char *mode) { MSVCRT_FILE* file; int flags = 0, plus = 0, fd; @@ -1464,15 +1464,15 @@ MSVCRT_FILE* __cdecl MSVCRT_fopen(const char *path, const char *mode) FIXME(":unknown flag %c not supported\n",mode[-1]); } - fd = MSVCRT__open(path, flags); + fd = _open(path, flags); if (fd < 0) return NULL; - file = MSVCRT__alloc_fp(fd); + file = msvcrt_alloc_fp(fd); TRACE(":got (%p)\n",file); if (!file) - MSVCRT__close(fd); + _close(fd); return file; } @@ -1480,7 +1480,7 @@ MSVCRT_FILE* __cdecl MSVCRT_fopen(const char *path, const char *mode) /********************************************************************* * _wfopen (MSVCRT.@) */ -MSVCRT_FILE *__cdecl MSVCRT__wfopen(const WCHAR *path, const WCHAR *mode) +MSVCRT_FILE *_wfopen(const WCHAR *path, const WCHAR *mode) { const unsigned int plen = wcslen(path), mlen = wcslen(mode); char *patha = MSVCRT_calloc(plen + 1, 1); @@ -1505,7 +1505,7 @@ MSVCRT_FILE *__cdecl MSVCRT__wfopen(const WCHAR *path, const WCHAR *mode) /********************************************************************* * _fsopen (MSVCRT.@) */ -MSVCRT_FILE* __cdecl MSVCRT__fsopen(const char *path, const char *mode, int share) +MSVCRT_FILE* _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); @@ -1514,25 +1514,25 @@ MSVCRT_FILE* __cdecl MSVCRT__fsopen(const char *path, const char *mode, int sha /********************************************************************* * _wfsopen (MSVCRT.@) */ -MSVCRT_FILE* __cdecl MSVCRT__wfsopen(const WCHAR *path, const WCHAR *mode, int share) +MSVCRT_FILE* _wfsopen(const WCHAR *path, const WCHAR *mode, int share) { FIXME(":(%s,%s,%d),ignoring share mode!\n", debugstr_w(path),debugstr_w(mode),share); - return MSVCRT__wfopen(path,mode); + return _wfopen(path,mode); } /********************************************************************* * fputc (MSVCRT.@) */ -int __cdecl MSVCRT_fputc(int c, MSVCRT_FILE* file) +int MSVCRT_fputc(int c, MSVCRT_FILE* file) { - return MSVCRT__write(file->_file, &c, 1) == 1? c : MSVCRT_EOF; + return _write(file->_file, &c, 1) == 1? c : MSVCRT_EOF; } /********************************************************************* * _flsbuf (MSVCRT.@) */ -int __cdecl MSVCRT__flsbuf(int c, MSVCRT_FILE* file) +int _flsbuf(int c, MSVCRT_FILE* file) { return MSVCRT_fputc(c,file); } @@ -1540,7 +1540,7 @@ int __cdecl MSVCRT__flsbuf(int c, MSVCRT_FILE* file) /********************************************************************* * _fputchar (MSVCRT.@) */ -int __cdecl MSVCRT__fputchar(int c) +int _fputchar(int c) { return MSVCRT_fputc(c, MSVCRT_stdout); } @@ -1548,9 +1548,9 @@ int __cdecl MSVCRT__fputchar(int c) /********************************************************************* * fread (MSVCRT.@) */ -DWORD __cdecl MSVCRT_fread(void *ptr, int size, int nmemb, MSVCRT_FILE* file) +DWORD MSVCRT_fread(void *ptr, int size, int nmemb, MSVCRT_FILE* file) { - DWORD read = MSVCRT__read(file->_file,ptr, size * nmemb); + DWORD read = _read(file->_file,ptr, size * nmemb); if (read <= 0) return 0; return read / size; @@ -1560,7 +1560,7 @@ DWORD __cdecl MSVCRT_fread(void *ptr, int size, int nmemb, MSVCRT_FILE* file) * freopen (MSVCRT.@) * */ -MSVCRT_FILE* __cdecl MSVCRT_freopen(const char *path, const char *mode,MSVCRT_FILE* file) +MSVCRT_FILE* MSVCRT_freopen(const char *path, const char *mode,MSVCRT_FILE* file) { MSVCRT_FILE* newfile; int fd; @@ -1592,7 +1592,7 @@ MSVCRT_FILE* __cdecl MSVCRT_freopen(const char *path, const char *mode,MSVCRT_FI /* And free up the resources allocated by fopen, but * not the HANDLE we copied. */ MSVCRT_free(MSVCRT_files[fd]); - MSVCRT__free_fd(newfile->_file); + msvcrt_free_fd(newfile->_file); return &MSVCRT__iob[fd]; } @@ -1605,17 +1605,17 @@ MSVCRT_FILE* __cdecl MSVCRT_freopen(const char *path, const char *mode,MSVCRT_FI /********************************************************************* * fsetpos (MSVCRT.@) */ -int __cdecl MSVCRT_fsetpos(MSVCRT_FILE* file, MSVCRT_fpos_t *pos) +int MSVCRT_fsetpos(MSVCRT_FILE* file, MSVCRT_fpos_t *pos) { - return MSVCRT__lseek(file->_file,*pos,SEEK_SET); + return _lseek(file->_file,*pos,SEEK_SET); } /********************************************************************* * fscanf (MSVCRT.@) */ -int __cdecl MSVCRT_fscanf(MSVCRT_FILE* file, const char *format, ...) +int MSVCRT_fscanf(MSVCRT_FILE* file, const char *format, ...) { - /* NOTE: If you extend this function, extend MSVCRT__cscanf in console.c too */ + /* NOTE: If you extend this function, extend _cscanf in console.c too */ int rd = 0; int nch; va_list ap; @@ -1736,25 +1736,25 @@ int __cdecl MSVCRT_fscanf(MSVCRT_FILE* file, const char *format, ...) /********************************************************************* * fseek (MSVCRT.@) */ -LONG __cdecl MSVCRT_fseek(MSVCRT_FILE* file, LONG offset, int whence) +LONG MSVCRT_fseek(MSVCRT_FILE* file, LONG offset, int whence) { - return MSVCRT__lseek(file->_file,offset,whence); + return _lseek(file->_file,offset,whence); } /********************************************************************* * ftell (MSVCRT.@) */ -LONG __cdecl MSVCRT_ftell(MSVCRT_FILE* file) +LONG MSVCRT_ftell(MSVCRT_FILE* file) { - return MSVCRT__tell(file->_file); + return _tell(file->_file); } /********************************************************************* * fwrite (MSVCRT.@) */ -unsigned int __cdecl MSVCRT_fwrite(const void *ptr, int size, int nmemb, MSVCRT_FILE* file) +unsigned int MSVCRT_fwrite(const void *ptr, int size, int nmemb, MSVCRT_FILE* file) { - unsigned int written = MSVCRT__write(file->_file, ptr, size * nmemb); + unsigned int written = _write(file->_file, ptr, size * nmemb); if (written <= 0) return 0; return written / size; @@ -1763,7 +1763,7 @@ unsigned int __cdecl MSVCRT_fwrite(const void *ptr, int size, int nmemb, MSVCRT_ /********************************************************************* * fputs (MSVCRT.@) */ -int __cdecl MSVCRT_fputs(const char *s, MSVCRT_FILE* file) +int MSVCRT_fputs(const char *s, MSVCRT_FILE* file) { return MSVCRT_fwrite(s,strlen(s),1,file) == 1 ? 0 : MSVCRT_EOF; } @@ -1771,7 +1771,7 @@ int __cdecl MSVCRT_fputs(const char *s, MSVCRT_FILE* file) /********************************************************************* * fputws (MSVCRT.@) */ -int __cdecl MSVCRT_fputws(const WCHAR *s, MSVCRT_FILE* file) +int MSVCRT_fputws(const WCHAR *s, MSVCRT_FILE* file) { return MSVCRT_fwrite(s,wcslen(s),1,file) == 1 ? 0 : MSVCRT_EOF; } @@ -1779,7 +1779,7 @@ int __cdecl MSVCRT_fputws(const WCHAR *s, MSVCRT_FILE* file) /********************************************************************* * getchar (MSVCRT.@) */ -int __cdecl MSVCRT_getchar(void) +int MSVCRT_getchar(void) { return MSVCRT_fgetc(MSVCRT_stdin); } @@ -1787,7 +1787,7 @@ int __cdecl MSVCRT_getchar(void) /********************************************************************* * getc (MSVCRT.@) */ -int __cdecl MSVCRT_getc(MSVCRT_FILE* file) +int MSVCRT_getc(MSVCRT_FILE* file) { return MSVCRT_fgetc(file); } @@ -1795,7 +1795,7 @@ int __cdecl MSVCRT_getc(MSVCRT_FILE* file) /********************************************************************* * gets (MSVCRT.@) */ -char *__cdecl MSVCRT_gets(char *buf) +char *MSVCRT_gets(char *buf) { int cc; char * buf_start = buf; @@ -1817,7 +1817,7 @@ char *__cdecl MSVCRT_gets(char *buf) /********************************************************************* * putc (MSVCRT.@) */ -int __cdecl MSVCRT_putc(int c, MSVCRT_FILE* file) +int MSVCRT_putc(int c, MSVCRT_FILE* file) { return MSVCRT_fputc(c, file); } @@ -1825,7 +1825,7 @@ int __cdecl MSVCRT_putc(int c, MSVCRT_FILE* file) /********************************************************************* * putchar (MSVCRT.@) */ -void __cdecl MSVCRT_putchar(int c) +void MSVCRT_putchar(int c) { MSVCRT_fputc(c, MSVCRT_stdout); } @@ -1833,7 +1833,7 @@ void __cdecl MSVCRT_putchar(int c) /********************************************************************* * puts (MSVCRT.@) */ -int __cdecl MSVCRT_puts(const char *s) +int MSVCRT_puts(const char *s) { int retval = MSVCRT_EOF; if (MSVCRT_fwrite(s,strlen(s),1,MSVCRT_stdout) == 1) @@ -1844,7 +1844,7 @@ int __cdecl MSVCRT_puts(const char *s) /********************************************************************* * _putws (MSVCRT.@) */ -int __cdecl MSVCRT__putws(const WCHAR *s) +int _putws(const WCHAR *s) { static const WCHAR nl = (WCHAR)L'\n'; if (MSVCRT_fwrite(s,wcslen(s),1,MSVCRT_stdout) == 1) @@ -1855,7 +1855,7 @@ int __cdecl MSVCRT__putws(const WCHAR *s) /********************************************************************* * remove (MSVCRT.@) */ -int __cdecl MSVCRT_remove(const char *path) +int MSVCRT_remove(const char *path) { TRACE("(%s)\n",path); if (DeleteFileA(path)) @@ -1868,7 +1868,7 @@ int __cdecl MSVCRT_remove(const char *path) /********************************************************************* * _wremove (MSVCRT.@) */ -int __cdecl MSVCRT__wremove(const WCHAR *path) +int _wremove(const WCHAR *path) { TRACE("(%s)\n",debugstr_w(path)); if (DeleteFileW(path)) @@ -1881,7 +1881,7 @@ int __cdecl MSVCRT__wremove(const WCHAR *path) /********************************************************************* * scanf (MSVCRT.@) */ -int __cdecl MSVCRT_scanf(const char *format, ...) +int MSVCRT_scanf(const char *format, ...) { va_list valist; int res; @@ -1895,7 +1895,7 @@ int __cdecl MSVCRT_scanf(const char *format, ...) /********************************************************************* * rename (MSVCRT.@) */ -int __cdecl MSVCRT_rename(const char *oldpath,const char *newpath) +int MSVCRT_rename(const char *oldpath,const char *newpath) { TRACE(":from %s to %s\n",oldpath,newpath); if (MoveFileExA(oldpath, newpath, MOVEFILE_REPLACE_EXISTING)) @@ -1908,7 +1908,7 @@ int __cdecl MSVCRT_rename(const char *oldpath,const char *newpath) /********************************************************************* * _wrename (MSVCRT.@) */ -int __cdecl MSVCRT__wrename(const WCHAR *oldpath,const WCHAR *newpath) +int _wrename(const WCHAR *oldpath,const WCHAR *newpath) { TRACE(":from %s to %s\n",debugstr_w(oldpath),debugstr_w(newpath)); if (MoveFileExW(oldpath, newpath, MOVEFILE_REPLACE_EXISTING)) @@ -1929,7 +1929,7 @@ void MSVCRT_setvbuf(MSVCRT_FILE* file, char *buf, int mode, unsigned int size) /********************************************************************* * setbuf (MSVCRT.@) */ -void __cdecl MSVCRT_setbuf(MSVCRT_FILE* file, char *buf) +void MSVCRT_setbuf(MSVCRT_FILE* file, char *buf) { MSVCRT_setvbuf(file, buf, buf ? _IOFBF : _IONBF, BUFSIZ); } @@ -1937,7 +1937,7 @@ void __cdecl MSVCRT_setbuf(MSVCRT_FILE* file, char *buf) /********************************************************************* * tmpnam (MSVCRT.@) */ -char *__cdecl MSVCRT_tmpnam(char *s) +char *MSVCRT_tmpnam(char *s) { char tmpbuf[MAX_PATH]; char* prefix = "TMP"; @@ -1955,13 +1955,13 @@ char *__cdecl MSVCRT_tmpnam(char *s) /********************************************************************* * tmpfile (MSVCRT.@) */ -MSVCRT_FILE* __cdecl MSVCRT_tmpfile(void) +MSVCRT_FILE* MSVCRT_tmpfile(void) { char *filename = MSVCRT_tmpnam(NULL); int fd; - fd = MSVCRT__open(filename, _O_CREAT | _O_BINARY | _O_RDWR | _O_TEMPORARY); + fd = _open(filename, _O_CREAT | _O_BINARY | _O_RDWR | _O_TEMPORARY); if (fd != -1) - return MSVCRT__alloc_fp(fd); + return msvcrt_alloc_fp(fd); return NULL; } extern int vsnprintf(void *, unsigned int, const void*, va_list); @@ -1969,7 +1969,7 @@ extern int vsnprintf(void *, unsigned int, const void*, va_list); /********************************************************************* * vfprintf (MSVCRT.@) */ -int __cdecl MSVCRT_vfprintf(MSVCRT_FILE* file, const char *format, va_list valist) +int MSVCRT_vfprintf(MSVCRT_FILE* file, const char *format, va_list valist) { char buf[2048], *mem = buf; int written, resize = sizeof(buf), retval; @@ -1996,12 +1996,12 @@ int __cdecl MSVCRT_vfprintf(MSVCRT_FILE* file, const char *format, va_list valis /********************************************************************* * vfwprintf (MSVCRT.@) */ -int __cdecl MSVCRT_vfwprintf(MSVCRT_FILE* file, const WCHAR *format, va_list valist) +int MSVCRT_vfwprintf(MSVCRT_FILE* file, const WCHAR *format, va_list valist) { WCHAR buf[2048], *mem = buf; int written, resize = sizeof(buf) / sizeof(WCHAR), retval; /* See vfprintf comments */ - while ((written = MSVCRT__vsnwprintf(mem, resize, format, valist)) == -1 || + while ((written = _vsnwprintf(mem, resize, format, valist)) == -1 || written > resize) { resize = (written == -1 ? resize * 2 : written + sizeof(WCHAR)); @@ -2019,7 +2019,7 @@ int __cdecl MSVCRT_vfwprintf(MSVCRT_FILE* file, const WCHAR *format, va_list val /********************************************************************* * vprintf (MSVCRT.@) */ -int __cdecl MSVCRT_vprintf(const char *format, va_list valist) +int MSVCRT_vprintf(const char *format, va_list valist) { return MSVCRT_vfprintf(MSVCRT_stdout,format,valist); } @@ -2027,7 +2027,7 @@ int __cdecl MSVCRT_vprintf(const char *format, va_list valist) /********************************************************************* * vwprintf (MSVCRT.@) */ -int __cdecl MSVCRT_vwprintf(const WCHAR *format, va_list valist) +int MSVCRT_vwprintf(const WCHAR *format, va_list valist) { return MSVCRT_vfwprintf(MSVCRT_stdout,format,valist); } @@ -2035,7 +2035,7 @@ int __cdecl MSVCRT_vwprintf(const WCHAR *format, va_list valist) /********************************************************************* * fprintf (MSVCRT.@) */ -int __cdecl MSVCRT_fprintf(MSVCRT_FILE* file, const char *format, ...) +int MSVCRT_fprintf(MSVCRT_FILE* file, const char *format, ...) { va_list valist; int res; @@ -2048,7 +2048,7 @@ int __cdecl MSVCRT_fprintf(MSVCRT_FILE* file, const char *format, ...) /********************************************************************* * fwprintf (MSVCRT.@) */ -int __cdecl MSVCRT_fwprintf(MSVCRT_FILE* file, const WCHAR *format, ...) +int MSVCRT_fwprintf(MSVCRT_FILE* file, const WCHAR *format, ...) { va_list valist; int res; @@ -2061,7 +2061,7 @@ int __cdecl MSVCRT_fwprintf(MSVCRT_FILE* file, const WCHAR *format, ...) /********************************************************************* * printf (MSVCRT.@) */ -int __cdecl MSVCRT_printf(const char *format, ...) +int MSVCRT_printf(const char *format, ...) { va_list valist; int res; @@ -2074,7 +2074,7 @@ int __cdecl MSVCRT_printf(const char *format, ...) /********************************************************************* * wprintf (MSVCRT.@) */ -int __cdecl MSVCRT_wprintf(const WCHAR *format, ...) +int MSVCRT_wprintf(const WCHAR *format, ...) { va_list valist; int res; diff --git a/dlls/msvcrt/heap.c b/dlls/msvcrt/heap.c index 0e653a637e3..50fc9cfa923 100644 --- a/dlls/msvcrt/heap.c +++ b/dlls/msvcrt/heap.c @@ -41,7 +41,7 @@ static int MSVCRT_new_mode; /********************************************************************* * operator_new (MSVCRT.@) */ -void *__cdecl MSVCRT_operator_new(unsigned long size) +void* MSVCRT_operator_new(unsigned long size) { void *retval = HeapAlloc(GetProcessHeap(), 0, size); TRACE("(%ld) returning %p\n", size, retval); @@ -55,7 +55,7 @@ void *__cdecl MSVCRT_operator_new(unsigned long size) /********************************************************************* * operator_delete (MSVCRT.@) */ -void __cdecl MSVCRT_operator_delete(void *mem) +void MSVCRT_operator_delete(void *mem) { TRACE("(%p)\n", mem); HeapFree(GetProcessHeap(), 0, mem); @@ -65,7 +65,7 @@ void __cdecl MSVCRT_operator_delete(void *mem) /********************************************************************* * ?_query_new_handler@@YAP6AHI@ZXZ (MSVCRT.@) */ -MSVCRT_new_handler_func __cdecl MSVCRT__query_new_handler(void) +MSVCRT_new_handler_func MSVCRT__query_new_handler(void) { return MSVCRT_new_handler; } @@ -74,7 +74,7 @@ MSVCRT_new_handler_func __cdecl MSVCRT__query_new_handler(void) /********************************************************************* * ?_query_new_mode@@YAHXZ (MSVCRT.@) */ -int __cdecl MSVCRT__query_new_mode(void) +int MSVCRT__query_new_mode(void) { return MSVCRT_new_mode; } @@ -82,7 +82,7 @@ int __cdecl MSVCRT__query_new_mode(void) /********************************************************************* * ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z (MSVCRT.@) */ -MSVCRT_new_handler_func __cdecl MSVCRT__set_new_handler(MSVCRT_new_handler_func func) +MSVCRT_new_handler_func MSVCRT__set_new_handler(MSVCRT_new_handler_func func) { MSVCRT_new_handler_func old_handler; LOCK_HEAP; @@ -95,7 +95,7 @@ MSVCRT_new_handler_func __cdecl MSVCRT__set_new_handler(MSVCRT_new_handler_func /********************************************************************* * ?_set_new_mode@@YAHH@Z (MSVCRT.@) */ -int __cdecl MSVCRT__set_new_mode(int mode) +int MSVCRT__set_new_mode(int mode) { int old_mode; LOCK_HEAP; @@ -108,7 +108,7 @@ int __cdecl MSVCRT__set_new_mode(int mode) /********************************************************************* * _expand (MSVCRT.@) */ -void *__cdecl MSVCRT__expand(void *mem, unsigned int size) +void* _expand(void* mem, unsigned int size) { return HeapReAlloc(GetProcessHeap(), HEAP_REALLOC_IN_PLACE_ONLY, mem, size); } @@ -116,7 +116,7 @@ void *__cdecl MSVCRT__expand(void *mem, unsigned int size) /********************************************************************* * _heapchk (MSVCRT.@) */ -int __cdecl MSVCRT__heapchk(void) +int _heapchk(void) { if (!HeapValidate( GetProcessHeap(), 0, NULL)) { @@ -129,7 +129,7 @@ int __cdecl MSVCRT__heapchk(void) /********************************************************************* * _heapmin (MSVCRT.@) */ -int __cdecl MSVCRT__heapmin(void) +int _heapmin(void) { if (!HeapCompact( GetProcessHeap(), 0 )) { @@ -143,7 +143,7 @@ int __cdecl MSVCRT__heapmin(void) /********************************************************************* * _heapwalk (MSVCRT.@) */ -int __cdecl MSVCRT__heapwalk(MSVCRT_HEAPINFO *next) +int _heapwalk(MSVCRT_HEAPINFO* next) { PROCESS_HEAP_ENTRY phe; @@ -184,14 +184,14 @@ int __cdecl MSVCRT__heapwalk(MSVCRT_HEAPINFO *next) /********************************************************************* * _heapset (MSVCRT.@) */ -int __cdecl MSVCRT__heapset(unsigned int value) +int _heapset(unsigned int value) { int retval; MSVCRT_HEAPINFO heap; memset( &heap, 0, sizeof(MSVCRT_HEAPINFO) ); LOCK_HEAP; - while ((retval = MSVCRT__heapwalk(&heap)) == MSVCRT_HEAPOK) + while ((retval = _heapwalk(&heap)) == MSVCRT_HEAPOK) { if (heap._useflag == MSVCRT_FREEENTRY) memset(heap._pentry, value, heap._size); @@ -203,7 +203,7 @@ int __cdecl MSVCRT__heapset(unsigned int value) /********************************************************************* * _msize (MSVCRT.@) */ -long __cdecl MSVCRT__msize(void *mem) +long _msize(void* mem) { long size = HeapSize(GetProcessHeap(),0,mem); if (size == -1) @@ -217,7 +217,7 @@ long __cdecl MSVCRT__msize(void *mem) /********************************************************************* * calloc (MSVCRT.@) */ -void *__cdecl MSVCRT_calloc(unsigned int size, unsigned int count) +void* MSVCRT_calloc(unsigned int size, unsigned int count) { return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, size * count ); } @@ -225,7 +225,7 @@ void *__cdecl MSVCRT_calloc(unsigned int size, unsigned int count) /********************************************************************* * free (MSVCRT.@) */ -void __cdecl MSVCRT_free(void *ptr) +void MSVCRT_free(void* ptr) { HeapFree(GetProcessHeap(),0,ptr); } @@ -233,7 +233,7 @@ void __cdecl MSVCRT_free(void *ptr) /********************************************************************* * malloc (MSVCRT.@) */ -void * __cdecl MSVCRT_malloc(unsigned int size) +void* MSVCRT_malloc(unsigned int size) { void *ret = HeapAlloc(GetProcessHeap(),0,size); if (!ret) @@ -244,7 +244,7 @@ void * __cdecl MSVCRT_malloc(unsigned int size) /********************************************************************* * realloc (MSVCRT.@) */ -void *__cdecl MSVCRT_realloc(void *ptr, unsigned int size) +void* MSVCRT_realloc(void* ptr, unsigned int size) { return HeapReAlloc(GetProcessHeap(), 0, ptr, size); } diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c index 430743396b1..f710cbeee1d 100644 --- a/dlls/msvcrt/locale.c +++ b/dlls/msvcrt/locale.c @@ -254,7 +254,7 @@ static LCID MSVCRT_locale_to_LCID(locale_search_t* locale) extern int snprintf(char *, int, const char *, ...); /* INTERNAL: Set ctype behaviour for a codepage */ -static void MSVCRT_set_ctype(unsigned int codepage, LCID lcid) +static void msvcrt_set_ctype(unsigned int codepage, LCID lcid) { CPINFO cp; @@ -297,7 +297,7 @@ static void MSVCRT_set_ctype(unsigned int codepage, LCID lcid) /********************************************************************* * setlocale (MSVCRT.@) */ -char *__cdecl MSVCRT_setlocale(int category, const char *locale) +char* MSVCRT_setlocale(int category, const char* locale) { LCID lcid = 0; locale_search_t lc; @@ -443,7 +443,7 @@ char *__cdecl MSVCRT_setlocale(int category, const char *locale) case MSVCRT_LC_COLLATE: if (!lc_all) break; case MSVCRT_LC_CTYPE: - MSVCRT_set_ctype(atoi(lc.found_codepage),lcid); + msvcrt_set_ctype(atoi(lc.found_codepage),lcid); if (!lc_all) break; case MSVCRT_LC_MONETARY: if (!lc_all) break; @@ -459,7 +459,7 @@ char *__cdecl MSVCRT_setlocale(int category, const char *locale) /********************************************************************* * _Getdays (MSVCRT.@) */ -const char *__cdecl MSVCRT__Getdays(void) +const char* _Getdays(void) { static const char *MSVCRT_days = ":Sun:Sunday:Mon:Monday:Tue:Tuesday:Wed:" "Wednesday:Thu:Thursday:Fri:Friday:Sat:Saturday"; @@ -471,7 +471,7 @@ const char *__cdecl MSVCRT__Getdays(void) /********************************************************************* * _Getmonths (MSVCRT.@) */ -const char *__cdecl MSVCRT__Getmonths(void) +const char* _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:" @@ -484,7 +484,7 @@ const char *__cdecl MSVCRT__Getmonths(void) /********************************************************************* * _Getnames (MSVCRT.@) */ -const char *__cdecl MSVCRT__Getnames(void) +const char* _Getnames(void) { /* FIXME: */ TRACE("(void) stub"); @@ -494,7 +494,7 @@ const char *__cdecl MSVCRT__Getnames(void) /********************************************************************* * _Strftime (MSVCRT.@) */ -const char *__cdecl MSVCRT__Strftime(char *out, unsigned int len, const char *fmt, +const char* _Strftime(char *out, unsigned int len, const char *fmt, const void *tm, void *foo) { /* FIXME: */ @@ -507,7 +507,7 @@ const char *__cdecl MSVCRT__Strftime(char *out, unsigned int len, const char *fm /********************************************************************* * _setmbcp (MSVCRT.@) */ -void __cdecl MSVCRT__setmbcp(int cp) +void _setmbcp(int cp) { LOCK_LOCALE; if (MSVCRT_current_lc_all_cp != cp) @@ -521,7 +521,7 @@ void __cdecl MSVCRT__setmbcp(int cp) /********************************************************************* * _getmbcp (MSVCRT.@) */ -int __cdecl MSVCRT__getmbcp(void) +int _getmbcp(void) { return MSVCRT_current_lc_all_cp; } diff --git a/dlls/msvcrt/main.c b/dlls/msvcrt/main.c index 847e8b1f143..859f0ac0d1f 100644 --- a/dlls/msvcrt/main.c +++ b/dlls/msvcrt/main.c @@ -17,23 +17,23 @@ CRITICAL_SECTION MSVCRT_exit_cs; CRITICAL_SECTION MSVCRT_console_cs; CRITICAL_SECTION MSVCRT_locale_cs; -static inline BOOL MSVCRT_init_tls(void); -static inline BOOL MSVCRT_free_tls(void); -static inline void MSVCRT_init_critical_sections(void); -static inline void MSVCRT_free_critical_sections(void); +static inline BOOL msvcrt_init_tls(void); +static inline BOOL msvcrt_free_tls(void); +static inline void msvcrt_init_critical_sections(void); +static inline void msvcrt_free_critical_sections(void); #ifdef __GNUC__ -const char *MSVCRT_get_reason(DWORD reason) __attribute__((unused)); +const char *msvcrt_get_reason(DWORD reason) __attribute__((unused)); #else -const char *MSVCRT_get_reason(DWORD reason); +const char *msvcrt_get_reason(DWORD reason); #endif -void MSVCRT_init_io(void); -void MSVCRT_init_console(void); -void MSVCRT_free_console(void); -void MSVCRT_init_args(void); -void MSVCRT_free_args(void); -void MSVCRT_init_vtables(void); -char *__cdecl MSVCRT_setlocale(int category, const char *locale); +void msvcrt_init_io(void); +void msvcrt_init_console(void); +void msvcrt_free_console(void); +void msvcrt_init_args(void); +void msvcrt_free_args(void); +void msvcrt_init_vtables(void); +char* MSVCRT_setlocale(int category, const char* locale); /********************************************************************* @@ -44,20 +44,20 @@ BOOL WINAPI MSVCRT_Init(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) MSVCRT_thread_data *tls; TRACE("(0x%08x, %s, %p) pid(%ld), tid(%ld), tls(%ld)\n", - hinstDLL, MSVCRT_get_reason(fdwReason), lpvReserved, + hinstDLL, msvcrt_get_reason(fdwReason), lpvReserved, (long)GetCurrentProcessId(), (long)GetCurrentThreadId(), (long)MSVCRT_tls_index); switch (fdwReason) { case DLL_PROCESS_ATTACH: - if (!MSVCRT_init_tls()) + if (!msvcrt_init_tls()) return FALSE; - MSVCRT_init_vtables(); - MSVCRT_init_critical_sections(); - MSVCRT_init_io(); - MSVCRT_init_console(); - MSVCRT_init_args(); + msvcrt_init_vtables(); + msvcrt_init_critical_sections(); + msvcrt_init_io(); + msvcrt_init_console(); + msvcrt_init_args(); MSVCRT_setlocale(0, "C"); TRACE("finished process init\n"); /* FALL THROUGH for Initial TLS allocation!! */ @@ -74,11 +74,11 @@ BOOL WINAPI MSVCRT_Init(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) TRACE("finished thread init\n"); break; case DLL_PROCESS_DETACH: - MSVCRT_free_critical_sections(); - MSVCRT__fcloseall(); - MSVCRT_free_console(); - MSVCRT_free_args(); - if (!MSVCRT_free_tls()) + msvcrt_free_critical_sections(); + _fcloseall(); + msvcrt_free_console(); + msvcrt_free_args(); + if (!msvcrt_free_tls()) return FALSE; TRACE("finished process free\n"); break; @@ -98,7 +98,7 @@ BOOL WINAPI MSVCRT_Init(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) return TRUE; } -static inline BOOL MSVCRT_init_tls(void) +static inline BOOL msvcrt_init_tls(void) { MSVCRT_tls_index = TlsAlloc(); @@ -110,7 +110,7 @@ static inline BOOL MSVCRT_init_tls(void) return TRUE; } -static inline BOOL MSVCRT_free_tls(void) +static inline BOOL msvcrt_free_tls(void) { if (!TlsFree(MSVCRT_tls_index)) { @@ -120,7 +120,7 @@ static inline BOOL MSVCRT_free_tls(void) return TRUE; } -static inline void MSVCRT_init_critical_sections(void) +static inline void msvcrt_init_critical_sections(void) { InitializeCriticalSectionAndSpinCount(&MSVCRT_heap_cs, 4000); InitializeCriticalSection(&MSVCRT_file_cs); @@ -129,7 +129,7 @@ static inline void MSVCRT_init_critical_sections(void) InitializeCriticalSection(&MSVCRT_locale_cs); } -static inline void MSVCRT_free_critical_sections(void) +static inline void msvcrt_free_critical_sections(void) { DeleteCriticalSection(&MSVCRT_locale_cs); DeleteCriticalSection(&MSVCRT_console_cs); @@ -138,7 +138,7 @@ static inline void MSVCRT_free_critical_sections(void) DeleteCriticalSection(&MSVCRT_heap_cs); } -const char *MSVCRT_get_reason(DWORD reason) +const char* msvcrt_get_reason(DWORD reason) { switch (reason) { diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 8e0910010a6..ce9e0f57e80 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -93,7 +93,7 @@ typedef struct __MSVCRT_exception } MSVCRT_exception; -typedef int (__cdecl *MSVCRT_matherr_func)(MSVCRT_exception *); +typedef int (*MSVCRT_matherr_func)(MSVCRT_exception *); static MSVCRT_matherr_func MSVCRT_default_matherr_func = NULL; @@ -108,7 +108,7 @@ static MSVCRT_matherr_func MSVCRT_default_matherr_func = NULL; /********************************************************************* * _CIacos (MSVCRT.@) */ -double __cdecl MSVCRT__CIacos(void) +double _CIacos(void) { FPU_DOUBLE(x); if (x < -1.0 || x > 1.0 || !finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM); @@ -118,7 +118,7 @@ double __cdecl MSVCRT__CIacos(void) /********************************************************************* * _CIasin (MSVCRT.@) */ -double __cdecl MSVCRT__CIasin(void) +double _CIasin(void) { FPU_DOUBLE(x); if (x < -1.0 || x > 1.0 || !finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM); @@ -128,7 +128,7 @@ double __cdecl MSVCRT__CIasin(void) /********************************************************************* * _CIatan (MSVCRT.@) */ -double __cdecl MSVCRT__CIatan(void) +double _CIatan(void) { FPU_DOUBLE(x); if (!finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM); @@ -138,7 +138,7 @@ double __cdecl MSVCRT__CIatan(void) /********************************************************************* * _CIatan2 (MSVCRT.@) */ -double __cdecl MSVCRT__CIatan2(void) +double _CIatan2(void) { FPU_DOUBLES(x,y); if (!finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM); @@ -148,7 +148,7 @@ double __cdecl MSVCRT__CIatan2(void) /********************************************************************* * _CIcos (MSVCRT.@) */ -double __cdecl MSVCRT__CIcos(void) +double _CIcos(void) { FPU_DOUBLE(x); if (!finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM); @@ -158,7 +158,7 @@ double __cdecl MSVCRT__CIcos(void) /********************************************************************* * _CIcosh (MSVCRT.@) */ -double __cdecl MSVCRT__CIcosh(void) +double _CIcosh(void) { FPU_DOUBLE(x); if (!finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM); @@ -168,7 +168,7 @@ double __cdecl MSVCRT__CIcosh(void) /********************************************************************* * _CIexp (MSVCRT.@) */ -double __cdecl MSVCRT__CIexp(void) +double _CIexp(void) { FPU_DOUBLE(x); if (!finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM); @@ -178,7 +178,7 @@ double __cdecl MSVCRT__CIexp(void) /********************************************************************* * _CIfmod (MSVCRT.@) */ -double __cdecl MSVCRT__CIfmod(void) +double _CIfmod(void) { FPU_DOUBLES(x,y); if (!finite(x) || !finite(y)) SET_THREAD_VAR(errno,MSVCRT_EDOM); @@ -188,7 +188,7 @@ double __cdecl MSVCRT__CIfmod(void) /********************************************************************* * _CIlog (MSVCRT.@) */ -double __cdecl MSVCRT__CIlog(void) +double _CIlog(void) { FPU_DOUBLE(x); if (x < 0.0 || !finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM); @@ -199,7 +199,7 @@ double __cdecl MSVCRT__CIlog(void) /********************************************************************* * _CIlog10 (MSVCRT.@) */ -double __cdecl MSVCRT__CIlog10(void) +double _CIlog10(void) { FPU_DOUBLE(x); if (x < 0.0 || !finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM); @@ -210,7 +210,7 @@ double __cdecl MSVCRT__CIlog10(void) /********************************************************************* * _CIpow (MSVCRT.@) */ -double __cdecl MSVCRT__CIpow(void) +double _CIpow(void) { double z; FPU_DOUBLES(x,y); @@ -223,7 +223,7 @@ double __cdecl MSVCRT__CIpow(void) /********************************************************************* * _CIsin (MSVCRT.@) */ -double __cdecl MSVCRT__CIsin(void) +double _CIsin(void) { FPU_DOUBLE(x); if (!finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM); @@ -233,7 +233,7 @@ double __cdecl MSVCRT__CIsin(void) /********************************************************************* * _CIsinh (MSVCRT.@) */ -double __cdecl MSVCRT__CIsinh(void) +double _CIsinh(void) { FPU_DOUBLE(x); if (!finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM); @@ -243,7 +243,7 @@ double __cdecl MSVCRT__CIsinh(void) /********************************************************************* * _CIsqrt (MSVCRT.@) */ -double __cdecl MSVCRT__CIsqrt(void) +double _CIsqrt(void) { FPU_DOUBLE(x); if (x < 0.0 || !finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM); @@ -253,7 +253,7 @@ double __cdecl MSVCRT__CIsqrt(void) /********************************************************************* * _CItan (MSVCRT.@) */ -double __cdecl MSVCRT__CItan(void) +double _CItan(void) { FPU_DOUBLE(x); if (!finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM); @@ -263,7 +263,7 @@ double __cdecl MSVCRT__CItan(void) /********************************************************************* * _CItanh (MSVCRT.@) */ -double __cdecl MSVCRT__CItanh(void) +double _CItanh(void) { FPU_DOUBLE(x); if (!finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM); @@ -274,7 +274,7 @@ double __cdecl MSVCRT__CItanh(void) /* The above cannot be called on non x86 platforms, stub them for linking */ -#define IX86_ONLY(func) double __cdecl MSVCRT_##func(void) { return 0.0; } +#define IX86_ONLY(func) double MSVCRT_##func(void) { return 0.0; } IX86_ONLY(_CIacos) IX86_ONLY(_CIasin) @@ -298,7 +298,7 @@ IX86_ONLY(_CItanh) /********************************************************************* * _fpclass (MSVCRT.@) */ -int __cdecl MSVCRT__fpclass(double num) +int _fpclass(double num) { #if defined(HAVE_FPCLASS) || defined(fpclass) switch (fpclass( num )) @@ -333,7 +333,7 @@ int __cdecl MSVCRT__fpclass(double num) /********************************************************************* * _rotl (MSVCRT.@) */ -unsigned int __cdecl MSVCRT__rotl(unsigned int num, int shift) +unsigned int _rotl(unsigned int num, int shift) { shift &= 31; return (num << shift) | (num >> (32-shift)); @@ -342,7 +342,7 @@ unsigned int __cdecl MSVCRT__rotl(unsigned int num, int shift) /********************************************************************* * _logb (MSVCRT.@) */ -double __cdecl MSVCRT__logb(double num) +double _logb(double num) { if (!finite(num)) SET_THREAD_VAR(errno,MSVCRT_EDOM); return logb(num); @@ -351,7 +351,7 @@ double __cdecl MSVCRT__logb(double num) /********************************************************************* * _lrotl (MSVCRT.@) */ -unsigned long __cdecl MSVCRT__lrotl(unsigned long num, int shift) +unsigned long _lrotl(unsigned long num, int shift) { shift &= 0x1f; return (num << shift) | (num >> (32-shift)); @@ -360,7 +360,7 @@ unsigned long __cdecl MSVCRT__lrotl(unsigned long num, int shift) /********************************************************************* * _lrotr (MSVCRT.@) */ -unsigned long __cdecl MSVCRT__lrotr(unsigned long num, int shift) +unsigned long _lrotr(unsigned long num, int shift) { shift &= 0x1f; return (num >> shift) | (num << (32-shift)); @@ -369,7 +369,7 @@ unsigned long __cdecl MSVCRT__lrotr(unsigned long num, int shift) /********************************************************************* * _rotr (MSVCRT.@) */ -unsigned int __cdecl MSVCRT__rotr(unsigned int num, int shift) +unsigned int _rotr(unsigned int num, int shift) { shift &= 0x1f; return (num >> shift) | (num << (32-shift)); @@ -378,7 +378,7 @@ unsigned int __cdecl MSVCRT__rotr(unsigned int num, int shift) /********************************************************************* * _scalb (MSVCRT.@) */ -double __cdecl MSVCRT__scalb(double num, long power) +double _scalb(double num, long power) { /* Note - Can't forward directly as libc expects y as double */ double dblpower = (double)power; @@ -389,7 +389,7 @@ double __cdecl MSVCRT__scalb(double num, long power) /********************************************************************* * _matherr (MSVCRT.@) */ -int __cdecl MSVCRT__matherr(MSVCRT_exception *e) +int _matherr(MSVCRT_exception *e) { if (e) TRACE("(%p = %d, %s, %g %g %g)\n",e, e->type, e->name, e->arg1, e->arg2, @@ -405,7 +405,7 @@ int __cdecl MSVCRT__matherr(MSVCRT_exception *e) /********************************************************************* * __setusermatherr (MSVCRT.@) */ -void __cdecl MSVCRT___setusermatherr(MSVCRT_matherr_func func) +void MSVCRT___setusermatherr(MSVCRT_matherr_func func) { MSVCRT_default_matherr_func = func; TRACE(":new matherr handler %p\n", func); @@ -414,7 +414,7 @@ void __cdecl MSVCRT___setusermatherr(MSVCRT_matherr_func func) /********************************************************************** * _statusfp (MSVCRT.@) */ -unsigned int __cdecl MSVCRT__statusfp(void) +unsigned int _statusfp(void) { unsigned int retVal = 0; #if defined(__GNUC__) && defined(__i386__) @@ -436,9 +436,9 @@ unsigned int __cdecl MSVCRT__statusfp(void) /********************************************************************* * _clearfp (MSVCRT.@) */ -unsigned int __cdecl MSVCRT__clearfp(void) +unsigned int _clearfp(void) { - unsigned int retVal = MSVCRT__statusfp(); + unsigned int retVal = _statusfp(); #if defined(__GNUC__) && defined(__i386__) __asm__ __volatile__( "fnclex" ); #else @@ -450,7 +450,7 @@ unsigned int __cdecl MSVCRT__clearfp(void) /********************************************************************* * ldexp (MSVCRT.@) */ -double __cdecl MSVCRT_ldexp(double num, long exp) +double MSVCRT_ldexp(double num, long exp) { double z = ldexp(num,exp); @@ -464,7 +464,7 @@ double __cdecl MSVCRT_ldexp(double num, long exp) /********************************************************************* * _cabs (MSVCRT.@) */ -double __cdecl MSVCRT__cabs(MSVCRT_complex num) +double _cabs(MSVCRT_complex num) { return sqrt(num.real * num.real + num.imaginary * num.imaginary); } @@ -472,7 +472,7 @@ double __cdecl MSVCRT__cabs(MSVCRT_complex num) /********************************************************************* * _chgsign (MSVCRT.@) */ -double __cdecl MSVCRT__chgsign(double num) +double _chgsign(double num) { /* FIXME: +-infinity,Nan not tested */ return -num; @@ -481,7 +481,7 @@ double __cdecl MSVCRT__chgsign(double num) /********************************************************************* * _control87 (MSVCRT.@) */ -unsigned int __cdecl MSVCRT__control87(unsigned int newval, unsigned int mask) +unsigned int _control87(unsigned int newval, unsigned int mask) { #if defined(__GNUC__) && defined(__i386__) unsigned int fpword, flags = 0; @@ -535,17 +535,17 @@ unsigned int __cdecl MSVCRT__control87(unsigned int newval, unsigned int mask) __asm__ __volatile__( "fldcw %0" : : "m" (fpword) ); return fpword; #else - return MSVCRT__controlfp( newval, mask ); + return _controlfp( newval, mask ); #endif } /********************************************************************* * _controlfp (MSVCRT.@) */ -unsigned int __cdecl MSVCRT__controlfp(unsigned int newval, unsigned int mask) +unsigned int _controlfp(unsigned int newval, unsigned int mask) { #if defined(__GNUC__) && defined(__i386__) - return MSVCRT__control87( newval, mask ); + return _control87( newval, mask ); #else FIXME(":Not Implemented!\n"); return 0; @@ -555,7 +555,7 @@ unsigned int __cdecl MSVCRT__controlfp(unsigned int newval, unsigned int mask) /********************************************************************* * _copysign (MSVCRT.@) */ -double __cdecl MSVCRT__copysign(double num, double sign) +double _copysign(double num, double sign) { /* FIXME: Behaviour for Nan/Inf? */ if (sign < 0.0) @@ -566,7 +566,7 @@ double __cdecl MSVCRT__copysign(double num, double sign) /********************************************************************* * _finite (MSVCRT.@) */ -int __cdecl MSVCRT__finite(double num) +int _finite(double num) { return (finite(num)?1:0); /* See comment for _isnan() */ } @@ -574,7 +574,7 @@ int __cdecl MSVCRT__finite(double num) /********************************************************************* * _fpreset (MSVCRT.@) */ -void __cdecl MSVCRT__fpreset(void) +void _fpreset(void) { #if defined(__GNUC__) && defined(__i386__) __asm__ __volatile__( "fninit" ); @@ -586,7 +586,7 @@ void __cdecl MSVCRT__fpreset(void) /********************************************************************* * _isnan (MSVCRT.@) */ -INT __cdecl MSVCRT__isnan(double num) +INT _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 @@ -597,12 +597,12 @@ INT __cdecl MSVCRT__isnan(double num) /********************************************************************* * _y0 (MSVCRT.@) */ -double __cdecl MSVCRT__y0(double num) +double _y0(double num) { double retval; if (!finite(num)) SET_THREAD_VAR(errno,MSVCRT_EDOM); retval = y0(num); - if (MSVCRT__fpclass(retval) == _FPCLASS_NINF) + if (_fpclass(retval) == _FPCLASS_NINF) { SET_THREAD_VAR(errno,MSVCRT_EDOM); retval = sqrt(-1); @@ -613,12 +613,12 @@ double __cdecl MSVCRT__y0(double num) /********************************************************************* * _y1 (MSVCRT.@) */ -double __cdecl MSVCRT__y1(double num) +double _y1(double num) { double retval; if (!finite(num)) SET_THREAD_VAR(errno,MSVCRT_EDOM); retval = y1(num); - if (MSVCRT__fpclass(retval) == _FPCLASS_NINF) + if (_fpclass(retval) == _FPCLASS_NINF) { SET_THREAD_VAR(errno,MSVCRT_EDOM); retval = sqrt(-1); @@ -629,12 +629,12 @@ double __cdecl MSVCRT__y1(double num) /********************************************************************* * _yn (MSVCRT.@) */ -double __cdecl MSVCRT__yn(int order, double num) +double _yn(int order, double num) { double retval; if (!finite(num)) SET_THREAD_VAR(errno,MSVCRT_EDOM); retval = yn(order,num); - if (MSVCRT__fpclass(retval) == _FPCLASS_NINF) + if (_fpclass(retval) == _FPCLASS_NINF) { SET_THREAD_VAR(errno,MSVCRT_EDOM); retval = sqrt(-1); @@ -645,7 +645,7 @@ double __cdecl MSVCRT__yn(int order, double num) /********************************************************************* * _nextafter (MSVCRT.@) */ -double __cdecl MSVCRT__nextafter(double num, double next) +double _nextafter(double num, double next) { double retval; if (!finite(num) || !finite(next)) SET_THREAD_VAR(errno,MSVCRT_EDOM); @@ -661,7 +661,7 @@ double __cdecl MSVCRT__nextafter(double num, double next) * [i386] Windows binary compatible - returns the struct in eax/edx. */ #ifdef __i386__ -LONGLONG __cdecl MSVCRT_div(int num, int denom) +LONGLONG MSVCRT_div(int num, int denom) { LONGLONG retval; div_t dt = div(num,denom); @@ -674,7 +674,7 @@ LONGLONG __cdecl MSVCRT_div(int num, int denom) * VERSION * [!i386] Non-x86 can't run win32 apps so we don't need binary compatibility */ -div_t __cdecl MSVCRT_div(int num, int denom) +div_t MSVCRT_div(int num, int denom) { return div(num,denom); } @@ -687,7 +687,7 @@ div_t __cdecl MSVCRT_div(int num, int denom) * [i386] Windows binary compatible - returns the struct in eax/edx. */ #ifdef __i386__ -ULONGLONG __cdecl MSVCRT_ldiv(long num, long denom) +ULONGLONG MSVCRT_ldiv(long num, long denom) { ULONGLONG retval; ldiv_t ldt = ldiv(num,denom); @@ -700,7 +700,7 @@ ULONGLONG __cdecl MSVCRT_ldiv(long num, long denom) * VERSION * [!i386] Non-x86 can't run win32 apps so we don't need binary compatibility */ -ldiv_t __cdecl MSVCRT_ldiv(long num, long denom) +ldiv_t MSVCRT_ldiv(long num, long denom) { return ldiv(num,denom); } @@ -715,7 +715,7 @@ ldiv_t __cdecl MSVCRT_ldiv(long num, long denom) * I _think_ this function is intended to work around the Pentium * fdiv bug. */ -void __cdecl MSVCRT__adj_fdiv_m16i(void) +void _adj_fdiv_m16i(void) { TRACE("(): stub"); } @@ -729,7 +729,7 @@ void __cdecl MSVCRT__adj_fdiv_m16i(void) * I _think_ this function is intended to work around the Pentium * fdiv bug. */ -void __cdecl MSVCRT__adj_fdiv_m32(void) +void _adj_fdiv_m32(void) { TRACE("(): stub"); } @@ -743,7 +743,7 @@ void __cdecl MSVCRT__adj_fdiv_m32(void) * I _think_ this function is intended to work around the Pentium * fdiv bug. */ -void __cdecl MSVCRT__adj_fdiv_m32i(void) +void _adj_fdiv_m32i(void) { TRACE("(): stub"); } @@ -757,7 +757,7 @@ void __cdecl MSVCRT__adj_fdiv_m32i(void) * I _think_ this function is intended to work around the Pentium * fdiv bug. */ -void __cdecl MSVCRT__adj_fdiv_m64(void) +void _adj_fdiv_m64(void) { TRACE("(): stub"); } @@ -771,7 +771,7 @@ void __cdecl MSVCRT__adj_fdiv_m64(void) * I _think_ this function is intended to work around the Pentium * fdiv bug. */ -void __cdecl MSVCRT__adj_fdiv_r(void) +void _adj_fdiv_r(void) { TRACE("(): stub"); } @@ -785,7 +785,7 @@ void __cdecl MSVCRT__adj_fdiv_r(void) * I _think_ this function is intended to work around the Pentium * fdiv bug. */ -void __cdecl MSVCRT__adj_fdivr_m16i(void) +void _adj_fdivr_m16i(void) { TRACE("(): stub"); } @@ -799,7 +799,7 @@ void __cdecl MSVCRT__adj_fdivr_m16i(void) * I _think_ this function is intended to work around the Pentium * fdiv bug. */ -void __cdecl MSVCRT__adj_fdivr_m32(void) +void _adj_fdivr_m32(void) { TRACE("(): stub"); } @@ -813,7 +813,7 @@ void __cdecl MSVCRT__adj_fdivr_m32(void) * I _think_ this function is intended to work around the Pentium * fdiv bug. */ -void __cdecl MSVCRT__adj_fdivr_m32i(void) +void _adj_fdivr_m32i(void) { TRACE("(): stub"); } @@ -827,7 +827,7 @@ void __cdecl MSVCRT__adj_fdivr_m32i(void) * I _think_ this function is intended to work around the Pentium * fdiv bug. */ -void __cdecl MSVCRT__adj_fdivr_m64(void) +void _adj_fdivr_m64(void) { TRACE("(): stub"); } @@ -841,7 +841,7 @@ void __cdecl MSVCRT__adj_fdivr_m64(void) * I _think_ this function is intended to work around the Pentium * fdiv bug. */ -void __cdecl MSVCRT__adj_fpatan(void) +void _adj_fpatan(void) { TRACE("(): stub"); } @@ -855,7 +855,7 @@ void __cdecl MSVCRT__adj_fpatan(void) * I _think_ this function is intended to work around the Pentium * fdiv bug. */ -void __cdecl MSVCRT__adj_fprem(void) +void _adj_fprem(void) { TRACE("(): stub"); } @@ -869,7 +869,7 @@ void __cdecl MSVCRT__adj_fprem(void) * I _think_ this function is intended to work around the Pentium * fdiv bug. */ -void __cdecl MSVCRT__adj_fprem1(void) +void _adj_fprem1(void) { TRACE("(): stub"); } @@ -883,7 +883,7 @@ void __cdecl MSVCRT__adj_fprem1(void) * I _think_ this function is intended to work around the Pentium * fdiv bug. */ -void __cdecl MSVCRT__adj_fptan(void) +void _adj_fptan(void) { TRACE("(): stub"); } @@ -894,7 +894,7 @@ void __cdecl MSVCRT__adj_fptan(void) * I _think_ this function should be a variable indicating whether * Pentium fdiv bug safe code should be used. */ -void __cdecl MSVCRT__adjust_fdiv(void) +void _adjust_fdiv(void) { TRACE("(): stub"); } @@ -908,7 +908,7 @@ void __cdecl MSVCRT__adjust_fdiv(void) * I _think_ this function is intended to work around the Pentium * fdiv bug. */ -void __cdecl MSVCRT__safe_fdiv(void) +void _safe_fdiv(void) { TRACE("(): stub"); } @@ -922,7 +922,7 @@ void __cdecl MSVCRT__safe_fdiv(void) * I _think_ this function is intended to work around the Pentium * fdiv bug. */ -void __cdecl MSVCRT__safe_fdivr(void) +void _safe_fdivr(void) { TRACE("(): stub"); } @@ -936,7 +936,7 @@ void __cdecl MSVCRT__safe_fdivr(void) * I _think_ this function is intended to work around the Pentium * fdiv bug. */ -void __cdecl MSVCRT__safe_fprem(void) +void _safe_fprem(void) { TRACE("(): stub"); } @@ -951,7 +951,7 @@ void __cdecl MSVCRT__safe_fprem(void) * I _think_ this function is intended to work around the Pentium * fdiv bug. */ -void __cdecl MSVCRT__safe_fprem1(void) +void _safe_fprem1(void) { TRACE("(): stub"); } diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c index 271e06e6188..bd532f8fbab 100644 --- a/dlls/msvcrt/mbcs.c +++ b/dlls/msvcrt/mbcs.c @@ -15,16 +15,16 @@ DEFAULT_DEBUG_CHANNEL(msvcrt); unsigned char MSVCRT_mbctype[257]; int MSVCRT___mb_cur_max = 1; -int __cdecl MSVCRT_isleadbyte(int); -char *__cdecl MSVCRT__strset(char *, int); -char *__cdecl MSVCRT__strnset(char *, int, unsigned int); +int MSVCRT_isleadbyte(int); +char *_strset(char *, int); +char *_strnset(char *, int, unsigned int); extern unsigned int MSVCRT_current_lc_all_cp; /********************************************************************* * __p__mbctype (MSVCRT.@) */ -unsigned char *__cdecl MSVCRT___p__mbctype(void) +unsigned char *__p__mbctype(void) { return MSVCRT_mbctype; } @@ -32,7 +32,7 @@ unsigned char *__cdecl MSVCRT___p__mbctype(void) /********************************************************************* * __p___mb_cur_max(MSVCRT.@) */ -int *__cdecl MSVCRT___p___mb_cur_max(void) +int *__p___mb_cur_max(void) { return &MSVCRT___mb_cur_max; } @@ -40,7 +40,7 @@ int *__cdecl MSVCRT___p___mb_cur_max(void) /********************************************************************* * _mbsnextc(MSVCRT.@) */ -unsigned int __cdecl MSVCRT__mbsnextc(const unsigned char *str) +unsigned int _mbsnextc(const unsigned char *str) { if(MSVCRT___mb_cur_max > 1 && MSVCRT_isleadbyte(*str)) return *str << 8 | str[1]; @@ -50,7 +50,7 @@ unsigned int __cdecl MSVCRT__mbsnextc(const unsigned char *str) /********************************************************************* * _mbscmp(MSVCRT.@) */ -int __cdecl MSVCRT__mbscmp(const char *str, const char *cmp) +int _mbscmp(const char *str, const char *cmp) { if(MSVCRT___mb_cur_max > 1) { @@ -60,8 +60,8 @@ int __cdecl MSVCRT__mbscmp(const char *str, const char *cmp) return *cmp ? -1 : 0; if(!*cmp) return 1; - strc = MSVCRT__mbsnextc(str); - cmpc = MSVCRT__mbsnextc(cmp); + strc = _mbsnextc(str); + cmpc = _mbsnextc(cmp); if(strc != cmpc) return strc < cmpc ? -1 : 1; str +=(strc > 255) ? 2 : 1; @@ -74,18 +74,18 @@ int __cdecl MSVCRT__mbscmp(const char *str, const char *cmp) /********************************************************************* * _mbsicmp(MSVCRT.@) */ -int __cdecl MSVCRT__mbsicmp(const char *str, const char *cmp) +int _mbsicmp(const char *str, const char *cmp) { /* FIXME: No tolower() for mb strings yet */ if(MSVCRT___mb_cur_max > 1) - return MSVCRT__mbscmp(str, cmp); + return _mbscmp(str, cmp); return strcasecmp(str, cmp); /* ASCII CP */ } /********************************************************************* * _mbsncmp (MSVCRT.@) */ -int __cdecl MSVCRT__mbsncmp(const char *str, const char *cmp, unsigned int len) +int _mbsncmp(const char *str, const char *cmp, unsigned int len) { if(!len) return 0; @@ -99,8 +99,8 @@ int __cdecl MSVCRT__mbsncmp(const char *str, const char *cmp, unsigned int len) return *cmp ? -1 : 0; if(!*cmp) return 1; - strc = MSVCRT__mbsnextc(str); - cmpc = MSVCRT__mbsnextc(cmp); + strc = _mbsnextc(str); + cmpc = _mbsnextc(cmp); if(strc != cmpc) return strc < cmpc ? -1 : 1; str +=(strc > 255) ? 2 : 1; @@ -116,18 +116,18 @@ int __cdecl MSVCRT__mbsncmp(const char *str, const char *cmp, unsigned int len) * * Compare two multibyte strings case insensitively to 'len' characters. */ -int __cdecl MSVCRT__mbsnicmp(const char *str, const char *cmp, unsigned int len) +int _mbsnicmp(const char *str, const char *cmp, unsigned int len) { /* FIXME: No tolower() for mb strings yet */ if(MSVCRT___mb_cur_max > 1) - return MSVCRT__mbsncmp(str, cmp, len); + return _mbsncmp(str, cmp, len); return strncasecmp(str, cmp, len); /* ASCII CP */ } /********************************************************************* * _mbsinc(MSVCRT.@) */ -char *__cdecl MSVCRT__mbsinc(const unsigned char *str) +char *_mbsinc(const unsigned char *str) { if(MSVCRT___mb_cur_max > 1 && MSVCRT_isleadbyte(*str)) return (char *)str + 2; /* MB char */ @@ -138,14 +138,14 @@ char *__cdecl MSVCRT__mbsinc(const unsigned char *str) /********************************************************************* * _mbsninc(MSVCRT.@) */ -char *MSVCRT__mbsninc(const char *str, unsigned int num) +char *_mbsninc(const char *str, unsigned int num) { if(!str || num < 1) return NULL; if(MSVCRT___mb_cur_max > 1) { while(num--) - str = MSVCRT__mbsinc(str); + str = _mbsinc(str); return (char *)str; } return (char *)str + num; /* ASCII CP */ @@ -154,7 +154,7 @@ char *MSVCRT__mbsninc(const char *str, unsigned int num) /********************************************************************* * _mbslen(MSVCRT.206) */ -int __cdecl MSVCRT__mbslen(const unsigned char *str) +int _mbslen(const unsigned char *str) { if(MSVCRT___mb_cur_max > 1) { @@ -172,7 +172,7 @@ int __cdecl MSVCRT__mbslen(const unsigned char *str) /********************************************************************* * _mbsrchr(MSVCRT.@) */ -char *__cdecl MSVCRT__mbsrchr(const char *s,unsigned int x) +char *_mbsrchr(const char *s,unsigned int x) { /* FIXME: handle multibyte strings */ return strrchr(s,x); @@ -181,7 +181,7 @@ char *__cdecl MSVCRT__mbsrchr(const char *s,unsigned int x) /********************************************************************* * mbtowc(MSVCRT.@) */ -int __cdecl MSVCRT_mbtowc(WCHAR *dst, const unsigned char *str, unsigned int n) +int MSVCRT_mbtowc(WCHAR *dst, const unsigned char *str, unsigned int n) { if(n <= 0 || !str) return 0; @@ -198,7 +198,7 @@ int __cdecl MSVCRT_mbtowc(WCHAR *dst, const unsigned char *str, unsigned int n) /********************************************************************* * _mbccpy(MSVCRT.@) */ -void __cdecl MSVCRT__mbccpy(char *dest, const unsigned char *src) +void _mbccpy(char *dest, const unsigned char *src) { *dest++ = *src; if(MSVCRT___mb_cur_max > 1 && MSVCRT_isleadbyte(*src)) @@ -208,7 +208,7 @@ void __cdecl MSVCRT__mbccpy(char *dest, const unsigned char *src) /********************************************************************* * _mbbtombc(MSVCRT.@) */ -unsigned int __cdecl MSVCRT__mbbtombc(unsigned int c) +unsigned int _mbbtombc(unsigned int c) { if(MSVCRT___mb_cur_max > 1 && ((c >= 0x20 && c <=0x7e) ||(c >= 0xa1 && c <= 0xdf))) @@ -223,7 +223,7 @@ unsigned int __cdecl MSVCRT__mbbtombc(unsigned int c) /********************************************************************* * _mbclen(MSVCRT.@) */ -unsigned int __cdecl MSVCRT__mbclen(const unsigned char *str) +unsigned int _mbclen(const unsigned char *str) { return MSVCRT_isleadbyte(*str) ? 2 : 1; } @@ -231,7 +231,7 @@ unsigned int __cdecl MSVCRT__mbclen(const unsigned char *str) /********************************************************************* * _ismbbkana(MSVCRT.@) */ -int __cdecl MSVCRT__ismbbkana(unsigned int c) +int _ismbbkana(unsigned int c) { /* FIXME: use lc_ctype when supported, not lc_all */ if(MSVCRT_current_lc_all_cp == 932) @@ -245,7 +245,7 @@ int __cdecl MSVCRT__ismbbkana(unsigned int c) /********************************************************************* * _ismbchira(MSVCRT.@) */ -int __cdecl MSVCRT__ismbchira(unsigned int c) +int _ismbchira(unsigned int c) { /* FIXME: use lc_ctype when supported, not lc_all */ if(MSVCRT_current_lc_all_cp == 932) @@ -259,13 +259,13 @@ int __cdecl MSVCRT__ismbchira(unsigned int c) /********************************************************************* * _ismbckata(MSVCRT.@) */ -int __cdecl MSVCRT__ismbckata(unsigned int c) +int _ismbckata(unsigned int c) { /* FIXME: use lc_ctype when supported, not lc_all */ if(MSVCRT_current_lc_all_cp == 932) { if(c < 256) - return MSVCRT__ismbbkana(c); + return _ismbbkana(c); /* Japanese/Katakana, CP 932 */ return (c >= 0x8340 && c <= 0x8396 && c != 0x837f); } @@ -275,7 +275,7 @@ int __cdecl MSVCRT__ismbckata(unsigned int c) /********************************************************************* * _ismbblead(MSVCRT.@) */ -int __cdecl MSVCRT__ismbblead(unsigned int c) +int _ismbblead(unsigned int c) { /* FIXME: should reference MSVCRT_mbctype */ return MSVCRT___mb_cur_max > 1 && MSVCRT_isleadbyte(c); @@ -285,16 +285,16 @@ int __cdecl MSVCRT__ismbblead(unsigned int c) /********************************************************************* * _ismbbtrail(MSVCRT.@) */ -int __cdecl MSVCRT__ismbbtrail(unsigned int c) +int _ismbbtrail(unsigned int c) { /* FIXME: should reference MSVCRT_mbctype */ - return !MSVCRT__ismbblead(c); + return !_ismbblead(c); } /********************************************************************* * _ismbslead(MSVCRT.@) */ -int __cdecl MSVCRT__ismbslead(const unsigned char *start, const unsigned char *str) +int _ismbslead(const unsigned char *start, const unsigned char *str) { /* Lead bytes can also be trail bytes if caller messed up * iterating through the string... @@ -313,19 +313,19 @@ int __cdecl MSVCRT__ismbslead(const unsigned char *start, const unsigned char *s /********************************************************************* * _ismbstrail(MSVCRT.@) */ -int __cdecl MSVCRT__ismbstrail(const char *start, const unsigned char *str) +int _ismbstrail(const char *start, const unsigned char *str) { /* Must not be a lead, and must be preceeded by one */ - return !MSVCRT__ismbslead(start, str) && MSVCRT_isleadbyte(str[-1]); + return !_ismbslead(start, str) && MSVCRT_isleadbyte(str[-1]); } /********************************************************************* * _mbsdec(MSVCRT.@) */ -char *__cdecl MSVCRT__mbsdec(const char *start, const char *cur) +char *_mbsdec(const char *start, const char *cur) { if(MSVCRT___mb_cur_max > 1) - return (char *)(MSVCRT__ismbstrail(start,cur-1) ? cur - 2 : cur -1); + return (char *)(_ismbstrail(start,cur-1) ? cur - 2 : cur -1); return (char *)cur - 1; /* ASCII CP or SB char */ } @@ -333,12 +333,12 @@ char *__cdecl MSVCRT__mbsdec(const char *start, const char *cur) /********************************************************************* * _mbsset(MSVCRT.@) */ -char *__cdecl MSVCRT__mbsset(char *str, unsigned int c) +char *_mbsset(char *str, unsigned int c) { char *ret = str; if(MSVCRT___mb_cur_max == 1 || c < 256) - return MSVCRT__strset(str, c); /* ASCII CP or SB char */ + return _strset(str, c); /* ASCII CP or SB char */ c &= 0xffff; /* Strip high bits */ @@ -356,7 +356,7 @@ char *__cdecl MSVCRT__mbsset(char *str, unsigned int c) /********************************************************************* * _mbsnset(MSVCRT.@) */ -char *__cdecl MSVCRT__mbsnset(char *str, unsigned int c, unsigned int len) +char *_mbsnset(char *str, unsigned int c, unsigned int len) { char *ret = str; @@ -364,7 +364,7 @@ char *__cdecl MSVCRT__mbsnset(char *str, unsigned int c, unsigned int len) return ret; if(MSVCRT___mb_cur_max == 1 || c < 256) - return MSVCRT__strnset(str, c, len); /* ASCII CP or SB char */ + return _strnset(str, c, len); /* ASCII CP or SB char */ c &= 0xffff; /* Strip high bits */ @@ -382,7 +382,7 @@ char *__cdecl MSVCRT__mbsnset(char *str, unsigned int c, unsigned int len) /********************************************************************* * _mbstrlen(MSVCRT.@) */ -int __cdecl MSVCRT__mbstrlen(const unsigned char *str) +int _mbstrlen(const unsigned char *str) { if(MSVCRT___mb_cur_max > 1) { @@ -400,7 +400,7 @@ int __cdecl MSVCRT__mbstrlen(const unsigned char *str) /********************************************************************* * _mbsncpy(MSVCRT.@) */ -char *__cdecl MSVCRT__mbsncpy(char *dst, const char *src, unsigned int len) +char *_mbsncpy(char *dst, const char *src, unsigned int len) { if(!len) return dst; @@ -428,12 +428,12 @@ char *__cdecl MSVCRT__mbsncpy(char *dst, const char *src, unsigned int len) * * Find a multibyte character in a multibyte string. */ -char *__cdecl MSVCRT__mbschr(const char *str, unsigned int c) +char *_mbschr(const char *str, unsigned int c) { if(MSVCRT___mb_cur_max > 1) { unsigned int next; - while((next = MSVCRT__mbsnextc(str))) + while((next = _mbsnextc(str))) { if(next == c) return (char *)str; @@ -447,7 +447,7 @@ char *__cdecl MSVCRT__mbschr(const char *str, unsigned int c) /********************************************************************* * _mbsnccnt(MSVCRT.@) */ -unsigned int __cdecl MSVCRT__mbsnccnt(const unsigned char *str, unsigned int len) +unsigned int _mbsnccnt(const unsigned char *str, unsigned int len) { int ret = 0; @@ -472,12 +472,12 @@ unsigned int __cdecl MSVCRT__mbsnccnt(const unsigned char *str, unsigned int len /********************************************************************* * _mbsncat(MSVCRT.@) */ -char *__cdecl MSVCRT__mbsncat(char *dst, const unsigned char *src, unsigned int len) +char *_mbsncat(char *dst, const unsigned char *src, unsigned int len) { if(MSVCRT___mb_cur_max > 1) { char *res = dst; - dst += MSVCRT__mbslen(dst); + dst += _mbslen(dst); while(*src && len--) { *dst = *src; diff --git a/dlls/msvcrt/misc.c b/dlls/msvcrt/misc.c index 8d1ec730e56..0535958a8e5 100644 --- a/dlls/msvcrt/misc.c +++ b/dlls/msvcrt/misc.c @@ -8,12 +8,12 @@ DEFAULT_DEBUG_CHANNEL(msvcrt); -typedef int (__cdecl *MSVCRT_comp_func)(const void*, const void*); +typedef int (*MSVCRT_comp_func)(const void*, const void*); /********************************************************************* * _beep (MSVCRT.@) */ -void __cdecl MSVCRT__beep( unsigned int freq, unsigned int duration) +void _beep( unsigned int freq, unsigned int duration) { TRACE(":Freq %d, Duration %d\n",freq,duration); Beep(freq, duration); @@ -24,7 +24,7 @@ extern int rand(void); /********************************************************************* * rand (MSVCRT.@) */ -int __cdecl MSVCRT_rand() +int MSVCRT_rand() { return (rand() & 0x7fff); } @@ -32,17 +32,18 @@ int __cdecl MSVCRT_rand() /********************************************************************* * _sleep (MSVCRT.@) */ -void __cdecl MSVCRT__sleep(unsigned long timeout) +void _sleep(unsigned long timeout) { - TRACE("MSVCRT__sleep for %ld milliseconds\n",timeout); + TRACE("_sleep for %ld milliseconds\n",timeout); Sleep((timeout)?timeout:1); } /********************************************************************* * _lfind (MSVCRT.@) */ -void* __cdecl MSVCRT__lfind(const void * match, const void * start, -unsigned int * array_size,unsigned int elem_size, MSVCRT_comp_func cf) +void* _lfind(const void* match, const void* start, + unsigned int* array_size, unsigned int elem_size, + MSVCRT_comp_func cf) { unsigned int size = *array_size; if (size) @@ -58,8 +59,9 @@ unsigned int * array_size,unsigned int elem_size, MSVCRT_comp_func cf) /********************************************************************* * _lsearch (MSVCRT.@) */ -void * __cdecl MSVCRT__lsearch(const void * match,void * start, -unsigned int * array_size,unsigned int elem_size, MSVCRT_comp_func cf) +void* _lsearch(const void* match, void* start, + unsigned int* array_size, unsigned int elem_size, + MSVCRT_comp_func cf) { unsigned int size = *array_size; if (size) @@ -79,7 +81,7 @@ unsigned int * array_size,unsigned int elem_size, MSVCRT_comp_func cf) /********************************************************************* * _chkesp (MSVCRT.@) */ -void __cdecl MSVCRT__chkesp(void) +void _chkesp(void) { } diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index 073b22fd758..f59a7c1edda 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -34,13 +34,13 @@ typedef struct __MSVCRT_thread_data ((MSVCRT_thread_data*)TlsGetValue(MSVCRT_tls_index))->x = y void MSVCRT__set_errno(int); -int __cdecl MSVCRT__set_new_mode(int mode); -int __cdecl MSVCRT__fcloseall(void); -void *__cdecl MSVCRT_malloc(unsigned int); -void *__cdecl MSVCRT_calloc(unsigned int, unsigned int); -void __cdecl MSVCRT_free(void *); -int __cdecl MSVCRT__cputs(const char *); -int __cdecl MSVCRT__cprintf( const char *, ... ); -char *__cdecl MSVCRT__strdup(const char *); +int MSVCRT__set_new_mode(int mode); +int _fcloseall(void); +void* MSVCRT_malloc(unsigned int); +void* MSVCRT_calloc(unsigned int, unsigned int); +void MSVCRT_free(void *); +int _cputs(const char *); +int _cprintf( const char *, ... ); +char* _strdup(const char *); #endif /* __WINE_MSVCRT_H */ diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 83d9e1fd5d7..3b6ec88240a 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -57,30 +57,30 @@ debug_channels (msvcrt) @ stub ?terminate@@YAXXZ #() @ stub ?unexpected@@YAXXZ #() @ stdcall ?what@exception@@UBEPBDXZ(ptr) MSVCRT_exception_what -@ cdecl -noimport _CIacos() MSVCRT__CIacos -@ cdecl -noimport _CIasin() MSVCRT__CIasin -@ cdecl -noimport _CIatan() MSVCRT__CIatan -@ cdecl -noimport _CIatan2() MSVCRT__CIatan2 -@ cdecl -noimport _CIcos() MSVCRT__CIcos -@ cdecl -noimport _CIcosh() MSVCRT__CIcosh -@ cdecl -noimport _CIexp() MSVCRT__CIexp -@ cdecl -noimport _CIfmod() MSVCRT__CIfmod -@ cdecl -noimport _CIlog() MSVCRT__CIlog -@ cdecl -noimport _CIlog10() MSVCRT__CIlog10 -@ cdecl -noimport _CIpow() MSVCRT__CIpow -@ cdecl -noimport _CIsin() MSVCRT__CIsin -@ cdecl -noimport _CIsinh() MSVCRT__CIsinh -@ cdecl -noimport _CIsqrt() MSVCRT__CIsqrt -@ cdecl -noimport _CItan() MSVCRT__CItan -@ cdecl -noimport _CItanh() MSVCRT__CItanh +@ cdecl -noimport _CIacos() _CIacos +@ cdecl -noimport _CIasin() _CIasin +@ cdecl -noimport _CIatan() _CIatan +@ cdecl -noimport _CIatan2() _CIatan2 +@ cdecl -noimport _CIcos() _CIcos +@ cdecl -noimport _CIcosh() _CIcosh +@ cdecl -noimport _CIexp() _CIexp +@ cdecl -noimport _CIfmod() _CIfmod +@ cdecl -noimport _CIlog() _CIlog +@ cdecl -noimport _CIlog10() _CIlog10 +@ cdecl -noimport _CIpow() _CIpow +@ cdecl -noimport _CIsin() _CIsin +@ cdecl -noimport _CIsinh() _CIsinh +@ cdecl -noimport _CIsqrt() _CIsqrt +@ cdecl -noimport _CItan() _CItan +@ cdecl -noimport _CItanh() _CItanh @ stub _CxxThrowException -@ cdecl -i386 -norelay _EH_prolog() MSVCRT__EH_prolog -@ cdecl _Getdays() MSVCRT__Getdays -@ cdecl _Getmonths() MSVCRT__Getmonths -@ cdecl _Getnames() MSVCRT__Getnames +@ cdecl -i386 -norelay _EH_prolog() _EH_prolog +@ cdecl _Getdays() _Getdays +@ cdecl _Getmonths() _Getmonths +@ cdecl _Getnames() _Getnames @ extern _HUGE MSVCRT__HUGE -@ cdecl _Strftime(str long str ptr ptr) MSVCRT__Strftime -@ cdecl _XcptFilter(long ptr) MSVCRT__XcptFilter +@ cdecl _Strftime(str long str ptr ptr) _Strftime +@ cdecl _XcptFilter(long ptr) _XcptFilter @ stub __CxxFrameHandler @ stub __CxxLongjmpUnwind @ stub __RTCastToVoid @@ -93,10 +93,10 @@ debug_channels (msvcrt) @ stub __crtCompareStringA @ stub __crtGetLocaleInfoW @ stub __crtLCMapStringA -@ cdecl __dllonexit(ptr ptr ptr) MSVCRT___dllonexit -@ cdecl __doserrno() MSVCRT___doserrno +@ cdecl __dllonexit(ptr ptr ptr) __dllonexit +@ cdecl __doserrno() __doserrno @ stub __fpecode #() -@ cdecl __getmainargs(ptr ptr ptr long ptr) MSVCRT___getmainargs +@ cdecl __getmainargs(ptr ptr ptr long ptr) __getmainargs @ extern __initenv MSVCRT___initenv @ cdecl __isascii(long) MSVCRT___isascii @ cdecl __iscsym(long) MSVCRT___iscsym @@ -106,34 +106,34 @@ debug_channels (msvcrt) @ stub __lc_handle @ stub __lconv_init @ extern __mb_cur_max MSVCRT___mb_cur_max -@ cdecl __p___argc() MSVCRT___p___argc -@ cdecl __p___argv() MSVCRT___p___argv -@ cdecl __p___initenv() MSVCRT___p___initenv -@ cdecl __p___mb_cur_max() MSVCRT___p___mb_cur_max -@ cdecl __p___wargv() MSVCRT___p___wargv -@ cdecl __p___winitenv() MSVCRT___p___winitenv -@ cdecl __p__acmdln() MSVCRT___p__acmdln +@ cdecl __p___argc() __p___argc +@ cdecl __p___argv() __p___argv +@ cdecl __p___initenv() __p___initenv +@ cdecl __p___mb_cur_max() __p___mb_cur_max +@ cdecl __p___wargv() __p___wargv +@ cdecl __p___winitenv() __p___winitenv +@ cdecl __p__acmdln() __p__acmdln @ stub __p__amblksiz #() -@ cdecl __p__commode() MSVCRT___p__commode +@ cdecl __p__commode() __p__commode @ stub __p__daylight #() @ stub __p__dstbias #() -@ cdecl __p__environ() MSVCRT___p__environ +@ cdecl __p__environ() __p__environ @ stub __p__fileinfo #() -@ cdecl __p__fmode() MSVCRT___p__fmode -@ cdecl __p__iob() MSVCRT___p__iob +@ cdecl __p__fmode() __p__fmode +@ cdecl __p__iob() __p__iob @ stub __p__mbcasemap #() -@ cdecl __p__mbctype() MSVCRT___p__mbctype -@ cdecl __p__osver() MSVCRT___p__osver -@ cdecl __p__pctype() MSVCRT___p__pctype +@ cdecl __p__mbctype() __p__mbctype +@ cdecl __p__osver() __p__osver +@ cdecl __p__pctype() __p__pctype @ stub __p__pgmptr #() @ stub __p__pwctype #() -@ cdecl __p__timezone() MSVCRT___p__timezone +@ cdecl __p__timezone() __p__timezone @ stub __p__tzname #() -@ cdecl __p__wcmdln() MSVCRT___p__wcmdln -@ cdecl __p__wenviron() MSVCRT___p__wenviron -@ cdecl __p__winmajor() MSVCRT___p__winmajor -@ cdecl __p__winminor() MSVCRT___p__winminor -@ cdecl __p__winver() MSVCRT___p__winver +@ cdecl __p__wcmdln() __p__wcmdln +@ cdecl __p__wenviron() __p__wenviron +@ cdecl __p__winmajor() __p__winmajor +@ cdecl __p__winminor() __p__winminor +@ cdecl __p__winver() __p__winver @ stub __p__wpgmptr #() @ stub __pioinfo #() @ stub __pxcptinfoptrs #() @@ -147,70 +147,70 @@ debug_channels (msvcrt) @ cdecl __unDNameEx() MSVCRT___unDNameEx #FIXME @ extern __unguarded_readlc_active MSVCRT___unguarded_readlc_active @ extern __wargv MSVCRT___wargv -@ cdecl __wgetmainargs(ptr ptr ptr long ptr) MSVCRT___wgetmainargs +@ cdecl __wgetmainargs(ptr ptr ptr long ptr) __wgetmainargs @ extern __winitenv MSVCRT___winitenv -@ cdecl _abnormal_termination() MSVCRT__abnormal_termination -@ cdecl _access(str long) MSVCRT__access +@ cdecl _abnormal_termination() _abnormal_termination +@ cdecl _access(str long) _access @ extern _acmdln MSVCRT__acmdln -@ cdecl _adj_fdiv_m16i() MSVCRT__adj_fdiv_m16i -@ cdecl _adj_fdiv_m32() MSVCRT__adj_fdiv_m32 -@ cdecl _adj_fdiv_m32i() MSVCRT__adj_fdiv_m32i -@ cdecl _adj_fdiv_m64() MSVCRT__adj_fdiv_m64 -@ cdecl _adj_fdiv_r() MSVCRT__adj_fdiv_r -@ cdecl _adj_fdivr_m16i() MSVCRT__adj_fdivr_m16i -@ cdecl _adj_fdivr_m32() MSVCRT__adj_fdivr_m32 -@ cdecl _adj_fdivr_m32i() MSVCRT__adj_fdivr_m32i -@ cdecl _adj_fdivr_m64() MSVCRT__adj_fdivr_m64 -@ cdecl _adj_fpatan() MSVCRT__adj_fpatan -@ cdecl _adj_fprem() MSVCRT__adj_fprem -@ cdecl _adj_fprem1() MSVCRT__adj_fprem1 -@ cdecl _adj_fptan() MSVCRT__adj_fptan -@ cdecl _adjust_fdiv() MSVCRT__adjust_fdiv +@ cdecl _adj_fdiv_m16i() _adj_fdiv_m16i +@ cdecl _adj_fdiv_m32() _adj_fdiv_m32 +@ cdecl _adj_fdiv_m32i() _adj_fdiv_m32i +@ cdecl _adj_fdiv_m64() _adj_fdiv_m64 +@ cdecl _adj_fdiv_r() _adj_fdiv_r +@ cdecl _adj_fdivr_m16i() _adj_fdivr_m16i +@ cdecl _adj_fdivr_m32() _adj_fdivr_m32 +@ cdecl _adj_fdivr_m32i() _adj_fdivr_m32i +@ cdecl _adj_fdivr_m64() _adj_fdivr_m64 +@ cdecl _adj_fpatan() _adj_fpatan +@ cdecl _adj_fprem() _adj_fprem +@ cdecl _adj_fprem1() _adj_fprem1 +@ cdecl _adj_fptan() _adj_fptan +@ cdecl _adjust_fdiv() _adjust_fdiv @ stub _aexit_rtn @ cdecl _amsg_exit(long) MSVCRT__amsg_exit @ cdecl _assert(str str long) MSVCRT__assert @ stub _atodbl @ stub _atoi64 #(str) @ stub _atoldbl -@ cdecl _beep(long long) MSVCRT__beep +@ cdecl _beep(long long) _beep @ stub _beginthread #(ptr long ptr) -@ cdecl _beginthreadex (ptr long ptr ptr long ptr) MSVCRT__beginthreadex +@ cdecl _beginthreadex (ptr long ptr ptr long ptr) _beginthreadex @ cdecl _c_exit() MSVCRT__c_exit -@ cdecl _cabs(long) MSVCRT__cabs +@ cdecl _cabs(long) _cabs @ stub _callnewh @ cdecl _cexit() MSVCRT__cexit -@ cdecl _cgets(str) MSVCRT__cgets -@ cdecl _chdir(str) MSVCRT__chdir -@ cdecl _chdrive(long) MSVCRT__chdrive -@ cdecl _chgsign( double ) MSVCRT__chgsign -@ cdecl -noimport -i386 _chkesp() MSVCRT__chkesp -@ cdecl _chmod(str long) MSVCRT__chmod +@ cdecl _cgets(str) _cgets +@ cdecl _chdir(str) _chdir +@ cdecl _chdrive(long) _chdrive +@ cdecl _chgsign( double ) _chgsign +@ cdecl -noimport -i386 _chkesp() _chkesp +@ cdecl _chmod(str long) _chmod @ stub _chsize #(long long) -@ cdecl _clearfp() MSVCRT__clearfp -@ cdecl _close(long) MSVCRT__close -@ cdecl _commit(long) MSVCRT__commit +@ cdecl _clearfp() _clearfp +@ cdecl _close(long) _close +@ cdecl _commit(long) _commit @ extern _commode MSVCRT__commode -@ cdecl _control87(long long) MSVCRT__control87 -@ cdecl _controlfp(long long) MSVCRT__controlfp -@ cdecl _copysign( double double ) MSVCRT__copysign -@ varargs _cprintf(str) MSVCRT__cprintf -@ cdecl _cputs(str) MSVCRT__cputs -@ cdecl _creat(str long) MSVCRT__creat -@ varargs _cscanf(str) MSVCRT__cscanf +@ cdecl _control87(long long) _control87 +@ cdecl _controlfp(long long) _controlfp +@ cdecl _copysign( double double ) _copysign +@ varargs _cprintf(str) _cprintf +@ cdecl _cputs(str) _cputs +@ cdecl _creat(str long) _creat +@ varargs _cscanf(str) _cscanf @ extern _ctype MSVCRT__ctype -@ cdecl _cwait(ptr long long) MSVCRT__cwait +@ cdecl _cwait(ptr long long) _cwait @ stub _daylight @ stub _dstbias @ stub _dup #(long) @ stub _dup2 #(long long) @ cdecl _ecvt( double long ptr ptr) ecvt @ stub _endthread #() -@ cdecl _endthreadex(long) MSVCRT__endthreadex +@ cdecl _endthreadex(long) _endthreadex @ extern _environ MSVCRT__environ -@ cdecl _eof(long) MSVCRT__eof +@ cdecl _eof(long) _eof @ cdecl _errno() MSVCRT__errno -@ cdecl _except_handler2(ptr ptr ptr ptr) MSVCRT__except_handler2 -@ cdecl _except_handler3(ptr ptr ptr ptr) MSVCRT__except_handler3 +@ cdecl _except_handler2(ptr ptr ptr ptr) _except_handler2 +@ cdecl _except_handler3(ptr ptr ptr ptr) _except_handler3 @ stub _execl #(str str) varargs @ stub _execle #(str str) varargs @ stub _execlp #(str str) varargs @@ -220,89 +220,89 @@ debug_channels (msvcrt) @ stub _execvp #(str str) @ stub _execvpe #(str str str) @ cdecl _exit(long) MSVCRT__exit -@ cdecl _expand(ptr long) MSVCRT__expand -@ cdecl _fcloseall() MSVCRT__fcloseall +@ cdecl _expand(ptr long) _expand +@ cdecl _fcloseall() _fcloseall @ cdecl _fcvt( double long ptr ptr) fcvt -@ cdecl _fdopen(long str) MSVCRT__fdopen -@ cdecl _fgetchar() MSVCRT__fgetchar -@ cdecl _fgetwchar() MSVCRT__fgetwchar -@ cdecl _filbuf(ptr) MSVCRT__filbuf +@ cdecl _fdopen(long str) _fdopen +@ cdecl _fgetchar() _fgetchar +@ cdecl _fgetwchar() _fgetwchar +@ cdecl _filbuf(ptr) _filbuf @ stub _fileinfo -@ cdecl _filelength(long) MSVCRT__filelength +@ cdecl _filelength(long) _filelength @ stub _filelengthi64 #(long) -@ cdecl _fileno(ptr) MSVCRT__fileno -@ cdecl _findclose(long) MSVCRT__findclose -@ cdecl _findfirst(str ptr) MSVCRT__findfirst +@ cdecl _fileno(ptr) _fileno +@ cdecl _findclose(long) _findclose +@ cdecl _findfirst(str ptr) _findfirst @ stub _findfirsti64 #(str ptr) -@ cdecl _findnext(long ptr) MSVCRT__findnext +@ cdecl _findnext(long ptr) _findnext @ stub _findnexti64 #(long ptr) -@ cdecl _finite( double ) MSVCRT__finite -@ cdecl _flsbuf(long ptr) MSVCRT__flsbuf -@ cdecl _flushall() MSVCRT__flushall +@ cdecl _finite( double ) _finite +@ cdecl _flsbuf(long ptr) _flsbuf +@ cdecl _flushall() _flushall @ extern _fmode MSVCRT__fmode -@ cdecl _fpclass(double) MSVCRT__fpclass +@ cdecl _fpclass(double) _fpclass @ stub _fpieee_flt -@ cdecl _fpreset() MSVCRT__fpreset -@ cdecl _fputchar(long) MSVCRT__fputchar -@ cdecl _fputwchar(long) MSVCRT__fputwchar -@ cdecl _fsopen(str str long) MSVCRT__fsopen -@ cdecl _fstat(long ptr) MSVCRT__fstat +@ cdecl _fpreset() _fpreset +@ cdecl _fputchar(long) _fputchar +@ cdecl _fputwchar(long) _fputwchar +@ cdecl _fsopen(str str long) _fsopen +@ cdecl _fstat(long ptr) _fstat @ stub _fstati64 #(long ptr) -@ cdecl _ftime(ptr) MSVCRT__ftime +@ cdecl _ftime(ptr) _ftime @ forward -noimport _ftol ntdll._ftol -@ cdecl _fullpath(str str long) MSVCRT__fullpath -@ cdecl _futime(long ptr) MSVCRT__futime +@ cdecl _fullpath(str str long) _fullpath +@ cdecl _futime(long ptr) _futime @ cdecl _gcvt( double long str) gcvt -@ cdecl _get_osfhandle(long) MSVCRT__get_osfhandle +@ cdecl _get_osfhandle(long) _get_osfhandle @ stub _get_sbh_threshold #() -@ cdecl _getch() MSVCRT__getch -@ cdecl _getche() MSVCRT__getche -@ cdecl _getcwd(str long) MSVCRT__getcwd -@ cdecl _getdcwd(long str long) MSVCRT__getdcwd -@ cdecl _getdiskfree(long ptr) MSVCRT__getdiskfree +@ cdecl _getch() _getch +@ cdecl _getche() _getche +@ cdecl _getcwd(str long) _getcwd +@ cdecl _getdcwd(long str long) _getdcwd +@ cdecl _getdiskfree(long ptr) _getdiskfree @ forward _getdllprocaddr kernel32.GetProcAddress -@ cdecl _getdrive() MSVCRT__getdrive +@ cdecl _getdrive() _getdrive @ forward _getdrives kernel32.GetLogicalDrives @ stub _getmaxstdio #() -@ cdecl _getmbcp() MSVCRT__getmbcp +@ cdecl _getmbcp() _getmbcp @ forward _getpid kernel32.GetCurrentProcessId @ stub _getsystime #(ptr) -@ cdecl _getw(ptr) MSVCRT__getw +@ cdecl _getw(ptr) _getw @ stub _getws #(wstr) -@ cdecl _global_unwind2(ptr) MSVCRT__global_unwind2 +@ cdecl _global_unwind2(ptr) _global_unwind2 @ stub _heapadd #() -@ cdecl _heapchk() MSVCRT__heapchk -@ cdecl _heapmin() MSVCRT__heapmin -@ cdecl _heapset(long) MSVCRT__heapset +@ cdecl _heapchk() _heapchk +@ cdecl _heapmin() _heapmin +@ cdecl _heapset(long) _heapset @ stub _heapused #(ptr ptr) -@ cdecl _heapwalk(ptr) MSVCRT__heapwalk +@ cdecl _heapwalk(ptr) _heapwalk @ cdecl _hypot(double double) hypot @ stub _i64toa #(long str long) @ stub _i64tow #(long wstr long) -@ cdecl _initterm(ptr ptr) MSVCRT__initterm +@ cdecl _initterm(ptr ptr) _initterm @ stub _inp #(long) -i386 @ stub _inpd #(long) -i386 @ stub _inpw #(long) -i386 @ extern _iob MSVCRT__iob -@ cdecl _isatty(long) MSVCRT__isatty -@ cdecl _isctype(long long) MSVCRT__isctype +@ cdecl _isatty(long) _isatty +@ cdecl _isctype(long long) _isctype @ stub _ismbbalnum #(long) @ stub _ismbbalpha #(long) @ stub _ismbbgraph #(long) @ stub _ismbbkalnum #(long) -@ cdecl _ismbbkana(long) MSVCRT__ismbbkana +@ cdecl _ismbbkana(long) _ismbbkana @ stub _ismbbkprint #(long) @ stub _ismbbkpunct #(long) -@ cdecl _ismbblead(long) MSVCRT__ismbblead +@ cdecl _ismbblead(long) _ismbblead @ stub _ismbbprint #(long) @ stub _ismbbpunct #(long) -@ cdecl _ismbbtrail(long) MSVCRT__ismbbtrail +@ cdecl _ismbbtrail(long) _ismbbtrail @ stub _ismbcalnum #(long) @ stub _ismbcalpha #(long) @ stub _ismbcdigit #(long) @ stub _ismbcgraph #(long) -@ cdecl _ismbchira(long) MSVCRT__ismbchira -@ cdecl _ismbckata(long) MSVCRT__ismbckata +@ cdecl _ismbchira(long) _ismbchira +@ cdecl _ismbckata(long) _ismbckata @ stub _ismbcl0 #(long) @ stub _ismbcl1 #(long) @ stub _ismbcl2 #(long) @@ -313,37 +313,38 @@ debug_channels (msvcrt) @ stub _ismbcspace #(long) @ stub _ismbcsymbol #(long) @ stub _ismbcupper #(long) -@ cdecl _ismbslead(ptr ptr) MSVCRT__ismbslead -@ cdecl _ismbstrail(ptr ptr) MSVCRT__ismbstrail -@ cdecl _isnan( double ) MSVCRT__isnan +@ cdecl _ismbslead(ptr ptr) _ismbslead +@ cdecl _ismbstrail(ptr ptr) _ismbstrail +@ cdecl _isnan( double ) _isnan @ forward -noimport _itoa ntdll._itoa -@ cdecl _itow(long wstr long) MSVCRT__itow +@ cdecl _itow(long wstr long) _itow @ cdecl _j0(double) j0 @ cdecl _j1(double) j1 @ cdecl _jn(long double) jn -@ cdecl _kbhit() MSVCRT__kbhit +@ cdecl _kbhit() _kbhit @ stub _lfind -@ cdecl _loaddll(str) MSVCRT__loaddll -@ cdecl _local_unwind2(ptr long) MSVCRT__local_unwind2 +@ cdecl _loaddll(str) _loaddll +@ cdecl _local_unwind2(ptr long) _local_unwind2 @ stub _lock @ stub _locking #(long long long) -@ cdecl _logb( double ) MSVCRT__logb +@ cdecl _logb( double ) _logb @ stub _longjmpex -@ cdecl _lrotl(long long) MSVCRT__lrotl -@ cdecl _lrotr(long long) MSVCRT__lrotr -@ cdecl _lsearch(ptr ptr long long ptr) MSVCRT__lsearch -@ cdecl _lseek(long long long) MSVCRT__lseek +@ cdecl _lrotl(long long) _lrotl +@ cdecl _lrotr(long long) _lrotr +@ cdecl _lsearch(ptr ptr long long ptr) _lsearch +@ cdecl _lseek(long long long) _lseek @ stub _lseeki64 #(long long long) @ forward -noimport _ltoa ntdll._ltoa @ stub _ltow #(long) -@ cdecl _makepath(str str str str str) MSVCRT__makepath -@ cdecl _mbbtombc(long) MSVCRT__mbbtombc +@ cdecl _makepath(str str str str str) _makepath +@ cdecl _matherr(ptr) _matherr +@ cdecl _mbbtombc(long) _mbbtombc @ stub _mbbtype #(long long) @ stub _mbcasemap @ cdecl _mbccpy (str str) strcpy @ stub _mbcjistojms #(long) @ stub _mbcjmstojis #(long) -@ cdecl _mbclen(ptr) MSVCRT__mbclen +@ cdecl _mbclen(ptr) _mbclen @ stub _mbctohira #(long) @ stub _mbctokata #(long) @ stub _mbctolower #(long) @@ -352,17 +353,17 @@ debug_channels (msvcrt) @ stub _mbctype @ stub _mbsbtype #(ptr long) @ cdecl _mbscat(str str) strcat -@ cdecl _mbschr(str long) MSVCRT__mbschr -@ cdecl _mbscmp(str str) MSVCRT__mbscmp +@ cdecl _mbschr(str long) _mbschr +@ cdecl _mbscmp(str str) _mbscmp @ stub _mbscoll #(str str) @ cdecl _mbscpy(ptr str) strcpy @ stub _mbscspn #(str str) -@ cdecl _mbsdec(ptr ptr) MSVCRT__mbsdec -@ cdecl _mbsdup(str) MSVCRT__strdup -@ cdecl _mbsicmp(str str) MSVCRT__mbsicmp +@ cdecl _mbsdec(ptr ptr) _mbsdec +@ cdecl _mbsdup(str) _strdup +@ cdecl _mbsicmp(str str) _mbsicmp @ stub _mbsicoll #(str str) -@ cdecl _mbsinc(str) MSVCRT__mbsinc -@ cdecl _mbslen(str) MSVCRT__mbslen +@ cdecl _mbsinc(str) _mbsinc +@ cdecl _mbslen(str) _mbslen @ stub _mbslwr #(str) @ stub _mbsnbcat #(str str long) @ stub _mbsnbcmp #(str str long) @@ -372,35 +373,35 @@ debug_channels (msvcrt) @ stub _mbsnbicmp #(str str long) @ stub _mbsnbicoll #(str str long) @ stub _mbsnbset #(str long long) -@ cdecl _mbsncat(str str long) MSVCRT__mbsncat -@ cdecl _mbsnccnt(str long) MSVCRT__mbsnccnt -@ cdecl _mbsncmp(str str long) MSVCRT__mbsncmp +@ cdecl _mbsncat(str str long) _mbsncat +@ cdecl _mbsnccnt(str long) _mbsnccnt +@ cdecl _mbsncmp(str str long) _mbsncmp @ stub _mbsncoll #(ptr str long) -@ cdecl _mbsncpy(str str long) MSVCRT__mbsncpy -@ cdecl _mbsnextc(str) MSVCRT__mbsnextc -@ cdecl _mbsnicmp(str str long) MSVCRT__mbsnicmp +@ cdecl _mbsncpy(str str long) _mbsncpy +@ cdecl _mbsnextc(str) _mbsnextc +@ cdecl _mbsnicmp(str str long) _mbsnicmp @ stub _mbsnicoll #(str str long) -@ cdecl _mbsninc(str long) MSVCRT__mbsninc -@ cdecl _mbsnset(str long long) MSVCRT__mbsnset +@ cdecl _mbsninc(str long) _mbsninc +@ cdecl _mbsnset(str long long) _mbsnset @ stub _mbspbrk #(str str) -@ cdecl _mbsrchr(str long) MSVCRT__mbsrchr +@ cdecl _mbsrchr(str long) _mbsrchr @ stub _mbsrev #(str) -@ cdecl _mbsset(str long) MSVCRT__mbsset +@ cdecl _mbsset(str long) _mbsset @ stub _mbsspn #(str str) @ stub _mbsspnp #(str str) @ cdecl _mbsstr(str str) strstr @ stub _mbstok #(str str) -@ cdecl _mbstrlen(str) MSVCRT__mbstrlen +@ cdecl _mbstrlen(str) _mbstrlen @ stub _mbsupr #(str) @ cdecl _memccpy(ptr ptr long long) memccpy @ forward -noimport _memicmp ntdll._memicmp -@ cdecl _mkdir(str) MSVCRT__mkdir -@ cdecl _mktemp(str) MSVCRT__mktemp -@ cdecl _msize(ptr) MSVCRT__msize -@ cdecl _nextafter(double double) MSVCRT__nextafter -@ cdecl _onexit(ptr) MSVCRT__onexit -@ cdecl _open(str long) MSVCRT__open -@ cdecl _open_osfhandle(long long) MSVCRT__open_osfhandle +@ cdecl _mkdir(str) _mkdir +@ cdecl _mktemp(str) _mktemp +@ cdecl _msize(ptr) _msize +@ cdecl _nextafter(double double) _nextafter +@ cdecl _onexit(ptr) _onexit +@ cdecl _open(str long) _open +@ cdecl _open_osfhandle(long long) _open_osfhandle @ stub _osver @ stub _outp #(long long) @ stub _outpd #(long long) @@ -410,23 +411,23 @@ debug_channels (msvcrt) @ stub _pgmptr @ stub _pipe #(ptr long long) @ stub _popen #(str str) -@ cdecl _purecall() MSVCRT__purecall -@ cdecl _putch(long) MSVCRT__putch -@ cdecl _putenv(str) MSVCRT__putenv -@ cdecl _putw(long ptr) MSVCRT__putw -@ cdecl _putws(wstr) MSVCRT__putws +@ cdecl _purecall() _purecall +@ cdecl _putch(long) _putch +@ cdecl _putenv(str) _putenv +@ cdecl _putw(long ptr) _putw +@ cdecl _putws(wstr) _putws @ stub _pwctype -@ cdecl _read(long ptr long) MSVCRT__read -@ cdecl _rmdir(str) MSVCRT__rmdir -@ cdecl _rmtmp() MSVCRT__rmtmp -@ cdecl _rotl(long long) MSVCRT__rotl -@ cdecl _rotr(long long) MSVCRT__rotr -@ cdecl _safe_fdiv() MSVCRT__safe_fdiv -@ cdecl _safe_fdivr() MSVCRT__safe_fdivr -@ cdecl _safe_fprem() MSVCRT__safe_fprem -@ cdecl _safe_fprem1() MSVCRT__safe_fprem1 -@ cdecl _scalb( double long) MSVCRT__scalb -@ cdecl _searchenv(str str str) MSVCRT__searchenv +@ cdecl _read(long ptr long) _read +@ cdecl _rmdir(str) _rmdir +@ cdecl _rmtmp() _rmtmp +@ cdecl _rotl(long long) _rotl +@ cdecl _rotr(long long) _rotr +@ cdecl _safe_fdiv() _safe_fdiv +@ cdecl _safe_fdivr() _safe_fdivr +@ cdecl _safe_fprem() _safe_fprem +@ cdecl _safe_fprem1() _safe_fprem1 +@ cdecl _scalb( double long) _scalb +@ cdecl _searchenv(str str str) _searchenv @ stub _seh_longjmp_unwind @ stub _set_error_mode #(long) @ stub _set_sbh_threshold #(long) @@ -434,10 +435,10 @@ debug_channels (msvcrt) @ cdecl _setjmp(ptr) MSVCRT__setjmp @ cdecl _setjmp3(ptr long) MSVCRT__setjmp3 @ stub _setmaxstdio #(long) -@ cdecl _setmbcp(long) MSVCRT__setmbcp -@ cdecl _setmode(long long) MSVCRT__setmode +@ cdecl _setmbcp(long) _setmbcp +@ cdecl _setmode(long long) _setmode @ stub _setsystime #(ptr long) -@ cdecl _sleep(long) MSVCRT__sleep +@ cdecl _sleep(long) _sleep @ varargs _snprintf(str long str) snprintf @ forward -noimport _snwprintf ntdll._snwprintf @ cdecl _sopen(str long long) MSVCRT__sopen @@ -445,68 +446,68 @@ debug_channels (msvcrt) @ stub _spawnle #(str str) varargs @ stub _spawnlp #(str str) varargs @ stub _spawnlpe #(str str) varargs -@ cdecl _spawnv(long str ptr) MSVCRT__spawnv -@ cdecl _spawnve(long str ptr ptr) MSVCRT__spawnve -@ cdecl _spawnvp(long str ptr) MSVCRT__spawnvp -@ cdecl _spawnvpe(long str ptr ptr) MSVCRT__spawnvpe +@ cdecl _spawnv(long str ptr) _spawnv +@ cdecl _spawnve(long str ptr ptr) _spawnve +@ cdecl _spawnvp(long str ptr) _spawnvp +@ cdecl _spawnvpe(long str ptr ptr) _spawnvpe @ forward -noimport _splitpath ntdll._splitpath -@ cdecl _stat(str ptr) MSVCRT__stat +@ cdecl _stat(str ptr) _stat @ stub _stati64 #(str ptr) -@ cdecl _statusfp() MSVCRT__statusfp +@ cdecl _statusfp() _statusfp @ cdecl _strcmpi(str str) strcasecmp -@ cdecl _strdate(str) MSVCRT__strdate -@ cdecl _strdup(str) MSVCRT__strdup -@ cdecl _strerror(long) MSVCRT__strerror +@ cdecl _strdate(str) _strdate +@ cdecl _strdup(str) _strdup +@ cdecl _strerror(long) _strerror @ cdecl _stricmp(str str) strcasecmp @ stub _stricoll #(str str) @ forward -noimport _strlwr ntdll._strlwr @ stub _strncoll #(str str long) @ cdecl _strnicmp(str str long) strncasecmp @ stub _strnicoll #(str str long) -@ cdecl _strnset(str long long) MSVCRT__strnset -@ cdecl _strrev(str) MSVCRT__strrev -@ cdecl _strset(str long) MSVCRT__strset -@ cdecl _strtime(str) MSVCRT__strtime +@ cdecl _strnset(str long long) _strnset +@ cdecl _strrev(str) _strrev +@ cdecl _strset(str long) _strset +@ cdecl _strtime(str) _strtime @ forward -noimport _strupr ntdll._strupr -@ cdecl _swab(str str long) MSVCRT__swab -@ stub _sys_errlist #() -@ stub _sys_nerr #() -@ cdecl _tell(long) MSVCRT__tell +@ cdecl _swab(str str long) _swab +@ stub _sys_errlist #() # FIXME: This is supposed to be a variable! +@ stub _sys_nerr #() # FIXME: This is supposed to be a variable! +@ cdecl _tell(long) _tell @ stub _telli64 #(long) -@ cdecl _tempnam(str str) MSVCRT__tempnam +@ cdecl _tempnam(str str) _tempnam @ stub _timezone #() -@ cdecl _tolower(long) MSVCRT__tolower -@ cdecl _toupper(long) MSVCRT__toupper +@ cdecl _tolower(long) _tolower +@ cdecl _toupper(long) _toupper @ stub _tzname @ stub _tzset #() @ stub _ui64toa #(long str long) @ stub _ui64tow #(long wstr long) @ forward -noimport _ultoa ntdll._ultoa @ forward -noimport _ultow ntdll._ultow -@ cdecl _umask(long) MSVCRT__umask -@ cdecl _ungetch(long) MSVCRT__ungetch -@ cdecl _unlink(str) MSVCRT__unlink -@ cdecl _unloaddll(long) MSVCRT__unloaddll +@ cdecl _umask(long) _umask +@ cdecl _ungetch(long) _ungetch +@ cdecl _unlink(str) _unlink +@ cdecl _unloaddll(long) _unloaddll @ stub _unlock -@ cdecl _utime(str ptr) MSVCRT__utime +@ cdecl _utime(str ptr) _utime @ cdecl _vsnprintf(ptr long ptr ptr) vsnprintf -@ cdecl _vsnwprintf(wstr long wstr long) MSVCRT__vsnwprintf -@ cdecl _waccess(wstr long) MSVCRT__waccess +@ cdecl _vsnwprintf(wstr long wstr long) _vsnwprintf +@ cdecl _waccess(wstr long) _waccess @ stub _wasctime #(ptr) -@ cdecl _wchdir(wstr) MSVCRT__wchdir -@ cdecl _wchmod(wstr long) MSVCRT__wchmod +@ cdecl _wchdir(wstr) _wchdir +@ cdecl _wchmod(wstr long) _wchmod @ extern _wcmdln MSVCRT__wcmdln -@ cdecl _wcreat(wstr long) MSVCRT__wcreat -@ cdecl _wcsdup(wstr) MSVCRT__wcsdup +@ cdecl _wcreat(wstr long) _wcreat +@ cdecl _wcsdup(wstr) _wcsdup @ forward -noimport _wcsicmp ntdll._wcsicmp -@ cdecl _wcsicoll(wstr wstr) MSVCRT__wcsicoll +@ cdecl _wcsicoll(wstr wstr) _wcsicoll @ forward -noimport _wcslwr ntdll._wcslwr @ stub _wcsncoll #(wstr wstr long) @ forward -noimport _wcsnicmp ntdll._wcsnicmp @ stub _wcsnicoll #(wstr wstr long) -@ cdecl _wcsnset(wstr long long) MSVCRT__wcsnset -@ cdecl _wcsrev(wstr) MSVCRT__wcsrev -@ cdecl _wcsset(wstr long) MSVCRT__wcsset +@ cdecl _wcsnset(wstr long long) _wcsnset +@ cdecl _wcsrev(wstr) _wcsrev +@ cdecl _wcsset(wstr long) _wcsset @ forward -noimport _wcsupr ntdll._wcsupr @ stub _wctime #(ptr) @ extern _wenviron MSVCRT__wenviron @@ -518,33 +519,33 @@ debug_channels (msvcrt) @ stub _wexecve #(wstr wstr wstr) @ stub _wexecvp #(wstr wstr) @ stub _wexecvpe #(wstr wstr wstr) -@ cdecl _wfdopen(long wstr) MSVCRT__wfdopen -@ cdecl _wfindfirst(wstr ptr) MSVCRT__wfindfirst +@ cdecl _wfdopen(long wstr) _wfdopen +@ cdecl _wfindfirst(wstr ptr) _wfindfirst @ stub _wfindfirsti64 #(wstr ptr) -@ cdecl _wfindnext(long ptr) MSVCRT__wfindnext +@ cdecl _wfindnext(long ptr) _wfindnext @ stub _wfindnexti64 #(long ptr) -@ cdecl _wfopen(wstr wstr) MSVCRT__wfopen +@ cdecl _wfopen(wstr wstr) _wfopen @ stub _wfreopen #(wstr wstr ptr) -@ cdecl _wfsopen(wstr wstr long) MSVCRT__wfsopen +@ cdecl _wfsopen(wstr wstr long) _wfsopen @ stub _wfullpath #(wstr wstr long) -@ cdecl _wgetcwd(wstr long) MSVCRT__wgetcwd -@ cdecl _wgetdcwd(long wstr long) MSVCRT__wgetdcwd -@ cdecl _wgetenv(wstr) MSVCRT__wgetenv +@ cdecl _wgetcwd(wstr long) _wgetcwd +@ cdecl _wgetdcwd(long wstr long) _wgetdcwd +@ cdecl _wgetenv(wstr) _wgetenv @ extern _winmajor MSVCRT__winmajor @ extern _winminor MSVCRT__winminor @ extern _winver MSVCRT__winver @ stub _wmakepath #(wstr wstr wstr wstr wstr) -@ cdecl _wmkdir(wstr) MSVCRT__wmkdir -@ cdecl _wmktemp(wstr) MSVCRT__wmktemp -@ cdecl _wopen(wstr long) MSVCRT__wopen +@ cdecl _wmkdir(wstr) _wmkdir +@ cdecl _wmktemp(wstr) _wmktemp +@ cdecl _wopen(wstr long) _wopen @ stub _wperror #(wstr) @ stub _wpgmptr @ stub _wpopen #(wstr wstr) -@ cdecl _wputenv(wstr) MSVCRT__wputenv -@ cdecl _wremove(wstr) MSVCRT__wremove -@ cdecl _wrename(wstr wstr) MSVCRT__wrename -@ cdecl _write(long ptr long) MSVCRT__write -@ cdecl _wrmdir(wstr) MSVCRT__wrmdir +@ cdecl _wputenv(wstr) _wputenv +@ cdecl _wremove(wstr) _wremove +@ cdecl _wrename(wstr wstr) _wrename +@ cdecl _write(long ptr long) _write +@ cdecl _wrmdir(wstr) _wrmdir @ stub _wsearchenv #(wstr wstr wstr) @ stub _wsetlocale #(long wstr) @ stub _wsopen #(wstr long long) varargs @@ -556,22 +557,22 @@ debug_channels (msvcrt) @ stub _wspawnve #(long wstr wstr wstr) @ stub _wspawnvp #(long wstr wstr) @ stub _wspawnvpe #(long wstr wstr wstr) -@ cdecl _wsplitpath(wstr wstr wstr wstr wstr) MSVCRT__wsplitpath -@ cdecl _wstat(wstr ptr) MSVCRT__wstat +@ cdecl _wsplitpath(wstr wstr wstr wstr wstr) _wsplitpath +@ cdecl _wstat(wstr ptr) _wstat @ stub _wstati64 #(wstr ptr) @ stub _wstrdate #(wstr) @ stub _wstrtime #(wstr) @ stub _wsystem #(wstr) -@ cdecl _wtempnam(wstr wstr) MSVCRT__wtempnam +@ cdecl _wtempnam(wstr wstr) _wtempnam @ stub _wtmpnam #(wstr) @ forward -noimport _wtoi NTDLL._wtoi @ stub _wtoi64 #(wstr) @ forward _wtol NTDLL._wtol -@ cdecl _wunlink(wstr) MSVCRT__wunlink -@ cdecl _wutime(wstr ptr) MSVCRT__wutime -@ cdecl _y0(double) MSVCRT__y0 -@ cdecl _y1(double) MSVCRT__y1 -@ cdecl _yn(long double ) MSVCRT__yn +@ cdecl _wunlink(wstr) _wunlink +@ cdecl _wutime(wstr ptr) _wutime +@ cdecl _y0(double) _y0 +@ cdecl _y1(double) _y1 +@ cdecl _yn(long double ) _yn @ cdecl abort() MSVCRT_abort @ forward -noimport abs ntdll.abs @ cdecl acos( double ) acos diff --git a/dlls/msvcrt/process.c b/dlls/msvcrt/process.c index d8d54019f80..c2841bc3a41 100644 --- a/dlls/msvcrt/process.c +++ b/dlls/msvcrt/process.c @@ -23,17 +23,17 @@ DEFAULT_DEBUG_CHANNEL(msvcrt); #define _P_NOWAITO 3 #define _P_DETACH 4 -void __cdecl MSVCRT__exit(int); -void __cdecl MSVCRT__searchenv(const char* file, const char* env, char *buf); +void MSVCRT__exit(int); +void _searchenv(const char* file, const char* env, char *buf); -/* FIXME: Check file extenstions for app to run */ +/* FIXME: Check file extensions for app to run */ static const unsigned int EXE = 'e' << 16 | 'x' << 8 | 'e'; static const unsigned int BAT = 'b' << 16 | 'a' << 8 | 't'; static const unsigned int CMD = 'c' << 16 | 'm' << 8 | 'd'; static const unsigned int COM = 'c' << 16 | 'o' << 8 | 'm'; /* INTERNAL: Spawn a child process */ -static int __MSVCRT__spawn(int flags, const char *exe, char * args, char *env) +static int msvcrt_spawn(int flags, const char* exe, char* args, char* env) { STARTUPINFOA si; PROCESS_INFORMATION pi; @@ -83,7 +83,7 @@ static int __MSVCRT__spawn(int flags, const char *exe, char * args, char *env) } /* INTERNAL: Convert argv list to a single 'delim'-separated string */ -static char * __MSVCRT__argvtos(const char * *arg, char delim) +static char* msvcrt_argvtos(const char* *arg, char delim) { const char **search = arg; long size = 0; @@ -119,7 +119,7 @@ static char * __MSVCRT__argvtos(const char * *arg, char delim) /********************************************************************* * _cwait (MSVCRT.@) */ -int __cdecl MSVCRT__cwait(int *status, int pid, int action) +int _cwait(int *status, int pid, int action) { HANDLE hPid = (HANDLE)pid; int doserrno; @@ -152,11 +152,11 @@ int __cdecl MSVCRT__cwait(int *status, int pid, int action) /********************************************************************* * _spawnve (MSVCRT.@) */ -int __cdecl MSVCRT__spawnve(int flags, const char *name, const char **argv, +int _spawnve(int flags, const char* name, const char **argv, const char **envv) { - char * args = __MSVCRT__argvtos(argv,' '); - char * envs = __MSVCRT__argvtos(envv,0); + char * args = msvcrt_argvtos(argv,' '); + char * envs = msvcrt_argvtos(envv,0); const char *fullname = name; int ret = -1; @@ -165,7 +165,7 @@ int __cdecl MSVCRT__spawnve(int flags, const char *name, const char **argv, if (args) { - ret = __MSVCRT__spawn(flags, fullname, args, envs); + ret = msvcrt_spawn(flags, fullname, args, envs); MSVCRT_free(args); } if (envs) @@ -177,43 +177,43 @@ int __cdecl MSVCRT__spawnve(int flags, const char *name, const char **argv, /********************************************************************* * _spawnv (MSVCRT.@) */ -int __cdecl MSVCRT__spawnv(int flags, const char *name, const char **argv) +int _spawnv(int flags, const char* name, const char **argv) { - return MSVCRT__spawnve(flags, name, argv, NULL); + return _spawnve(flags, name, argv, NULL); } /********************************************************************* * _spawnvpe (MSVCRT.@) */ -int __cdecl MSVCRT__spawnvpe(int flags, const char *name, const char **argv, +int _spawnvpe(int flags, const char* name, const char **argv, const char **envv) { char fullname[MAX_PATH]; - MSVCRT__searchenv(name, "PATH", fullname); - return MSVCRT__spawnve(flags, fullname[0] ? fullname : name, argv, envv); + _searchenv(name, "PATH", fullname); + return _spawnve(flags, fullname[0] ? fullname : name, argv, envv); } /********************************************************************* * _spawnvp (MSVCRT.@) */ -int __cdecl MSVCRT__spawnvp(int flags, const char *name, const char **argv) +int _spawnvp(int flags, const char* name, const char **argv) { - return MSVCRT__spawnvpe(flags, name, argv, NULL); + return _spawnvpe(flags, name, argv, NULL); } /********************************************************************* * system (MSVCRT.@) */ -int __cdecl MSVCRT_system(const char *cmd) +int MSVCRT_system(const char* cmd) { /* FIXME: should probably launch cmd interpreter in COMSPEC */ - return __MSVCRT__spawn(_P_WAIT, cmd, NULL, NULL); + return msvcrt_spawn(_P_WAIT, cmd, NULL, NULL); } /********************************************************************* * _loaddll (MSVCRT.@) */ -int __cdecl MSVCRT__loaddll(const char *dllname) +int _loaddll(const char* dllname) { return LoadLibraryA(dllname); } @@ -221,7 +221,7 @@ int __cdecl MSVCRT__loaddll(const char *dllname) /********************************************************************* * _unloaddll (MSVCRT.@) */ -int __cdecl MSVCRT__unloaddll(int dll) +int _unloaddll(int dll) { if (FreeLibrary((HANDLE)dll)) return 0; diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c index 1736707635a..22d5c3e0009 100644 --- a/dlls/msvcrt/string.c +++ b/dlls/msvcrt/string.c @@ -12,7 +12,7 @@ DEFAULT_DEBUG_CHANNEL(msvcrt); /* INTERNAL: MSVCRT_malloc() based strndup */ -char * MSVCRT__strndup(const char * buf, unsigned int size) +char* msvcrt_strndup(const char* buf, unsigned int size) { char* ret; unsigned int len = strlen(buf), max_len; @@ -31,7 +31,7 @@ char * MSVCRT__strndup(const char * buf, unsigned int size) /********************************************************************* * _strdec (MSVCRT.@) */ -char * __cdecl MSVCRT__strdec(const char * str1, const char * str2) +char* _strdec(const char* str1, const char* str2) { /* Hmm. While the docs suggest that the following should work... */ /* return (str2<=str1?0:str2-1); */ @@ -43,7 +43,7 @@ char * __cdecl MSVCRT__strdec(const char * str1, const char * str2) /********************************************************************* * _strdup (MSVCRT.@) */ -char * __cdecl MSVCRT__strdup(const char * str) +char* _strdup(const char* str) { char * ret = MSVCRT_malloc(strlen(str)+1); if (ret) strcpy( ret, str ); @@ -53,7 +53,7 @@ char * __cdecl MSVCRT__strdup(const char * str) /********************************************************************* * _strinc (MSVCRT.@) */ -char * __cdecl MSVCRT__strinc(const char * str) +char* _strinc(const char* str) { return (char*)str+1; } @@ -61,7 +61,7 @@ char * __cdecl MSVCRT__strinc(const char * str) /********************************************************************* * _strnextc (MSVCRT.@) */ -unsigned int __cdecl MSVCRT__strnextc(const char * str) +unsigned int _strnextc(const char* str) { return (unsigned int)*str; } @@ -71,7 +71,7 @@ unsigned int __cdecl MSVCRT__strnextc(const char * str) * * Return a pointer to the 'n'th character in a string */ -char * __cdecl MSVCRT__strninc(char * str, unsigned int n) +char* _strninc(char* str, unsigned int n) { return str + n; } @@ -79,7 +79,7 @@ char * __cdecl MSVCRT__strninc(char * str, unsigned int n) /********************************************************************* * _strnset (MSVCRT.@) */ -char * __cdecl MSVCRT__strnset(char * str, int value, unsigned int len) +char* _strnset(char* str, int value, unsigned int len) { if (len > 0 && str) while (*str && len--) @@ -90,7 +90,7 @@ char * __cdecl MSVCRT__strnset(char * str, int value, unsigned int len) /********************************************************************* * _strrev (MSVCRT.@) */ -char * __cdecl MSVCRT__strrev (char * str) +char* _strrev(char* str) { char * p1; char * p2; @@ -109,7 +109,7 @@ char * __cdecl MSVCRT__strrev (char * str) /********************************************************************* * _strset (MSVCRT.@) */ -char * __cdecl MSVCRT__strset (char * str, int value) +char* _strset(char* str, int value) { char *ptr = str; while (*ptr) @@ -121,7 +121,7 @@ char * __cdecl MSVCRT__strset (char * str, int value) /********************************************************************* * _strncnt (MSVCRT.@) */ -unsigned int __cdecl MSVCRT__strncnt(char * str, unsigned int max) +unsigned int _strncnt(char* str, unsigned int max) { unsigned int len = strlen(str); return (len > max? max : len); @@ -130,7 +130,7 @@ unsigned int __cdecl MSVCRT__strncnt(char * str, unsigned int max) /********************************************************************* * _strspnp (MSVCRT.@) */ -char * __cdecl MSVCRT__strspnp(char * str1, char * str2) +char* _strspnp(char* str1, char* str2) { str1 += strspn(str1,str2); return *str1? str1 : 0; @@ -139,7 +139,7 @@ char * __cdecl MSVCRT__strspnp(char * str1, char * str2) /********************************************************************* * _swab (MSVCRT.@) */ -void __cdecl MSVCRT__swab(char * src, char * dst, int len) +void _swab(char* src, char* dst, int len) { if (len > 1) { diff --git a/dlls/msvcrt/thread.c b/dlls/msvcrt/thread.c index 6cc734b25c9..89a5d043a9d 100644 --- a/dlls/msvcrt/thread.c +++ b/dlls/msvcrt/thread.c @@ -11,11 +11,11 @@ DEFAULT_DEBUG_CHANNEL(msvcrt); /********************************************************************* * _beginthreadex (MSVCRT.@) */ -unsigned long __cdecl MSVCRT__beginthreadex(void *sec, - unsigned int stack, - LPTHREAD_START_ROUTINE start, - void *arg, unsigned int flag, - unsigned int*addr) +unsigned long _beginthreadex(void* sec, + unsigned int stack, + LPTHREAD_START_ROUTINE start, + void* arg, unsigned int flag, + unsigned int* addr) { TRACE("(%p,%d,%p,%p,%d,%p)\n",sec, stack,start, arg,flag,addr); /* FIXME */ @@ -25,7 +25,7 @@ unsigned long __cdecl MSVCRT__beginthreadex(void *sec, /********************************************************************* * _endthreadex (MSVCRT.@) */ -void __cdecl MSVCRT__endthreadex(unsigned int retval) +void _endthreadex(unsigned int retval) { TRACE("(%d)\n",retval); /* FIXME */ diff --git a/dlls/msvcrt/time.c b/dlls/msvcrt/time.c index 4240f96abb6..fbb1eb8b06a 100644 --- a/dlls/msvcrt/time.c +++ b/dlls/msvcrt/time.c @@ -22,7 +22,7 @@ typedef struct __MSVCRT_timeb /* INTERNAL: Return formatted current time/date */ -char * MSVCRT_get_current_time(char * out, const char * format) +char* msvcrt_get_current_time(char* out, const char* format) { static const time_t bad_time = (time_t)-1; time_t t; @@ -40,23 +40,23 @@ char * MSVCRT_get_current_time(char * out, const char * format) /********************************************************************** * _strdate (MSVCRT.@) */ -char * __cdecl MSVCRT__strdate (char * date) +char* _strdate(char* date) { - return MSVCRT_get_current_time(date,"%m/%d/%y"); + return msvcrt_get_current_time(date,"%m/%d/%y"); } /********************************************************************* * _strtime (MSVCRT.@) */ -char * __cdecl MSVCRT__strtime (char * date) +char* _strtime(char* date) { - return MSVCRT_get_current_time(date,"%H:%M:%S"); + return msvcrt_get_current_time(date,"%H:%M:%S"); } /********************************************************************* * clock (MSVCRT.@) */ -clock_t __cdecl MSVCRT_clock(void) +clock_t MSVCRT_clock(void) { struct tms alltimes; clock_t res; @@ -73,7 +73,7 @@ clock_t __cdecl MSVCRT_clock(void) /********************************************************************* * difftime (MSVCRT.@) */ -double __cdecl MSVCRT_difftime (time_t time1, time_t time2) +double MSVCRT_difftime(time_t time1, time_t time2) { return (double)(time1 - time2); } @@ -81,7 +81,7 @@ double __cdecl MSVCRT_difftime (time_t time1, time_t time2) /********************************************************************* * time (MSVCRT.@) */ -time_t __cdecl MSVCRT_time(time_t *buf) +time_t MSVCRT_time(time_t* buf) { time_t curtime = time(NULL); return buf ? *buf = curtime : curtime; @@ -90,7 +90,7 @@ time_t __cdecl MSVCRT_time(time_t *buf) /********************************************************************* * _ftime (MSVCRT.@) */ -void __cdecl MSVCRT__ftime (MSVCRT_timeb *buf) +void _ftime(MSVCRT_timeb* buf) { buf->time = MSVCRT_time(NULL); buf->millitm = 0; /* FIXME */ diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c index 784756c8404..4ba83cc4d00 100644 --- a/dlls/msvcrt/wcs.c +++ b/dlls/msvcrt/wcs.c @@ -14,7 +14,7 @@ DEFAULT_DEBUG_CHANNEL(msvcrt); /* INTERNAL: MSVCRT_malloc() based wstrndup */ -LPWSTR MSVCRT__wstrndup(LPCWSTR buf, unsigned int size) +LPWSTR msvcrt_wstrndup(LPCWSTR buf, unsigned int size) { WCHAR* ret; unsigned int len = strlenW(buf), max_len; @@ -33,7 +33,7 @@ LPWSTR MSVCRT__wstrndup(LPCWSTR buf, unsigned int size) /********************************************************************* * _wcsdup (MSVCRT.@) */ -LPWSTR __cdecl MSVCRT__wcsdup( LPCWSTR str ) +LPWSTR _wcsdup( LPCWSTR str ) { LPWSTR ret = NULL; if (str) @@ -48,7 +48,7 @@ LPWSTR __cdecl MSVCRT__wcsdup( LPCWSTR str ) /********************************************************************* * _wcsicoll (MSVCRT.@) */ -INT __cdecl MSVCRT__wcsicoll( LPCWSTR str1, LPCWSTR str2 ) +INT _wcsicoll( LPCWSTR str1, LPCWSTR str2 ) { /* FIXME: handle collates */ return strcmpiW( str1, str2 ); @@ -57,7 +57,7 @@ INT __cdecl MSVCRT__wcsicoll( LPCWSTR str1, LPCWSTR str2 ) /********************************************************************* * _wcsnset (MSVCRT.@) */ -LPWSTR __cdecl MSVCRT__wcsnset( LPWSTR str, WCHAR c, INT n ) +LPWSTR _wcsnset( LPWSTR str, WCHAR c, INT n ) { LPWSTR ret = str; while ((n-- > 0) && *str) *str++ = c; @@ -67,7 +67,7 @@ LPWSTR __cdecl MSVCRT__wcsnset( LPWSTR str, WCHAR c, INT n ) /********************************************************************* * _wcsrev (MSVCRT.@) */ -LPWSTR __cdecl MSVCRT__wcsrev( LPWSTR str ) +LPWSTR _wcsrev( LPWSTR str ) { LPWSTR ret = str; LPWSTR end = str + strlenW(str) - 1; @@ -83,7 +83,7 @@ LPWSTR __cdecl MSVCRT__wcsrev( LPWSTR str ) /********************************************************************* * _wcsset (MSVCRT.@) */ -LPWSTR __cdecl MSVCRT__wcsset( LPWSTR str, WCHAR c ) +LPWSTR _wcsset( LPWSTR str, WCHAR c ) { LPWSTR ret = str; while (*str) *str++ = c; @@ -93,7 +93,7 @@ LPWSTR __cdecl MSVCRT__wcsset( LPWSTR str, WCHAR c ) /********************************************************************* * _vsnwprintf (MSVCRT.@) */ -int __cdecl MSVCRT__vsnwprintf(WCHAR *str, unsigned int len, +int _vsnwprintf(WCHAR *str, unsigned int len, const WCHAR *format, va_list valist) { /* If you fix a bug in this function, fix it in ntdll/wcstring.c also! */ @@ -219,15 +219,15 @@ int __cdecl MSVCRT__vsnwprintf(WCHAR *str, unsigned int len, /********************************************************************* * vswprintf (MSVCRT.@) */ -int __cdecl MSVCRT_vswprintf( LPWSTR str, LPCWSTR format, va_list args ) +int MSVCRT_vswprintf( LPWSTR str, LPCWSTR format, va_list args ) { - return MSVCRT__vsnwprintf( str, INT_MAX, format, args ); + return _vsnwprintf( str, INT_MAX, format, args ); } /********************************************************************* * wcscoll (MSVCRT.@) */ -DWORD __cdecl MSVCRT_wcscoll( LPCWSTR str1, LPCWSTR str2 ) +DWORD MSVCRT_wcscoll( LPCWSTR str1, LPCWSTR str2 ) { /* FIXME: handle collates */ return strcmpW( str1, str2 ); @@ -236,7 +236,7 @@ DWORD __cdecl MSVCRT_wcscoll( LPCWSTR str1, LPCWSTR str2 ) /********************************************************************* * wcspbrk (MSVCRT.@) */ -LPWSTR __cdecl MSVCRT_wcspbrk( LPCWSTR str, LPCWSTR accept ) +LPWSTR MSVCRT_wcspbrk( LPCWSTR str, LPCWSTR accept ) { LPCWSTR p; while (*str) @@ -250,7 +250,7 @@ LPWSTR __cdecl MSVCRT_wcspbrk( LPCWSTR str, LPCWSTR accept ) /********************************************************************* * wctomb (MSVCRT.@) */ -INT __cdecl MSVCRT_wctomb( char *dst, WCHAR ch ) +INT MSVCRT_wctomb( char *dst, WCHAR ch ) { return WideCharToMultiByte( CP_ACP, 0, &ch, 1, dst, 6, NULL, NULL ); } @@ -258,7 +258,7 @@ INT __cdecl MSVCRT_wctomb( char *dst, WCHAR ch ) /********************************************************************* * iswalnum (MSVCRT.@) */ -INT __cdecl MSVCRT_iswalnum( WCHAR wc ) +INT MSVCRT_iswalnum( WCHAR wc ) { return get_char_typeW(wc) & (C1_ALPHA|C1_DIGIT|C1_LOWER|C1_UPPER); } @@ -266,7 +266,7 @@ INT __cdecl MSVCRT_iswalnum( WCHAR wc ) /********************************************************************* * iswalpha (MSVCRT.@) */ -INT __cdecl MSVCRT_iswalpha( WCHAR wc ) +INT MSVCRT_iswalpha( WCHAR wc ) { return get_char_typeW(wc) & (C1_ALPHA|C1_LOWER|C1_UPPER); } @@ -274,7 +274,7 @@ INT __cdecl MSVCRT_iswalpha( WCHAR wc ) /********************************************************************* * iswcntrl (MSVCRT.@) */ -INT __cdecl MSVCRT_iswcntrl( WCHAR wc ) +INT MSVCRT_iswcntrl( WCHAR wc ) { return get_char_typeW(wc) & C1_CNTRL; } @@ -282,7 +282,7 @@ INT __cdecl MSVCRT_iswcntrl( WCHAR wc ) /********************************************************************* * iswdigit (MSVCRT.@) */ -INT __cdecl MSVCRT_iswdigit( WCHAR wc ) +INT MSVCRT_iswdigit( WCHAR wc ) { return get_char_typeW(wc) & C1_DIGIT; } @@ -290,7 +290,7 @@ INT __cdecl MSVCRT_iswdigit( WCHAR wc ) /********************************************************************* * iswgraph (MSVCRT.@) */ -INT __cdecl MSVCRT_iswgraph( WCHAR wc ) +INT MSVCRT_iswgraph( WCHAR wc ) { return get_char_typeW(wc) & (C1_ALPHA|C1_PUNCT|C1_DIGIT|C1_LOWER|C1_UPPER); } @@ -298,7 +298,7 @@ INT __cdecl MSVCRT_iswgraph( WCHAR wc ) /********************************************************************* * iswlower (MSVCRT.@) */ -INT __cdecl MSVCRT_iswlower( WCHAR wc ) +INT MSVCRT_iswlower( WCHAR wc ) { return get_char_typeW(wc) & C1_LOWER; } @@ -306,7 +306,7 @@ INT __cdecl MSVCRT_iswlower( WCHAR wc ) /********************************************************************* * iswprint (MSVCRT.@) */ -INT __cdecl MSVCRT_iswprint( WCHAR wc ) +INT MSVCRT_iswprint( WCHAR wc ) { return get_char_typeW(wc) & (C1_ALPHA|C1_BLANK|C1_PUNCT|C1_DIGIT|C1_LOWER|C1_UPPER); } @@ -314,7 +314,7 @@ INT __cdecl MSVCRT_iswprint( WCHAR wc ) /********************************************************************* * iswpunct (MSVCRT.@) */ -INT __cdecl MSVCRT_iswpunct( WCHAR wc ) +INT MSVCRT_iswpunct( WCHAR wc ) { return get_char_typeW(wc) & C1_PUNCT; } @@ -322,7 +322,7 @@ INT __cdecl MSVCRT_iswpunct( WCHAR wc ) /********************************************************************* * iswspace (MSVCRT.@) */ -INT __cdecl MSVCRT_iswspace( WCHAR wc ) +INT MSVCRT_iswspace( WCHAR wc ) { return get_char_typeW(wc) & C1_SPACE; } @@ -330,7 +330,7 @@ INT __cdecl MSVCRT_iswspace( WCHAR wc ) /********************************************************************* * iswupper (MSVCRT.@) */ -INT __cdecl MSVCRT_iswupper( WCHAR wc ) +INT MSVCRT_iswupper( WCHAR wc ) { return get_char_typeW(wc) & C1_UPPER; } @@ -338,19 +338,19 @@ INT __cdecl MSVCRT_iswupper( WCHAR wc ) /********************************************************************* * iswxdigit (MSVCRT.@) */ -INT __cdecl MSVCRT_iswxdigit( WCHAR wc ) +INT MSVCRT_iswxdigit( WCHAR wc ) { return get_char_typeW(wc) & C1_XDIGIT; } -extern char *__cdecl _itoa( long , char *, int); -extern char *__cdecl _ultoa( long , char *, int); -extern char *__cdecl _ltoa( long , char *, int); +extern char *_itoa( long , char *, int); +extern char *_ultoa( long , char *, int); +extern char *_ltoa( long , char *, int); /********************************************************************* * _itow (MSVCRT.@) */ -WCHAR* __cdecl MSVCRT__itow(int value,WCHAR* out,int base) +WCHAR* _itow(int value,WCHAR* out,int base) { char buf[64]; _itoa(value, buf, base); @@ -361,7 +361,7 @@ WCHAR* __cdecl MSVCRT__itow(int value,WCHAR* out,int base) /********************************************************************* * _ltow (MSVCRT.@) */ -WCHAR* __cdecl MSVCRT__ltow(long value,WCHAR* out,int base) +WCHAR* _ltow(long value,WCHAR* out,int base) { char buf[128]; _ltoa(value, buf, base); @@ -372,7 +372,7 @@ WCHAR* __cdecl MSVCRT__ltow(long value,WCHAR* out,int base) /********************************************************************* * _ultow (MSVCRT.@) */ -WCHAR* __cdecl MSVCRT__ultow(unsigned long value,WCHAR* out,int base) +WCHAR* _ultow(unsigned long value,WCHAR* out,int base) { char buf[128]; _ultoa(value, buf, base);