aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--com32/samples/hello.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/com32/samples/hello.c b/com32/samples/hello.c
index 4b29901d..27fd7d53 100644
--- a/com32/samples/hello.c
+++ b/com32/samples/hello.c
@@ -20,21 +20,16 @@
#include <stdio.h>
#include <console.h>
-int main(void)
+int main(int argc, char *argv[])
{
- char buffer[1024];
+ int i;
openconsole(&dev_stdcon_r, &dev_stdcon_w);
printf("Hello, World!\n");
- for (;;) {
- printf("> ");
- fgets(buffer, sizeof buffer, stdin);
- if ( !strncmp(buffer, "exit", 4) )
- break;
- printf(": %s", buffer);
- }
+ for (i = 1; i < argc; i++)
+ printf("%s%c", argv[i], (i == argc-1) ? '\n' : ' ');
return 0;
}