Mailing List Archive

[6853] cherokee/trunk/cherokee/macros.h: Implements CHEROKEE_CHAR_IS_WHITE, CHEROKEE_CHAR_IS_UPPERCASE,
Revision: 6853
http://svn.cherokee-project.com/changeset/6853
Author: alo
Date: 2011-09-15 19:13:48 +0200 (Thu, 15 Sep 2011)
Log Message:
-----------
Implements CHEROKEE_CHAR_IS_WHITE, CHEROKEE_CHAR_IS_UPPERCASE,
CHEROKEE_CHAR_IS_LOWERCASE, CHEROKEE_CHAR_TO_LOWER and
CHEROKEE_CHAT_TO_UPPER.

Modified Paths:
--------------
cherokee/trunk/cherokee/macros.h

Modified: cherokee/trunk/cherokee/macros.h
===================================================================
--- cherokee/trunk/cherokee/macros.h 2011-09-15 11:12:30 UTC (rev 6852)
+++ cherokee/trunk/cherokee/macros.h 2011-09-15 17:13:48 UTC (rev 6853)
@@ -409,4 +409,12 @@
cherokee_buffer_mrproper (&tmp); \
} while (0)

+
+#define CHEROKEE_CHAR_IS_WHITE(_ch) (((_ch) == ' ') || ((_ch) == '\t') || ((_ch) == '\n'))
+#define CHEROKEE_CHAR_IS_UPPERCASE(_ch) (((_ch) >= 'A') && ((_ch) <= 'Z'))
+#define CHEROKEE_CHAR_IS_LOWERCASE(_ch) (((_ch) >= 'a') && ((_ch) <= 'z'))
+#define CHEROKEE_CHAR_TO_LOWER(_ch) ((_ch) | 32)
+#define CHEROKEE_CHAT_TO_UPPER(_ch) ((_ch) & ~32)
+
+
#endif /* CHEROKEE_MACROS_H */