view toys/hello.c @ 239:4f1ca01db000

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).
author Rob Landley <>
date Sun, 20 Jan 2008 19:00:16 -0600
parents 163498bf547b
children 157eab6dcdd2
line wrap: on
line source

/* vi: set sw=4 ts=4:
 * hello.c - A hello world program.
 * Copyright 2006 Rob Landley <>
 * Not in SUSv3.
 * See


config HELLO
	bool "hello"
	default y
	  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.

	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");