Edited some stuff in wc and mv

This commit is contained in:
qorg11 2020-07-28 12:46:55 +02:00
parent bb78561f7f
commit a1f38d5892
No known key found for this signature in database
GPG Key ID: 343FC20A4ACA62B9
2 changed files with 7 additions and 3 deletions

View File

@ -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)
{

View File

@ -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);