Mercurial > hg > toybox
annotate toys/hello.c @ 186:25447caf1b4b
Change command main() functions to return void, and exit(toys.exitval) from
the toybox infrastructure instead. Eliminates a return call from each command.
author | Rob Landley <rob@landley.net> |
---|---|
date | Thu, 29 Nov 2007 18:14:37 -0600 |
parents | d87d8a056295 |
children | 30a6db5a95c2 |
rev | line source |
---|---|
13
d87d8a056295
Add a hello world applet, partly as an example and partly for testing purposes.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
1 /* vi: set sw=4 ts=4: */ |
d87d8a056295
Add a hello world applet, partly as an example and partly for testing purposes.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
2 /* |
d87d8a056295
Add a hello world applet, partly as an example and partly for testing purposes.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
3 * hello.c - A hello world program. |
d87d8a056295
Add a hello world applet, partly as an example and partly for testing purposes.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
4 */ |
d87d8a056295
Add a hello world applet, partly as an example and partly for testing purposes.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
5 |
d87d8a056295
Add a hello world applet, partly as an example and partly for testing purposes.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
6 #include "toys.h" |
d87d8a056295
Add a hello world applet, partly as an example and partly for testing purposes.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
7 |
186
25447caf1b4b
Change command main() functions to return void, and exit(toys.exitval) from
Rob Landley <rob@landley.net>
parents:
13
diff
changeset
|
8 void hello_main(void) |
13
d87d8a056295
Add a hello world applet, partly as an example and partly for testing purposes.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
9 { |
d87d8a056295
Add a hello world applet, partly as an example and partly for testing purposes.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
10 printf("Hello world\n"); |
d87d8a056295
Add a hello world applet, partly as an example and partly for testing purposes.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
11 } |