aboutsummaryrefslogtreecommitdiff
path: root/toys.h
blob: ec1ad76244feec1d6ae9d3717695aaa913c37528 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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;