/*****************************************************************************/
/* */
-/* chartype.c */
+/* chartype.c */
/* */
-/* Character classification functions */
+/* Character classification functions */
/* */
/* */
/* */
-/* (C) 2000 Ullrich von Bassewitz */
-/* Wacholderweg 14 */
-/* D-70597 Stuttgart */
-/* EMail: uz@musoftware.de */
+/* (C) 2000-2004 Ullrich von Bassewitz */
+/* Römerstrasse 52 */
+/* D-70794 Filderstadt */
+/* EMail: uz@cc65.org */
/* */
/* */
/* This software is provided 'as-is', without any expressed or implied */
/*****************************************************************************/
-/* Code */
+/* Code */
/*****************************************************************************/
int IsBlank (char C)
-/* Check for a space, tab or newline */
+/* Check for a space or tab */
{
- return (C == ' ' || C == '\t' || C == '\n');
+ return (C == ' ' || C == '\t');
+}
+
+
+
+int IsSpace (char C)
+/* Check for any white space characters */
+{
+ return (C == ' ' || C == '\n' || C == '\r' || C == '\t' || C == '\v' || C == '\f');
}
+int IsBDigit (char C)
+/* Check for binary digits (0/1) */
+{
+ return (C == '0' || C == '1');
+}
+
+
+
+int IsODigit (char C)
+/* Check for octal digits (0..7) */
+{
+ return (C >= '0' && C <= '7');
+}
+
+
+
int IsXDigit (char C)
/* Check for hexadecimal digits */
{
{
return (C == '"' || C == '\'');
}
-
-
-