aboutsummaryrefslogtreecommitdiff
path: root/include/busybox.h
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-02-14 21:23:06 +0000
committerEric Andersen <andersen@codepoet.org>2001-02-14 21:23:06 +0000
commit67991cf824f8df27e74c92d754fb507681c69ce6 (patch)
treea0b652f3dc794d1050c1a8de3afb014a621238fa /include/busybox.h
parent68be2ab914e1e20fe666bbd22a89a18714be2789 (diff)
downloadbusybox-67991cf824f8df27e74c92d754fb507681c69ce6.tar.gz
This patch, put together by Manuel Novoa III, is a merge of work
done by Evin Robertson (bug#1105) and work from Manuel to make usage messages occupy less space and simplify how usage messages are displayed.
Diffstat (limited to 'include/busybox.h')
-rw-r--r--include/busybox.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/busybox.h b/include/busybox.h
index 39580b548..aef537b2b 100644
--- a/include/busybox.h
+++ b/include/busybox.h
@@ -72,7 +72,7 @@ struct BB_applet {
const char* name;
int (*main)(int argc, char** argv);
enum Location location;
- const char* usage;
+ int usage_index;
};
/* From busybox.c */
extern const struct BB_applet applets[];
@@ -87,9 +87,15 @@ extern const struct BB_applet applets[];
#include "applets.h"
#undef PROTOTYPES
+#define APPLET_ENUM
+enum APPLET_INDEX_NUMBERS {
+#include "applets.h"
+};
+#undef APPLET_ENUM
+
extern const char *applet_name;
-extern void usage(const char *usage) __attribute__ ((noreturn));
+extern void show_usage(void) __attribute__ ((noreturn));
extern void error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2)));
extern void error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2)));
extern void perror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2)));
@@ -153,6 +159,7 @@ extern FILE *wfopen(const char *path, const char *mode);
extern FILE *xfopen(const char *path, const char *mode);
extern void chomp(char *s);
extern struct BB_applet *find_applet_by_name(const char *name);
+void run_applet_by_name(const char *name, int argc, char **argv);
#ifndef DMALLOC
extern void *xmalloc (size_t size);