From 9c02fb3ec070b3c2fab651274a8b7cf398fe80db Mon Sep 17 00:00:00 2001 From: cuz Date: Fri, 5 Jan 2001 19:25:24 +0000 Subject: [PATCH] Minor updates git-svn-id: svn://svn.cc65.org/cc65/trunk@594 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/common/chartype.c | 12 ++++++++++-- src/common/chartype.h | 8 ++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/common/chartype.c b/src/common/chartype.c index 31412948e..193dc3200 100644 --- a/src/common/chartype.c +++ b/src/common/chartype.c @@ -79,9 +79,9 @@ int IsAscii (char C) 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'); } @@ -110,6 +110,14 @@ int IsUpper (char C) +int IsBDigit (char C) +/* Check for binary digits (0/1) */ +{ + return (C == '0' || C == '1'); +} + + + int IsXDigit (char C) /* Check for hexadecimal digits */ { diff --git a/src/common/chartype.h b/src/common/chartype.h index 3f895e4d0..3292da75e 100644 --- a/src/common/chartype.h +++ b/src/common/chartype.h @@ -65,7 +65,7 @@ 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 */ int IsDigit (char C); /* Check for a digit */ @@ -73,12 +73,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 */