Piotr Caban : msvcrt: Use internal toupper implementation.
Alexandre Julliard
julliard at winehq.org
Tue Mar 26 16:43:14 CDT 2019
Module: wine
Branch: master
Commit: 3f675c1a9d6e8acfc75f302bfb03ed70af02da4e
URL: https://source.winehq.org/git/wine.git/?a=commit;h=3f675c1a9d6e8acfc75f302bfb03ed70af02da4e
Author: Piotr Caban <piotr at codeweavers.com>
Date: Tue Mar 26 11:31:06 2019 +0100
msvcrt: Use internal toupper implementation.
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msvcrt/file.c | 2 +-
dlls/msvcrt/mbcs.c | 6 +++---
dlls/msvcrt/printf.h | 6 +++---
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c
index 4fffd89..cf87866 100644
--- a/dlls/msvcrt/file.c
+++ b/dlls/msvcrt/file.c
@@ -3007,7 +3007,7 @@ int CDECL MSVCRT_stat64(const char* path, struct MSVCRT__stat64 * buf)
as a drive letter
*/
if (isalpha(*path)&& (*(path+1)==':'))
- buf->st_dev = buf->st_rdev = toupper(*path) - 'A'; /* drive num */
+ buf->st_dev = buf->st_rdev = MSVCRT__toupper_l(*path, NULL) - 'A'; /* drive num */
else
buf->st_dev = buf->st_rdev = MSVCRT__getdrive() - 1;
diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c
index 4234c06..918fff8 100644
--- a/dlls/msvcrt/mbcs.c
+++ b/dlls/msvcrt/mbcs.c
@@ -417,7 +417,7 @@ unsigned int CDECL _mbctoupper(unsigned int c)
FIXME("Handle MBC chars\n");
return c;
}
- return toupper(c); /* ASCII CP or SB char */
+ return MSVCRT__toupper_l(c, NULL); /* ASCII CP or SB char */
}
/*********************************************************************
@@ -1977,7 +1977,7 @@ unsigned char* CDECL _mbsupr(unsigned char* s)
*s++=c;
}
}
- else for ( ; *s; s++) *s = toupper(*s);
+ else for ( ; *s; s++) *s = MSVCRT__toupper_l(*s, NULL);
return ret;
}
@@ -2011,7 +2011,7 @@ int CDECL _mbsupr_s(unsigned char* s, MSVCRT_size_t len)
*s++=c;
}
}
- else for ( ; *s && len > 0; s++, len--) *s = toupper(*s);
+ else for ( ; *s && len > 0; s++, len--) *s = MSVCRT__toupper_l(*s, NULL);
if (*s)
{
*s = '\0';
diff --git a/dlls/msvcrt/printf.h b/dlls/msvcrt/printf.h
index b42dd73..a0d7540 100644
--- a/dlls/msvcrt/printf.h
+++ b/dlls/msvcrt/printf.h
@@ -354,7 +354,7 @@ static inline void FUNC_NAME(pf_fixup_exponent)(char *buf, BOOL three_digit_exp)
{
char* tmp = buf;
- while(tmp[0] && toupper(tmp[0])!='E')
+ while(tmp[0] && MSVCRT__toupper_l(tmp[0], NULL)!='E')
tmp++;
if(tmp[0] && (tmp[1]=='+' || tmp[1]=='-') &&
@@ -664,10 +664,10 @@ int FUNC_NAME(pf_printf)(FUNC_NAME(puts_clbk) pf_puts, void *puts_ctx, const API
sprintf(tmp, nan_str);
if (strchr("EFG", flags.Format))
for(i=0; tmp[i]; i++)
- tmp[i] = toupper(tmp[i]);
+ tmp[i] = MSVCRT__toupper_l(tmp[i], NULL);
} else {
sprintf(tmp, float_fmt, val);
- if(toupper(flags.Format)=='E' || toupper(flags.Format)=='G')
+ if(MSVCRT__toupper_l(flags.Format, NULL)=='E' || MSVCRT__toupper_l(flags.Format, NULL)=='G')
FUNC_NAME(pf_fixup_exponent)(tmp, three_digit_exp);
}
More information about the wine-cvs
mailing list