mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 20:23:38 +00:00
msvcrt: Do not use wide character constants.
This commit is contained in:
parent
399a297b19
commit
ec4936a6a3
|
@ -2764,7 +2764,7 @@ int CDECL MSVCRT_fputws(const MSVCRT_wchar_t *s, MSVCRT_FILE* file)
|
|||
return MSVCRT_fwrite(s,sizeof(*s),len,file) == len ? 0 : MSVCRT_EOF;
|
||||
for (i=0; i<len; i++)
|
||||
{
|
||||
if ((s[i] == L'\n') && (MSVCRT_fputc('\r', file) == MSVCRT_EOF))
|
||||
if ((s[i] == '\n') && (MSVCRT_fputc('\r', file) == MSVCRT_EOF))
|
||||
return MSVCRT_WEOF;
|
||||
if (MSVCRT_fputwc(s[i], file) == MSVCRT_WEOF)
|
||||
return MSVCRT_WEOF;
|
||||
|
|
|
@ -50,10 +50,10 @@ static int char2digit(char c, int base) {
|
|||
* given base, or -1 if the given character is not a digit of the base.
|
||||
*/
|
||||
static int wchar2digit(MSVCRT_wchar_t c, int base) {
|
||||
if ((c>=L'0') && (c<=L'9') && (c<=L'0'+base-1)) return (c-L'0');
|
||||
if ((c>='0') && (c<='9') && (c<='0'+base-1)) return (c-'0');
|
||||
if (base<=10) return -1;
|
||||
if ((c>=L'A') && (c<=L'Z') && (c<=L'A'+base-11)) return (c-L'A'+10);
|
||||
if ((c>=L'a') && (c<=L'z') && (c<=L'a'+base-11)) return (c-L'a'+10);
|
||||
if ((c>='A') && (c<='Z') && (c<='A'+base-11)) return (c-'A'+10);
|
||||
if ((c>='a') && (c<='z') && (c<='a'+base-11)) return (c-'a'+10);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue