Mail Archives: djgpp-workers/2001/07/13/20:39:00
> According to Andrew Cottrell:
> > I will have written an app to create an approx 3GB file and the results
are
> > with the changes outlined above included in the io\_*.c files:
> > Windows 98 FAT32 partition exe running on Windows 98 - OK 12/07/2001
> > 09:28p 2,946,776,700 TEST.BIN
> > Windows 2000 NTFS partition exe running on Windows 2000 - OKAY
> > 12/07/2001 09:22p 2,946,776,700 TEST.BIN
> > Windows 2000 FAT32 partition with exe running on Windows 2000 - OKAY
> > 12/07/2001 09:15p 2,946,776,700 TEST.BIN
> >
> > It all looks okay for writing a file > 2GB with the mods. If the mod
failed
> > what should have I seen?
>
> Have I understood you correctly that if you on WINDOZE 2k open a file
> on a FAT32 file system without the extended bit set, you can still
> write more than 2.5GiB to it?
>
> If so, amazing! But good for us.
>
> > The app uses fprintf to write in text mode 5,000 bytes of ASCII spaces
at a
> > time to the test.bin file. I hope I don't haev to do this again as it
takes
> > a long time to do on my Win98 box.
>
> You probably won't have to test it on a WINDOZE 98 box as I have one
> (except if you really want to).
Thanks.
I thought I should send the source for teh app I wrote that generated the
file just in case I didn't set a correct flag when openning the file. Before
I ran the app I deleted the test.bin file.
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <conio.h>
#include <dos.h>
#include <dir.h>
#include <string.h>
char line_length_500[] =
" "
" "
" "
" "
" "
" "
" "
" "
" "
" ";
FILE * OutputFilePointer;
static void main_exit_cleanup()
{
if (OutputFilePointer)
{
fclose(OutputFilePointer);
OutputFilePointer = NULL;
}
}
int main(int argc, char *argv[])
{
char OutputFilename[] = "TEST.BIN\0";
unsigned long loop, file_size;
long counter;
atexit(main_exit_cleanup);
if ((OutputFilePointer = fopen("TEST.BIN", "ab"))==NULL)
{
fprintf(stderr, "Error: Cannot open %s\n\r", OutputFilename);
return (0);
}
file_size = 0;
counter = 0;
for (loop=0;;loop++)
{
if( file_size < (0xB0000000))
{
fprintf(OutputFilePointer,
"%s%s%s%s%s%s%s%s%s%s",
line_length_500,
line_length_500,
line_length_500,
line_length_500,
line_length_500,
line_length_500,
line_length_500,
line_length_500,
line_length_500,
line_length_500);
file_size += (sizeof(line_length_500)*10);
counter++;
if ((counter % (1000))==0)
{
printf("%d\n", file_size);
}
}
else
{
break;
}
}
fclose(OutputFilePointer);
OutputFilePointer = NULL;
return (0);
}
Andrew
- Raw text -