Michael Stefaniuc : msvcrt: Do not use wide character constants.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jun 25 07:28:10 CDT 2007


Module: wine
Branch: master
Commit: ec4936a6a36064ec08e32db90c2f5ebeef59c1b0
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ec4936a6a36064ec08e32db90c2f5ebeef59c1b0

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Fri Jun 22 23:39:31 2007 +0200

msvcrt: Do not use wide character constants.

---

 dlls/msvcrt/file.c  |    2 +-
 dlls/msvcrt/scanf.c |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c
index 14b7311..1be1a10 100644
--- a/dlls/msvcrt/file.c
+++ b/dlls/msvcrt/file.c
@@ -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; 
diff --git a/dlls/msvcrt/scanf.c b/dlls/msvcrt/scanf.c
index c035845..c51c5ab 100644
--- a/dlls/msvcrt/scanf.c
+++ b/dlls/msvcrt/scanf.c
@@ -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;
 }
 




More information about the wine-cvs mailing list