mirror of
https://github.com/aaru-dps/fstester.git
synced 2025-12-16 19:24:39 +00:00
Fix dereferencing strings.
This commit is contained in:
@@ -84,8 +84,8 @@ void DeleteFiles(const char* path)
|
||||
|
||||
for(pos = 0; pos < 64; pos++)
|
||||
{
|
||||
memset(&filename, 0, 9);
|
||||
sprintf((char*)filename, "%08d", pos);
|
||||
memset(filename, 0, 9);
|
||||
sprintf(filename, "%08d", pos);
|
||||
str255[0] = 8;
|
||||
memcpy(str255 + 1, filename, 8);
|
||||
|
||||
|
||||
@@ -78,8 +78,8 @@ void DirectoryDepth(const char* path)
|
||||
|
||||
while(!rc)
|
||||
{
|
||||
memset(&filename, 0, 9);
|
||||
sprintf((char*)filename, "%08d", pos);
|
||||
memset(filename, 0, 9);
|
||||
sprintf(filename, "%08d", pos);
|
||||
str255[0] = 8;
|
||||
memcpy(str255 + 1, filename, 8);
|
||||
|
||||
|
||||
@@ -100,8 +100,8 @@ void Filenames(const char* path)
|
||||
rc = HOpenDF(refNum, dirId, str255, 0, &refFile);
|
||||
if(!rc)
|
||||
{
|
||||
memset(&message, 0, 300);
|
||||
sprintf((char*)message, FILENAME_FORMAT, filenames[pos]);
|
||||
memset(message, 0, 300);
|
||||
sprintf(message, FILENAME_FORMAT, filenames[pos]);
|
||||
count = strlen(message);
|
||||
wRc = FSWrite(refFile, &count, message);
|
||||
cRc = FSClose(refFile);
|
||||
|
||||
@@ -88,8 +88,8 @@ void MillionFiles(const char* path)
|
||||
|
||||
for(pos = 0; pos < 5000; pos++)
|
||||
{
|
||||
memset(&filename, 0, 9);
|
||||
sprintf((char*)filename, "%08d", pos);
|
||||
memset(filename, 0, 9);
|
||||
sprintf(filename, "%08d", pos);
|
||||
str255[0] = 8;
|
||||
memcpy(str255 + 1, filename, 8);
|
||||
|
||||
|
||||
@@ -136,8 +136,8 @@ void Links(const char* path)
|
||||
|
||||
for(pos = 0; pos < 64; pos++)
|
||||
{
|
||||
memset(&filename, 0, 9);
|
||||
sprintf((char*)filename, "TARGET%02d", pos);
|
||||
memset(filename, 0, 9);
|
||||
sprintf(filename, "TARGET%02d", pos);
|
||||
str255[0] = 8;
|
||||
memcpy(str255 + 1, filename, 8);
|
||||
|
||||
@@ -158,8 +158,8 @@ void Links(const char* path)
|
||||
targetSpec.name[0] = 8;
|
||||
memcpy(targetSpec.name + 1, filename, 8);
|
||||
|
||||
memset(&filename, 0, 9);
|
||||
sprintf((char*)filename, "ALIAS_%02d", pos);
|
||||
memset(filename, 0, 9);
|
||||
sprintf(filename, "ALIAS_%02d", pos);
|
||||
memset(&aliasSpec, 0, sizeof(FSSpec));
|
||||
aliasSpec.vRefNum = refNum;
|
||||
aliasSpec.parID = dirId;
|
||||
|
||||
@@ -99,8 +99,8 @@ void Timestamps(const char* path)
|
||||
|
||||
if(!rc)
|
||||
{
|
||||
memset(&message, 0, 300);
|
||||
sprintf((char*)message, DATETIME_FORMAT, mac_times[i].message, mac_times[i].type);
|
||||
memset(message, 0, 300);
|
||||
sprintf(message, DATETIME_FORMAT, mac_times[i].message, mac_times[i].type);
|
||||
count = strlen(message);
|
||||
wRc = FSWrite(refFile, &count, message);
|
||||
cRc = FSClose(refFile);
|
||||
|
||||
@@ -89,9 +89,9 @@ void ExtendedAttributes(const char* path)
|
||||
eap.fpGEAList = NULL;
|
||||
eap.fpFEAList = (PFEALIST)&CommentsEA;
|
||||
eap.oError = 0;
|
||||
memset(&message, 0, 300);
|
||||
sprintf(&message, "This files has an optional .COMMENTS EA\n");
|
||||
wRc = DosWrite(handle, &message, strlen(message), &actionTaken);
|
||||
memset(message, 0, 300);
|
||||
sprintf(message, "This files has an optional .COMMENTS EA\n");
|
||||
wRc = DosWrite(handle, message, strlen(message), &actionTaken);
|
||||
rc = DosSetFileInfo(handle, 2, (PBYTE)&eap, sizeof(EAOP));
|
||||
cRc = DosClose(handle);
|
||||
}
|
||||
@@ -112,9 +112,9 @@ void ExtendedAttributes(const char* path)
|
||||
eap.fpGEAList = NULL;
|
||||
eap.fpFEAList = (PFEALIST)&CommentsEACritical;
|
||||
eap.oError = 0;
|
||||
memset(&message, 0, 300);
|
||||
sprintf(&message, "This files has a critical .COMMENTS EA\n");
|
||||
wRc = DosWrite(handle, &message, strlen(message), &actionTaken);
|
||||
memset(message, 0, 300);
|
||||
sprintf(message, "This files has a critical .COMMENTS EA\n");
|
||||
wRc = DosWrite(handle, message, strlen(message), &actionTaken);
|
||||
rc = DosSetFileInfo(handle, 2, (PBYTE)&eap, sizeof(EAOP));
|
||||
cRc = DosClose(handle);
|
||||
}
|
||||
@@ -135,9 +135,9 @@ void ExtendedAttributes(const char* path)
|
||||
eap.fpGEAList = NULL;
|
||||
eap.fpFEAList = (PFEALIST)&IconEA;
|
||||
eap.oError = 0;
|
||||
memset(&message, 0, 300);
|
||||
sprintf(&message, "This files has an optional .ICON EA\n");
|
||||
wRc = DosWrite(handle, &message, strlen(message), &actionTaken);
|
||||
memset(message, 0, 300);
|
||||
sprintf(message, "This files has an optional .ICON EA\n");
|
||||
wRc = DosWrite(handle, message, strlen(message), &actionTaken);
|
||||
rc = DosSetFileInfo(handle, 2, (PBYTE)&eap, sizeof(EAOP));
|
||||
cRc = DosClose(handle);
|
||||
}
|
||||
|
||||
@@ -75,9 +75,9 @@ void DeleteFiles(const char* path)
|
||||
|
||||
for(pos = 0; pos < 64; pos++)
|
||||
{
|
||||
memset(&filename, 0, 9);
|
||||
sprintf(&filename, "%X", pos);
|
||||
rc = DosOpen(&filename,
|
||||
memset(filename, 0, 9);
|
||||
sprintf(filename, "%X", pos);
|
||||
rc = DosOpen(filename,
|
||||
&handle,
|
||||
&actionTaken,
|
||||
0,
|
||||
@@ -88,6 +88,6 @@ void DeleteFiles(const char* path)
|
||||
if(rc) break;
|
||||
|
||||
DosClose(handle);
|
||||
__os2_delete(&filename);
|
||||
__os2_delete(filename);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,8 +73,8 @@ void DirectoryDepth(const char* path)
|
||||
|
||||
while(!rc)
|
||||
{
|
||||
memset(&filename, 0, 9);
|
||||
sprintf(&filename, "%08d", pos);
|
||||
memset(filename, 0, 9);
|
||||
sprintf(filename, "%08d", pos);
|
||||
rc = __os2_mkdir(filename);
|
||||
|
||||
if(!rc) rc = __os2_chdir(filename);
|
||||
|
||||
@@ -86,9 +86,9 @@ void Filenames(const char* path)
|
||||
|
||||
if(!rc)
|
||||
{
|
||||
memset(&message, 0, 300);
|
||||
sprintf(&message, FILENAME_FORMAT, filenames[pos]);
|
||||
wRc = DosWrite(handle, &message, strlen(message), &actionTaken);
|
||||
memset(message, 0, 300);
|
||||
sprintf(message, FILENAME_FORMAT, filenames[pos]);
|
||||
wRc = DosWrite(handle, message, strlen(message), &actionTaken);
|
||||
cRc = DosClose(handle);
|
||||
}
|
||||
|
||||
|
||||
@@ -75,9 +75,9 @@ void MillionFiles(const char* path)
|
||||
|
||||
for(pos = 0; pos < 1000; pos++)
|
||||
{
|
||||
memset(&filename, 0, 9);
|
||||
sprintf(&filename, "%08llu", pos);
|
||||
rc = DosOpen(&filename,
|
||||
memset(filename, 0, 9);
|
||||
sprintf(filename, "%08llu", pos);
|
||||
rc = DosOpen(filename,
|
||||
&handle,
|
||||
&actionTaken,
|
||||
0,
|
||||
|
||||
@@ -101,8 +101,8 @@ void Timestamps(const char* path)
|
||||
status.ftimeCreation.hours = 23;
|
||||
status.ftimeCreation.minutes = 59;
|
||||
status.ftimeCreation.twosecs = 29;
|
||||
memset(&message, 0, 300);
|
||||
sprintf(&message,
|
||||
memset(message, 0, 300);
|
||||
sprintf(message,
|
||||
DATETIME_FORMAT,
|
||||
status.fdateCreation.year + 1980,
|
||||
status.fdateCreation.month,
|
||||
@@ -112,7 +112,7 @@ void Timestamps(const char* path)
|
||||
status.ftimeCreation.twosecs * 2,
|
||||
"creation");
|
||||
|
||||
wRc = DosWrite(handle, &message, strlen(message), &actionTaken);
|
||||
wRc = DosWrite(handle, message, strlen(message), &actionTaken);
|
||||
tRc = DosSetFileInfo(handle, 1, (PBYTE)&status, status_size);
|
||||
cRc = DosClose(handle);
|
||||
}
|
||||
@@ -137,8 +137,8 @@ void Timestamps(const char* path)
|
||||
status.ftimeCreation.hours = 0;
|
||||
status.ftimeCreation.minutes = 0;
|
||||
status.ftimeCreation.twosecs = 0;
|
||||
memset(&message, 0, 300);
|
||||
sprintf(&message,
|
||||
memset(message, 0, 300);
|
||||
sprintf(message,
|
||||
DATETIME_FORMAT,
|
||||
status.fdateCreation.year + 1980,
|
||||
status.fdateCreation.month,
|
||||
@@ -148,7 +148,7 @@ void Timestamps(const char* path)
|
||||
status.ftimeCreation.twosecs * 2,
|
||||
"creation");
|
||||
|
||||
wRc = DosWrite(handle, &message, strlen(message), &actionTaken);
|
||||
wRc = DosWrite(handle, message, strlen(message), &actionTaken);
|
||||
tRc = DosSetFileInfo(handle, 1, (PBYTE)&status, status_size);
|
||||
cRc = DosClose(handle);
|
||||
}
|
||||
@@ -173,8 +173,8 @@ void Timestamps(const char* path)
|
||||
status.ftimeCreation.hours = 23;
|
||||
status.ftimeCreation.minutes = 59;
|
||||
status.ftimeCreation.twosecs = 29;
|
||||
memset(&message, 0, 300);
|
||||
sprintf(&message,
|
||||
memset(message, 0, 300);
|
||||
sprintf(message,
|
||||
DATETIME_FORMAT,
|
||||
status.fdateCreation.year + 1980,
|
||||
status.fdateCreation.month,
|
||||
@@ -184,7 +184,7 @@ void Timestamps(const char* path)
|
||||
status.ftimeCreation.twosecs * 2,
|
||||
"creation");
|
||||
|
||||
wRc = DosWrite(handle, &message, strlen(message), &actionTaken);
|
||||
wRc = DosWrite(handle, message, strlen(message), &actionTaken);
|
||||
tRc = DosSetFileInfo(handle, 1, (PBYTE)&status, status_size);
|
||||
cRc = DosClose(handle);
|
||||
}
|
||||
@@ -209,8 +209,8 @@ void Timestamps(const char* path)
|
||||
status.ftimeCreation.hours = 0;
|
||||
status.ftimeCreation.minutes = 0;
|
||||
status.ftimeCreation.twosecs = 0;
|
||||
memset(&message, 0, 300);
|
||||
sprintf(&message,
|
||||
memset(message, 0, 300);
|
||||
sprintf(message,
|
||||
DATETIME_FORMAT,
|
||||
status.fdateCreation.year + 1980,
|
||||
status.fdateCreation.month,
|
||||
@@ -220,7 +220,7 @@ void Timestamps(const char* path)
|
||||
status.ftimeCreation.twosecs * 2,
|
||||
"creation");
|
||||
|
||||
wRc = DosWrite(handle, &message, strlen(message), &actionTaken);
|
||||
wRc = DosWrite(handle, message, strlen(message), &actionTaken);
|
||||
tRc = DosSetFileInfo(handle, 1, (PBYTE)&status, status_size);
|
||||
cRc = DosClose(handle);
|
||||
}
|
||||
@@ -245,8 +245,8 @@ void Timestamps(const char* path)
|
||||
status.ftimeLastWrite.hours = 23;
|
||||
status.ftimeLastWrite.minutes = 59;
|
||||
status.ftimeLastWrite.twosecs = 29;
|
||||
memset(&message, 0, 300);
|
||||
sprintf(&message,
|
||||
memset(message, 0, 300);
|
||||
sprintf(message,
|
||||
DATETIME_FORMAT,
|
||||
status.fdateLastWrite.year + 1980,
|
||||
status.fdateLastWrite.month,
|
||||
@@ -256,7 +256,7 @@ void Timestamps(const char* path)
|
||||
status.ftimeLastWrite.twosecs * 2,
|
||||
"last written");
|
||||
|
||||
wRc = DosWrite(handle, &message, strlen(message), &actionTaken);
|
||||
wRc = DosWrite(handle, message, strlen(message), &actionTaken);
|
||||
tRc = DosSetFileInfo(handle, 1, (PBYTE)&status, status_size);
|
||||
cRc = DosClose(handle);
|
||||
}
|
||||
@@ -281,8 +281,8 @@ void Timestamps(const char* path)
|
||||
status.ftimeLastWrite.hours = 0;
|
||||
status.ftimeLastWrite.minutes = 0;
|
||||
status.ftimeLastWrite.twosecs = 0;
|
||||
memset(&message, 0, 300);
|
||||
sprintf(&message,
|
||||
memset(message, 0, 300);
|
||||
sprintf(message,
|
||||
DATETIME_FORMAT,
|
||||
status.fdateLastWrite.year + 1980,
|
||||
status.fdateLastWrite.month,
|
||||
@@ -292,7 +292,7 @@ void Timestamps(const char* path)
|
||||
status.ftimeLastWrite.twosecs * 2,
|
||||
"last written");
|
||||
|
||||
wRc = DosWrite(handle, &message, strlen(message), &actionTaken);
|
||||
wRc = DosWrite(handle, message, strlen(message), &actionTaken);
|
||||
tRc = DosSetFileInfo(handle, 1, (PBYTE)&status, status_size);
|
||||
cRc = DosClose(handle);
|
||||
}
|
||||
@@ -317,8 +317,8 @@ void Timestamps(const char* path)
|
||||
status.ftimeLastWrite.hours = 23;
|
||||
status.ftimeLastWrite.minutes = 59;
|
||||
status.ftimeLastWrite.twosecs = 29;
|
||||
memset(&message, 0, 300);
|
||||
sprintf(&message,
|
||||
memset(message, 0, 300);
|
||||
sprintf(message,
|
||||
DATETIME_FORMAT,
|
||||
status.fdateLastWrite.year + 1980,
|
||||
status.fdateLastWrite.month,
|
||||
@@ -328,7 +328,7 @@ void Timestamps(const char* path)
|
||||
status.ftimeLastWrite.twosecs * 2,
|
||||
"last written");
|
||||
|
||||
wRc = DosWrite(handle, &message, strlen(message), &actionTaken);
|
||||
wRc = DosWrite(handle, message, strlen(message), &actionTaken);
|
||||
tRc = DosSetFileInfo(handle, 1, (PBYTE)&status, status_size);
|
||||
cRc = DosClose(handle);
|
||||
}
|
||||
@@ -353,8 +353,8 @@ void Timestamps(const char* path)
|
||||
status.ftimeLastWrite.hours = 0;
|
||||
status.ftimeLastWrite.minutes = 0;
|
||||
status.ftimeLastWrite.twosecs = 0;
|
||||
memset(&message, 0, 300);
|
||||
sprintf(&message,
|
||||
memset(message, 0, 300);
|
||||
sprintf(message,
|
||||
DATETIME_FORMAT,
|
||||
status.fdateLastWrite.year + 1980,
|
||||
status.fdateLastWrite.month,
|
||||
@@ -364,7 +364,7 @@ void Timestamps(const char* path)
|
||||
status.ftimeLastWrite.twosecs * 2,
|
||||
"last written");
|
||||
|
||||
wRc = DosWrite(handle, &message, strlen(message), &actionTaken);
|
||||
wRc = DosWrite(handle, message, strlen(message), &actionTaken);
|
||||
tRc = DosSetFileInfo(handle, 1, (PBYTE)&status, status_size);
|
||||
cRc = DosClose(handle);
|
||||
}
|
||||
@@ -389,8 +389,8 @@ void Timestamps(const char* path)
|
||||
status.ftimeLastAccess.hours = 23;
|
||||
status.ftimeLastAccess.minutes = 59;
|
||||
status.ftimeLastAccess.twosecs = 29;
|
||||
memset(&message, 0, 300);
|
||||
sprintf(&message,
|
||||
memset(message, 0, 300);
|
||||
sprintf(message,
|
||||
DATETIME_FORMAT,
|
||||
status.fdateLastAccess.year + 1980,
|
||||
status.fdateLastAccess.month,
|
||||
@@ -400,7 +400,7 @@ void Timestamps(const char* path)
|
||||
status.ftimeLastAccess.twosecs * 2,
|
||||
"last access");
|
||||
|
||||
wRc = DosWrite(handle, &message, strlen(message), &actionTaken);
|
||||
wRc = DosWrite(handle, message, strlen(message), &actionTaken);
|
||||
tRc = DosSetFileInfo(handle, 1, (PBYTE)&status, status_size);
|
||||
cRc = DosClose(handle);
|
||||
}
|
||||
@@ -425,8 +425,8 @@ void Timestamps(const char* path)
|
||||
status.ftimeLastAccess.hours = 0;
|
||||
status.ftimeLastAccess.minutes = 0;
|
||||
status.ftimeLastAccess.twosecs = 0;
|
||||
memset(&message, 0, 300);
|
||||
sprintf(&message,
|
||||
memset(message, 0, 300);
|
||||
sprintf(message,
|
||||
DATETIME_FORMAT,
|
||||
status.fdateLastAccess.year + 1980,
|
||||
status.fdateLastAccess.month,
|
||||
@@ -436,7 +436,7 @@ void Timestamps(const char* path)
|
||||
status.ftimeLastAccess.twosecs * 2,
|
||||
"last access");
|
||||
|
||||
wRc = DosWrite(handle, &message, strlen(message), &actionTaken);
|
||||
wRc = DosWrite(handle, message, strlen(message), &actionTaken);
|
||||
tRc = DosSetFileInfo(handle, 1, (PBYTE)&status, status_size);
|
||||
cRc = DosClose(handle);
|
||||
}
|
||||
@@ -461,8 +461,8 @@ void Timestamps(const char* path)
|
||||
status.ftimeLastAccess.hours = 23;
|
||||
status.ftimeLastAccess.minutes = 59;
|
||||
status.ftimeLastAccess.twosecs = 29;
|
||||
memset(&message, 0, 300);
|
||||
sprintf(&message,
|
||||
memset(message, 0, 300);
|
||||
sprintf(message,
|
||||
DATETIME_FORMAT,
|
||||
status.fdateLastAccess.year + 1980,
|
||||
status.fdateLastAccess.month,
|
||||
@@ -472,7 +472,7 @@ void Timestamps(const char* path)
|
||||
status.ftimeLastAccess.twosecs * 2,
|
||||
"last access");
|
||||
|
||||
wRc = DosWrite(handle, &message, strlen(message), &actionTaken);
|
||||
wRc = DosWrite(handle, message, strlen(message), &actionTaken);
|
||||
tRc = DosSetFileInfo(handle, 1, (PBYTE)&status, status_size);
|
||||
cRc = DosClose(handle);
|
||||
}
|
||||
@@ -497,8 +497,8 @@ void Timestamps(const char* path)
|
||||
status.ftimeLastAccess.hours = 0;
|
||||
status.ftimeLastAccess.minutes = 0;
|
||||
status.ftimeLastAccess.twosecs = 0;
|
||||
memset(&message, 0, 300);
|
||||
sprintf(&message,
|
||||
memset(message, 0, 300);
|
||||
sprintf(message,
|
||||
DATETIME_FORMAT,
|
||||
status.fdateLastAccess.year + 1980,
|
||||
status.fdateLastAccess.month,
|
||||
@@ -508,7 +508,7 @@ void Timestamps(const char* path)
|
||||
status.ftimeLastAccess.twosecs * 2,
|
||||
"last access");
|
||||
|
||||
wRc = DosWrite(handle, &message, strlen(message), &actionTaken);
|
||||
wRc = DosWrite(handle, message, strlen(message), &actionTaken);
|
||||
tRc = DosSetFileInfo(handle, 1, (PBYTE)&status, status_size);
|
||||
cRc = DosClose(handle);
|
||||
}
|
||||
@@ -537,8 +537,8 @@ void Timestamps(const char* path)
|
||||
status.ftimeLastAccess = status.ftimeCreation;
|
||||
status.fdateLastWrite = status.fdateCreation;
|
||||
status.ftimeLastWrite = status.ftimeCreation;
|
||||
memset(&message, 0, 300);
|
||||
sprintf(&message,
|
||||
memset(message, 0, 300);
|
||||
sprintf(message,
|
||||
DATETIME_FORMAT,
|
||||
status.fdateCreation.year + 1980,
|
||||
status.fdateCreation.month,
|
||||
@@ -548,7 +548,7 @@ void Timestamps(const char* path)
|
||||
status.ftimeCreation.twosecs * 2,
|
||||
"all");
|
||||
|
||||
wRc = DosWrite(handle, &message, strlen(message), &actionTaken);
|
||||
wRc = DosWrite(handle, message, strlen(message), &actionTaken);
|
||||
tRc = DosSetFileInfo(handle, 1, (PBYTE)&status, status_size);
|
||||
cRc = DosClose(handle);
|
||||
}
|
||||
@@ -577,8 +577,8 @@ void Timestamps(const char* path)
|
||||
status.ftimeLastAccess = status.ftimeCreation;
|
||||
status.fdateLastWrite = status.fdateCreation;
|
||||
status.ftimeLastWrite = status.ftimeCreation;
|
||||
memset(&message, 0, 300);
|
||||
sprintf(&message,
|
||||
memset(message, 0, 300);
|
||||
sprintf(message,
|
||||
DATETIME_FORMAT,
|
||||
status.fdateCreation.year + 1980,
|
||||
status.fdateCreation.month,
|
||||
@@ -588,7 +588,7 @@ void Timestamps(const char* path)
|
||||
status.ftimeCreation.twosecs * 2,
|
||||
"all");
|
||||
|
||||
wRc = DosWrite(handle, &message, strlen(message), &actionTaken);
|
||||
wRc = DosWrite(handle, message, strlen(message), &actionTaken);
|
||||
tRc = DosSetFileInfo(handle, 1, (PBYTE)&status, status_size);
|
||||
cRc = DosClose(handle);
|
||||
}
|
||||
@@ -617,8 +617,8 @@ void Timestamps(const char* path)
|
||||
status.ftimeLastAccess = status.ftimeCreation;
|
||||
status.fdateLastWrite = status.fdateCreation;
|
||||
status.ftimeLastWrite = status.ftimeCreation;
|
||||
memset(&message, 0, 300);
|
||||
sprintf(&message,
|
||||
memset(message, 0, 300);
|
||||
sprintf(message,
|
||||
DATETIME_FORMAT,
|
||||
status.fdateCreation.year + 1980,
|
||||
status.fdateCreation.month,
|
||||
@@ -628,7 +628,7 @@ void Timestamps(const char* path)
|
||||
status.ftimeCreation.twosecs * 2,
|
||||
"all");
|
||||
|
||||
wRc = DosWrite(handle, &message, strlen(message), &actionTaken);
|
||||
wRc = DosWrite(handle, message, strlen(message), &actionTaken);
|
||||
tRc = DosSetFileInfo(handle, 1, (PBYTE)&status, status_size);
|
||||
cRc = DosClose(handle);
|
||||
}
|
||||
@@ -657,8 +657,8 @@ void Timestamps(const char* path)
|
||||
status.ftimeLastAccess = status.ftimeCreation;
|
||||
status.fdateLastWrite = status.fdateCreation;
|
||||
status.ftimeLastWrite = status.ftimeCreation;
|
||||
memset(&message, 0, 300);
|
||||
sprintf(&message,
|
||||
memset(message, 0, 300);
|
||||
sprintf(message,
|
||||
DATETIME_FORMAT,
|
||||
status.fdateCreation.year + 1980,
|
||||
status.fdateCreation.month,
|
||||
@@ -668,7 +668,7 @@ void Timestamps(const char* path)
|
||||
status.ftimeCreation.twosecs * 2,
|
||||
"all");
|
||||
|
||||
wRc = DosWrite(handle, &message, strlen(message), &actionTaken);
|
||||
wRc = DosWrite(handle, &essage, strlen(message), &actionTaken);
|
||||
tRc = DosSetFileInfo(handle, 1, (PBYTE)&status, status_size);
|
||||
cRc = DosClose(handle);
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ void DeleteFiles(const char* path)
|
||||
|
||||
for(pos = 0; pos < 64; pos++)
|
||||
{
|
||||
memset(&filename, 0, 9);
|
||||
memset(filename, 0, 9);
|
||||
sprintf(filename, "%lX", pos);
|
||||
h = fopen(filename, "w+");
|
||||
if(h == NULL) { break; }
|
||||
|
||||
@@ -69,8 +69,8 @@ void DirectoryDepth(const char* path)
|
||||
|
||||
while(!ret)
|
||||
{
|
||||
memset(&filename, 0, 9);
|
||||
sprintf(&filename, "%08ld", pos);
|
||||
memset(filename, 0, 9);
|
||||
sprintf(filename, "%08ld", pos);
|
||||
ret = mkdir(filename, 0755);
|
||||
|
||||
if(!ret) ret = chdir(filename);
|
||||
|
||||
@@ -80,10 +80,10 @@ void Filenames(const char* path)
|
||||
if(!h) { rc = errno; }
|
||||
else
|
||||
{
|
||||
memset(&message, 0, 300);
|
||||
sprintf((char*)&message, FILENAME_FORMAT, filenames[pos]);
|
||||
memset(message, 0, 300);
|
||||
sprintf(message, FILENAME_FORMAT, filenames[pos]);
|
||||
|
||||
ret = fprintf(h, (const char*)&message);
|
||||
ret = fprintf(h, message);
|
||||
if(ret < 0) { wRc = errno; }
|
||||
|
||||
ret = fclose(h);
|
||||
|
||||
@@ -71,7 +71,7 @@ void MillionFiles(const char* path)
|
||||
|
||||
for(pos = 0; pos < 1000; pos++)
|
||||
{
|
||||
memset(&filename, 0, 9);
|
||||
memset(filename, 0, 9);
|
||||
sprintf(filename, "%08ld", pos);
|
||||
|
||||
h = fopen(filename, "w+");
|
||||
|
||||
@@ -83,8 +83,8 @@ void Timestamps(const char* path)
|
||||
if(h == NULL) { rc = errno; }
|
||||
else
|
||||
{
|
||||
memset(&message, 0, 300);
|
||||
sprintf((char*)message, DATETIME_FORMAT, MAXDATETIME, "access");
|
||||
memset(message, 0, 300);
|
||||
sprintf(message, DATETIME_FORMAT, MAXDATETIME, "access");
|
||||
times.actime = MAXTIMESTAMP;
|
||||
|
||||
ret = fprintf(h, message);
|
||||
@@ -107,8 +107,8 @@ void Timestamps(const char* path)
|
||||
if(h == NULL) { rc = errno; }
|
||||
else
|
||||
{
|
||||
memset(&message, 0, 300);
|
||||
sprintf((char*)message, DATETIME_FORMAT, MAXDATETIME, "modification");
|
||||
memset(message, 0, 300);
|
||||
sprintf(message, DATETIME_FORMAT, MAXDATETIME, "modification");
|
||||
times.modtime = MAXTIMESTAMP;
|
||||
|
||||
ret = fprintf(h, message);
|
||||
@@ -131,8 +131,8 @@ void Timestamps(const char* path)
|
||||
if(h == NULL) { rc = errno; }
|
||||
else
|
||||
{
|
||||
memset(&message, 0, 300);
|
||||
sprintf((char*)message, DATETIME_FORMAT, MINDATETIME, "access");
|
||||
memset(message, 0, 300);
|
||||
sprintf(message, DATETIME_FORMAT, MINDATETIME, "access");
|
||||
times.actime = MINTIMESTAMP;
|
||||
|
||||
ret = fprintf(h, message);
|
||||
@@ -155,8 +155,8 @@ void Timestamps(const char* path)
|
||||
if(h == NULL) { rc = errno; }
|
||||
else
|
||||
{
|
||||
memset(&message, 0, 300);
|
||||
sprintf((char*)message, DATETIME_FORMAT, MINDATETIME, "modification");
|
||||
memset(message, 0, 300);
|
||||
sprintf(message, DATETIME_FORMAT, MINDATETIME, "modification");
|
||||
times.modtime = MINTIMESTAMP;
|
||||
|
||||
ret = fprintf(h, message);
|
||||
@@ -179,8 +179,8 @@ void Timestamps(const char* path)
|
||||
if(h == NULL) { rc = errno; }
|
||||
else
|
||||
{
|
||||
memset(&message, 0, 300);
|
||||
sprintf((char*)message, DATETIME_FORMAT, Y1KDATETIME, "access");
|
||||
memset(message, 0, 300);
|
||||
sprintf(message, DATETIME_FORMAT, Y1KDATETIME, "access");
|
||||
times.actime = Y1KTIMESTAMP;
|
||||
|
||||
ret = fprintf(h, message);
|
||||
@@ -203,8 +203,8 @@ void Timestamps(const char* path)
|
||||
if(h == NULL) { rc = errno; }
|
||||
else
|
||||
{
|
||||
memset(&message, 0, 300);
|
||||
sprintf((char*)message, DATETIME_FORMAT, Y1KDATETIME, "modification");
|
||||
memset(message, 0, 300);
|
||||
sprintf(message, DATETIME_FORMAT, Y1KDATETIME, "modification");
|
||||
times.modtime = Y1KTIMESTAMP;
|
||||
|
||||
ret = fprintf(h, message);
|
||||
@@ -227,8 +227,8 @@ void Timestamps(const char* path)
|
||||
if(h == NULL) { rc = errno; }
|
||||
else
|
||||
{
|
||||
memset(&message, 0, 300);
|
||||
sprintf((char*)message, DATETIME_FORMAT, Y2KDATETIME, "access");
|
||||
memset(message, 0, 300);
|
||||
sprintf(message, DATETIME_FORMAT, Y2KDATETIME, "access");
|
||||
times.actime = Y2KTIMESTAMP;
|
||||
|
||||
ret = fprintf(h, message);
|
||||
@@ -251,8 +251,8 @@ void Timestamps(const char* path)
|
||||
if(h == NULL) { rc = errno; }
|
||||
else
|
||||
{
|
||||
memset(&message, 0, 300);
|
||||
sprintf((char*)message, DATETIME_FORMAT, Y1KDATETIME, "modification");
|
||||
memset(message, 0, 300);
|
||||
sprintf(message, DATETIME_FORMAT, Y1KDATETIME, "modification");
|
||||
times.modtime = Y2KTIMESTAMP;
|
||||
|
||||
ret = fprintf(h, message);
|
||||
@@ -275,8 +275,8 @@ void Timestamps(const char* path)
|
||||
if(h == NULL) { rc = errno; }
|
||||
else
|
||||
{
|
||||
memset(&message, 0, 300);
|
||||
sprintf((char*)message, DATETIME_FORMAT, LESSDATETIME, "access");
|
||||
memset(message, 0, 300);
|
||||
sprintf(message, DATETIME_FORMAT, LESSDATETIME, "access");
|
||||
times.actime = LESSTIMESTAMP;
|
||||
|
||||
ret = fprintf(h, message);
|
||||
@@ -299,8 +299,8 @@ void Timestamps(const char* path)
|
||||
if(h == NULL) { rc = errno; }
|
||||
else
|
||||
{
|
||||
memset(&message, 0, 300);
|
||||
sprintf((char*)message, DATETIME_FORMAT, LESSDATETIME, "modification");
|
||||
memset(message, 0, 300);
|
||||
sprintf(message, DATETIME_FORMAT, LESSDATETIME, "modification");
|
||||
times.modtime = LESSTIMESTAMP;
|
||||
|
||||
ret = fprintf(h, message);
|
||||
|
||||
Reference in New Issue
Block a user