commit 1a374138eb19c36497084f08b07a87c327264347
parent 371c5f0803649496ebb1023dbbe0ac881a43fc26
Author: Marie <lordofthesquishies@gmail.com>
Date: Tue, 28 Jul 2020 08:37:08 -0400
improve ls (make it look cleaner)
Diffstat:
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/cat.c b/src/cat.c
@@ -27,10 +27,11 @@ main(int argc, char *argv[])
{
if(argc == 1)
cat(0,NULL);
- else for(int i = 1; i<argc;i++)
- {
+ else
+ for(int i = 1; i<argc;i++)
+ {
cat(1,argv[i]);
- }
+ }
return 0;
}
diff --git a/src/ls.c b/src/ls.c
@@ -23,11 +23,10 @@ main(int argc, char *argv[])
{
if(ent->d_name[0] == '.' && !all)
continue;
- printf("%s ",ent->d_name); /* TODO: sort, and do not display . and .. */
+ printf("%s\n",ent->d_name); /* TODO: sort, and do not display . and .. */
}
}
closedir(dir);
- printf("\n");
return 0;
}
diff --git a/src/touch.c b/src/touch.c
@@ -12,7 +12,7 @@ main(int argc, char *argv[])
return 1;
}
- int fd = creat(argv[1],0644);
+ int fd = creat(argv[1], 0644);
if(fd == -1)
{