]> sjero.net Git - wget/blobdiff - src/safe-ctype.h
[svn] Remove K&R support.
[wget] / src / safe-ctype.h
index 17ced521e11ce23b2fef9f6e58c861961197b6bf..0c5c5863fe26a9af0417ca955c4408a9cf43a8e0 100644 (file)
@@ -51,30 +51,22 @@ so, delete this exception statement from your version.  */
 
 #ifndef I_REALLY_WANT_CTYPE_MACROS
 
+/* We used to #define these to errors, but that loses when real
+   ctype.h is included, usually by a library's (OpenSSL's) header
+   which gets #included after wget.h.  */
+
 #undef isalpha
-#define isalpha *** Please use ISALPHA ***
 #undef isalnum
-#define isalnum *** Please use ISALNUM ***
 #undef isblank
-#define isblank *** Please use ISBLANK ***
 #undef iscntrl
-#define iscntrl *** Please use ISCNTRL ***
 #undef isdigit
-#define isdigit *** Please use ISDIGIT ***
 #undef isgraph
-#define isgraph *** Please use ISGRAPH ***
 #undef islower
-#define islower *** Please use ISLOWER ***
 #undef isprint
-#define isprint *** Please use ISPRINT ***
 #undef ispunct
-#define ispunct *** Please use ISPUNCT ***
 #undef isspace
-#define isspace *** Please use ISSPACE ***
 #undef isupper
-#define isupper *** Please use ISUPPER ***
 #undef isxdigit
-#define isxdigit *** Please use ISXDIGIT ***
 
 #endif /* I_REALLY_WANT_CTYPE_MACROS */
 
@@ -108,7 +100,7 @@ enum {
 /* Character classification.  */
 extern const unsigned short _sch_istable[256];
 
-#define _sch_test(c, bit) (_sch_istable[(c) & 0xff] & (bit))
+#define _sch_test(c, bit) (_sch_istable[(c) & 0xff] & (unsigned short)(bit))
 
 #define ISALPHA(c)  _sch_test(c, _sch_isalpha)
 #define ISALNUM(c)  _sch_test(c, _sch_isalnum)