From 459903bd4e270ab4884ba9577516f9b2753898b0 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 27 Nov 2006 14:44:18 +0000 Subject: Provide our own isdigit macro. saves more than 400 bytes. --- include/libbb.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/libbb.h b/include/libbb.h index 63748c85d..baab74878 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -666,7 +666,6 @@ extern const char bb_default_login_shell[]; #undef isascii #undef isblank #undef iscntrl -#undef isdigit #undef isgraph #undef islower #undef isprint @@ -675,6 +674,11 @@ extern const char bb_default_login_shell[]; #undef isupper #undef isxdigit +/* This one is more efficient - we save ~400 bytes */ +#undef isdigit +#define isdigit(a) ((unsigned)((a) - '0') <= 9) + + #ifdef DMALLOC #include #endif -- cgit v1.2.3