aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-03-19 19:30:24 +0000
committerEric Andersen <andersen@codepoet.org>2001-03-19 19:30:24 +0000
commit2ccfef2004675cc6cb18b9cdad1ebdaf892a10c2 (patch)
tree16b0e70cfb8994ee2249c77ba57cef3f56713d2d
parent23c1a18126aba2b2c3b5a818b826ae7f958cf4bd (diff)
downloadbusybox-w32-2ccfef2004675cc6cb18b9cdad1ebdaf892a10c2.tar.gz
busybox-w32-2ccfef2004675cc6cb18b9cdad1ebdaf892a10c2.tar.bz2
busybox-w32-2ccfef2004675cc6cb18b9cdad1ebdaf892a10c2.zip
Patch from Vladimir to move struct applet from busybox.c to applets.c,
which looks like the right place for such things to live.
-rw-r--r--applets.c8
-rw-r--r--applets.h3
-rw-r--r--applets/applets.c8
-rw-r--r--applets/busybox.c5
-rw-r--r--busybox.c5
-rw-r--r--include/applets.h3
6 files changed, 16 insertions, 16 deletions
diff --git a/applets.c b/applets.c
index 1e31e8925..515110372 100644
--- a/applets.c
+++ b/applets.c
@@ -29,12 +29,20 @@
29#include <stdlib.h> 29#include <stdlib.h>
30#include "busybox.h" 30#include "busybox.h"
31 31
32#undef APPLET
33#undef APPLET_NOUSAGE
34#undef PROTOTYPES
35#include "applets.h"
36
32#define bb_need_full_version 37#define bb_need_full_version
33#define BB_DECLARE_EXTERN 38#define BB_DECLARE_EXTERN
34#include "messages.c" 39#include "messages.c"
35 40
36struct BB_applet *applet_using; 41struct BB_applet *applet_using;
37 42
43/* The -1 arises because of the {0,NULL,0,-1} entry above. */
44const size_t NUM_APPLETS = (sizeof (applets) / sizeof (struct BB_applet) - 1);
45
38extern void show_usage(void) 46extern void show_usage(void)
39{ 47{
40 const char *format_string; 48 const char *format_string;
diff --git a/applets.h b/applets.h
index f7f68cd8d..8c59507ce 100644
--- a/applets.h
+++ b/applets.h
@@ -436,7 +436,4 @@
436 { 0,NULL,0 } 436 { 0,NULL,0 }
437}; 437};
438 438
439/* The -1 arises because of the {0,NULL,0,-1} entry above. */
440size_t NUM_APPLETS = (sizeof (applets) / sizeof (struct BB_applet) - 1);
441
442#endif 439#endif
diff --git a/applets/applets.c b/applets/applets.c
index 1e31e8925..515110372 100644
--- a/applets/applets.c
+++ b/applets/applets.c
@@ -29,12 +29,20 @@
29#include <stdlib.h> 29#include <stdlib.h>
30#include "busybox.h" 30#include "busybox.h"
31 31
32#undef APPLET
33#undef APPLET_NOUSAGE
34#undef PROTOTYPES
35#include "applets.h"
36
32#define bb_need_full_version 37#define bb_need_full_version
33#define BB_DECLARE_EXTERN 38#define BB_DECLARE_EXTERN
34#include "messages.c" 39#include "messages.c"
35 40
36struct BB_applet *applet_using; 41struct BB_applet *applet_using;
37 42
43/* The -1 arises because of the {0,NULL,0,-1} entry above. */
44const size_t NUM_APPLETS = (sizeof (applets) / sizeof (struct BB_applet) - 1);
45
38extern void show_usage(void) 46extern void show_usage(void)
39{ 47{
40 const char *format_string; 48 const char *format_string;
diff --git a/applets/busybox.c b/applets/busybox.c
index 0250e4c10..2872f1e38 100644
--- a/applets/busybox.c
+++ b/applets/busybox.c
@@ -6,11 +6,6 @@
6#include <stdlib.h> 6#include <stdlib.h>
7#include "busybox.h" 7#include "busybox.h"
8 8
9#undef APPLET
10#undef APPLET_NOUSAGE
11#undef PROTOTYPES
12#include "applets.h"
13
14#define bb_need_full_version 9#define bb_need_full_version
15#define BB_DECLARE_EXTERN 10#define BB_DECLARE_EXTERN
16#include "messages.c" 11#include "messages.c"
diff --git a/busybox.c b/busybox.c
index 0250e4c10..2872f1e38 100644
--- a/busybox.c
+++ b/busybox.c
@@ -6,11 +6,6 @@
6#include <stdlib.h> 6#include <stdlib.h>
7#include "busybox.h" 7#include "busybox.h"
8 8
9#undef APPLET
10#undef APPLET_NOUSAGE
11#undef PROTOTYPES
12#include "applets.h"
13
14#define bb_need_full_version 9#define bb_need_full_version
15#define BB_DECLARE_EXTERN 10#define BB_DECLARE_EXTERN
16#include "messages.c" 11#include "messages.c"
diff --git a/include/applets.h b/include/applets.h
index f7f68cd8d..8c59507ce 100644
--- a/include/applets.h
+++ b/include/applets.h
@@ -436,7 +436,4 @@
436 { 0,NULL,0 } 436 { 0,NULL,0 }
437}; 437};
438 438
439/* The -1 arises because of the {0,NULL,0,-1} entry above. */
440size_t NUM_APPLETS = (sizeof (applets) / sizeof (struct BB_applet) - 1);
441
442#endif 439#endif