Koba Tsveniashvily wrote in a message to All:
KT> Hi every1. Whats up?
Hi there,
KT> The problem occurs when the buffer size is over 60000 bytes. Does
KT> fread or fwrite have some limitations? Plz help.
KT> Plz Plz Plz help.
Well, it's probably related to some unknown characters in your text. Just
compile this little program, and it will work (may need some work!!):
var InF: File;
OutF: File;
Buffer: Array[0..(8*1024)-1] of Byte;
Numread: Word;
begin
Assign(InF, 'TC30.ARJ');
Reset(InF, 1);
Assign(OutF, 'TEST.ARJ');
ReWrite(OutF, 1);
While NOT Eof(InF) do
begin
BlockRead(InF, Buffer, SizeOf(Buffer), NumRead);
BlockWrite(OUtF, Buffer, NumRead);
end; { while }
Close(InF);
Close(OutF);
end.
KT> #include
KT> #include
KT> #include
KT> while(fsize)
KT> {
KT> fread(buf,buf_num,1,in);
KT> fwrite(buf,buf_num,1,out);
Groetjes / Cheerio,
Maarten Bekers [Author of EleBBS, elevator@wxs.nl]
--- timEd 1.10
---------------
* Origin: EleBBS (RA-Clone) info: http://home.wxs.nl/~elevator (2:285/233.5)
|