view toys/hello.c @ 396:7ca3bef07f0d

Implement truncate.
author Rob Landley <rob@landley.net>
date Sun, 11 Dec 2011 03:58:43 -0600
parents 5d4dacab7be0
children f6ffc6685a9e
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://opengroup.org/onlinepubs/9699919799/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");
}