i can not into tab
This commit is contained in:
parent
ff1db80023
commit
5cb189ea37
@ -5,32 +5,32 @@
|
||||
static int
|
||||
process(char *name, struct timespec *ts)
|
||||
{
|
||||
FILE *file = fopen(name, "r");
|
||||
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;
|
||||
}
|
||||
if (file == 0){
|
||||
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);
|
||||
}
|
||||
int x;
|
||||
while ((x = fgetc(file)) != EOF) {
|
||||
printf("%c", x);
|
||||
nanosleep(ts, NULL);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
char *argv0;
|
||||
char *argv0;
|
||||
|
||||
struct timespec ts;
|
||||
ts.tv_sec = 0;
|
||||
ts.tv_nsec = 10 * 1000000;
|
||||
struct timespec ts;
|
||||
ts.tv_sec = 0;
|
||||
ts.tv_nsec = 10 * 1000000;
|
||||
|
||||
process(argv[1], &ts);
|
||||
process(argv[1], &ts);
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user