diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-04-01 14:47:57 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-04-01 14:47:57 +0000 |
commit | 468aea2d8800cc0496383616d82d7c957ae8bc50 (patch) | |
tree | 8a2f3d80dc2440dd007caed4cfa235b3858c9170 /applets/applet_tables.c | |
parent | 165f5b394fa337e71e08435b51108f4394199b2b (diff) | |
download | busybox-w32-468aea2d8800cc0496383616d82d7c957ae8bc50.tar.gz busybox-w32-468aea2d8800cc0496383616d82d7c957ae8bc50.tar.bz2 busybox-w32-468aea2d8800cc0496383616d82d7c957ae8bc50.zip |
shells: do not frocibly enable test, echo and kill _applets_,
just build relevant source and use xxx_main functions.
build system: add a special case when we have exactly one applet enabled
(makes "true", "false", "basename" REALLY tiny).
getopt32: do not use stdio.
function old new delta
getopt32 1385 1412 +27
make_device 1187 1200 +13
basename_main 120 127 +7
tcpudpsvd_main 1922 1926 +4
testcmd 5 - -5
echocmd 5 - -5
fuser_main 1243 1231 -12
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 4/1 up/down: 51/-22) Total: 29 bytes
Diffstat (limited to 'applets/applet_tables.c')
-rw-r--r-- | applets/applet_tables.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/applets/applet_tables.c b/applets/applet_tables.c index 6c3492b4d..35b099eb4 100644 --- a/applets/applet_tables.c +++ b/applets/applet_tables.c | |||
@@ -69,9 +69,14 @@ int main(int argc, char **argv) | |||
69 | 69 | ||
70 | /* Keep in sync with include/busybox.h! */ | 70 | /* Keep in sync with include/busybox.h! */ |
71 | 71 | ||
72 | puts("/* This is a generated file, don't edit */"); | 72 | puts("/* This is a generated file, don't edit */\n"); |
73 | 73 | ||
74 | puts("const char applet_names[] ALIGN1 = \"\"\n"); | 74 | if (NUM_APPLETS == 1) { |
75 | printf("#define SINGLE_APPLET_STR \"%s\"\n", applets[0].name); | ||
76 | printf("#define SINGLE_APPLET_MAIN %s_main\n\n", applets[0].name); | ||
77 | } | ||
78 | |||
79 | puts("const char applet_names[] ALIGN1 = \"\""); | ||
75 | for (i = 0; i < NUM_APPLETS; i++) { | 80 | for (i = 0; i < NUM_APPLETS; i++) { |
76 | printf("\"%s\" \"\\0\"\n", applets[i].name); | 81 | printf("\"%s\" \"\\0\"\n", applets[i].name); |
77 | } | 82 | } |