[BusyBox] Complex patch to applets
Vladimir N. Oleynik
dzo at simtreas.ru
Sat Mar 17 17:52:51 UTC 2001
I move declare struct applet from busybox.c to applets.c.
Save little bytes (NUM_APPLETS const now).
I think, this best for use.
--w
vodz
-------------- next part --------------
diff -rbu busybox.orig/applets.c busybox/applets.c
--- busybox.orig/applets.c Sat Mar 17 15:58:42 2001
+++ busybox/applets.c Sat Mar 17 20:21:09 2001
@@ -29,11 +29,19 @@
#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)
{
diff -rbu busybox.orig/applets.h busybox/applets.h
--- busybox.orig/applets.h Sat Mar 17 15:54:57 2001
+++ busybox/applets.h Sat Mar 17 20:21:14 2001
@@ -435,8 +435,5 @@
#if !defined(PROTOTYPES) && !defined(MAKE_USAGE)
{ 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
diff -rbu busybox.orig/busybox.c busybox/busybox.c
--- busybox.orig/busybox.c Fri Mar 2 20:47:17 2001
+++ busybox/busybox.c Sat Mar 17 20:22:32 2001
@@ -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"
More information about the busybox
mailing list