Fix compiling with Watcom 11.

This commit is contained in:
2020-05-03 02:46:36 +01:00
parent 7ae241b6a5
commit f0c12e64ab
4 changed files with 25 additions and 38 deletions

View File

@@ -1089,12 +1089,12 @@ void Links(const char *path)
void MillionFiles(const char *path)
{
char driveNo = path[0] - '@';
int rc = 0;
char filename[9];
unsigned long long pos = 0;
int handle;
unsigned total;
char driveNo = path[0] - '@';
int rc = 0;
char filename[9];
unsigned long pos = 0;
int handle;
unsigned total;
if(driveNo > 32) driveNo -= 32;
@@ -1113,7 +1113,7 @@ void MillionFiles(const char *path)
printf("Creating lots of files.\n");
for(pos = 0; pos < 100000ULL; pos++)
for(pos = 0; pos < 100000; pos++)
{
memset(&filename, 0, 9);
sprintf(&filename, "%08llu", pos);

View File

@@ -1670,12 +1670,12 @@ void Sparse(const char *path)
void MillionFiles(const char *path)
{
char drivePath[4];
USHORT rc = 0;
char filename[9];
unsigned long long pos = 0;
USHORT actionTaken = 0;
HFILE handle;
char drivePath[4];
USHORT rc = 0;
char filename[9];
unsigned long pos = 0;
USHORT actionTaken = 0;
HFILE handle;
drivePath[0] = path[0];
drivePath[1] = ':';
@@ -1702,7 +1702,7 @@ void MillionFiles(const char *path)
printf("Creating lots of files.\n");
for(pos = 0; pos < 100000ULL; pos++)
for(pos = 0; pos < 100000; pos++)
{
memset(&filename, 0, 9);
sprintf(&filename, "%08llu", pos);
@@ -1719,7 +1719,7 @@ void MillionFiles(const char *path)
DosClose(handle);
}
printf("\tCreated %llu files\n", pos);
printf("\tCreated %lu files\n", pos);
}
void DeleteFiles(const char *path)

View File

@@ -44,19 +44,6 @@ Copyright (C) 2011-2020 Natalia Portillo
#define FSAT_LOCALDRV 3 /* Local drive */
#define FSAT_REMOTEDRV 4 /* Remote drive attached to FSD */
/* Cannot be used directly must be traversed manually, at least with OpenWatcom 1.8 */
typedef struct _FSQBUFFER /* fsqbuf Data structure for QFSAttach */
{
USHORT iType; /* Item type */
USHORT cbName; /* Length of item name, sans NULL */
UCHAR szName[1]; /* ASCIIZ item name */
USHORT cbFSDName; /* Length of FSD name, sans NULL */
UCHAR szFSDName[1]; /* ASCIIZ FSD name */
USHORT cbFSAData; /* Length of FSD Attach data returned */
UCHAR rgFSAData[1]; /* FSD Attach data from FSD */
} FSQBUFFER;
typedef FSQBUFFER *PFSQBUFFER;
unsigned char CommentsEA[72] = {
0x45, 0x00, 0x00, 0x00, 0x00, 0x09, 0x33, 0x00, 0x2E, 0x43, 0x4F, 0x4D, 0x4D, 0x45, 0x4E, 0x54, 0x53, 0x00,
0xFD, 0xFF, 0x2E, 0x00, 0x54, 0x68, 0x69, 0x73, 0x20, 0x45, 0x41, 0x20, 0x63, 0x6F, 0x6E, 0x74, 0x61, 0x69,

View File

@@ -61,7 +61,7 @@ void GetOsInfo()
return;
}
if(aulBuffer[0] = 20)
if(aulBuffer[0] == 20)
{
MajorVer = aulBuffer[1] / 10;
MinorVer = aulBuffer[1] % 10;
@@ -1593,12 +1593,12 @@ void Links(const char *path)
void MillionFiles(const char *path)
{
char drivePath[4];
APIRET rc = 0;
char filename[9];
unsigned long long pos = 0;
ULONG actionTaken = 0;
HFILE handle;
char drivePath[4];
APIRET rc = 0;
char filename[9];
unsigned long pos = 0;
ULONG actionTaken = 0;
HFILE handle;
drivePath[0] = path[0];
drivePath[1] = ':';
@@ -1625,10 +1625,10 @@ void MillionFiles(const char *path)
printf("Creating lots of files.\n");
for(pos = 0; pos < 100000ULL; pos++)
for(pos = 0; pos < 100000; pos++)
{
memset(&filename, 0, 9);
sprintf(&filename, "%08d", pos);
sprintf(&filename, "%08lu", pos);
rc = DosOpen(&filename,
&handle,
&actionTaken,
@@ -1642,7 +1642,7 @@ void MillionFiles(const char *path)
DosClose(handle);
}
printf("\tCreated %llu files\n", pos);
printf("\tCreated %lu files\n", pos);
}
void DeleteFiles(const char *path)