Result of three way diffing with include/crtdll and the winapi2 headers.
[reactos.git] / reactos / include / msvcrt / ctype.h
index 45f6356..f4db364 100644 (file)
  *
  *  This code is distributed in the hope that it will be useful but
  *  WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- *  DISCLAMED. This includes but is not limited to warranties of
+ *  DISCLAIMED. This includes but is not limited to warranties of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  *
- * $Revision: 1.4 $
- * $Author: chorns $
- * $Date: 2002/09/08 10:22:30 $
+ * $Revision: 1.5 $
+ * $Author: robd $
+ * $Date: 2002/11/24 18:06:00 $
  *
  */
 
 #ifndef _CTYPE_H_
 #define _CTYPE_H_
 
-#define        __need_wchar_t
-#define        __need_wint_t
+#define __need_wchar_t
+#define __need_wint_t
 #include <msvcrt/stddef.h>
 
 
  * The following flags are used to tell iswctype and _isctype what character
  * types you are looking for.
  */
-#define        _UPPER          0x0001
-#define        _LOWER          0x0002
-#define        _DIGIT          0x0004
-#define        _SPACE          0x0008
-#define        _PUNCT          0x0010
-#define        _CONTROL        0x0020
-#define        _BLANK          0x0040
-#define        _HEX            0x0080
+#define _UPPER      0x0001
+#define _LOWER      0x0002
+#define _DIGIT      0x0004
+#define _SPACE      0x0008 /* HT  LF  VT  FF  CR  SP */
+#define _PUNCT      0x0010
+#define _CONTROL    0x0020
+#define _BLANK      0x0040 /* this is SP only, not SP and HT as in C99  */
+#define _HEX        0x0080
+#define _LEADBYTE   0x8000
 
-#define        _ALPHA          0x0103
-#define        _LEADBYTE       0x8000
+#define _ALPHA      0x0103
 
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-int    isalnum(int c);
-int    isalpha(int c);
-int    iscntrl(int c);
-int    isdigit(int c);
-int    isgraph(int c);
-int    islower(int c);
-int    isprint(int c);
-int    ispunct(int c);
-int    isspace(int c);
-int    isupper(int c);
-int    isxdigit(int c);
-
-#ifndef        __STRICT_ANSI__
-int    _isctype (unsigned int c, int ctypeFlags);
+int isalnum(int);
+int isalpha(int);
+int iscntrl(int);
+int isdigit(int);
+int isgraph(int);
+int islower(int);
+int isprint(int);
+int ispunct(int);
+int isspace(int);
+int isupper(int);
+int isxdigit(int);
+
+#ifndef __STRICT_ANSI__
+int _isctype (unsigned int, int);
 #endif
 
-int    tolower(int c);
-int    toupper(int c);
+/* These are the ANSI versions, with correct checking of argument */
+int tolower(int);
+int toupper(int);
 
 /*
  * NOTE: The above are not old name type wrappers, but functions exported
- * explicitly by MSVCRT. However, underscored versions are also exported.
+ * explicitly by MSVCRT/CRTDLL. However, underscored versions are also
+ * exported.
  */
-#ifndef        __STRICT_ANSI__
-int    _tolower(int c);
-int    _toupper(int c);
-#endif
-
-#ifndef WEOF
-#define        WEOF    (wchar_t)(0xFFFF)
+#ifndef __STRICT_ANSI__
+/*
+ *  These are the cheap non-std versions: The return values are undefined
+ *  if the argument is not ASCII char or is not of appropriate case
+ */ 
+int _tolower(int);
+int _toupper(int);
 #endif
 
 /*
@@ -94,46 +96,51 @@ int _toupper(int c);
  *       problems under the current Cygwin compiler distribution.
  */
 
-typedef int    wctype_t;
+typedef int wctype_t;
+
 
 /* Wide character equivalents */
-int    iswalnum(wint_t wc);
-int    iswalpha(wint_t wc);
-int    iswascii(wint_t wc);
-int    iswcntrl(wint_t wc);
-int    iswctype(wint_t wc, wctype_t wctypeFlags);
-int    is_wctype(wint_t wc, wctype_t wctypeFlags);     /* Obsolete! */
-int    iswdigit(wint_t wc);
-int    iswgraph(wint_t wc);
-int    iswlower(wint_t wc);
-int    iswprint(wint_t wc);
-int    iswpunct(wint_t wc);
-int    iswspace(wint_t wc);
-int    iswupper(wint_t wc);
-int    iswxdigit(wint_t wc);
-
-wchar_t        towlower(wchar_t c);
-wchar_t        towupper(wchar_t c);
-
-int    isleadbyte (int c);
-
-#ifndef        __STRICT_ANSI__
-int    __isascii (int c);
-int    __toascii (int c);
-int    __iscsymf (int c);      /* Valid first character in C symbol */
-int    __iscsym (int c);       /* Valid character in C symbol (after first) */
-
-#ifndef        _NO_OLDNAMES
-#define        isascii(c)      __isascii(c)
-#define        toascii(c)      _toascii(c)
-#define        iscsymf(c)      __iscsymf(c)
-#define        iscsym(c)       __iscsym(c)
-#endif /* Not _NO_OLDNAMES */
-
-#endif /* Not __STRICT_ANSI__ */
+#ifndef WEOF
+#define WEOF    (wchar_t)(0xFFFF)
+#endif
+
+int iswalnum(wint_t);
+int iswalpha(wint_t);
+int iswascii(wint_t);
+int iswcntrl(wint_t);
+int iswctype(wint_t, wctype_t);
+int is_wctype(wint_t, wctype_t);    /* Obsolete! */
+int iswdigit(wint_t);
+int iswgraph(wint_t);
+int iswlower(wint_t);
+int iswprint(wint_t);
+int iswpunct(wint_t);
+int iswspace(wint_t);
+int iswupper(wint_t);
+int iswxdigit(wint_t);
+
+wchar_t towlower(wchar_t);
+wchar_t towupper(wchar_t);
+
+int isleadbyte(int);
+
+#ifndef __STRICT_ANSI__
+int __isascii(int);
+int __toascii(int);
+int __iscsymf(int);    /* Valid first character in C symbol */
+int __iscsym(int); /* Valid character in C symbol (after first) */
+
+#ifndef _NO_OLDNAMES
+#define isascii(c)  __isascii(c)
+#define toascii(c)  _toascii(c)
+#define iscsymf(c)  __iscsymf(c)
+#define iscsym(c)   __iscsym(c)
+#endif  /* Not _NO_OLDNAMES */
+
+#endif  /* Not __STRICT_ANSI__ */
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* Not _CTYPE_H_ */
+#endif  /* Not _CTYPE_H_ */