Patch from Vladimir to move struct applet from busybox.c to applets.c,
authorEric Andersen <andersen@codepoet.org>
Mon, 19 Mar 2001 19:30:24 +0000 (19:30 -0000)
committerEric Andersen <andersen@codepoet.org>
Mon, 19 Mar 2001 19:30:24 +0000 (19:30 -0000)
which looks like the right place for such things to live.

applets.c
applets.h
applets/applets.c
applets/busybox.c
busybox.c
include/applets.h

index 1e31e89259917ec8f7f90e756d0838505b56ef26..51511037203e8e4ea81b80b835f56e80b6089087 100644 (file)
--- a/applets.c
+++ b/applets.c
 #include <stdlib.h>
 #include "busybox.h"
 
+#undef APPLET
+#undef APPLET_NOUSAGE
+#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. */
+const size_t NUM_APPLETS = (sizeof (applets) / sizeof (struct BB_applet) - 1);
+
 extern void show_usage(void)
 {
        const char *format_string;
index f7f68cd8d91c27c6941c7c2468698de8affc67f2..8c59507cec8b510160618f033692ee867203ebf4 100644 (file)
--- a/applets.h
+++ b/applets.h
        { 0,NULL,0 }
 };
 
-/* The -1 arises because of the {0,NULL,0,-1} entry above. */
-size_t NUM_APPLETS = (sizeof (applets) / sizeof (struct BB_applet) - 1);
-
 #endif
index 1e31e89259917ec8f7f90e756d0838505b56ef26..51511037203e8e4ea81b80b835f56e80b6089087 100644 (file)
 #include <stdlib.h>
 #include "busybox.h"
 
+#undef APPLET
+#undef APPLET_NOUSAGE
+#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. */
+const size_t NUM_APPLETS = (sizeof (applets) / sizeof (struct BB_applet) - 1);
+
 extern void show_usage(void)
 {
        const char *format_string;
index 0250e4c108ccee77d65c0b28c4e467e617d5724b..2872f1e38c0c6c0feaa9cc6ce12f0423d17830d3 100644 (file)
@@ -6,11 +6,6 @@
 #include <stdlib.h>
 #include "busybox.h"
 
-#undef APPLET
-#undef APPLET_NOUSAGE
-#undef PROTOTYPES
-#include "applets.h"
-
 #define bb_need_full_version
 #define BB_DECLARE_EXTERN
 #include "messages.c"
index 0250e4c108ccee77d65c0b28c4e467e617d5724b..2872f1e38c0c6c0feaa9cc6ce12f0423d17830d3 100644 (file)
--- a/busybox.c
+++ b/busybox.c
@@ -6,11 +6,6 @@
 #include <stdlib.h>
 #include "busybox.h"
 
-#undef APPLET
-#undef APPLET_NOUSAGE
-#undef PROTOTYPES
-#include "applets.h"
-
 #define bb_need_full_version
 #define BB_DECLARE_EXTERN
 #include "messages.c"
index f7f68cd8d91c27c6941c7c2468698de8affc67f2..8c59507cec8b510160618f033692ee867203ebf4 100644 (file)
        { 0,NULL,0 }
 };
 
-/* The -1 arises because of the {0,NULL,0,-1} entry above. */
-size_t NUM_APPLETS = (sizeof (applets) / sizeof (struct BB_applet) - 1);
-
 #endif