Mercurial > hg > toybox
comparison toys/toylist.h @ 234:163498bf547b
Move NEWTOY() list from end of toylist.h to generated/newtoys.h.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 19 Jan 2008 17:43:27 -0600 |
parents | 31dc682c18ad |
children | 6b292ee780ab |
comparison
equal
deleted
inserted
replaced
233:d4176f3f3835 | 234:163498bf547b |
---|---|
2 /* Toybox infrastructure. | 2 /* Toybox infrastructure. |
3 * | 3 * |
4 * Copyright 2006 Rob Landley <rob@landley.net> | 4 * Copyright 2006 Rob Landley <rob@landley.net> |
5 */ | 5 */ |
6 | 6 |
7 | |
8 // Provide function declarations and structs. Note that main.c #includes this | |
9 // file twice (with different macros) to populate toy_list[]. | |
10 | |
11 #ifndef NEWTOY | |
12 #define NEWTOY(name, opts, flags) void name##_main(void); | |
13 #define OLDTOY(name, oldname, opts, flags) | |
14 | 7 |
15 struct df_data { | 8 struct df_data { |
16 struct arg_list *fstype; | 9 struct arg_list *fstype; |
17 | 10 |
18 long units; | 11 long units; |
124 char *name; | 117 char *name; |
125 void (*toy_main)(void); | 118 void (*toy_main)(void); |
126 char *options; | 119 char *options; |
127 int flags; | 120 int flags; |
128 } toy_list[]; | 121 } toy_list[]; |
129 | |
130 #endif | |
131 | |
132 // List of all the applets toybox can provide. | |
133 | |
134 // This one is out of order on purpose: it's the first element in the array. | |
135 | |
136 NEWTOY(toybox, NULL, 0) | |
137 | |
138 // The rest of these are alphabetical, for binary search. | |
139 | |
140 USE_BASENAME(NEWTOY(basename, "<1>2", TOYFLAG_BIN)) | |
141 USE_BZCAT(NEWTOY(bzcat, NULL, TOYFLAG_USR|TOYFLAG_BIN)) | |
142 USE_CATV(NEWTOY(catv, "vte", TOYFLAG_USR|TOYFLAG_BIN)) | |
143 USE_CHROOT(NEWTOY(chroot, "<1", TOYFLAG_USR|TOYFLAG_SBIN)) | |
144 USE_CHVT(NEWTOY(chvt, "<1", TOYFLAG_USR|TOYFLAG_SBIN)) | |
145 USE_COUNT(NEWTOY(count, NULL, TOYFLAG_USR|TOYFLAG_BIN)) | |
146 USE_TOYSH(NEWTOY(cd, NULL, TOYFLAG_NOFORK)) | |
147 USE_DF(NEWTOY(df, "Pkt*a", TOYFLAG_USR|TOYFLAG_SBIN)) | |
148 USE_DIRNAME(NEWTOY(dirname, "<1>1", TOYFLAG_BIN)) | |
149 USE_DMESG(NEWTOY(dmesg, "s#n#c", TOYFLAG_BIN)) | |
150 USE_ECHO(NEWTOY(echo, "+en", TOYFLAG_BIN)) | |
151 USE_TOYSH(NEWTOY(exit, NULL, TOYFLAG_NOFORK)) | |
152 USE_FALSE(NEWTOY(false, NULL, TOYFLAG_BIN)) | |
153 USE_HELLO(NEWTOY(hello, NULL, TOYFLAG_USR|TOYFLAG_BIN)) | |
154 USE_HELP(NEWTOY(help, "<1", TOYFLAG_BIN)) | |
155 USE_MKE2FS(NEWTOY(mke2fs, MKE2FS_OPTSTRING, TOYFLAG_SBIN)) | |
156 USE_MKFIFO(NEWTOY(mkfifo, "<1m:", TOYFLAG_BIN)) | |
157 USE_NETCAT(OLDTOY(nc, netcat, "i#w#l@p#s:q#f:e", TOYFLAG_BIN)) | |
158 USE_NETCAT(NEWTOY(netcat, "i#w#l@p#s:q#f:e", TOYFLAG_BIN)) | |
159 USE_ONEIT(NEWTOY(oneit, "+<1c:p", TOYFLAG_SBIN)) | |
160 USE_PATCH(NEWTOY(patch, "up#i:R", TOYFLAG_USR|TOYFLAG_BIN)) | |
161 USE_PWD(NEWTOY(pwd, NULL, TOYFLAG_BIN)) | |
162 USE_READLINK(NEWTOY(readlink, "<1f", TOYFLAG_BIN)) | |
163 USE_SED(NEWTOY(sed, "irne*", TOYFLAG_BIN)) | |
164 USE_TOYSH(OLDTOY(sh, toysh, "c:i", TOYFLAG_BIN)) | |
165 USE_SHA1SUM(NEWTOY(sha1sum, NULL, TOYFLAG_USR|TOYFLAG_BIN)) | |
166 USE_SLEEP(NEWTOY(sleep, "<1", TOYFLAG_BIN)) | |
167 USE_SYNC(NEWTOY(sync, NULL, TOYFLAG_BIN)) | |
168 USE_TOUCH(NEWTOY(touch, "l#t:r:mca", TOYFLAG_BIN)) | |
169 USE_TOYSH(NEWTOY(toysh, "c:i", TOYFLAG_BIN)) | |
170 USE_TRUE(NEWTOY(true, NULL, TOYFLAG_BIN)) | |
171 USE_TTY(NEWTOY(tty, "s", TOYFLAG_BIN)) | |
172 USE_WHICH(NEWTOY(which, "a", TOYFLAG_USR|TOYFLAG_BIN)) | |
173 USE_YES(NEWTOY(yes, NULL, TOYFLAG_USR|TOYFLAG_BIN)) |