2 /* Toybox infrastructure.
4 * Copyright 2006 Rob Landley <rob@landley.net>
6 * Licensed under GPL version 2, see file LICENSE in this tarball for details.
22 int toybox_main(void);
25 #define TOYFLAG_USR (1<<0)
26 #define TOYFLAG_BIN (1<<1)
27 #define TOYFLAG_SBIN (1<<2)
28 #define TOYMASK_LOCATION ((1<<4)-1)
30 #define TOYFLAG_NOFORK (1<<4)
32 extern struct toy_list {
34 int (*toy_main)(void);
37 struct toy_list *toy_find(char *name);
38 void toy_init(struct toy_list *which, char *argv[]);
39 void toy_exec(char *argv[]);
41 // Global context for this applet.
43 extern struct toy_context {
44 struct toy_list *which; // Which entry in toy_list is this one?
45 int exitval; // Value error_exit feeds to exit()
53 struct toybox_data {;};
54 struct toysh_data {;};
58 struct exit_data exit;
60 struct toybox_data toybox;
61 struct toysh_data toysh;
65 // Pending the addition of menuconfig...
67 #define CFG_TOYS_FREE 0
69 #define CFG_TOYSH_TTY 0 // Terminal control
70 #define CFG_TOYSH_JOBCTL 0 // &, fg, bg, jobs. ctrl-z with tty.
71 #define CFG_TOYSH_FLOWCTL 0 // if, while, for, functions { }
72 #define CFG_TOYSH_ENVVARS 0 // Environment variables
73 #define CFG_TOYSH_LOCVARS 0 // Local, synthetic, fancy prompts, set, $?
74 #define CFG_TOYSH_PIPES 0 // Pipes and redirects: | > < >> << && || & () ;