Commit 203a8f82 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Adjust the 'MSVCRT_' prefix to match the msvcrt headers

Prefix internal methods with 'msvcrt_' instead of 'MSVCRT_', '__MSVCRT_', etc. Remove '_cdecl', it's unnecessary
parent 77c1618d
...@@ -21,7 +21,7 @@ static HANDLE MSVCRT_console_out= INVALID_HANDLE_VALUE; ...@@ -21,7 +21,7 @@ static HANDLE MSVCRT_console_out= INVALID_HANDLE_VALUE;
static int __MSVCRT_console_buffer = MSVCRT_EOF; static int __MSVCRT_console_buffer = MSVCRT_EOF;
/* INTERNAL: Initialise console handles */ /* INTERNAL: Initialise console handles */
void MSVCRT_init_console(void) void msvcrt_init_console(void)
{ {
TRACE(":Opening console handles\n"); TRACE(":Opening console handles\n");
...@@ -41,7 +41,7 @@ void MSVCRT_init_console(void) ...@@ -41,7 +41,7 @@ void MSVCRT_init_console(void)
} }
/* INTERNAL: Free console handles */ /* INTERNAL: Free console handles */
void MSVCRT_free_console(void) void msvcrt_free_console(void)
{ {
TRACE(":Closing console handles\n"); TRACE(":Closing console handles\n");
CloseHandle(MSVCRT_console_in); CloseHandle(MSVCRT_console_in);
...@@ -51,7 +51,7 @@ void MSVCRT_free_console(void) ...@@ -51,7 +51,7 @@ void MSVCRT_free_console(void)
/********************************************************************* /*********************************************************************
* _cputs (MSVCRT.@) * _cputs (MSVCRT.@)
*/ */
int __cdecl MSVCRT__cputs(const char * str) int _cputs(const char* str)
{ {
DWORD count; DWORD count;
int retval = MSVCRT_EOF; int retval = MSVCRT_EOF;
...@@ -67,7 +67,7 @@ int __cdecl MSVCRT__cputs(const char * str) ...@@ -67,7 +67,7 @@ int __cdecl MSVCRT__cputs(const char * str)
/********************************************************************* /*********************************************************************
* _getch (MSVCRT.@) * _getch (MSVCRT.@)
*/ */
int __cdecl MSVCRT__getch(void) int _getch(void)
{ {
int retval = MSVCRT_EOF; int retval = MSVCRT_EOF;
...@@ -112,7 +112,7 @@ int __cdecl MSVCRT__getch(void) ...@@ -112,7 +112,7 @@ int __cdecl MSVCRT__getch(void)
/********************************************************************* /*********************************************************************
* _putch (MSVCRT.@) * _putch (MSVCRT.@)
*/ */
int __cdecl MSVCRT__putch(int c) int _putch(int c)
{ {
int retval = MSVCRT_EOF; int retval = MSVCRT_EOF;
DWORD count; DWORD count;
...@@ -126,13 +126,13 @@ int __cdecl MSVCRT__putch(int c) ...@@ -126,13 +126,13 @@ int __cdecl MSVCRT__putch(int c)
/********************************************************************* /*********************************************************************
* _getche (MSVCRT.@) * _getche (MSVCRT.@)
*/ */
int __cdecl MSVCRT__getche(void) int _getche(void)
{ {
int retval; int retval;
LOCK_CONSOLE; LOCK_CONSOLE;
retval = MSVCRT__getch(); retval = _getch();
if (retval != MSVCRT_EOF) if (retval != MSVCRT_EOF)
retval = MSVCRT__putch(retval); retval = _putch(retval);
UNLOCK_CONSOLE; UNLOCK_CONSOLE;
return retval; return retval;
} }
...@@ -140,7 +140,7 @@ int __cdecl MSVCRT__getche(void) ...@@ -140,7 +140,7 @@ int __cdecl MSVCRT__getche(void)
/********************************************************************* /*********************************************************************
* _cgets (MSVCRT.@) * _cgets (MSVCRT.@)
*/ */
char *__cdecl MSVCRT__cgets(char *str) char* _cgets(char* str)
{ {
char *buf = str + 2; char *buf = str + 2;
int c; int c;
...@@ -149,7 +149,7 @@ char *__cdecl MSVCRT__cgets(char *str) ...@@ -149,7 +149,7 @@ char *__cdecl MSVCRT__cgets(char *str)
LOCK_CONSOLE; LOCK_CONSOLE;
do 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; break;
*buf++ = c & 0xff; *buf++ = c & 0xff;
} while (1); } while (1);
...@@ -161,7 +161,7 @@ char *__cdecl MSVCRT__cgets(char *str) ...@@ -161,7 +161,7 @@ char *__cdecl MSVCRT__cgets(char *str)
/********************************************************************* /*********************************************************************
* _ungetch (MSVCRT.@) * _ungetch (MSVCRT.@)
*/ */
int __cdecl MSVCRT__ungetch(int c) int _ungetch(int c)
{ {
int retval = MSVCRT_EOF; int retval = MSVCRT_EOF;
LOCK_CONSOLE; LOCK_CONSOLE;
...@@ -174,7 +174,7 @@ int __cdecl MSVCRT__ungetch(int c) ...@@ -174,7 +174,7 @@ int __cdecl MSVCRT__ungetch(int c)
/********************************************************************* /*********************************************************************
* _cscanf (MSVCRT.@) * _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 */ /* NOTE: If you extend this function, extend MSVCRT_fscanf in file.c too */
int rd = 0; int rd = 0;
...@@ -184,12 +184,12 @@ int __cdecl MSVCRT__cscanf( const char * format, ... ) ...@@ -184,12 +184,12 @@ int __cdecl MSVCRT__cscanf( const char * format, ... )
WARN("\"%s\": semi-stub\n", format); WARN("\"%s\": semi-stub\n", format);
va_start(ap, format); va_start(ap, format);
LOCK_CONSOLE; LOCK_CONSOLE;
nch = MSVCRT__getch(); nch = _getch();
while (*format) { while (*format) {
if (*format == ' ') { if (*format == ' ') {
/* skip whitespace */ /* skip whitespace */
while ((nch!=MSVCRT_EOF) && isspace(nch)) while ((nch!=MSVCRT_EOF) && isspace(nch))
nch = MSVCRT__getch(); nch = _getch();
} }
else if (*format == '%') { else if (*format == '%') {
int st = 0; int st = 0;
...@@ -200,10 +200,10 @@ int __cdecl MSVCRT__cscanf( const char * format, ... ) ...@@ -200,10 +200,10 @@ int __cdecl MSVCRT__cscanf( const char * format, ... )
int cur = 0; int cur = 0;
/* skip initial whitespace */ /* skip initial whitespace */
while ((nch!=MSVCRT_EOF) && isspace(nch)) while ((nch!=MSVCRT_EOF) && isspace(nch))
nch = MSVCRT__getch(); nch = _getch();
/* get sign and first digit */ /* get sign and first digit */
if (nch == '-') { if (nch == '-') {
nch = MSVCRT__getch(); nch = _getch();
if (isdigit(nch)) if (isdigit(nch))
cur = -(nch - '0'); cur = -(nch - '0');
else break; else break;
...@@ -212,11 +212,11 @@ int __cdecl MSVCRT__cscanf( const char * format, ... ) ...@@ -212,11 +212,11 @@ int __cdecl MSVCRT__cscanf( const char * format, ... )
cur = nch - '0'; cur = nch - '0';
else break; else break;
} }
nch = MSVCRT__getch(); nch = _getch();
/* read until no more digits */ /* read until no more digits */
while ((nch!=MSVCRT_EOF) && isdigit(nch)) { while ((nch!=MSVCRT_EOF) && isdigit(nch)) {
cur = cur*10 + (nch - '0'); cur = cur*10 + (nch - '0');
nch = MSVCRT__getch(); nch = _getch();
} }
st = 1; st = 1;
*val = cur; *val = cur;
...@@ -227,10 +227,10 @@ int __cdecl MSVCRT__cscanf( const char * format, ... ) ...@@ -227,10 +227,10 @@ int __cdecl MSVCRT__cscanf( const char * format, ... )
float cur = 0; float cur = 0;
/* skip initial whitespace */ /* skip initial whitespace */
while ((nch!=MSVCRT_EOF) && isspace(nch)) while ((nch!=MSVCRT_EOF) && isspace(nch))
nch = MSVCRT__getch(); nch = _getch();
/* get sign and first digit */ /* get sign and first digit */
if (nch == '-') { if (nch == '-') {
nch = MSVCRT__getch(); nch = _getch();
if (isdigit(nch)) if (isdigit(nch))
cur = -(nch - '0'); cur = -(nch - '0');
else break; else break;
...@@ -242,16 +242,16 @@ int __cdecl MSVCRT__cscanf( const char * format, ... ) ...@@ -242,16 +242,16 @@ int __cdecl MSVCRT__cscanf( const char * format, ... )
/* read until no more digits */ /* read until no more digits */
while ((nch!=MSVCRT_EOF) && isdigit(nch)) { while ((nch!=MSVCRT_EOF) && isdigit(nch)) {
cur = cur*10 + (nch - '0'); cur = cur*10 + (nch - '0');
nch = MSVCRT__getch(); nch = _getch();
} }
if (nch == '.') { if (nch == '.') {
/* handle decimals */ /* handle decimals */
float dec = 1; float dec = 1;
nch = MSVCRT__getch(); nch = _getch();
while ((nch!=MSVCRT_EOF) && isdigit(nch)) { while ((nch!=MSVCRT_EOF) && isdigit(nch)) {
dec /= 10; dec /= 10;
cur += dec * (nch - '0'); cur += dec * (nch - '0');
nch = MSVCRT__getch(); nch = _getch();
} }
} }
st = 1; st = 1;
...@@ -263,11 +263,11 @@ int __cdecl MSVCRT__cscanf( const char * format, ... ) ...@@ -263,11 +263,11 @@ int __cdecl MSVCRT__cscanf( const char * format, ... )
char*sptr = str; char*sptr = str;
/* skip initial whitespace */ /* skip initial whitespace */
while ((nch!=MSVCRT_EOF) && isspace(nch)) while ((nch!=MSVCRT_EOF) && isspace(nch))
nch = MSVCRT__getch(); nch = _getch();
/* read until whitespace */ /* read until whitespace */
while ((nch!=MSVCRT_EOF) && !isspace(nch)) { while ((nch!=MSVCRT_EOF) && !isspace(nch)) {
*sptr++ = nch; st++; *sptr++ = nch; st++;
nch = MSVCRT__getch(); nch = _getch();
} }
/* terminate */ /* terminate */
*sptr = 0; *sptr = 0;
...@@ -282,13 +282,13 @@ int __cdecl MSVCRT__cscanf( const char * format, ... ) ...@@ -282,13 +282,13 @@ int __cdecl MSVCRT__cscanf( const char * format, ... )
else { else {
/* check for character match */ /* check for character match */
if (nch == *format) if (nch == *format)
nch = MSVCRT__getch(); nch = _getch();
else break; else break;
} }
format++; format++;
} }
if (nch != MSVCRT_EOF) if (nch != MSVCRT_EOF)
MSVCRT__ungetch(nch); _ungetch(nch);
UNLOCK_CONSOLE; UNLOCK_CONSOLE;
va_end(ap); va_end(ap);
TRACE("returning %d\n", rd); TRACE("returning %d\n", rd);
...@@ -298,7 +298,7 @@ int __cdecl MSVCRT__cscanf( const char * format, ... ) ...@@ -298,7 +298,7 @@ int __cdecl MSVCRT__cscanf( const char * format, ... )
/********************************************************************* /*********************************************************************
* _kbhit (MSVCRT.@) * _kbhit (MSVCRT.@)
*/ */
int __cdecl MSVCRT__kbhit(void) int _kbhit(void)
{ {
int retval = 0; int retval = 0;
...@@ -338,7 +338,7 @@ extern int snprintf(char *, int, const char *, ...); ...@@ -338,7 +338,7 @@ extern int snprintf(char *, int, const char *, ...);
/********************************************************************* /*********************************************************************
* _cprintf (MSVCRT.@) * _cprintf (MSVCRT.@)
*/ */
int __cdecl MSVCRT__cprintf( const char * format, ... ) int _cprintf(const char* format, ...)
{ {
char buf[2048], *mem = buf; char buf[2048], *mem = buf;
int written, resize = sizeof(buf), retval; int written, resize = sizeof(buf), retval;
...@@ -362,7 +362,7 @@ int __cdecl MSVCRT__cprintf( const char * format, ... ) ...@@ -362,7 +362,7 @@ int __cdecl MSVCRT__cprintf( const char * format, ... )
} }
va_end(valist); va_end(valist);
LOCK_CONSOLE; LOCK_CONSOLE;
retval = MSVCRT__cputs( mem ); retval = _cputs( mem );
UNLOCK_CONSOLE; UNLOCK_CONSOLE;
if (mem != buf) if (mem != buf)
MSVCRT_free (mem); MSVCRT_free (mem);
......
...@@ -8,29 +8,29 @@ ...@@ -8,29 +8,29 @@
DEFAULT_DEBUG_CHANNEL(msvcrt); DEFAULT_DEBUG_CHANNEL(msvcrt);
/* ASCII char classification table - binary compatible */ /* ASCII char classification table - binary compatible */
#define MSVCRT_UPPER C1_UPPER #define _UPPER C1_UPPER
#define MSVCRT_LOWER C1_LOWER #define _LOWER C1_LOWER
#define MSVCRT_DIGIT C1_DIGIT #define _DIGIT C1_DIGIT
#define MSVCRT_SPACE C1_SPACE #define _SPACE C1_SPACE
#define MSVCRT_PUNCT C1_PUNCT #define _PUNCT C1_PUNCT
#define MSVCRT_CONTROL C1_CNTRL #define _CONTROL C1_CNTRL
#define MSVCRT_BLANK C1_BLANK #define _BLANK C1_BLANK
#define MSVCRT_HEX C1_XDIGIT #define _HEX C1_XDIGIT
#define MSVCRT_LEADBYTE 0x8000 #define _LEADBYTE 0x8000
#define MSVCRT_ALPHA (C1_ALPHA|MSVCRT_UPPER|MSVCRT_LOWER) #define _ALPHA (C1_ALPHA|_UPPER|_LOWER)
#define _C_ MSVCRT_CONTROL #define _C_ _CONTROL
#define _S_ MSVCRT_SPACE #define _S_ _SPACE
#define _P_ MSVCRT_PUNCT #define _P_ _PUNCT
#define _D_ MSVCRT_DIGIT #define _D_ _DIGIT
#define _H_ MSVCRT_HEX #define _H_ _HEX
#define _U_ MSVCRT_UPPER #define _U_ _UPPER
#define _L_ MSVCRT_LOWER #define _L_ _LOWER
WORD MSVCRT__ctype [257] = { WORD MSVCRT__ctype [257] = {
0, _C_, _C_, _C_, _C_, _C_, _C_, _C_, _C_, _C_, _S_|_C_, _S_|_C_, 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_, _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_, _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_, _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_, _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; ...@@ -62,9 +62,9 @@ extern int MSVCRT___mb_cur_max;
extern LCID MSVCRT_current_lc_all_lcid; 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; return &MSVCRT__pctype;
} }
...@@ -72,7 +72,7 @@ WORD** MSVCRT___p__pctype(void) ...@@ -72,7 +72,7 @@ WORD** MSVCRT___p__pctype(void)
/********************************************************************* /*********************************************************************
* _isctype (MSVCRT.@) * _isctype (MSVCRT.@)
*/ */
int __cdecl MSVCRT__isctype(int c, int type) int _isctype(int c, int type)
{ {
if (c >= -1 && c <= 255) if (c >= -1 && c <= 255)
return MSVCRT__pctype[c] & type; return MSVCRT__pctype[c] & type;
...@@ -83,7 +83,7 @@ int __cdecl MSVCRT__isctype(int c, int type) ...@@ -83,7 +83,7 @@ int __cdecl MSVCRT__isctype(int c, int type)
WORD typeInfo; WORD typeInfo;
char convert[3], *pconv = convert; 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++ = (UINT)c >> 8;
*pconv++ = c & 0xff; *pconv++ = c & 0xff;
*pconv = 0; *pconv = 0;
...@@ -98,104 +98,103 @@ int __cdecl MSVCRT__isctype(int c, int type) ...@@ -98,104 +98,103 @@ int __cdecl MSVCRT__isctype(int c, int type)
/********************************************************************* /*********************************************************************
* isalnum (MSVCRT.@) * 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.@) * 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.@) * 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.@) * 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.@) * 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.@) * 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.@) * 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.@) * isprint (MSVCRT.@)
*/ */
int __cdecl MSVCRT_isprint(int c) int MSVCRT_isprint(int c)
{ {
return MSVCRT__isctype( c, MSVCRT_ALPHA | MSVCRT_DIGIT | return _isctype( c, _ALPHA | _DIGIT | _BLANK | _PUNCT );
MSVCRT_BLANK | MSVCRT_PUNCT );
} }
/********************************************************************* /*********************************************************************
* ispunct (MSVCRT.@) * 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.@) * 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.@) * 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.@) * 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.@) * __isascii (MSVCRT.@)
*/ */
int __cdecl MSVCRT___isascii(int c) int MSVCRT___isascii(int c)
{ {
return isascii((unsigned)c); return isascii((unsigned)c);
} }
...@@ -203,7 +202,7 @@ int __cdecl MSVCRT___isascii(int c) ...@@ -203,7 +202,7 @@ int __cdecl MSVCRT___isascii(int c)
/********************************************************************* /*********************************************************************
* __toascii (MSVCRT.@) * __toascii (MSVCRT.@)
*/ */
int __cdecl MSVCRT___toascii(int c) int MSVCRT___toascii(int c)
{ {
return (unsigned)c & 0x7f; return (unsigned)c & 0x7f;
} }
...@@ -212,7 +211,7 @@ int __cdecl MSVCRT___toascii(int c) ...@@ -212,7 +211,7 @@ int __cdecl MSVCRT___toascii(int c)
* iswascii (MSVCRT.@) * iswascii (MSVCRT.@)
* *
*/ */
int __cdecl MSVCRT_iswascii(WCHAR c) int MSVCRT_iswascii(WCHAR c)
{ {
return ((unsigned)c < 0x80); return ((unsigned)c < 0x80);
} }
...@@ -220,7 +219,7 @@ int __cdecl MSVCRT_iswascii(WCHAR c) ...@@ -220,7 +219,7 @@ int __cdecl MSVCRT_iswascii(WCHAR c)
/********************************************************************* /*********************************************************************
* __iscsym (MSVCRT.@) * __iscsym (MSVCRT.@)
*/ */
int __cdecl MSVCRT___iscsym(int c) int MSVCRT___iscsym(int c)
{ {
return (c < 127 && (isalnum(c) || c == '_')); return (c < 127 && (isalnum(c) || c == '_'));
} }
...@@ -228,7 +227,7 @@ int __cdecl MSVCRT___iscsym(int c) ...@@ -228,7 +227,7 @@ int __cdecl MSVCRT___iscsym(int c)
/********************************************************************* /*********************************************************************
* __iscsymf (MSVCRT.@) * __iscsymf (MSVCRT.@)
*/ */
int __cdecl MSVCRT___iscsymf(int c) int MSVCRT___iscsymf(int c)
{ {
return (c < 127 && (isalpha(c) || c == '_')); return (c < 127 && (isalpha(c) || c == '_'));
} }
...@@ -236,7 +235,7 @@ int __cdecl MSVCRT___iscsymf(int c) ...@@ -236,7 +235,7 @@ int __cdecl MSVCRT___iscsymf(int c)
/********************************************************************* /*********************************************************************
* _toupper (MSVCRT.@) * _toupper (MSVCRT.@)
*/ */
int __cdecl MSVCRT__toupper(int c) int MSVCRT__toupper(int c)
{ {
return c - 0x20; /* sic */ return c - 0x20; /* sic */
} }
...@@ -244,7 +243,7 @@ int __cdecl MSVCRT__toupper(int c) ...@@ -244,7 +243,7 @@ int __cdecl MSVCRT__toupper(int c)
/********************************************************************* /*********************************************************************
* _tolower (MSVCRT.@) * _tolower (MSVCRT.@)
*/ */
int __cdecl MSVCRT__tolower(int c) int MSVCRT__tolower(int c)
{ {
return c + 0x20; /* sic */ return c + 0x20; /* sic */
} }
...@@ -37,87 +37,87 @@ WCHAR **MSVCRT___winitenv; ...@@ -37,87 +37,87 @@ WCHAR **MSVCRT___winitenv;
int MSVCRT_timezone; int MSVCRT_timezone;
int MSVCRT_app_type; int MSVCRT_app_type;
typedef void (__cdecl *MSVCRT__INITTERMFUN)(void); typedef void (*_INITTERMFUN)(void);
/*********************************************************************** /***********************************************************************
* __p___argc (MSVCRT.@) * __p___argc (MSVCRT.@)
*/ */
unsigned int *__cdecl MSVCRT___p___argc(void) { return &MSVCRT___argc; } unsigned int* __p___argc(void) { return &MSVCRT___argc; }
/*********************************************************************** /***********************************************************************
* __p__commode (MSVCRT.@) * __p__commode (MSVCRT.@)
*/ */
unsigned int *__cdecl MSVCRT___p__commode(void) { return &MSVCRT__commode; } unsigned int* __p__commode(void) { return &MSVCRT__commode; }
/*********************************************************************** /***********************************************************************
* __p__fmode (MSVCRT.@) * __p__fmode (MSVCRT.@)
*/ */
unsigned int *__cdecl MSVCRT___p__fmode(void) { return &MSVCRT__fmode; } unsigned int* __p__fmode(void) { return &MSVCRT__fmode; }
/*********************************************************************** /***********************************************************************
* __p__osver (MSVCRT.@) * __p__osver (MSVCRT.@)
*/ */
unsigned int *__cdecl MSVCRT___p__osver(void) { return &MSVCRT__osver; } unsigned int* __p__osver(void) { return &MSVCRT__osver; }
/*********************************************************************** /***********************************************************************
* __p__winmajor (MSVCRT.@) * __p__winmajor (MSVCRT.@)
*/ */
unsigned int *__cdecl MSVCRT___p__winmajor(void) { return &MSVCRT__winmajor; } unsigned int* __p__winmajor(void) { return &MSVCRT__winmajor; }
/*********************************************************************** /***********************************************************************
* __p__winminor (MSVCRT.@) * __p__winminor (MSVCRT.@)
*/ */
unsigned int *__cdecl MSVCRT___p__winminor(void) { return &MSVCRT__winminor; } unsigned int* __p__winminor(void) { return &MSVCRT__winminor; }
/*********************************************************************** /***********************************************************************
* __p__winver (MSVCRT.@) * __p__winver (MSVCRT.@)
*/ */
unsigned int *__cdecl MSVCRT___p__winver(void) { return &MSVCRT__winver; } unsigned int* __p__winver(void) { return &MSVCRT__winver; }
/********************************************************************* /*********************************************************************
* __p__acmdln (MSVCRT.@) * __p__acmdln (MSVCRT.@)
*/ */
char **__cdecl MSVCRT___p__acmdln(void) { return &MSVCRT__acmdln; } char** __p__acmdln(void) { return &MSVCRT__acmdln; }
/********************************************************************* /*********************************************************************
* __p__wcmdln (MSVCRT.@) * __p__wcmdln (MSVCRT.@)
*/ */
WCHAR **__cdecl MSVCRT___p__wcmdln(void) { return &MSVCRT__wcmdln; } WCHAR** __p__wcmdln(void) { return &MSVCRT__wcmdln; }
/********************************************************************* /*********************************************************************
* __p___argv (MSVCRT.@) * __p___argv (MSVCRT.@)
*/ */
char ***__cdecl MSVCRT___p___argv(void) { return &MSVCRT___argv; } char*** __p___argv(void) { return &MSVCRT___argv; }
/********************************************************************* /*********************************************************************
* __p___wargv (MSVCRT.@) * __p___wargv (MSVCRT.@)
*/ */
WCHAR ***__cdecl MSVCRT___p___wargv(void) { return &MSVCRT___wargv; } WCHAR*** __p___wargv(void) { return &MSVCRT___wargv; }
/********************************************************************* /*********************************************************************
* __p__environ (MSVCRT.@) * __p__environ (MSVCRT.@)
*/ */
char **__cdecl MSVCRT___p__environ(void) { return &MSVCRT__environ; } char** __p__environ(void) { return &MSVCRT__environ; }
/********************************************************************* /*********************************************************************
* __p__wenviron (MSVCRT.@) * __p__wenviron (MSVCRT.@)
*/ */
WCHAR **__cdecl MSVCRT___p__wenviron(void) { return &MSVCRT__wenviron; } WCHAR** __p__wenviron(void) { return &MSVCRT__wenviron; }
/********************************************************************* /*********************************************************************
* __p___initenv (MSVCRT.@) * __p___initenv (MSVCRT.@)
*/ */
char ***__cdecl MSVCRT___p___initenv(void) { return &MSVCRT___initenv; } char*** __p___initenv(void) { return &MSVCRT___initenv; }
/********************************************************************* /*********************************************************************
* __p___winitenv (MSVCRT.@) * __p___winitenv (MSVCRT.@)
*/ */
WCHAR ***__cdecl MSVCRT___p___winitenv(void) { return &MSVCRT___winitenv; } WCHAR*** __p___winitenv(void) { return &MSVCRT___winitenv; }
/********************************************************************* /*********************************************************************
* __p__timezone (MSVCRT.@) * __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 */ /* INTERNAL: Create a wide string from an ascii string */
static WCHAR *wstrdupa(const char *str) static WCHAR *wstrdupa(const char *str)
...@@ -135,19 +135,19 @@ 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 * program we simply return the data we've already initialised. This also means
* you can call multiple times without leaking * you can call multiple times without leaking
*/ */
void MSVCRT_init_args(void) void msvcrt_init_args(void)
{ {
char *cmdline, **xargv = NULL; char *cmdline, **xargv = NULL;
WCHAR *wcmdline, **wxargv = NULL; WCHAR *wcmdline, **wxargv = NULL;
int xargc,end,last_arg,afterlastspace; int xargc,end,last_arg,afterlastspace;
DWORD version; DWORD version;
MSVCRT__acmdln = MSVCRT__strdup( GetCommandLineA() ); MSVCRT__acmdln = _strdup( GetCommandLineA() );
MSVCRT__wcmdln = wcmdline = wstrdupa(MSVCRT__acmdln); MSVCRT__wcmdln = wcmdline = wstrdupa(MSVCRT__acmdln);
/* Make a copy of MSVCRT__acmdln to be able modify it. /* Make a copy of MSVCRT__acmdln to be able modify it.
We will free it at the end of processing. */ 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)); TRACE("got '%s', wide = '%s'\n", cmdline, debugstr_w(wcmdline));
...@@ -187,7 +187,7 @@ void MSVCRT_init_args(void) ...@@ -187,7 +187,7 @@ void MSVCRT_init_args(void)
if (strlen(cmdline+afterlastspace)) if (strlen(cmdline+afterlastspace))
{ {
xargv[xargc] = MSVCRT__strdup(cmdline+afterlastspace); xargv[xargc] = _strdup(cmdline+afterlastspace);
wxargv[xargc] = wstrdupa(xargv[xargc]); wxargv[xargc] = wstrdupa(xargv[xargc]);
xargc++; xargc++;
if (!last_arg) /* need to seek to the next arg ? */ if (!last_arg) /* need to seek to the next arg ? */
...@@ -224,7 +224,7 @@ void MSVCRT_init_args(void) ...@@ -224,7 +224,7 @@ void MSVCRT_init_args(void)
/* INTERNAL: free memory used by args */ /* INTERNAL: free memory used by args */
void MSVCRT_free_args(void) void msvcrt_free_args(void)
{ {
/* FIXME */ /* FIXME */
} }
...@@ -232,7 +232,7 @@ void MSVCRT_free_args(void) ...@@ -232,7 +232,7 @@ void MSVCRT_free_args(void)
/********************************************************************* /*********************************************************************
* __getmainargs (MSVCRT.@) * __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) int expand_wildcards, int *new_mode)
{ {
TRACE("(%p,%p,%p,%d,%p).\n", argc, argv, environ, expand_wildcards, 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, ...@@ -245,7 +245,7 @@ void __cdecl MSVCRT___getmainargs(int *argc, char ***argv, char **environ,
/********************************************************************* /*********************************************************************
* __wgetmainargs (MSVCRT.@) * __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) int expand_wildcards, int *new_mode)
{ {
TRACE("(%p,%p,%p,%d,%p).\n", argc, wargv, wenviron, expand_wildcards, 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, ...@@ -258,9 +258,9 @@ void __cdecl MSVCRT___wgetmainargs(int *argc, WCHAR ***wargv, WCHAR **wenviron,
/********************************************************************* /*********************************************************************
* _initterm (MSVCRT.@) * _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); TRACE("(%p,%p)\n",start,end);
while (current<end) while (current<end)
...@@ -279,7 +279,7 @@ unsigned int __cdecl MSVCRT__initterm(MSVCRT__INITTERMFUN *start,MSVCRT__INITTER ...@@ -279,7 +279,7 @@ unsigned int __cdecl MSVCRT__initterm(MSVCRT__INITTERMFUN *start,MSVCRT__INITTER
/********************************************************************* /*********************************************************************
* __set_app_type (MSVCRT.@) * __set_app_type (MSVCRT.@)
*/ */
void __cdecl MSVCRT___set_app_type(int app_type) void MSVCRT___set_app_type(int app_type)
{ {
TRACE("(%d) %s application\n", app_type, app_type == 2 ? "Gui" : "Console"); TRACE("(%d) %s application\n", app_type, app_type == 2 ? "Gui" : "Console");
MSVCRT_app_type = app_type; MSVCRT_app_type = app_type;
......
...@@ -11,12 +11,12 @@ ...@@ -11,12 +11,12 @@
DEFAULT_DEBUG_CHANNEL(msvcrt); DEFAULT_DEBUG_CHANNEL(msvcrt);
LPWSTR __cdecl wcsrchr( LPWSTR str, WCHAR ch ); LPWSTR wcsrchr( LPWSTR str, WCHAR ch );
/********************************************************************* /*********************************************************************
* getenv (MSVCRT.@) * getenv (MSVCRT.@)
*/ */
char *__cdecl MSVCRT_getenv(const char *name) char *MSVCRT_getenv(const char *name)
{ {
char *environ = GetEnvironmentStringsA(); char *environ = GetEnvironmentStringsA();
char *pp,*pos = NULL; char *pp,*pos = NULL;
...@@ -43,7 +43,7 @@ char *__cdecl MSVCRT_getenv(const char *name) ...@@ -43,7 +43,7 @@ char *__cdecl MSVCRT_getenv(const char *name)
/********************************************************************* /*********************************************************************
* _wgetenv (MSVCRT.@) * _wgetenv (MSVCRT.@)
*/ */
WCHAR *__cdecl MSVCRT__wgetenv(const WCHAR *name) WCHAR *_wgetenv(const WCHAR *name)
{ {
WCHAR* environ = GetEnvironmentStringsW(); WCHAR* environ = GetEnvironmentStringsW();
WCHAR* pp,*pos = NULL; WCHAR* pp,*pos = NULL;
...@@ -70,7 +70,7 @@ WCHAR *__cdecl MSVCRT__wgetenv(const WCHAR *name) ...@@ -70,7 +70,7 @@ WCHAR *__cdecl MSVCRT__wgetenv(const WCHAR *name)
/********************************************************************* /*********************************************************************
* _putenv (MSVCRT.@) * _putenv (MSVCRT.@)
*/ */
int __cdecl MSVCRT__putenv(const char *str) int _putenv(const char *str)
{ {
char name[256], value[512]; char name[256], value[512];
char *dst = name; char *dst = name;
...@@ -95,7 +95,7 @@ int __cdecl MSVCRT__putenv(const char *str) ...@@ -95,7 +95,7 @@ int __cdecl MSVCRT__putenv(const char *str)
/********************************************************************* /*********************************************************************
* _wputenv (MSVCRT.@) * _wputenv (MSVCRT.@)
*/ */
int __cdecl MSVCRT__wputenv(const WCHAR *str) int _wputenv(const WCHAR *str)
{ {
WCHAR name[256], value[512]; WCHAR name[256], value[512];
WCHAR *dst = name; WCHAR *dst = name;
......
...@@ -73,7 +73,7 @@ void MSVCRT__set_errno(int err) ...@@ -73,7 +73,7 @@ void MSVCRT__set_errno(int err)
/********************************************************************* /*********************************************************************
* _errno (MSVCRT.@) * _errno (MSVCRT.@)
*/ */
int *__cdecl MSVCRT__errno(void) int* MSVCRT__errno(void)
{ {
return GET_THREAD_VAR_PTR(errno); return GET_THREAD_VAR_PTR(errno);
} }
...@@ -81,7 +81,7 @@ int *__cdecl MSVCRT__errno(void) ...@@ -81,7 +81,7 @@ int *__cdecl MSVCRT__errno(void)
/********************************************************************* /*********************************************************************
* __doserrno (MSVCRT.@) * __doserrno (MSVCRT.@)
*/ */
int *__cdecl MSVCRT___doserrno(void) int* __doserrno(void)
{ {
return GET_THREAD_VAR_PTR(doserrno); return GET_THREAD_VAR_PTR(doserrno);
} }
...@@ -91,7 +91,7 @@ char *strerror(int); ...@@ -91,7 +91,7 @@ char *strerror(int);
/********************************************************************* /*********************************************************************
* strerror (MSVCRT.@) * strerror (MSVCRT.@)
*/ */
char * __cdecl MSVCRT_strerror (int err) char* MSVCRT_strerror(int err)
{ {
return strerror(err); /* FIXME */ return strerror(err); /* FIXME */
} }
...@@ -101,19 +101,19 @@ char * __cdecl MSVCRT_strerror (int err) ...@@ -101,19 +101,19 @@ char * __cdecl MSVCRT_strerror (int err)
*/ */
extern int sprintf(char *str, const char *format, ...); 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 */ static char strerrbuff[256]; /* FIXME: Per thread, nprintf */
sprintf(strerrbuff,"%s: %s\n",err,MSVCRT_strerror(GET_THREAD_VAR(errno))); sprintf(strerrbuff,"%s: %s\n",err,MSVCRT_strerror(GET_THREAD_VAR(errno)));
return strerrbuff; return strerrbuff;
} }
int __cdecl MSVCRT__cprintf( const char * format, ... ); int _cprintf( const char * format, ... );
/********************************************************************* /*********************************************************************
* perror (MSVCRT.@) * 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)));
} }
...@@ -21,8 +21,8 @@ typedef void (*MSVCRT_sig_handler_func)(void); ...@@ -21,8 +21,8 @@ typedef void (*MSVCRT_sig_handler_func)(void);
typedef struct _SCOPETABLE typedef struct _SCOPETABLE
{ {
DWORD previousTryLevel; DWORD previousTryLevel;
int (__cdecl *lpfnFilter)(PEXCEPTION_POINTERS); int (*lpfnFilter)(PEXCEPTION_POINTERS);
int (__cdecl *lpfnHandler)(void); int (*lpfnHandler)(void);
} SCOPETABLE, *PSCOPETABLE; } SCOPETABLE, *PSCOPETABLE;
typedef struct _MSVCRT_EXCEPTION_FRAME typedef struct _MSVCRT_EXCEPTION_FRAME
...@@ -44,10 +44,10 @@ typedef struct _MSVCRT_EXCEPTION_FRAME ...@@ -44,10 +44,10 @@ typedef struct _MSVCRT_EXCEPTION_FRAME
__asm__ __volatile__ ("movl %0,%%eax; movl %1,%%ebp; call *%%eax" \ __asm__ __volatile__ ("movl %0,%%eax; movl %1,%%ebp; call *%%eax" \
: : "g" (code_block), "g" (base_ptr)) : : "g" (code_block), "g" (base_ptr))
static DWORD __cdecl MSVCRT_nested_handler(PEXCEPTION_RECORD rec, static DWORD MSVCRT_nested_handler(PEXCEPTION_RECORD rec,
struct __EXCEPTION_FRAME *frame, struct __EXCEPTION_FRAME* frame,
PCONTEXT context WINE_UNUSED, PCONTEXT context WINE_UNUSED,
struct __EXCEPTION_FRAME **dispatch) struct __EXCEPTION_FRAME** dispatch)
{ {
if (rec->ExceptionFlags & 0x6) if (rec->ExceptionFlags & 0x6)
return ExceptionContinueSearch; return ExceptionContinueSearch;
...@@ -60,7 +60,7 @@ static DWORD __cdecl MSVCRT_nested_handler(PEXCEPTION_RECORD rec, ...@@ -60,7 +60,7 @@ static DWORD __cdecl MSVCRT_nested_handler(PEXCEPTION_RECORD rec,
/********************************************************************* /*********************************************************************
* _XcptFilter (MSVCRT.@) * _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); FIXME("(%d,%p)semi-stub\n", ex, ptr);
return UnhandledExceptionFilter(ptr); return UnhandledExceptionFilter(ptr);
...@@ -71,7 +71,7 @@ int __cdecl MSVCRT__XcptFilter(int ex, PEXCEPTION_POINTERS ptr) ...@@ -71,7 +71,7 @@ int __cdecl MSVCRT__XcptFilter(int ex, PEXCEPTION_POINTERS ptr)
*/ */
#ifdef __i386__ #ifdef __i386__
/* Provided for VC++ binary compatability only */ /* Provided for VC++ binary compatability only */
__ASM_GLOBAL_FUNC(MSVCRT__EH_prolog, __ASM_GLOBAL_FUNC(_EH_prolog,
"pushl $0xff\n\t" "pushl $0xff\n\t"
"pushl %eax\n\t" "pushl %eax\n\t"
"pushl %fs:0\n\t" "pushl %fs:0\n\t"
...@@ -86,7 +86,7 @@ __ASM_GLOBAL_FUNC(MSVCRT__EH_prolog, ...@@ -86,7 +86,7 @@ __ASM_GLOBAL_FUNC(MSVCRT__EH_prolog,
/******************************************************************* /*******************************************************************
* _global_unwind2 (MSVCRT.@) * _global_unwind2 (MSVCRT.@)
*/ */
void __cdecl MSVCRT__global_unwind2(PEXCEPTION_FRAME frame) void _global_unwind2(PEXCEPTION_FRAME frame)
{ {
TRACE("(%p)\n",frame); TRACE("(%p)\n",frame);
RtlUnwind( frame, 0, 0, 0 ); RtlUnwind( frame, 0, 0, 0 );
...@@ -95,7 +95,7 @@ void __cdecl MSVCRT__global_unwind2(PEXCEPTION_FRAME frame) ...@@ -95,7 +95,7 @@ void __cdecl MSVCRT__global_unwind2(PEXCEPTION_FRAME frame)
/******************************************************************* /*******************************************************************
* _local_unwind2 (MSVCRT.@) * _local_unwind2 (MSVCRT.@)
*/ */
void __cdecl MSVCRT__local_unwind2(MSVCRT_EXCEPTION_FRAME *frame, void _local_unwind2(MSVCRT_EXCEPTION_FRAME* frame,
DWORD trylevel) DWORD trylevel)
{ {
MSVCRT_EXCEPTION_FRAME *curframe = frame; MSVCRT_EXCEPTION_FRAME *curframe = frame;
...@@ -129,10 +129,10 @@ void __cdecl MSVCRT__local_unwind2(MSVCRT_EXCEPTION_FRAME *frame, ...@@ -129,10 +129,10 @@ void __cdecl MSVCRT__local_unwind2(MSVCRT_EXCEPTION_FRAME *frame,
/********************************************************************* /*********************************************************************
* _except_handler2 (MSVCRT.@) * _except_handler2 (MSVCRT.@)
*/ */
int __cdecl MSVCRT__except_handler2(PEXCEPTION_RECORD rec, int _except_handler2(PEXCEPTION_RECORD rec,
PEXCEPTION_FRAME frame, PEXCEPTION_FRAME frame,
PCONTEXT context, PCONTEXT context,
PEXCEPTION_FRAME *dispatcher) PEXCEPTION_FRAME* dispatcher)
{ {
FIXME("exception %lx flags=%lx at %p handler=%p %p %p stub\n", FIXME("exception %lx flags=%lx at %p handler=%p %p %p stub\n",
rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress, rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress,
...@@ -143,9 +143,9 @@ int __cdecl MSVCRT__except_handler2(PEXCEPTION_RECORD rec, ...@@ -143,9 +143,9 @@ int __cdecl MSVCRT__except_handler2(PEXCEPTION_RECORD rec,
/********************************************************************* /*********************************************************************
* _except_handler3 (MSVCRT.@) * _except_handler3 (MSVCRT.@)
*/ */
int __cdecl MSVCRT__except_handler3(PEXCEPTION_RECORD rec, int _except_handler3(PEXCEPTION_RECORD rec,
MSVCRT_EXCEPTION_FRAME *frame, MSVCRT_EXCEPTION_FRAME* frame,
PCONTEXT context,void *dispatcher) PCONTEXT context, void* dispatcher)
{ {
#if defined(__GNUC__) && defined(__i386__) #if defined(__GNUC__) && defined(__i386__)
long retval, trylevel; long retval, trylevel;
...@@ -161,7 +161,7 @@ int __cdecl MSVCRT__except_handler3(PEXCEPTION_RECORD rec, ...@@ -161,7 +161,7 @@ int __cdecl MSVCRT__except_handler3(PEXCEPTION_RECORD rec,
if (rec->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND)) if (rec->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND))
{ {
/* Unwinding the current frame */ /* Unwinding the current frame */
MSVCRT__local_unwind2(frame, TRYLEVEL_END); _local_unwind2(frame, TRYLEVEL_END);
return ExceptionContinueSearch; return ExceptionContinueSearch;
} }
else else
...@@ -191,8 +191,8 @@ int __cdecl MSVCRT__except_handler3(PEXCEPTION_RECORD rec, ...@@ -191,8 +191,8 @@ int __cdecl MSVCRT__except_handler3(PEXCEPTION_RECORD rec,
if (retval == EXCEPTION_EXECUTE_HANDLER) if (retval == EXCEPTION_EXECUTE_HANDLER)
{ {
/* Unwind all higher frames, this one will handle the exception */ /* Unwind all higher frames, this one will handle the exception */
MSVCRT__global_unwind2((PEXCEPTION_FRAME)frame); _global_unwind2((PEXCEPTION_FRAME)frame);
MSVCRT__local_unwind2(frame, trylevel); _local_unwind2(frame, trylevel);
/* Set our trylevel to the enclosing block, and call the __finally /* Set our trylevel to the enclosing block, and call the __finally
* code, which won't return * code, which won't return
...@@ -217,7 +217,7 @@ int __cdecl MSVCRT__except_handler3(PEXCEPTION_RECORD rec, ...@@ -217,7 +217,7 @@ int __cdecl MSVCRT__except_handler3(PEXCEPTION_RECORD rec,
/********************************************************************* /*********************************************************************
* _abnormal_termination (MSVCRT.@) * _abnormal_termination (MSVCRT.@)
*/ */
int __cdecl MSVCRT__abnormal_termination(void) int _abnormal_termination(void)
{ {
FIXME("(void)stub\n"); FIXME("(void)stub\n");
return 0; return 0;
...@@ -226,7 +226,7 @@ int __cdecl MSVCRT__abnormal_termination(void) ...@@ -226,7 +226,7 @@ int __cdecl MSVCRT__abnormal_termination(void)
/******************************************************************* /*******************************************************************
* _setjmp (MSVCRT.@) * _setjmp (MSVCRT.@)
*/ */
int __cdecl MSVCRT__setjmp(LPDWORD *jmpbuf) int MSVCRT__setjmp(LPDWORD* jmpbuf)
{ {
FIXME(":(%p): stub\n",jmpbuf); FIXME(":(%p): stub\n",jmpbuf);
return 0; return 0;
...@@ -244,7 +244,7 @@ int __cdecl MSVCRT__setjmp3(LPDWORD *jmpbuf, int x) ...@@ -244,7 +244,7 @@ int __cdecl MSVCRT__setjmp3(LPDWORD *jmpbuf, int x)
/********************************************************************* /*********************************************************************
* longjmp (MSVCRT.@) * 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"); FIXME("MSVCRT_longjmp semistub, expect crash\n");
longjmp(env, val); longjmp(env, val);
...@@ -253,7 +253,7 @@ void __cdecl MSVCRT_longjmp(jmp_buf env, int val) ...@@ -253,7 +253,7 @@ void __cdecl MSVCRT_longjmp(jmp_buf env, int val)
/********************************************************************* /*********************************************************************
* signal (MSVCRT.@) * 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); FIXME("(%d %p):stub\n", sig, func);
return (void*)-1; return (void*)-1;
......
...@@ -12,14 +12,14 @@ extern CRITICAL_SECTION MSVCRT_exit_cs; ...@@ -12,14 +12,14 @@ extern CRITICAL_SECTION MSVCRT_exit_cs;
#define LOCK_EXIT EnterCriticalSection(&MSVCRT_exit_cs) #define LOCK_EXIT EnterCriticalSection(&MSVCRT_exit_cs)
#define UNLOCK_EXIT LeaveCriticalSection(&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 MSVCRT_atexit_func *MSVCRT_atexit_table = NULL;
static int MSVCRT_atexit_table_size = 0; static int MSVCRT_atexit_table_size = 0;
static int MSVCRT_atexit_registered = 0; /* Points to free slot */ static int MSVCRT_atexit_registered = 0; /* Points to free slot */
extern int MSVCRT_app_type; 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 */ /* INTERNAL: call atexit functions */
void __MSVCRT__call_atexit(void) void __MSVCRT__call_atexit(void)
...@@ -40,7 +40,7 @@ void __MSVCRT__call_atexit(void) ...@@ -40,7 +40,7 @@ void __MSVCRT__call_atexit(void)
/********************************************************************* /*********************************************************************
* __dllonexit (MSVCRT.@) * __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 **start,
MSVCRT_atexit_func **end) MSVCRT_atexit_func **end)
{ {
...@@ -75,7 +75,7 @@ MSVCRT_atexit_func __cdecl MSVCRT___dllonexit(MSVCRT_atexit_func func, ...@@ -75,7 +75,7 @@ MSVCRT_atexit_func __cdecl MSVCRT___dllonexit(MSVCRT_atexit_func func,
/********************************************************************* /*********************************************************************
* _exit (MSVCRT.@) * _exit (MSVCRT.@)
*/ */
void __cdecl MSVCRT__exit(int exitcode) void MSVCRT__exit(int exitcode)
{ {
TRACE("(%d)\n", exitcode); TRACE("(%d)\n", exitcode);
ExitProcess(exitcode); ExitProcess(exitcode);
...@@ -84,7 +84,7 @@ void __cdecl MSVCRT__exit(int exitcode) ...@@ -84,7 +84,7 @@ void __cdecl MSVCRT__exit(int exitcode)
/********************************************************************* /*********************************************************************
* _amsg_exit (MSVCRT.@) * _amsg_exit (MSVCRT.@)
*/ */
void __cdecl MSVCRT__amsg_exit(int errnum) void MSVCRT__amsg_exit(int errnum)
{ {
TRACE("(%d)\n", errnum); TRACE("(%d)\n", errnum);
/* FIXME: text for the error number. */ /* FIXME: text for the error number. */
...@@ -92,42 +92,42 @@ void __cdecl MSVCRT__amsg_exit(int errnum) ...@@ -92,42 +92,42 @@ void __cdecl MSVCRT__amsg_exit(int errnum)
{ {
/* FIXME: MsgBox */ /* FIXME: MsgBox */
} }
MSVCRT__cprintf("\nruntime error R60%d\n",errnum); _cprintf("\nruntime error R60%d\n",errnum);
MSVCRT__exit(255); MSVCRT__exit(255);
} }
/********************************************************************* /*********************************************************************
* abort (MSVCRT.@) * abort (MSVCRT.@)
*/ */
void __cdecl MSVCRT_abort(void) void MSVCRT_abort(void)
{ {
TRACE("(void)\n"); TRACE("(void)\n");
if (MSVCRT_app_type == 2) if (MSVCRT_app_type == 2)
{ {
/* FIXME: MsgBox */ /* FIXME: MsgBox */
} }
MSVCRT__cputs("\nabnormal program termination\n"); _cputs("\nabnormal program termination\n");
MSVCRT__exit(3); MSVCRT__exit(3);
} }
/********************************************************************* /*********************************************************************
* _assert (MSVCRT.@) * _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); TRACE("(%s,%s,%d)\n",str,file,line);
if (MSVCRT_app_type == 2) if (MSVCRT_app_type == 2)
{ {
/* FIXME: MsgBox */ /* 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(); MSVCRT_abort();
} }
/********************************************************************* /*********************************************************************
* _c_exit (MSVCRT.@) * _c_exit (MSVCRT.@)
*/ */
void __cdecl MSVCRT__c_exit(void) void MSVCRT__c_exit(void)
{ {
TRACE("(void)\n"); TRACE("(void)\n");
/* All cleanup is done on DLL detach; Return to caller */ /* All cleanup is done on DLL detach; Return to caller */
...@@ -136,7 +136,7 @@ void __cdecl MSVCRT__c_exit(void) ...@@ -136,7 +136,7 @@ void __cdecl MSVCRT__c_exit(void)
/********************************************************************* /*********************************************************************
* _cexit (MSVCRT.@) * _cexit (MSVCRT.@)
*/ */
void __cdecl MSVCRT__cexit(void) void MSVCRT__cexit(void)
{ {
TRACE("(void)\n"); TRACE("(void)\n");
/* All cleanup is done on DLL detach; Return to caller */ /* All cleanup is done on DLL detach; Return to caller */
...@@ -145,7 +145,7 @@ void __cdecl MSVCRT__cexit(void) ...@@ -145,7 +145,7 @@ void __cdecl MSVCRT__cexit(void)
/********************************************************************* /*********************************************************************
* _onexit (MSVCRT.@) * _onexit (MSVCRT.@)
*/ */
MSVCRT_atexit_func __cdecl MSVCRT__onexit(MSVCRT_atexit_func func) MSVCRT_atexit_func _onexit(MSVCRT_atexit_func func)
{ {
TRACE("(%p)\n",func); TRACE("(%p)\n",func);
...@@ -179,7 +179,7 @@ void __cdecl MSVCRT__cexit(void) ...@@ -179,7 +179,7 @@ void __cdecl MSVCRT__cexit(void)
/********************************************************************* /*********************************************************************
* exit (MSVCRT.@) * exit (MSVCRT.@)
*/ */
void __cdecl MSVCRT_exit(int exitcode) void MSVCRT_exit(int exitcode)
{ {
TRACE("(%d)\n",exitcode); TRACE("(%d)\n",exitcode);
LOCK_EXIT; LOCK_EXIT;
...@@ -191,16 +191,16 @@ void __cdecl MSVCRT_exit(int exitcode) ...@@ -191,16 +191,16 @@ void __cdecl MSVCRT_exit(int exitcode)
/********************************************************************* /*********************************************************************
* atexit (MSVCRT.@) * atexit (MSVCRT.@)
*/ */
int __cdecl MSVCRT_atexit(MSVCRT_atexit_func func) int MSVCRT_atexit(MSVCRT_atexit_func func)
{ {
TRACE("(%p)\n", func); TRACE("(%p)\n", func);
return MSVCRT__onexit(func) == func ? 0 : -1; return _onexit(func) == func ? 0 : -1;
} }
/********************************************************************* /*********************************************************************
* _purecall (MSVCRT.@) * _purecall (MSVCRT.@)
*/ */
void __cdecl MSVCRT__purecall(void) void _purecall(void)
{ {
TRACE("(void)\n"); TRACE("(void)\n");
MSVCRT__amsg_exit( 25 ); MSVCRT__amsg_exit( 25 );
......
...@@ -41,7 +41,7 @@ static int MSVCRT_new_mode; ...@@ -41,7 +41,7 @@ static int MSVCRT_new_mode;
/********************************************************************* /*********************************************************************
* operator_new (MSVCRT.@) * operator_new (MSVCRT.@)
*/ */
void *__cdecl MSVCRT_operator_new(unsigned long size) void* MSVCRT_operator_new(unsigned long size)
{ {
void *retval = HeapAlloc(GetProcessHeap(), 0, size); void *retval = HeapAlloc(GetProcessHeap(), 0, size);
TRACE("(%ld) returning %p\n", size, retval); TRACE("(%ld) returning %p\n", size, retval);
...@@ -55,7 +55,7 @@ void *__cdecl MSVCRT_operator_new(unsigned long size) ...@@ -55,7 +55,7 @@ void *__cdecl MSVCRT_operator_new(unsigned long size)
/********************************************************************* /*********************************************************************
* operator_delete (MSVCRT.@) * operator_delete (MSVCRT.@)
*/ */
void __cdecl MSVCRT_operator_delete(void *mem) void MSVCRT_operator_delete(void *mem)
{ {
TRACE("(%p)\n", mem); TRACE("(%p)\n", mem);
HeapFree(GetProcessHeap(), 0, mem); HeapFree(GetProcessHeap(), 0, mem);
...@@ -65,7 +65,7 @@ void __cdecl MSVCRT_operator_delete(void *mem) ...@@ -65,7 +65,7 @@ void __cdecl MSVCRT_operator_delete(void *mem)
/********************************************************************* /*********************************************************************
* ?_query_new_handler@@YAP6AHI@ZXZ (MSVCRT.@) * ?_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; return MSVCRT_new_handler;
} }
...@@ -74,7 +74,7 @@ MSVCRT_new_handler_func __cdecl MSVCRT__query_new_handler(void) ...@@ -74,7 +74,7 @@ MSVCRT_new_handler_func __cdecl MSVCRT__query_new_handler(void)
/********************************************************************* /*********************************************************************
* ?_query_new_mode@@YAHXZ (MSVCRT.@) * ?_query_new_mode@@YAHXZ (MSVCRT.@)
*/ */
int __cdecl MSVCRT__query_new_mode(void) int MSVCRT__query_new_mode(void)
{ {
return MSVCRT_new_mode; return MSVCRT_new_mode;
} }
...@@ -82,7 +82,7 @@ int __cdecl MSVCRT__query_new_mode(void) ...@@ -82,7 +82,7 @@ int __cdecl MSVCRT__query_new_mode(void)
/********************************************************************* /*********************************************************************
* ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z (MSVCRT.@) * ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z (MSVCRT.@)
*/ */
MSVCRT_new_handler_func __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; MSVCRT_new_handler_func old_handler;
LOCK_HEAP; LOCK_HEAP;
...@@ -95,7 +95,7 @@ MSVCRT_new_handler_func __cdecl MSVCRT__set_new_handler(MSVCRT_new_handler_func ...@@ -95,7 +95,7 @@ MSVCRT_new_handler_func __cdecl MSVCRT__set_new_handler(MSVCRT_new_handler_func
/********************************************************************* /*********************************************************************
* ?_set_new_mode@@YAHH@Z (MSVCRT.@) * ?_set_new_mode@@YAHH@Z (MSVCRT.@)
*/ */
int __cdecl MSVCRT__set_new_mode(int mode) int MSVCRT__set_new_mode(int mode)
{ {
int old_mode; int old_mode;
LOCK_HEAP; LOCK_HEAP;
...@@ -108,7 +108,7 @@ int __cdecl MSVCRT__set_new_mode(int mode) ...@@ -108,7 +108,7 @@ int __cdecl MSVCRT__set_new_mode(int mode)
/********************************************************************* /*********************************************************************
* _expand (MSVCRT.@) * _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); return HeapReAlloc(GetProcessHeap(), HEAP_REALLOC_IN_PLACE_ONLY, mem, size);
} }
...@@ -116,7 +116,7 @@ void *__cdecl MSVCRT__expand(void *mem, unsigned int size) ...@@ -116,7 +116,7 @@ void *__cdecl MSVCRT__expand(void *mem, unsigned int size)
/********************************************************************* /*********************************************************************
* _heapchk (MSVCRT.@) * _heapchk (MSVCRT.@)
*/ */
int __cdecl MSVCRT__heapchk(void) int _heapchk(void)
{ {
if (!HeapValidate( GetProcessHeap(), 0, NULL)) if (!HeapValidate( GetProcessHeap(), 0, NULL))
{ {
...@@ -129,7 +129,7 @@ int __cdecl MSVCRT__heapchk(void) ...@@ -129,7 +129,7 @@ int __cdecl MSVCRT__heapchk(void)
/********************************************************************* /*********************************************************************
* _heapmin (MSVCRT.@) * _heapmin (MSVCRT.@)
*/ */
int __cdecl MSVCRT__heapmin(void) int _heapmin(void)
{ {
if (!HeapCompact( GetProcessHeap(), 0 )) if (!HeapCompact( GetProcessHeap(), 0 ))
{ {
...@@ -143,7 +143,7 @@ int __cdecl MSVCRT__heapmin(void) ...@@ -143,7 +143,7 @@ int __cdecl MSVCRT__heapmin(void)
/********************************************************************* /*********************************************************************
* _heapwalk (MSVCRT.@) * _heapwalk (MSVCRT.@)
*/ */
int __cdecl MSVCRT__heapwalk(MSVCRT_HEAPINFO *next) int _heapwalk(MSVCRT_HEAPINFO* next)
{ {
PROCESS_HEAP_ENTRY phe; PROCESS_HEAP_ENTRY phe;
...@@ -184,14 +184,14 @@ int __cdecl MSVCRT__heapwalk(MSVCRT_HEAPINFO *next) ...@@ -184,14 +184,14 @@ int __cdecl MSVCRT__heapwalk(MSVCRT_HEAPINFO *next)
/********************************************************************* /*********************************************************************
* _heapset (MSVCRT.@) * _heapset (MSVCRT.@)
*/ */
int __cdecl MSVCRT__heapset(unsigned int value) int _heapset(unsigned int value)
{ {
int retval; int retval;
MSVCRT_HEAPINFO heap; MSVCRT_HEAPINFO heap;
memset( &heap, 0, sizeof(MSVCRT_HEAPINFO) ); memset( &heap, 0, sizeof(MSVCRT_HEAPINFO) );
LOCK_HEAP; LOCK_HEAP;
while ((retval = MSVCRT__heapwalk(&heap)) == MSVCRT_HEAPOK) while ((retval = _heapwalk(&heap)) == MSVCRT_HEAPOK)
{ {
if (heap._useflag == MSVCRT_FREEENTRY) if (heap._useflag == MSVCRT_FREEENTRY)
memset(heap._pentry, value, heap._size); memset(heap._pentry, value, heap._size);
...@@ -203,7 +203,7 @@ int __cdecl MSVCRT__heapset(unsigned int value) ...@@ -203,7 +203,7 @@ int __cdecl MSVCRT__heapset(unsigned int value)
/********************************************************************* /*********************************************************************
* _msize (MSVCRT.@) * _msize (MSVCRT.@)
*/ */
long __cdecl MSVCRT__msize(void *mem) long _msize(void* mem)
{ {
long size = HeapSize(GetProcessHeap(),0,mem); long size = HeapSize(GetProcessHeap(),0,mem);
if (size == -1) if (size == -1)
...@@ -217,7 +217,7 @@ long __cdecl MSVCRT__msize(void *mem) ...@@ -217,7 +217,7 @@ long __cdecl MSVCRT__msize(void *mem)
/********************************************************************* /*********************************************************************
* calloc (MSVCRT.@) * 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 ); return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, size * count );
} }
...@@ -225,7 +225,7 @@ void *__cdecl MSVCRT_calloc(unsigned int size, unsigned int count) ...@@ -225,7 +225,7 @@ void *__cdecl MSVCRT_calloc(unsigned int size, unsigned int count)
/********************************************************************* /*********************************************************************
* free (MSVCRT.@) * free (MSVCRT.@)
*/ */
void __cdecl MSVCRT_free(void *ptr) void MSVCRT_free(void* ptr)
{ {
HeapFree(GetProcessHeap(),0,ptr); HeapFree(GetProcessHeap(),0,ptr);
} }
...@@ -233,7 +233,7 @@ void __cdecl MSVCRT_free(void *ptr) ...@@ -233,7 +233,7 @@ void __cdecl MSVCRT_free(void *ptr)
/********************************************************************* /*********************************************************************
* malloc (MSVCRT.@) * malloc (MSVCRT.@)
*/ */
void * __cdecl MSVCRT_malloc(unsigned int size) void* MSVCRT_malloc(unsigned int size)
{ {
void *ret = HeapAlloc(GetProcessHeap(),0,size); void *ret = HeapAlloc(GetProcessHeap(),0,size);
if (!ret) if (!ret)
...@@ -244,7 +244,7 @@ void * __cdecl MSVCRT_malloc(unsigned int size) ...@@ -244,7 +244,7 @@ void * __cdecl MSVCRT_malloc(unsigned int size)
/********************************************************************* /*********************************************************************
* realloc (MSVCRT.@) * 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); return HeapReAlloc(GetProcessHeap(), 0, ptr, size);
} }
...@@ -254,7 +254,7 @@ static LCID MSVCRT_locale_to_LCID(locale_search_t* locale) ...@@ -254,7 +254,7 @@ static LCID MSVCRT_locale_to_LCID(locale_search_t* locale)
extern int snprintf(char *, int, const char *, ...); extern int snprintf(char *, int, const char *, ...);
/* INTERNAL: Set ctype behaviour for a codepage */ /* 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; CPINFO cp;
...@@ -297,7 +297,7 @@ static void MSVCRT_set_ctype(unsigned int codepage, LCID lcid) ...@@ -297,7 +297,7 @@ static void MSVCRT_set_ctype(unsigned int codepage, LCID lcid)
/********************************************************************* /*********************************************************************
* setlocale (MSVCRT.@) * setlocale (MSVCRT.@)
*/ */
char *__cdecl MSVCRT_setlocale(int category, const char *locale) char* MSVCRT_setlocale(int category, const char* locale)
{ {
LCID lcid = 0; LCID lcid = 0;
locale_search_t lc; locale_search_t lc;
...@@ -443,7 +443,7 @@ char *__cdecl MSVCRT_setlocale(int category, const char *locale) ...@@ -443,7 +443,7 @@ char *__cdecl MSVCRT_setlocale(int category, const char *locale)
case MSVCRT_LC_COLLATE: case MSVCRT_LC_COLLATE:
if (!lc_all) break; if (!lc_all) break;
case MSVCRT_LC_CTYPE: case MSVCRT_LC_CTYPE:
MSVCRT_set_ctype(atoi(lc.found_codepage),lcid); msvcrt_set_ctype(atoi(lc.found_codepage),lcid);
if (!lc_all) break; if (!lc_all) break;
case MSVCRT_LC_MONETARY: case MSVCRT_LC_MONETARY:
if (!lc_all) break; if (!lc_all) break;
...@@ -459,7 +459,7 @@ char *__cdecl MSVCRT_setlocale(int category, const char *locale) ...@@ -459,7 +459,7 @@ char *__cdecl MSVCRT_setlocale(int category, const char *locale)
/********************************************************************* /*********************************************************************
* _Getdays (MSVCRT.@) * _Getdays (MSVCRT.@)
*/ */
const char *__cdecl MSVCRT__Getdays(void) const char* _Getdays(void)
{ {
static const char *MSVCRT_days = ":Sun:Sunday:Mon:Monday:Tue:Tuesday:Wed:" static const char *MSVCRT_days = ":Sun:Sunday:Mon:Monday:Tue:Tuesday:Wed:"
"Wednesday:Thu:Thursday:Fri:Friday:Sat:Saturday"; "Wednesday:Thu:Thursday:Fri:Friday:Sat:Saturday";
...@@ -471,7 +471,7 @@ const char *__cdecl MSVCRT__Getdays(void) ...@@ -471,7 +471,7 @@ const char *__cdecl MSVCRT__Getdays(void)
/********************************************************************* /*********************************************************************
* _Getmonths (MSVCRT.@) * _Getmonths (MSVCRT.@)
*/ */
const char *__cdecl MSVCRT__Getmonths(void) const char* _Getmonths(void)
{ {
static const char *MSVCRT_months = ":Jan:January:Feb:February:Mar:March:Apr:" static const char *MSVCRT_months = ":Jan:January:Feb:February:Mar:March:Apr:"
"April:May:May:Jun:June:Jul:July:Aug:August:Sep:September:Oct:" "April:May:May:Jun:June:Jul:July:Aug:August:Sep:September:Oct:"
...@@ -484,7 +484,7 @@ const char *__cdecl MSVCRT__Getmonths(void) ...@@ -484,7 +484,7 @@ const char *__cdecl MSVCRT__Getmonths(void)
/********************************************************************* /*********************************************************************
* _Getnames (MSVCRT.@) * _Getnames (MSVCRT.@)
*/ */
const char *__cdecl MSVCRT__Getnames(void) const char* _Getnames(void)
{ {
/* FIXME: */ /* FIXME: */
TRACE("(void) stub"); TRACE("(void) stub");
...@@ -494,7 +494,7 @@ const char *__cdecl MSVCRT__Getnames(void) ...@@ -494,7 +494,7 @@ const char *__cdecl MSVCRT__Getnames(void)
/********************************************************************* /*********************************************************************
* _Strftime (MSVCRT.@) * _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) const void *tm, void *foo)
{ {
/* FIXME: */ /* FIXME: */
...@@ -507,7 +507,7 @@ const char *__cdecl MSVCRT__Strftime(char *out, unsigned int len, const char *fm ...@@ -507,7 +507,7 @@ const char *__cdecl MSVCRT__Strftime(char *out, unsigned int len, const char *fm
/********************************************************************* /*********************************************************************
* _setmbcp (MSVCRT.@) * _setmbcp (MSVCRT.@)
*/ */
void __cdecl MSVCRT__setmbcp(int cp) void _setmbcp(int cp)
{ {
LOCK_LOCALE; LOCK_LOCALE;
if (MSVCRT_current_lc_all_cp != cp) if (MSVCRT_current_lc_all_cp != cp)
...@@ -521,7 +521,7 @@ void __cdecl MSVCRT__setmbcp(int cp) ...@@ -521,7 +521,7 @@ void __cdecl MSVCRT__setmbcp(int cp)
/********************************************************************* /*********************************************************************
* _getmbcp (MSVCRT.@) * _getmbcp (MSVCRT.@)
*/ */
int __cdecl MSVCRT__getmbcp(void) int _getmbcp(void)
{ {
return MSVCRT_current_lc_all_cp; return MSVCRT_current_lc_all_cp;
} }
......
...@@ -17,23 +17,23 @@ CRITICAL_SECTION MSVCRT_exit_cs; ...@@ -17,23 +17,23 @@ CRITICAL_SECTION MSVCRT_exit_cs;
CRITICAL_SECTION MSVCRT_console_cs; CRITICAL_SECTION MSVCRT_console_cs;
CRITICAL_SECTION MSVCRT_locale_cs; CRITICAL_SECTION MSVCRT_locale_cs;
static inline BOOL MSVCRT_init_tls(void); static inline BOOL msvcrt_init_tls(void);
static inline BOOL MSVCRT_free_tls(void); static inline BOOL msvcrt_free_tls(void);
static inline void MSVCRT_init_critical_sections(void); static inline void msvcrt_init_critical_sections(void);
static inline void MSVCRT_free_critical_sections(void); static inline void msvcrt_free_critical_sections(void);
#ifdef __GNUC__ #ifdef __GNUC__
const char *MSVCRT_get_reason(DWORD reason) __attribute__((unused)); const char *msvcrt_get_reason(DWORD reason) __attribute__((unused));
#else #else
const char *MSVCRT_get_reason(DWORD reason); const char *msvcrt_get_reason(DWORD reason);
#endif #endif
void MSVCRT_init_io(void); void msvcrt_init_io(void);
void MSVCRT_init_console(void); void msvcrt_init_console(void);
void MSVCRT_free_console(void); void msvcrt_free_console(void);
void MSVCRT_init_args(void); void msvcrt_init_args(void);
void MSVCRT_free_args(void); void msvcrt_free_args(void);
void MSVCRT_init_vtables(void); void msvcrt_init_vtables(void);
char *__cdecl MSVCRT_setlocale(int category, const char *locale); char* MSVCRT_setlocale(int category, const char* locale);
/********************************************************************* /*********************************************************************
...@@ -44,20 +44,20 @@ BOOL WINAPI MSVCRT_Init(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) ...@@ -44,20 +44,20 @@ BOOL WINAPI MSVCRT_Init(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
MSVCRT_thread_data *tls; MSVCRT_thread_data *tls;
TRACE("(0x%08x, %s, %p) pid(%ld), tid(%ld), tls(%ld)\n", 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)GetCurrentProcessId(), (long)GetCurrentThreadId(),
(long)MSVCRT_tls_index); (long)MSVCRT_tls_index);
switch (fdwReason) switch (fdwReason)
{ {
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:
if (!MSVCRT_init_tls()) if (!msvcrt_init_tls())
return FALSE; return FALSE;
MSVCRT_init_vtables(); msvcrt_init_vtables();
MSVCRT_init_critical_sections(); msvcrt_init_critical_sections();
MSVCRT_init_io(); msvcrt_init_io();
MSVCRT_init_console(); msvcrt_init_console();
MSVCRT_init_args(); msvcrt_init_args();
MSVCRT_setlocale(0, "C"); MSVCRT_setlocale(0, "C");
TRACE("finished process init\n"); TRACE("finished process init\n");
/* FALL THROUGH for Initial TLS allocation!! */ /* FALL THROUGH for Initial TLS allocation!! */
...@@ -74,11 +74,11 @@ BOOL WINAPI MSVCRT_Init(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) ...@@ -74,11 +74,11 @@ BOOL WINAPI MSVCRT_Init(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
TRACE("finished thread init\n"); TRACE("finished thread init\n");
break; break;
case DLL_PROCESS_DETACH: case DLL_PROCESS_DETACH:
MSVCRT_free_critical_sections(); msvcrt_free_critical_sections();
MSVCRT__fcloseall(); _fcloseall();
MSVCRT_free_console(); msvcrt_free_console();
MSVCRT_free_args(); msvcrt_free_args();
if (!MSVCRT_free_tls()) if (!msvcrt_free_tls())
return FALSE; return FALSE;
TRACE("finished process free\n"); TRACE("finished process free\n");
break; break;
...@@ -98,7 +98,7 @@ BOOL WINAPI MSVCRT_Init(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) ...@@ -98,7 +98,7 @@ BOOL WINAPI MSVCRT_Init(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
return TRUE; return TRUE;
} }
static inline BOOL MSVCRT_init_tls(void) static inline BOOL msvcrt_init_tls(void)
{ {
MSVCRT_tls_index = TlsAlloc(); MSVCRT_tls_index = TlsAlloc();
...@@ -110,7 +110,7 @@ static inline BOOL MSVCRT_init_tls(void) ...@@ -110,7 +110,7 @@ static inline BOOL MSVCRT_init_tls(void)
return TRUE; return TRUE;
} }
static inline BOOL MSVCRT_free_tls(void) static inline BOOL msvcrt_free_tls(void)
{ {
if (!TlsFree(MSVCRT_tls_index)) if (!TlsFree(MSVCRT_tls_index))
{ {
...@@ -120,7 +120,7 @@ static inline BOOL MSVCRT_free_tls(void) ...@@ -120,7 +120,7 @@ static inline BOOL MSVCRT_free_tls(void)
return TRUE; return TRUE;
} }
static inline void MSVCRT_init_critical_sections(void) static inline void msvcrt_init_critical_sections(void)
{ {
InitializeCriticalSectionAndSpinCount(&MSVCRT_heap_cs, 4000); InitializeCriticalSectionAndSpinCount(&MSVCRT_heap_cs, 4000);
InitializeCriticalSection(&MSVCRT_file_cs); InitializeCriticalSection(&MSVCRT_file_cs);
...@@ -129,7 +129,7 @@ static inline void MSVCRT_init_critical_sections(void) ...@@ -129,7 +129,7 @@ static inline void MSVCRT_init_critical_sections(void)
InitializeCriticalSection(&MSVCRT_locale_cs); 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_locale_cs);
DeleteCriticalSection(&MSVCRT_console_cs); DeleteCriticalSection(&MSVCRT_console_cs);
...@@ -138,7 +138,7 @@ static inline void MSVCRT_free_critical_sections(void) ...@@ -138,7 +138,7 @@ static inline void MSVCRT_free_critical_sections(void)
DeleteCriticalSection(&MSVCRT_heap_cs); DeleteCriticalSection(&MSVCRT_heap_cs);
} }
const char *MSVCRT_get_reason(DWORD reason) const char* msvcrt_get_reason(DWORD reason)
{ {
switch (reason) switch (reason)
{ {
......
...@@ -8,12 +8,12 @@ ...@@ -8,12 +8,12 @@
DEFAULT_DEBUG_CHANNEL(msvcrt); 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.@) * _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); TRACE(":Freq %d, Duration %d\n",freq,duration);
Beep(freq, duration); Beep(freq, duration);
...@@ -24,7 +24,7 @@ extern int rand(void); ...@@ -24,7 +24,7 @@ extern int rand(void);
/********************************************************************* /*********************************************************************
* rand (MSVCRT.@) * rand (MSVCRT.@)
*/ */
int __cdecl MSVCRT_rand() int MSVCRT_rand()
{ {
return (rand() & 0x7fff); return (rand() & 0x7fff);
} }
...@@ -32,17 +32,18 @@ int __cdecl MSVCRT_rand() ...@@ -32,17 +32,18 @@ int __cdecl MSVCRT_rand()
/********************************************************************* /*********************************************************************
* _sleep (MSVCRT.@) * _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); Sleep((timeout)?timeout:1);
} }
/********************************************************************* /*********************************************************************
* _lfind (MSVCRT.@) * _lfind (MSVCRT.@)
*/ */
void* __cdecl MSVCRT__lfind(const void * match, const void * start, void* _lfind(const void* match, const void* start,
unsigned int * array_size,unsigned int elem_size, MSVCRT_comp_func cf) unsigned int* array_size, unsigned int elem_size,
MSVCRT_comp_func cf)
{ {
unsigned int size = *array_size; unsigned int size = *array_size;
if (size) if (size)
...@@ -58,8 +59,9 @@ unsigned int * array_size,unsigned int elem_size, MSVCRT_comp_func cf) ...@@ -58,8 +59,9 @@ unsigned int * array_size,unsigned int elem_size, MSVCRT_comp_func cf)
/********************************************************************* /*********************************************************************
* _lsearch (MSVCRT.@) * _lsearch (MSVCRT.@)
*/ */
void * __cdecl MSVCRT__lsearch(const void * match,void * start, void* _lsearch(const void* match, void* start,
unsigned int * array_size,unsigned int elem_size, MSVCRT_comp_func cf) unsigned int* array_size, unsigned int elem_size,
MSVCRT_comp_func cf)
{ {
unsigned int size = *array_size; unsigned int size = *array_size;
if (size) if (size)
...@@ -79,7 +81,7 @@ unsigned int * array_size,unsigned int elem_size, MSVCRT_comp_func cf) ...@@ -79,7 +81,7 @@ unsigned int * array_size,unsigned int elem_size, MSVCRT_comp_func cf)
/********************************************************************* /*********************************************************************
* _chkesp (MSVCRT.@) * _chkesp (MSVCRT.@)
*/ */
void __cdecl MSVCRT__chkesp(void) void _chkesp(void)
{ {
} }
...@@ -34,13 +34,13 @@ typedef struct __MSVCRT_thread_data ...@@ -34,13 +34,13 @@ typedef struct __MSVCRT_thread_data
((MSVCRT_thread_data*)TlsGetValue(MSVCRT_tls_index))->x = y ((MSVCRT_thread_data*)TlsGetValue(MSVCRT_tls_index))->x = y
void MSVCRT__set_errno(int); void MSVCRT__set_errno(int);
int __cdecl MSVCRT__set_new_mode(int mode); int MSVCRT__set_new_mode(int mode);
int __cdecl MSVCRT__fcloseall(void); int _fcloseall(void);
void *__cdecl MSVCRT_malloc(unsigned int); void* MSVCRT_malloc(unsigned int);
void *__cdecl MSVCRT_calloc(unsigned int, unsigned int); void* MSVCRT_calloc(unsigned int, unsigned int);
void __cdecl MSVCRT_free(void *); void MSVCRT_free(void *);
int __cdecl MSVCRT__cputs(const char *); int _cputs(const char *);
int __cdecl MSVCRT__cprintf( const char *, ... ); int _cprintf( const char *, ... );
char *__cdecl MSVCRT__strdup(const char *); char* _strdup(const char *);
#endif /* __WINE_MSVCRT_H */ #endif /* __WINE_MSVCRT_H */
...@@ -23,17 +23,17 @@ DEFAULT_DEBUG_CHANNEL(msvcrt); ...@@ -23,17 +23,17 @@ DEFAULT_DEBUG_CHANNEL(msvcrt);
#define _P_NOWAITO 3 #define _P_NOWAITO 3
#define _P_DETACH 4 #define _P_DETACH 4
void __cdecl MSVCRT__exit(int); void MSVCRT__exit(int);
void __cdecl MSVCRT__searchenv(const char* file, const char* env, char *buf); 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 EXE = 'e' << 16 | 'x' << 8 | 'e';
static const unsigned int BAT = 'b' << 16 | 'a' << 8 | 't'; static const unsigned int BAT = 'b' << 16 | 'a' << 8 | 't';
static const unsigned int CMD = 'c' << 16 | 'm' << 8 | 'd'; static const unsigned int CMD = 'c' << 16 | 'm' << 8 | 'd';
static const unsigned int COM = 'c' << 16 | 'o' << 8 | 'm'; static const unsigned int COM = 'c' << 16 | 'o' << 8 | 'm';
/* INTERNAL: Spawn a child process */ /* 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; STARTUPINFOA si;
PROCESS_INFORMATION pi; PROCESS_INFORMATION pi;
...@@ -83,7 +83,7 @@ static int __MSVCRT__spawn(int flags, const char *exe, char * args, char *env) ...@@ -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 */ /* 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; const char **search = arg;
long size = 0; long size = 0;
...@@ -119,7 +119,7 @@ static char * __MSVCRT__argvtos(const char * *arg, char delim) ...@@ -119,7 +119,7 @@ static char * __MSVCRT__argvtos(const char * *arg, char delim)
/********************************************************************* /*********************************************************************
* _cwait (MSVCRT.@) * _cwait (MSVCRT.@)
*/ */
int __cdecl MSVCRT__cwait(int *status, int pid, int action) int _cwait(int *status, int pid, int action)
{ {
HANDLE hPid = (HANDLE)pid; HANDLE hPid = (HANDLE)pid;
int doserrno; int doserrno;
...@@ -152,11 +152,11 @@ int __cdecl MSVCRT__cwait(int *status, int pid, int action) ...@@ -152,11 +152,11 @@ int __cdecl MSVCRT__cwait(int *status, int pid, int action)
/********************************************************************* /*********************************************************************
* _spawnve (MSVCRT.@) * _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) const char **envv)
{ {
char * args = __MSVCRT__argvtos(argv,' '); char * args = msvcrt_argvtos(argv,' ');
char * envs = __MSVCRT__argvtos(envv,0); char * envs = msvcrt_argvtos(envv,0);
const char *fullname = name; const char *fullname = name;
int ret = -1; int ret = -1;
...@@ -165,7 +165,7 @@ int __cdecl MSVCRT__spawnve(int flags, const char *name, const char **argv, ...@@ -165,7 +165,7 @@ int __cdecl MSVCRT__spawnve(int flags, const char *name, const char **argv,
if (args) if (args)
{ {
ret = __MSVCRT__spawn(flags, fullname, args, envs); ret = msvcrt_spawn(flags, fullname, args, envs);
MSVCRT_free(args); MSVCRT_free(args);
} }
if (envs) if (envs)
...@@ -177,43 +177,43 @@ int __cdecl MSVCRT__spawnve(int flags, const char *name, const char **argv, ...@@ -177,43 +177,43 @@ int __cdecl MSVCRT__spawnve(int flags, const char *name, const char **argv,
/********************************************************************* /*********************************************************************
* _spawnv (MSVCRT.@) * _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.@) * _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) const char **envv)
{ {
char fullname[MAX_PATH]; char fullname[MAX_PATH];
MSVCRT__searchenv(name, "PATH", fullname); _searchenv(name, "PATH", fullname);
return MSVCRT__spawnve(flags, fullname[0] ? fullname : name, argv, envv); return _spawnve(flags, fullname[0] ? fullname : name, argv, envv);
} }
/********************************************************************* /*********************************************************************
* _spawnvp (MSVCRT.@) * _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.@) * system (MSVCRT.@)
*/ */
int __cdecl MSVCRT_system(const char *cmd) int MSVCRT_system(const char* cmd)
{ {
/* FIXME: should probably launch cmd interpreter in COMSPEC */ /* 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.@) * _loaddll (MSVCRT.@)
*/ */
int __cdecl MSVCRT__loaddll(const char *dllname) int _loaddll(const char* dllname)
{ {
return LoadLibraryA(dllname); return LoadLibraryA(dllname);
} }
...@@ -221,7 +221,7 @@ int __cdecl MSVCRT__loaddll(const char *dllname) ...@@ -221,7 +221,7 @@ int __cdecl MSVCRT__loaddll(const char *dllname)
/********************************************************************* /*********************************************************************
* _unloaddll (MSVCRT.@) * _unloaddll (MSVCRT.@)
*/ */
int __cdecl MSVCRT__unloaddll(int dll) int _unloaddll(int dll)
{ {
if (FreeLibrary((HANDLE)dll)) if (FreeLibrary((HANDLE)dll))
return 0; return 0;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
DEFAULT_DEBUG_CHANNEL(msvcrt); DEFAULT_DEBUG_CHANNEL(msvcrt);
/* INTERNAL: MSVCRT_malloc() based strndup */ /* 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; char* ret;
unsigned int len = strlen(buf), max_len; unsigned int len = strlen(buf), max_len;
...@@ -31,7 +31,7 @@ char * MSVCRT__strndup(const char * buf, unsigned int size) ...@@ -31,7 +31,7 @@ char * MSVCRT__strndup(const char * buf, unsigned int size)
/********************************************************************* /*********************************************************************
* _strdec (MSVCRT.@) * _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... */ /* Hmm. While the docs suggest that the following should work... */
/* return (str2<=str1?0:str2-1); */ /* return (str2<=str1?0:str2-1); */
...@@ -43,7 +43,7 @@ char * __cdecl MSVCRT__strdec(const char * str1, const char * str2) ...@@ -43,7 +43,7 @@ char * __cdecl MSVCRT__strdec(const char * str1, const char * str2)
/********************************************************************* /*********************************************************************
* _strdup (MSVCRT.@) * _strdup (MSVCRT.@)
*/ */
char * __cdecl MSVCRT__strdup(const char * str) char* _strdup(const char* str)
{ {
char * ret = MSVCRT_malloc(strlen(str)+1); char * ret = MSVCRT_malloc(strlen(str)+1);
if (ret) strcpy( ret, str ); if (ret) strcpy( ret, str );
...@@ -53,7 +53,7 @@ char * __cdecl MSVCRT__strdup(const char * str) ...@@ -53,7 +53,7 @@ char * __cdecl MSVCRT__strdup(const char * str)
/********************************************************************* /*********************************************************************
* _strinc (MSVCRT.@) * _strinc (MSVCRT.@)
*/ */
char * __cdecl MSVCRT__strinc(const char * str) char* _strinc(const char* str)
{ {
return (char*)str+1; return (char*)str+1;
} }
...@@ -61,7 +61,7 @@ char * __cdecl MSVCRT__strinc(const char * str) ...@@ -61,7 +61,7 @@ char * __cdecl MSVCRT__strinc(const char * str)
/********************************************************************* /*********************************************************************
* _strnextc (MSVCRT.@) * _strnextc (MSVCRT.@)
*/ */
unsigned int __cdecl MSVCRT__strnextc(const char * str) unsigned int _strnextc(const char* str)
{ {
return (unsigned int)*str; return (unsigned int)*str;
} }
...@@ -71,7 +71,7 @@ unsigned int __cdecl MSVCRT__strnextc(const char * str) ...@@ -71,7 +71,7 @@ unsigned int __cdecl MSVCRT__strnextc(const char * str)
* *
* Return a pointer to the 'n'th character in a string * 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; return str + n;
} }
...@@ -79,7 +79,7 @@ char * __cdecl MSVCRT__strninc(char * str, unsigned int n) ...@@ -79,7 +79,7 @@ char * __cdecl MSVCRT__strninc(char * str, unsigned int n)
/********************************************************************* /*********************************************************************
* _strnset (MSVCRT.@) * _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) if (len > 0 && str)
while (*str && len--) while (*str && len--)
...@@ -90,7 +90,7 @@ char * __cdecl MSVCRT__strnset(char * str, int value, unsigned int len) ...@@ -90,7 +90,7 @@ char * __cdecl MSVCRT__strnset(char * str, int value, unsigned int len)
/********************************************************************* /*********************************************************************
* _strrev (MSVCRT.@) * _strrev (MSVCRT.@)
*/ */
char * __cdecl MSVCRT__strrev (char * str) char* _strrev(char* str)
{ {
char * p1; char * p1;
char * p2; char * p2;
...@@ -109,7 +109,7 @@ char * __cdecl MSVCRT__strrev (char * str) ...@@ -109,7 +109,7 @@ char * __cdecl MSVCRT__strrev (char * str)
/********************************************************************* /*********************************************************************
* _strset (MSVCRT.@) * _strset (MSVCRT.@)
*/ */
char * __cdecl MSVCRT__strset (char * str, int value) char* _strset(char* str, int value)
{ {
char *ptr = str; char *ptr = str;
while (*ptr) while (*ptr)
...@@ -121,7 +121,7 @@ char * __cdecl MSVCRT__strset (char * str, int value) ...@@ -121,7 +121,7 @@ char * __cdecl MSVCRT__strset (char * str, int value)
/********************************************************************* /*********************************************************************
* _strncnt (MSVCRT.@) * _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); unsigned int len = strlen(str);
return (len > max? max : len); return (len > max? max : len);
...@@ -130,7 +130,7 @@ unsigned int __cdecl MSVCRT__strncnt(char * str, unsigned int max) ...@@ -130,7 +130,7 @@ unsigned int __cdecl MSVCRT__strncnt(char * str, unsigned int max)
/********************************************************************* /*********************************************************************
* _strspnp (MSVCRT.@) * _strspnp (MSVCRT.@)
*/ */
char * __cdecl MSVCRT__strspnp(char * str1, char * str2) char* _strspnp(char* str1, char* str2)
{ {
str1 += strspn(str1,str2); str1 += strspn(str1,str2);
return *str1? str1 : 0; return *str1? str1 : 0;
...@@ -139,7 +139,7 @@ char * __cdecl MSVCRT__strspnp(char * str1, char * str2) ...@@ -139,7 +139,7 @@ char * __cdecl MSVCRT__strspnp(char * str1, char * str2)
/********************************************************************* /*********************************************************************
* _swab (MSVCRT.@) * _swab (MSVCRT.@)
*/ */
void __cdecl MSVCRT__swab(char * src, char * dst, int len) void _swab(char* src, char* dst, int len)
{ {
if (len > 1) if (len > 1)
{ {
......
...@@ -11,11 +11,11 @@ DEFAULT_DEBUG_CHANNEL(msvcrt); ...@@ -11,11 +11,11 @@ DEFAULT_DEBUG_CHANNEL(msvcrt);
/********************************************************************* /*********************************************************************
* _beginthreadex (MSVCRT.@) * _beginthreadex (MSVCRT.@)
*/ */
unsigned long __cdecl MSVCRT__beginthreadex(void *sec, unsigned long _beginthreadex(void* sec,
unsigned int stack, unsigned int stack,
LPTHREAD_START_ROUTINE start, LPTHREAD_START_ROUTINE start,
void *arg, unsigned int flag, void* arg, unsigned int flag,
unsigned int*addr) unsigned int* addr)
{ {
TRACE("(%p,%d,%p,%p,%d,%p)\n",sec, stack,start, arg,flag,addr); TRACE("(%p,%d,%p,%p,%d,%p)\n",sec, stack,start, arg,flag,addr);
/* FIXME */ /* FIXME */
...@@ -25,7 +25,7 @@ unsigned long __cdecl MSVCRT__beginthreadex(void *sec, ...@@ -25,7 +25,7 @@ unsigned long __cdecl MSVCRT__beginthreadex(void *sec,
/********************************************************************* /*********************************************************************
* _endthreadex (MSVCRT.@) * _endthreadex (MSVCRT.@)
*/ */
void __cdecl MSVCRT__endthreadex(unsigned int retval) void _endthreadex(unsigned int retval)
{ {
TRACE("(%d)\n",retval); TRACE("(%d)\n",retval);
/* FIXME */ /* FIXME */
......
...@@ -22,7 +22,7 @@ typedef struct __MSVCRT_timeb ...@@ -22,7 +22,7 @@ typedef struct __MSVCRT_timeb
/* INTERNAL: Return formatted current time/date */ /* 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; static const time_t bad_time = (time_t)-1;
time_t t; time_t t;
...@@ -40,23 +40,23 @@ char * MSVCRT_get_current_time(char * out, const char * format) ...@@ -40,23 +40,23 @@ char * MSVCRT_get_current_time(char * out, const char * format)
/********************************************************************** /**********************************************************************
* _strdate (MSVCRT.@) * _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.@) * _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 (MSVCRT.@)
*/ */
clock_t __cdecl MSVCRT_clock(void) clock_t MSVCRT_clock(void)
{ {
struct tms alltimes; struct tms alltimes;
clock_t res; clock_t res;
...@@ -73,7 +73,7 @@ clock_t __cdecl MSVCRT_clock(void) ...@@ -73,7 +73,7 @@ clock_t __cdecl MSVCRT_clock(void)
/********************************************************************* /*********************************************************************
* difftime (MSVCRT.@) * 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); return (double)(time1 - time2);
} }
...@@ -81,7 +81,7 @@ double __cdecl MSVCRT_difftime (time_t time1, time_t time2) ...@@ -81,7 +81,7 @@ double __cdecl MSVCRT_difftime (time_t time1, time_t time2)
/********************************************************************* /*********************************************************************
* time (MSVCRT.@) * time (MSVCRT.@)
*/ */
time_t __cdecl MSVCRT_time(time_t *buf) time_t MSVCRT_time(time_t* buf)
{ {
time_t curtime = time(NULL); time_t curtime = time(NULL);
return buf ? *buf = curtime : curtime; return buf ? *buf = curtime : curtime;
...@@ -90,7 +90,7 @@ time_t __cdecl MSVCRT_time(time_t *buf) ...@@ -90,7 +90,7 @@ time_t __cdecl MSVCRT_time(time_t *buf)
/********************************************************************* /*********************************************************************
* _ftime (MSVCRT.@) * _ftime (MSVCRT.@)
*/ */
void __cdecl MSVCRT__ftime (MSVCRT_timeb *buf) void _ftime(MSVCRT_timeb* buf)
{ {
buf->time = MSVCRT_time(NULL); buf->time = MSVCRT_time(NULL);
buf->millitm = 0; /* FIXME */ buf->millitm = 0; /* FIXME */
......
...@@ -14,7 +14,7 @@ DEFAULT_DEBUG_CHANNEL(msvcrt); ...@@ -14,7 +14,7 @@ DEFAULT_DEBUG_CHANNEL(msvcrt);
/* INTERNAL: MSVCRT_malloc() based wstrndup */ /* INTERNAL: MSVCRT_malloc() based wstrndup */
LPWSTR MSVCRT__wstrndup(LPCWSTR buf, unsigned int size) LPWSTR msvcrt_wstrndup(LPCWSTR buf, unsigned int size)
{ {
WCHAR* ret; WCHAR* ret;
unsigned int len = strlenW(buf), max_len; unsigned int len = strlenW(buf), max_len;
...@@ -33,7 +33,7 @@ LPWSTR MSVCRT__wstrndup(LPCWSTR buf, unsigned int size) ...@@ -33,7 +33,7 @@ LPWSTR MSVCRT__wstrndup(LPCWSTR buf, unsigned int size)
/********************************************************************* /*********************************************************************
* _wcsdup (MSVCRT.@) * _wcsdup (MSVCRT.@)
*/ */
LPWSTR __cdecl MSVCRT__wcsdup( LPCWSTR str ) LPWSTR _wcsdup( LPCWSTR str )
{ {
LPWSTR ret = NULL; LPWSTR ret = NULL;
if (str) if (str)
...@@ -48,7 +48,7 @@ LPWSTR __cdecl MSVCRT__wcsdup( LPCWSTR str ) ...@@ -48,7 +48,7 @@ LPWSTR __cdecl MSVCRT__wcsdup( LPCWSTR str )
/********************************************************************* /*********************************************************************
* _wcsicoll (MSVCRT.@) * _wcsicoll (MSVCRT.@)
*/ */
INT __cdecl MSVCRT__wcsicoll( LPCWSTR str1, LPCWSTR str2 ) INT _wcsicoll( LPCWSTR str1, LPCWSTR str2 )
{ {
/* FIXME: handle collates */ /* FIXME: handle collates */
return strcmpiW( str1, str2 ); return strcmpiW( str1, str2 );
...@@ -57,7 +57,7 @@ INT __cdecl MSVCRT__wcsicoll( LPCWSTR str1, LPCWSTR str2 ) ...@@ -57,7 +57,7 @@ INT __cdecl MSVCRT__wcsicoll( LPCWSTR str1, LPCWSTR str2 )
/********************************************************************* /*********************************************************************
* _wcsnset (MSVCRT.@) * _wcsnset (MSVCRT.@)
*/ */
LPWSTR __cdecl MSVCRT__wcsnset( LPWSTR str, WCHAR c, INT n ) LPWSTR _wcsnset( LPWSTR str, WCHAR c, INT n )
{ {
LPWSTR ret = str; LPWSTR ret = str;
while ((n-- > 0) && *str) *str++ = c; while ((n-- > 0) && *str) *str++ = c;
...@@ -67,7 +67,7 @@ LPWSTR __cdecl MSVCRT__wcsnset( LPWSTR str, WCHAR c, INT n ) ...@@ -67,7 +67,7 @@ LPWSTR __cdecl MSVCRT__wcsnset( LPWSTR str, WCHAR c, INT n )
/********************************************************************* /*********************************************************************
* _wcsrev (MSVCRT.@) * _wcsrev (MSVCRT.@)
*/ */
LPWSTR __cdecl MSVCRT__wcsrev( LPWSTR str ) LPWSTR _wcsrev( LPWSTR str )
{ {
LPWSTR ret = str; LPWSTR ret = str;
LPWSTR end = str + strlenW(str) - 1; LPWSTR end = str + strlenW(str) - 1;
...@@ -83,7 +83,7 @@ LPWSTR __cdecl MSVCRT__wcsrev( LPWSTR str ) ...@@ -83,7 +83,7 @@ LPWSTR __cdecl MSVCRT__wcsrev( LPWSTR str )
/********************************************************************* /*********************************************************************
* _wcsset (MSVCRT.@) * _wcsset (MSVCRT.@)
*/ */
LPWSTR __cdecl MSVCRT__wcsset( LPWSTR str, WCHAR c ) LPWSTR _wcsset( LPWSTR str, WCHAR c )
{ {
LPWSTR ret = str; LPWSTR ret = str;
while (*str) *str++ = c; while (*str) *str++ = c;
...@@ -93,7 +93,7 @@ LPWSTR __cdecl MSVCRT__wcsset( LPWSTR str, WCHAR c ) ...@@ -93,7 +93,7 @@ LPWSTR __cdecl MSVCRT__wcsset( LPWSTR str, WCHAR c )
/********************************************************************* /*********************************************************************
* _vsnwprintf (MSVCRT.@) * _vsnwprintf (MSVCRT.@)
*/ */
int __cdecl MSVCRT__vsnwprintf(WCHAR *str, unsigned int len, int _vsnwprintf(WCHAR *str, unsigned int len,
const WCHAR *format, va_list valist) const WCHAR *format, va_list valist)
{ {
/* If you fix a bug in this function, fix it in ntdll/wcstring.c also! */ /* 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, ...@@ -219,15 +219,15 @@ int __cdecl MSVCRT__vsnwprintf(WCHAR *str, unsigned int len,
/********************************************************************* /*********************************************************************
* vswprintf (MSVCRT.@) * 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.@) * wcscoll (MSVCRT.@)
*/ */
DWORD __cdecl MSVCRT_wcscoll( LPCWSTR str1, LPCWSTR str2 ) DWORD MSVCRT_wcscoll( LPCWSTR str1, LPCWSTR str2 )
{ {
/* FIXME: handle collates */ /* FIXME: handle collates */
return strcmpW( str1, str2 ); return strcmpW( str1, str2 );
...@@ -236,7 +236,7 @@ DWORD __cdecl MSVCRT_wcscoll( LPCWSTR str1, LPCWSTR str2 ) ...@@ -236,7 +236,7 @@ DWORD __cdecl MSVCRT_wcscoll( LPCWSTR str1, LPCWSTR str2 )
/********************************************************************* /*********************************************************************
* wcspbrk (MSVCRT.@) * wcspbrk (MSVCRT.@)
*/ */
LPWSTR __cdecl MSVCRT_wcspbrk( LPCWSTR str, LPCWSTR accept ) LPWSTR MSVCRT_wcspbrk( LPCWSTR str, LPCWSTR accept )
{ {
LPCWSTR p; LPCWSTR p;
while (*str) while (*str)
...@@ -250,7 +250,7 @@ LPWSTR __cdecl MSVCRT_wcspbrk( LPCWSTR str, LPCWSTR accept ) ...@@ -250,7 +250,7 @@ LPWSTR __cdecl MSVCRT_wcspbrk( LPCWSTR str, LPCWSTR accept )
/********************************************************************* /*********************************************************************
* wctomb (MSVCRT.@) * 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 ); return WideCharToMultiByte( CP_ACP, 0, &ch, 1, dst, 6, NULL, NULL );
} }
...@@ -258,7 +258,7 @@ INT __cdecl MSVCRT_wctomb( char *dst, WCHAR ch ) ...@@ -258,7 +258,7 @@ INT __cdecl MSVCRT_wctomb( char *dst, WCHAR ch )
/********************************************************************* /*********************************************************************
* iswalnum (MSVCRT.@) * 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); return get_char_typeW(wc) & (C1_ALPHA|C1_DIGIT|C1_LOWER|C1_UPPER);
} }
...@@ -266,7 +266,7 @@ INT __cdecl MSVCRT_iswalnum( WCHAR wc ) ...@@ -266,7 +266,7 @@ INT __cdecl MSVCRT_iswalnum( WCHAR wc )
/********************************************************************* /*********************************************************************
* iswalpha (MSVCRT.@) * iswalpha (MSVCRT.@)
*/ */
INT __cdecl MSVCRT_iswalpha( WCHAR wc ) INT MSVCRT_iswalpha( WCHAR wc )
{ {
return get_char_typeW(wc) & (C1_ALPHA|C1_LOWER|C1_UPPER); return get_char_typeW(wc) & (C1_ALPHA|C1_LOWER|C1_UPPER);
} }
...@@ -274,7 +274,7 @@ INT __cdecl MSVCRT_iswalpha( WCHAR wc ) ...@@ -274,7 +274,7 @@ INT __cdecl MSVCRT_iswalpha( WCHAR wc )
/********************************************************************* /*********************************************************************
* iswcntrl (MSVCRT.@) * iswcntrl (MSVCRT.@)
*/ */
INT __cdecl MSVCRT_iswcntrl( WCHAR wc ) INT MSVCRT_iswcntrl( WCHAR wc )
{ {
return get_char_typeW(wc) & C1_CNTRL; return get_char_typeW(wc) & C1_CNTRL;
} }
...@@ -282,7 +282,7 @@ INT __cdecl MSVCRT_iswcntrl( WCHAR wc ) ...@@ -282,7 +282,7 @@ INT __cdecl MSVCRT_iswcntrl( WCHAR wc )
/********************************************************************* /*********************************************************************
* iswdigit (MSVCRT.@) * iswdigit (MSVCRT.@)
*/ */
INT __cdecl MSVCRT_iswdigit( WCHAR wc ) INT MSVCRT_iswdigit( WCHAR wc )
{ {
return get_char_typeW(wc) & C1_DIGIT; return get_char_typeW(wc) & C1_DIGIT;
} }
...@@ -290,7 +290,7 @@ INT __cdecl MSVCRT_iswdigit( WCHAR wc ) ...@@ -290,7 +290,7 @@ INT __cdecl MSVCRT_iswdigit( WCHAR wc )
/********************************************************************* /*********************************************************************
* iswgraph (MSVCRT.@) * 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); 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 ) ...@@ -298,7 +298,7 @@ INT __cdecl MSVCRT_iswgraph( WCHAR wc )
/********************************************************************* /*********************************************************************
* iswlower (MSVCRT.@) * iswlower (MSVCRT.@)
*/ */
INT __cdecl MSVCRT_iswlower( WCHAR wc ) INT MSVCRT_iswlower( WCHAR wc )
{ {
return get_char_typeW(wc) & C1_LOWER; return get_char_typeW(wc) & C1_LOWER;
} }
...@@ -306,7 +306,7 @@ INT __cdecl MSVCRT_iswlower( WCHAR wc ) ...@@ -306,7 +306,7 @@ INT __cdecl MSVCRT_iswlower( WCHAR wc )
/********************************************************************* /*********************************************************************
* iswprint (MSVCRT.@) * 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); 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 ) ...@@ -314,7 +314,7 @@ INT __cdecl MSVCRT_iswprint( WCHAR wc )
/********************************************************************* /*********************************************************************
* iswpunct (MSVCRT.@) * iswpunct (MSVCRT.@)
*/ */
INT __cdecl MSVCRT_iswpunct( WCHAR wc ) INT MSVCRT_iswpunct( WCHAR wc )
{ {
return get_char_typeW(wc) & C1_PUNCT; return get_char_typeW(wc) & C1_PUNCT;
} }
...@@ -322,7 +322,7 @@ INT __cdecl MSVCRT_iswpunct( WCHAR wc ) ...@@ -322,7 +322,7 @@ INT __cdecl MSVCRT_iswpunct( WCHAR wc )
/********************************************************************* /*********************************************************************
* iswspace (MSVCRT.@) * iswspace (MSVCRT.@)
*/ */
INT __cdecl MSVCRT_iswspace( WCHAR wc ) INT MSVCRT_iswspace( WCHAR wc )
{ {
return get_char_typeW(wc) & C1_SPACE; return get_char_typeW(wc) & C1_SPACE;
} }
...@@ -330,7 +330,7 @@ INT __cdecl MSVCRT_iswspace( WCHAR wc ) ...@@ -330,7 +330,7 @@ INT __cdecl MSVCRT_iswspace( WCHAR wc )
/********************************************************************* /*********************************************************************
* iswupper (MSVCRT.@) * iswupper (MSVCRT.@)
*/ */
INT __cdecl MSVCRT_iswupper( WCHAR wc ) INT MSVCRT_iswupper( WCHAR wc )
{ {
return get_char_typeW(wc) & C1_UPPER; return get_char_typeW(wc) & C1_UPPER;
} }
...@@ -338,19 +338,19 @@ INT __cdecl MSVCRT_iswupper( WCHAR wc ) ...@@ -338,19 +338,19 @@ INT __cdecl MSVCRT_iswupper( WCHAR wc )
/********************************************************************* /*********************************************************************
* iswxdigit (MSVCRT.@) * iswxdigit (MSVCRT.@)
*/ */
INT __cdecl MSVCRT_iswxdigit( WCHAR wc ) INT MSVCRT_iswxdigit( WCHAR wc )
{ {
return get_char_typeW(wc) & C1_XDIGIT; return get_char_typeW(wc) & C1_XDIGIT;
} }
extern char *__cdecl _itoa( long , char *, int); extern char *_itoa( long , char *, int);
extern char *__cdecl _ultoa( long , char *, int); extern char *_ultoa( long , char *, int);
extern char *__cdecl _ltoa( long , char *, int); extern char *_ltoa( long , char *, int);
/********************************************************************* /*********************************************************************
* _itow (MSVCRT.@) * _itow (MSVCRT.@)
*/ */
WCHAR* __cdecl MSVCRT__itow(int value,WCHAR* out,int base) WCHAR* _itow(int value,WCHAR* out,int base)
{ {
char buf[64]; char buf[64];
_itoa(value, buf, base); _itoa(value, buf, base);
...@@ -361,7 +361,7 @@ WCHAR* __cdecl MSVCRT__itow(int value,WCHAR* out,int base) ...@@ -361,7 +361,7 @@ WCHAR* __cdecl MSVCRT__itow(int value,WCHAR* out,int base)
/********************************************************************* /*********************************************************************
* _ltow (MSVCRT.@) * _ltow (MSVCRT.@)
*/ */
WCHAR* __cdecl MSVCRT__ltow(long value,WCHAR* out,int base) WCHAR* _ltow(long value,WCHAR* out,int base)
{ {
char buf[128]; char buf[128];
_ltoa(value, buf, base); _ltoa(value, buf, base);
...@@ -372,7 +372,7 @@ WCHAR* __cdecl MSVCRT__ltow(long value,WCHAR* out,int base) ...@@ -372,7 +372,7 @@ WCHAR* __cdecl MSVCRT__ltow(long value,WCHAR* out,int base)
/********************************************************************* /*********************************************************************
* _ultow (MSVCRT.@) * _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]; char buf[128];
_ultoa(value, buf, base); _ultoa(value, buf, base);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment