]> git.sur5r.net Git - cc65/blobdiff - src/common/chartype.h
First test plugin
[cc65] / src / common / chartype.h
index 3f895e4d00f342f81e310e2c48185ff97f7e2a3b..72ccf7560890bc0ca4e6c4c0560a668e7279f3e1 100644 (file)
 
 
 
+#include <ctype.h>
+
+/* common */
+#include "inline.h"
+
+
 /* This module contains replacements for functions in ctype.h besides other
  * functions. There is a problem with using ctype.h directly:
  * The parameter must have a value of "unsigned char" or EOF.
@@ -65,7 +71,20 @@ int IsAscii (char C);
 /* Check for an ASCII character */
 
 int IsBlank (char C);
-/* Check for a space, tab or newline */
+/* Check for a space or tab */
+
+#if defined(HAVE_INLINE)
+INLINE int IsControl (char C)
+/* Check for control chars */
+{
+    return iscntrl ((unsigned char) C);
+}
+#else
+#  define IsControl(C)                 iscntrl (C)
+#endif
+
+int IsSpace (char C);
+/* Check for any white space characters */
 
 int IsDigit (char C);
 /* Check for a digit */
@@ -73,12 +92,12 @@ int IsDigit (char C);
 int IsLower (char C);
 /* Check for a lower case char */
 
-int IsSpace (char C);
-/* Check for white space characters */
-
 int IsUpper (char C);
 /* Check for upper case characters */
 
+int IsBDigit (char C);
+/* Check for binary digits (0/1) */
+
 int IsXDigit (char C);
 /* Check for hexadecimal digits */