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.
21 #include <sys/statvfs.h>
22 #include <sys/types.h>
27 #include "gen_config.h"
28 #include "toys/toylist.h"
30 // These live in main.c
32 struct toy_list *toy_find(char *name);
33 void toy_init(struct toy_list *which, char *argv[]);
34 void toy_exec(char *argv[]);
36 // Global context for any applet.
38 extern struct toy_context {
39 struct toy_list *which; // Which entry in toy_list is this one?
40 int exitval; // Value error_exit feeds to exit()
41 char **argv; // Command line arguments
42 unsigned optflags; // Command line option flags from get_optflags()
43 char **optargs; // Arguments left over from get_optflags()
46 // One big temporary buffer, for use by applets (not library functions).