msvcrt: Use the msvcrt string functions internally.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2020-11-18 16:04:34 +01:00
parent f48648aeec
commit 2fb08bed46
4 changed files with 11 additions and 7 deletions

View File

@ -2455,7 +2455,7 @@ char * CDECL MSVCRT__ecvt( double number, int ndigits, int *decpt, int *sign )
/* take the exponential "e" out */
data->efcvt_buffer[ prec] = '\0';
/* read the exponent */
sscanf( data->efcvt_buffer + prec + 1, "%d", decpt);
MSVCRT_sscanf( data->efcvt_buffer + prec + 1, "%d", decpt);
(*decpt)++;
/* adjust for some border cases */
if( data->efcvt_buffer[0] == '0')/* value is zero */
@ -2515,7 +2515,7 @@ int CDECL MSVCRT__ecvt_s( char *buffer, MSVCRT_size_t length, double number, int
/* take the exponential "e" out */
result[ prec] = '\0';
/* read the exponent */
sscanf( result + prec + 1, "%d", decpt);
MSVCRT_sscanf( result + prec + 1, "%d", decpt);
(*decpt)++;
/* adjust for some border cases */
if( result[0] == '0')/* value is zero */

View File

@ -124,7 +124,7 @@ static inline MSVCRT_size_t u_strlen( const unsigned char *str )
static inline unsigned char* u_strncat( unsigned char* dst, const unsigned char* src, MSVCRT_size_t len )
{
return (unsigned char*)strncat( (char*)dst, (const char*)src, len);
return (unsigned char*)MSVCRT_strncat( (char*)dst, (const char*)src, len);
}
static inline int u_strcmp( const unsigned char *s1, const unsigned char *s2 )
@ -154,7 +154,7 @@ static inline unsigned char *u_strchr( const unsigned char *s, unsigned char x )
static inline unsigned char *u_strrchr( const unsigned char *s, unsigned char x )
{
return (unsigned char*) strrchr( (const char*)s, x );
return (unsigned char*) MSVCRT_strrchr( (const char*)s, x );
}
static inline unsigned char *u__strset( unsigned char *s, unsigned char c )

View File

@ -1170,6 +1170,7 @@ int __cdecl _ungetch(int);
int __cdecl _cputs(const char*);
int WINAPIV _cprintf(const char*,...);
int WINAPIV _cwprintf(const MSVCRT_wchar_t*,...);
int WINAPIV MSVCRT_sscanf(const char *, const char *, ...);
char*** __cdecl MSVCRT___p__environ(void);
int* __cdecl __p___mb_cur_max(void);
int* __cdecl MSVCRT___p__fmode(void);
@ -1200,9 +1201,12 @@ int __cdecl MSVCRT__stricmp(const char*, const char*);
int __cdecl MSVCRT__strnicmp(const char*, const char*, MSVCRT_size_t);
int __cdecl MSVCRT__strnicoll_l(const char*, const char*, MSVCRT_size_t, MSVCRT__locale_t);
int __cdecl MSVCRT__strncoll_l(const char*, const char*, MSVCRT_size_t, MSVCRT__locale_t);
char* __cdecl MSVCRT_strncat(char*,const char *,MSVCRT_size_t);
int __cdecl MSVCRT_strncmp(const char*, const char*, MSVCRT_size_t);
int __cdecl MSVCRT_strcmp(const char*, const char*);
char* __cdecl MSVCRT_strrchr(const char *, int);
char* __cdecl MSVCRT_strstr(const char*, const char*);
MSVCRT_long __cdecl MSVCRT_strtol(const char*, char**, int);
unsigned int __cdecl MSVCRT__get_output_format(void);
char* __cdecl MSVCRT_strtok_s(char*, const char*, char**);
char* __cdecl MSVCRT__itoa(int, char*, int);

View File

@ -127,11 +127,11 @@ void CDECL MSVCRT__tzset(void)
}else if(*tz == '+') {
tz++;
}
MSVCRT___timezone = strtol(tz, &tz, 10)*3600;
MSVCRT___timezone = MSVCRT_strtol(tz, &tz, 10)*3600;
if(*tz == ':') {
MSVCRT___timezone += strtol(tz+1, &tz, 10)*60;
MSVCRT___timezone += MSVCRT_strtol(tz+1, &tz, 10)*60;
if(*tz == ':')
MSVCRT___timezone += strtol(tz+1, &tz, 10);
MSVCRT___timezone += MSVCRT_strtol(tz+1, &tz, 10);
}
if(neg_zone)
MSVCRT___timezone = -MSVCRT___timezone;