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 */