Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-11-27 17:44:18 +0300
committerDenis Vlasenko <vda.linux@googlemail.com>2006-11-27 17:44:18 +0300
commit459903bd4e270ab4884ba9577516f9b2753898b0 (patch)
tree8dd4e8a4db28561fad1dcaeabee936a3aad7187c /include
parentd686a045c8134d3a42fa5cc6b2e09118e08d603f (diff)
Provide our own isdigit macro. saves more than 400 bytes.
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h6
1 files changed, 5 insertions, 1 deletions
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 <dmalloc.h>
#endif