X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fcommon%2Fchartype.c;h=73f7a6ee4b7990496cded526d2e4aebeb4741eb8;hb=a54cd59e1f4baeba5324296fbe3697a48e5b1bc8;hp=31412948ee81648474775cffc114a33e1c24c3be;hpb=37da7dff987fc53058e4bb8cabb5880ebeb45af0;p=cc65 diff --git a/src/common/chartype.c b/src/common/chartype.c index 31412948e..73f7a6ee4 100644 --- a/src/common/chartype.c +++ b/src/common/chartype.c @@ -79,9 +79,17 @@ 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'); +} + + + +int IsSpace (char C) +/* Check for any white space characters */ +{ + return (C == ' ' || C == '\n' || C == '\r' || C == '\t' || C == '\v' || C == '\f'); } @@ -110,6 +118,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 */ {