From 7c04f01bc73082a170c9a1988bf62c2428acc4f9 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 20 Jan 2008 19:00:16 -0600 Subject: Fluff out hello.c to supply more example code as a skeleton for new commands, and update a chunk of code.html (much more to do there). --- toys/hello.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'toys') diff --git a/toys/hello.c b/toys/hello.c index a8caeefe..e5d78f6a 100644 --- a/toys/hello.c +++ b/toys/hello.c @@ -7,7 +7,7 @@ * Not in SUSv3. * See http://www.opengroup.org/onlinepubs/009695399/utilities/ -USE_HELLO(NEWTOY(hello, NULL, TOYFLAG_USR|TOYFLAG_BIN)) +USE_HELLO(NEWTOY(hello, "e@d*c#b:a", TOYFLAG_USR|TOYFLAG_BIN)) config HELLO bool "hello" @@ -21,6 +21,19 @@ config HELLO #include "toys.h" +// Hello doesn't use these globals, they're here for example/skeleton purposes. + +DEFINE_GLOBALS( + char *b_string; + long c_number; + struct arg_list *d_list; + long e_count; + + int more_globals; +) + +#define TT this.hello + void hello_main(void) { printf("Hello world\n"); -- cgit v1.2.3