diff options
author | Jukka Jylänki <jujjyl@gmail.com> | 2013-12-19 18:10:29 +0200 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2013-12-19 18:10:29 +0200 |
commit | e98f5e310df4e255fc08213865f1cbd8e4d75d89 (patch) | |
tree | 6f52cb8c4679959b60c7ae204f4b5dcfb258a84c /tests/hello_world_exit.c | |
parent | 68bc17077e0919d369fe898631f7a2108487534a (diff) |
Implement command line passing to work to emrun when --emrun is passed.
Diffstat (limited to 'tests/hello_world_exit.c')
-rw-r--r-- | tests/hello_world_exit.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/hello_world_exit.c b/tests/hello_world_exit.c index febecc65..8932caf2 100644 --- a/tests/hello_world_exit.c +++ b/tests/hello_world_exit.c @@ -1,7 +1,13 @@ #include<stdio.h> #include<stdlib.h> -int main() { +int main(int argc, char **argv) { + printf("argc: %d\n", argc); + for(int i = 0; i < argc; ++i) { + printf("argv[%d]: %s\n", i, argv[i]); + } + if (argc <= 1) + exit(1); printf("hello, world!\n"); fprintf(stderr, "hello, error stream!\n"); exit(100); |