code shrink in help text code

text    data     bss     dec     hex filename
 823690     458    6956  831104   cae80 busybox_old
 823673     458    6956  831087   cae6f busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2009-08-30 19:57:49 +02:00
parent 1249dbb2c7
commit 630dde1cef

View File

@ -116,6 +116,7 @@ void FAST_FUNC bb_show_usage(void)
full_write2_str(p); full_write2_str(p);
full_write2_str("\n\n"); full_write2_str("\n\n");
} }
if (ENABLE_FEATURE_CLEAN_UP)
dealloc_usage_messages((char*)usage_string); dealloc_usage_messages((char*)usage_string);
#else #else
const char *p; const char *p;
@ -129,7 +130,7 @@ void FAST_FUNC bb_show_usage(void)
ap--; ap--;
} }
full_write2_str(bb_banner); full_write2_str(bb_banner);
full_write2_str(" multi-call binary\n"); full_write2_str(" multi-call binary.\n");
if (*p == '\b') if (*p == '\b')
full_write2_str("\nNo help available.\n\n"); full_write2_str("\nNo help available.\n\n");
else { else {
@ -139,6 +140,7 @@ void FAST_FUNC bb_show_usage(void)
full_write2_str(p); full_write2_str(p);
full_write2_str("\n\n"); full_write2_str("\n\n");
} }
if (ENABLE_FEATURE_CLEAN_UP)
dealloc_usage_messages((char*)usage_string); dealloc_usage_messages((char*)usage_string);
#endif #endif
} }
@ -643,8 +645,9 @@ static int busybox_main(char **argv)
} }
dup2(1, 2); dup2(1, 2);
full_write2_str(bb_banner); /* reuse const string... */ full_write2_str(bb_banner); /* reuse const string */
full_write2_str(" multi-call binary\n" full_write2_str(" multi-call binary.\n"); /* reuse */
full_write2_str(
"Copyright (C) 1998-2009 Erik Andersen, Rob Landley, Denys Vlasenko\n" "Copyright (C) 1998-2009 Erik Andersen, Rob Landley, Denys Vlasenko\n"
"and others. Licensed under GPLv2.\n" "and others. Licensed under GPLv2.\n"
"See source distribution for full notice.\n" "See source distribution for full notice.\n"
@ -655,7 +658,7 @@ static int busybox_main(char **argv)
"\tBusyBox is a multi-call binary that combines many common Unix\n" "\tBusyBox is a multi-call binary that combines many common Unix\n"
"\tutilities into a single executable. Most people will create a\n" "\tutilities into a single executable. Most people will create a\n"
"\tlink to busybox for each function they wish to use and BusyBox\n" "\tlink to busybox for each function they wish to use and BusyBox\n"
"\twill act like whatever it was invoked as!\n" "\twill act like whatever it was invoked as.\n"
"\n" "\n"
"Currently defined functions:\n"); "Currently defined functions:\n");
col = 0; col = 0;