Merging r37048, r37051, r37052, r37055 from the-real-msvc branch
[reactos.git] / reactos / lib / sdk / crt / string / ctype.c
index 99bec2b..7818357 100644 (file)
@@ -1,4 +1,6 @@
 #include <string.h>
+#undef __MINGW_IMPORT
+#define __MINGW_IMPORT
 #include <ctype.h>
 
 #undef _pctype
@@ -379,7 +381,7 @@ int iscntrl(int c)
  */
 int __iscsym(int c)
 {
-   return(isalnum(c)||(c == '_'));
+   return (c < 127 && (isalnum(c) || (c == '_')));
 }
 
 /*
@@ -387,7 +389,7 @@ int __iscsym(int c)
  */
 int __iscsymf(int c)
 {
-   return(isalpha(c)||(c == '_'));
+   return (c < 127 && (isalpha(c) || (c == '_')));
 }
 
 /*
@@ -589,7 +591,7 @@ int toupper(int c)
 /*
  * @implemented
  */
-wchar_t towlower(wchar_t c)
+wint_t towlower(wint_t c)
 {
    if (iswctype (c, _UPPER))
        return (c - upalpha);
@@ -599,7 +601,7 @@ wchar_t towlower(wchar_t c)
 /*
  * @implemented
  */
-wchar_t towupper(wchar_t c)
+wint_t towupper(wint_t c)
 {
    if (iswctype (c, _LOWER))
       return (c + upalpha);