view toys/hello.c @ 372:9051cb744d0a

Shut up even MORE gcc/glibc spurious warnings.
author Rob Landley <rob@landley.net>
date Wed, 06 Jan 2010 05:28:32 -0600
parents 157eab6dcdd2
children 5d4dacab7be0
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 n
	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");
}