aboutsummaryrefslogtreecommitdiff
path: root/toys.h
diff options
context:
space:
mode:
authorlandley <landley@driftwood>2006-09-28 17:18:51 -0400
committerlandley <landley@driftwood>2006-09-28 17:18:51 -0400
commitc56215062c961402515daeef8330ed75cd94af29 (patch)
tree7d29fd9f966e8392c180ec7a918d52b5ffb6a299 /toys.h
parent13bab2f09e9189c2b1e83ae37a1134108f9479cf (diff)
downloadtoybox-c56215062c961402515daeef8330ed75cd94af29.tar.gz
Next snapshot. Tries to grab something out of lib in order to build, I have
an empty "blah.c" in there to make it happy but I'm not checking that in.
Diffstat (limited to 'toys.h')
-rw-r--r--toys.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/toys.h b/toys.h
new file mode 100644
index 00000000..ec1ad762
--- /dev/null
+++ b/toys.h
@@ -0,0 +1,48 @@
+/* vi: set ts=4 :*/
+/* Toybox infrastructure.
+ *
+ * Copyright 2006 Rob Landley <rob@landley.net>
+ *
+ * Licensed under GPL version 2, see file LICENSE in this tarball for details.
+ */
+
+#include <stdio.h>
+#include <strings.h>
+
+/*
+name
+main()
+struct
+usage (short long example info)
+path (/usr/sbin)
+*/
+
+int toybox_main(void);
+int toysh_main(void);
+int df_main(void);
+
+extern struct toy_list {
+ char *name;
+ int (*toy_main)(void);
+} toy_list[];
+struct toy_list *find_toy_by_name(char *name);
+
+// Global context for this applet.
+
+extern struct toy_context {
+ struct toy_list *which;
+ int argc;
+ char **argv;
+ char buf[4096];
+} toys;
+
+struct toybox_data {;};
+struct toysh_data {;};
+struct df_data {;};
+
+union toy_union {
+ struct toybox_data toybox;
+ struct toysh_data toysh;
+ struct df_data df;
+} toy;
+