needs moar knf

This commit is contained in:
Elliott Pardee 2015-06-07 04:54:52 -04:00
parent 5cb189ea37
commit 437f9c66e1

View File

@ -2,20 +2,22 @@
#include <stdio.h>
#include <stdlib.h>
static int process(char *name, struct timespec *ts);
static int
process(char *name, struct timespec *ts)
{
FILE *file = fopen(name, "r");
if (file == 0){
fprintf(stderr, "[err] you either gave me an invalid file, or no file at all");
return -1;
fprintf(stderr, "[err] you either gave me an invalid file, or no file at all");
return -1;
}
int x;
while ((x = fgetc(file)) != EOF) {
printf("%c", x);
nanosleep(ts, NULL);
printf("%c", x);
nanosleep(ts, NULL);
}
return 0;