comparison main.c @ 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 571623c6765d
children 7cb15eae1664
comparison
equal deleted inserted replaced
233:d4176f3f3835 234:163498bf547b
12 #undef OLDTOY 12 #undef OLDTOY
13 #define NEWTOY(name, opts, flags) {#name, name##_main, opts, flags}, 13 #define NEWTOY(name, opts, flags) {#name, name##_main, opts, flags},
14 #define OLDTOY(name, oldname, opts, flags) {#name, oldname##_main, opts, flags}, 14 #define OLDTOY(name, oldname, opts, flags) {#name, oldname##_main, opts, flags},
15 15
16 struct toy_list toy_list[] = { 16 struct toy_list toy_list[] = {
17 #include "toys/toylist.h" 17 #include "generated/newtoys.h"
18 }; 18 };
19 19
20 #define TOY_LIST_LEN (sizeof(toy_list)/sizeof(struct toy_list)) 20 #define TOY_LIST_LEN (sizeof(toy_list)/sizeof(struct toy_list))
21 21
22 // global context for this applet. 22 // global context for this applet.
57 #undef NEWTOY 57 #undef NEWTOY
58 #undef OLDTOY 58 #undef OLDTOY
59 #define NEWTOY(name, opts, flags) opts || 59 #define NEWTOY(name, opts, flags) opts ||
60 #define OLDTOY(name, oldname, opts, flags) opts || 60 #define OLDTOY(name, oldname, opts, flags) opts ||
61 static const int NEED_OPTIONS = 61 static const int NEED_OPTIONS =
62 #include "toys/toylist.h" 62 #include "generated/newtoys.h"
63 0; // Ends the opts || opts || opts... 63 0; // Ends the opts || opts || opts...
64 64
65 void toy_init(struct toy_list *which, char *argv[]) 65 void toy_init(struct toy_list *which, char *argv[])
66 { 66 {
67 // Free old toys contents here? 67 // Free old toys contents here?