summaryrefslogtreecommitdiff
path: root/src/common/cbasetypes.h
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2020-03-28 16:56:20 -0400
committergumi <git@gumi.ca>2020-03-28 19:07:37 -0400
commit6b3d80109c2076a271a2f668ab2536814ca72d83 (patch)
tree4c6846c1f93de845c1fbd9e565718c8ac7a1b6ef /src/common/cbasetypes.h
parentdd7f653b00239299cdecb7ca826c21e5957863da (diff)
downloadhercules-6b3d80109c2076a271a2f668ab2536814ca72d83.tar.gz
hercules-6b3d80109c2076a271a2f668ab2536814ca72d83.tar.bz2
hercules-6b3d80109c2076a271a2f668ab2536814ca72d83.tar.xz
hercules-6b3d80109c2076a271a2f668ab2536814ca72d83.zip
add support for binary and octal number literals
Diffstat (limited to 'src/common/cbasetypes.h')
-rw-r--r--src/common/cbasetypes.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h
index 0b5613316..3ca0c5f67 100644
--- a/src/common/cbasetypes.h
+++ b/src/common/cbasetypes.h
@@ -410,13 +410,15 @@ typedef char bool;
#define ISALPHA(c) (isalpha((unsigned char)(c)))
#define ISCNTRL(c) (iscntrl((unsigned char)(c)))
#define ISDIGIT(c) (isdigit((unsigned char)(c)))
+#define ISXDIGIT(c) (isxdigit((unsigned char)(c)))
+#define ISBDIGIT(c) ((unsigned char)(c) == '0' || (unsigned char)(c) == '1')
+#define ISODIGIT(c) ((unsigned char)(c) >= '0' && (unsigned char)(c) <= '7')
#define ISGRAPH(c) (isgraph((unsigned char)(c)))
#define ISLOWER(c) (islower((unsigned char)(c)))
#define ISPRINT(c) (isprint((unsigned char)(c)))
#define ISPUNCT(c) (ispunct((unsigned char)(c)))
#define ISSPACE(c) (isspace((unsigned char)(c)))
#define ISUPPER(c) (isupper((unsigned char)(c)))
-#define ISXDIGIT(c) (isxdigit((unsigned char)(c)))
#define TOASCII(c) (toascii((unsigned char)(c)))
#define TOLOWER(c) (tolower((unsigned char)(c)))
#define TOUPPER(c) (toupper((unsigned char)(c)))