svn commit: trunk/busybox: coreutils findutils include runit util-l etc...
vda at busybox.net
vda at busybox.net
Fri Jul 27 15:06:26 UTC 2007
Author: vda
Date: 2007-07-27 08:06:25 -0700 (Fri, 27 Jul 2007)
New Revision: 19282
Log:
multiplier suffixes are short, store them directly in struct suffix_mult
function old new delta
xstrtoul_range_sfx 226 217 -9
xstrtoull_range_sfx 291 280 -11
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-20) Total: -20 bytes
text data bss dec hex filename
669128 2668 13616 685412 a7564 busybox_old
669108 2668 13616 685392 a7550 busybox_unstripped
Modified:
trunk/busybox/coreutils/dd.c
trunk/busybox/coreutils/head.c
trunk/busybox/coreutils/od_bloaty.c
trunk/busybox/coreutils/sleep.c
trunk/busybox/coreutils/split.c
trunk/busybox/coreutils/stty.c
trunk/busybox/coreutils/tail.c
trunk/busybox/findutils/find.c
trunk/busybox/include/libbb.h
trunk/busybox/runit/svlogd.c
trunk/busybox/util-linux/hexdump.c
Changeset:
Modified: trunk/busybox/coreutils/dd.c
===================================================================
--- trunk/busybox/coreutils/dd.c 2007-07-27 15:02:00 UTC (rev 19281)
+++ trunk/busybox/coreutils/dd.c 2007-07-27 15:06:25 UTC (rev 19282)
@@ -25,7 +25,7 @@
{ "M", 1048576 },
{ "GD", 1000000000 },
{ "G", 1073741824 },
- { NULL, 0 }
+ { }
};
struct globals {
Modified: trunk/busybox/coreutils/head.c
===================================================================
--- trunk/busybox/coreutils/head.c 2007-07-27 15:02:00 UTC (rev 19281)
+++ trunk/busybox/coreutils/head.c 2007-07-27 15:06:25 UTC (rev 19282)
@@ -25,7 +25,7 @@
{ "b", 512 },
{ "k", 1024 },
{ "m", 1024*1024 },
- { NULL, 0 }
+ { }
};
#endif
Modified: trunk/busybox/coreutils/od_bloaty.c
===================================================================
--- trunk/busybox/coreutils/od_bloaty.c 2007-07-27 15:02:00 UTC (rev 19281)
+++ trunk/busybox/coreutils/od_bloaty.c 2007-07-27 15:06:25 UTC (rev 19282)
@@ -981,7 +981,7 @@
static const struct suffix_mult Bb[] = {
{ "B", 1024 },
{ "b", 512 },
- { NULL, 0 }
+ { }
};
char *p;
int radix;
@@ -1204,7 +1204,7 @@
{ "b", 512 },
{ "k", 1024 },
{ "m", 1024*1024 },
- { NULL, 0 }
+ { }
};
unsigned opt;
int l_c_m;
Modified: trunk/busybox/coreutils/sleep.c
===================================================================
--- trunk/busybox/coreutils/sleep.c 2007-07-27 15:02:00 UTC (rev 19281)
+++ trunk/busybox/coreutils/sleep.c 2007-07-27 15:06:25 UTC (rev 19282)
@@ -29,7 +29,7 @@
{ "m", 60 },
{ "h", 60*60 },
{ "d", 24*60*60 },
- { NULL, 0 }
+ { }
};
#endif
Modified: trunk/busybox/coreutils/split.c
===================================================================
--- trunk/busybox/coreutils/split.c 2007-07-27 15:02:00 UTC (rev 19281)
+++ trunk/busybox/coreutils/split.c 2007-07-27 15:06:25 UTC (rev 19282)
@@ -20,7 +20,7 @@
#if ENABLE_FEATURE_SPLIT_FANCY
{ "g", 1024*1024*1024 },
#endif
- { NULL, 0 }
+ { }
};
/* Increment the suffix part of the filename.
Modified: trunk/busybox/coreutils/stty.c
===================================================================
--- trunk/busybox/coreutils/stty.c 2007-07-27 15:02:00 UTC (rev 19281)
+++ trunk/busybox/coreutils/stty.c 2007-07-27 15:06:25 UTC (rev 19282)
@@ -524,10 +524,10 @@
}
static const struct suffix_mult stty_suffixes[] = {
- {"b", 512 },
- {"k", 1024},
- {"B", 1024},
- {NULL, 0 }
+ { "b", 512 },
+ { "k", 1024 },
+ { "B", 1024 },
+ { }
};
static const struct mode_info *find_mode(const char *name)
Modified: trunk/busybox/coreutils/tail.c
===================================================================
--- trunk/busybox/coreutils/tail.c 2007-07-27 15:02:00 UTC (rev 19281)
+++ trunk/busybox/coreutils/tail.c 2007-07-27 15:06:25 UTC (rev 19282)
@@ -30,7 +30,7 @@
{ "b", 512 },
{ "k", 1024 },
{ "m", 1024*1024 },
- { NULL, 0 }
+ { }
};
struct globals {
Modified: trunk/busybox/findutils/find.c
===================================================================
--- trunk/busybox/findutils/find.c 2007-07-27 15:02:00 UTC (rev 19281)
+++ trunk/busybox/findutils/find.c 2007-07-27 15:06:25 UTC (rev 19282)
@@ -760,10 +760,10 @@
static const struct suffix_mult find_suffixes[] = {
{ "c", 1 },
{ "w", 2 },
- { "b"+1, 512 },
+ { "", 512 },
{ "b", 512 },
{ "k", 1024 },
- { NULL, 0 }
+ { }
};
action_size *ap;
ap = ALLOC_ACTION(size);
Modified: trunk/busybox/include/libbb.h
===================================================================
--- trunk/busybox/include/libbb.h 2007-07-27 15:02:00 UTC (rev 19281)
+++ trunk/busybox/include/libbb.h 2007-07-27 15:06:25 UTC (rev 19282)
@@ -451,7 +451,7 @@
char *bin2hex(char *buf, const char *cp, int count);
struct suffix_mult {
- const char *suffix;
+ char suffix[4];
unsigned mult;
};
#include "xatonum.h"
Modified: trunk/busybox/runit/svlogd.c
===================================================================
--- trunk/busybox/runit/svlogd.c 2007-07-27 15:02:00 UTC (rev 19281)
+++ trunk/busybox/runit/svlogd.c 2007-07-27 15:06:25 UTC (rev 19282)
@@ -488,9 +488,9 @@
break;
case 's': {
static const struct suffix_mult km_suffixes[] = {
- { "k", 1024 },
- { "m", 1024*1024 },
- { NULL, 0 }
+ { "k", 1024 },
+ { "m", 1024*1024 },
+ { }
};
ld->sizemax = xatou_sfx(&s[1], km_suffixes);
break;
@@ -503,10 +503,10 @@
break;
case 't': {
static const struct suffix_mult mh_suffixes[] = {
- { "m", 60 },
- { "h", 60*60 },
- /*{ "d", 24*60*60 },*/
- { NULL, 0 }
+ { "m", 60 },
+ { "h", 60*60 },
+ /*{ "d", 24*60*60 },*/
+ { }
};
ld->tmax = xatou_sfx(&s[1], mh_suffixes);
if (ld->tmax) {
Modified: trunk/busybox/util-linux/hexdump.c
===================================================================
--- trunk/busybox/util-linux/hexdump.c 2007-07-27 15:02:00 UTC (rev 19281)
+++ trunk/busybox/util-linux/hexdump.c 2007-07-27 15:06:25 UTC (rev 19282)
@@ -48,10 +48,10 @@
static const char hexdump_opts[] = "bcdoxCe:f:n:s:v";
static const struct suffix_mult suffixes[] = {
- { "b", 512 },
- { "k", 1024 },
- { "m", 1024*1024 },
- { NULL, 0 }
+ { "b", 512 },
+ { "k", 1024 },
+ { "m", 1024*1024 },
+ { }
};
int hexdump_main(int argc, char **argv);
More information about the busybox-cvs
mailing list