diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-10-23 03:16:08 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-10-23 03:16:08 +0200 |
commit | f2cbb03a378aa48f2e08b64877d54da3fab4ea6a (patch) | |
tree | 35ff7449ba394e4e0a84a19a70eafa7b181d8d71 /coreutils | |
parent | 7b4cd6f7b07b816c4b36d686fe47c5cfec7f5abf (diff) | |
download | busybox-f2cbb03a378aa48f2e08b64877d54da3fab4ea6a.tar.gz |
*: optimize most of isXXXXX() macros
text data bss dec hex filename
824164 453 6812 831429 cafc5 busybox_old
823730 453 6812 830995 cae13 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/od.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/coreutils/od.c b/coreutils/od.c index e4179a36d..228db19ac 100644 --- a/coreutils/od.c +++ b/coreutils/od.c @@ -20,9 +20,6 @@ #include "dump.h" -#define isdecdigit(c) isdigit(c) -#define ishexdigit(c) (isxdigit)(c) - static void odoffset(dumper_t *dumper, int argc, char ***argvp) { @@ -51,8 +48,8 @@ odoffset(dumper_t *dumper, int argc, char ***argvp) if ((*p != '+') && (argc < 2 - || (!isdecdigit(p[0]) - && ((p[0] != 'x') || !ishexdigit(p[1]))))) + || (!isdigit(p[0]) + && ((p[0] != 'x') || !isxdigit(p[1]))))) return; base = 0; @@ -62,7 +59,7 @@ odoffset(dumper_t *dumper, int argc, char ***argvp) */ if (p[0] == '+') ++p; - if (p[0] == 'x' && ishexdigit(p[1])) { + if (p[0] == 'x' && isxdigit(p[1])) { ++p; base = 16; } else if (p[0] == '0' && p[1] == 'x') { @@ -72,10 +69,10 @@ odoffset(dumper_t *dumper, int argc, char ***argvp) /* skip over the number */ if (base == 16) - for (num = p; ishexdigit(*p); ++p) + for (num = p; isxdigit(*p); ++p) continue; else - for (num = p; isdecdigit(*p); ++p) + for (num = p; isdigit(*p); ++p) continue; /* check for no number */ |