summaryrefslogtreecommitdiff
path: root/echo.c
diff options
context:
space:
mode:
authorrsc <rsc>2007-08-24 20:03:40 +0000
committerrsc <rsc>2007-08-24 20:03:40 +0000
commit1b789e1d50df4e7b98fa131fc29caf29a5f38bfa (patch)
treed3a2bd24a03aaede0a51b8e5938db6d55753e96a /echo.c
parent8e88f9e2c617cc1002039c6e37c3c831319b1f8f (diff)
downloadxv6-labs-1b789e1d50df4e7b98fa131fc29caf29a5f38bfa.tar.gz
xv6-labs-1b789e1d50df4e7b98fa131fc29caf29a5f38bfa.tar.bz2
xv6-labs-1b789e1d50df4e7b98fa131fc29caf29a5f38bfa.zip
Remove puts in favor of printf.
Allow multiple arguments to ls.
Diffstat (limited to 'echo.c')
-rw-r--r--echo.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/echo.c b/echo.c
index 7bf3a45..806dee0 100644
--- a/echo.c
+++ b/echo.c
@@ -7,10 +7,7 @@ main(int argc, char *argv[])
{
int i;
- for(i = 1; i < argc; i++){
- puts(argv[i]);
- puts(" ");
- }
- puts("\n");
+ for(i = 1; i < argc; i++)
+ printf(1, "%s%s", argv[i], i+1 < argc ? " " : "\n");
exit();
}