diff toys/oneit.c @ 237:7cb15eae1664

Zap toylist.h, moving contents of global structures into DEFINE_GLOBALS() macros in each C file, and making generated/globals.h from that. Rename "toy" to "this" along the way to avoid toy/toys confusion.
author Rob Landley <rob@landley.net>
date Sun, 20 Jan 2008 17:25:44 -0600
parents 163498bf547b
children 93223118c813
line wrap: on
line diff
--- a/toys/oneit.c	Sat Jan 19 17:55:45 2008 -0600
+++ b/toys/oneit.c	Sun Jan 20 17:25:44 2008 -0600
@@ -29,6 +29,12 @@
 #include "toys.h"
 #include <sys/reboot.h>
 
+DEFINE_GLOBALS(
+	char *console;
+)
+
+#define TT this.oneit
+
 // The minimum amount of work necessary to get ctrl-c and such to work is:
 //
 // - Fork a child (PID 1 is special: can't exit, has various signals blocked).
@@ -39,7 +45,6 @@
 // PID 1 then reaps zombies until the child process it spawned exits, at which
 // point it calls sync() and reboot().  I could stick a kill -1 in there.
 
-#define TT toy.oneit
 
 void oneit_main(void)
 {