mirror of
https://github.com/aaru-dps/fstester.git
synced 2025-12-16 19:24:39 +00:00
Use int instead of long to count elements in Z80.
This commit is contained in:
@@ -36,7 +36,7 @@ void DirectoryDepth(const char* path)
|
||||
#ifdef USE_FOLDERS
|
||||
int ret;
|
||||
char filename[9];
|
||||
long pos = 0;
|
||||
int pos = 0;
|
||||
|
||||
printf("\nPlease insert the \"DEPTH\" disk.\n");
|
||||
printf("Press Y to continue,\n");
|
||||
@@ -48,7 +48,7 @@ void DirectoryDepth(const char* path)
|
||||
while(!ret)
|
||||
{
|
||||
memset(filename, 0, 9);
|
||||
sprintf(filename, "%08ld", pos);
|
||||
sprintf(filename, "%08d", pos);
|
||||
ret = mkdir(filename, 0755);
|
||||
|
||||
if(!ret) ret = chdir(filename);
|
||||
@@ -59,6 +59,6 @@ void DirectoryDepth(const char* path)
|
||||
if(pos >= 1000) break;
|
||||
}
|
||||
|
||||
printf("\tCreated %ld levels of directory hierarchy\n", pos);
|
||||
printf("\tCreated %d levels of directory hierarchy\n\n", pos);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ Copyright (C) 2011-2021 Natalia Portillo
|
||||
void MillionFiles(const char* path)
|
||||
{
|
||||
char filename[9];
|
||||
long pos = 0;
|
||||
int pos;
|
||||
FILE* h;
|
||||
int ret;
|
||||
|
||||
@@ -54,5 +54,5 @@ void MillionFiles(const char* path)
|
||||
fclose(h);
|
||||
}
|
||||
|
||||
printf("\tCreated %ld files\n", pos);
|
||||
printf("\tCreated %d files\n\n", pos);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user