view toys/hello.c @ 297:6e65eefc37e9 0.0.6

Announce 0.0.6 release. (A bit early, so the next FWL release can use it.)
author Rob Landley <rob@landley.net>
date Mon, 26 May 2008 16:07:16 -0500
parents 4f1ca01db000
children 157eab6dcdd2
line wrap: on
line source

/* vi: set sw=4 ts=4:
 *
 * hello.c - A hello world program.
 *
 * Copyright 2006 Rob Landley <rob@landley.net>
 *
 * Not in SUSv3.
 * See http://www.opengroup.org/onlinepubs/009695399/utilities/

USE_HELLO(NEWTOY(hello, "e@d*c#b:a", TOYFLAG_USR|TOYFLAG_BIN))

config HELLO
	bool "hello"
	default y
	help
	  A hello world program.  You don't need this.

	  Mostly used as an example/skeleton file for adding new commands,
	  occasionally nice to test kernel booting via "init=/bin/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");
}