Updates from both Vladimir and Larry
[oweals/busybox.git] / applets.c
index 51511037203e8e4ea81b80b835f56e80b6089087..c1575c70d3220919ae6986f9eec3ca323fd6c385 100644 (file)
--- a/applets.c
+++ b/applets.c
@@ -27,6 +27,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include "busybox.h"
 
 #undef APPLET
 #undef PROTOTYPES
 #include "applets.h"
 
-#define bb_need_full_version
-#define BB_DECLARE_EXTERN
-#include "messages.c"
-
 struct BB_applet *applet_using;
 
 /* The -1 arises because of the {0,NULL,0,-1} entry above. */
@@ -48,6 +45,13 @@ extern void show_usage(void)
        const char *format_string;
        const char *usage_string = usage_messages;
        int i;
+       /* From busybox.c */
+       extern int been_there_done_that;
+
+       if (strcmp(applet_using->name, "busybox")==0) {
+               been_there_done_that=1;
+               busybox_main(0, NULL);
+       }
 
        for (i = applet_using - applets; i > 0; ) {
                if (!*usage_string++) {