Created
July 26, 2014 12:15
-
-
Save anonymous/6c7c4340e2a656b2066b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <tos.h> | |
void main(void) | |
{ | |
char name[20], line[200]; | |
int i, fd, err, err2, log; | |
log = Fcreate("L:\\atari.log", 0); | |
Dcreate("L:\\TEST"); | |
for (i=32; i<256; i++) { | |
sprintf(name, "L:\\TEST\\%02X_%c.TXT", i, i); | |
fd=Fcreate(name, 0); | |
err=fd<0; | |
if (!err) | |
err=Fclose(fd); | |
sprintf(line, "%02X - '%s' - %s\n", i, name, err?"error":"created"); | |
printf(line); | |
if (Fwrite(log, strlen(line), line)!=strlen(line)) | |
printf("Can't write to logfile"); | |
} | |
printf("Press Enter to start deletion of the files\n"); | |
Cconin(); | |
for (i=32; i<256; i++) { | |
sprintf(name, "L:\\TEST\\%02X_%c.TXT", i, i); | |
err=Fsfirst(name, 0); | |
err2=Fdelete(name); | |
sprintf(line, "%02X - '%s' - %s, %s\n", i, name, | |
err ? "not found" : "found", | |
err2 ? "error" : "deleted"); | |
printf(line); | |
if (Fwrite(log, strlen(line), line)!=strlen(line)) | |
printf("Can't write to logfile"); | |
} | |
Fclose(log); | |
exit(0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment