k9core

Unnamed repository
Log | Files | Refs | LICENSE

commit a1f38d589250ce8c0329cd0694cf27d12866bade
parent bb78561f7f6142b0fecdb424d33e27f696d56ce4
Author: qorg11 <qorg@vxempire.xyz>
Date:   Tue, 28 Jul 2020 12:46:55 +0200

Edited some stuff in wc and mv

Diffstat:
Msrc/mv.c | 7+++++--
Msrc/wc.c | 3++-
2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/mv.c b/src/mv.c @@ -1,6 +1,9 @@ #include <stdio.h> -/* #include <unistd.h> - #include <fcntl.h> +#include <unistd.h> +#include <fcntl.h> + + +/* int move(const char *src, const char *dst) { diff --git a/src/wc.c b/src/wc.c @@ -1,4 +1,5 @@ #include <stdio.h> +#include <ctype.h> void wc(FILE *file) @@ -11,7 +12,7 @@ wc(FILE *file) bytes++; if(c == '\n') newlines++; - if(c == ' ') + if(isspace(c)) spaces++; } printf("%i %i %i\n",newlines,spaces,bytes);