From b1aaba1fc8176ac0b7c202a664d2554aa0967116 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 20 Jan 2008 17:25:44 -0600 Subject: 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. --- toys/netcat.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'toys/netcat.c') diff --git a/toys/netcat.c b/toys/netcat.c index ed7a8877..f5024c9b 100644 --- a/toys/netcat.c +++ b/toys/netcat.c @@ -33,7 +33,17 @@ config NETCAT #include "toys.h" #include "toynet.h" -#define TT toy.netcat +DEFINE_GLOBALS( + char *filename; // -f read from filename instead of network + long quit_delay; // -q Exit after EOF from stdin after # seconds. + char *source_address; // -s Bind to a specific source address. + long port; // -p Bind to a specific source port. + long listen; // -l Listen for connection instead of dialing out. + long wait; // -w Wait # seconds for a connection. + long delay; // -i delay between lines sent +) + +#define TT this.netcat static void timeout(int signum) { -- cgit v1.2.3