Fix echo, shorten file size

This commit is contained in:
call-cc 2020-06-01 15:40:22 -04:00
parent 93016659c6
commit 602dd4047f
1 changed files with 1 additions and 2 deletions

View File

@ -1,10 +1,9 @@
#include <string.h>
#include <stdio.h> #include <stdio.h>
#include <unistd.h>
int int
main(int argc, char *argv[]) main(int argc, char *argv[])
{ {
++argv;
while(*argv) { while(*argv) {
(void)fputs(*argv, stdout); // Print argv (void)fputs(*argv, stdout); // Print argv
if(*++argv) putchar(' '); // If multiple things in argv, print a space between them. if(*++argv) putchar(' '); // If multiple things in argv, print a space between them.