[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gm2] IOChan.RawRead() returns fewer bytes than available

From: SiTex Graphics
Subject: Re: [Gm2] IOChan.RawRead() returns fewer bytes than available
Date: Tue, 27 Apr 2010 19:50:31 -0400

Hi Gaius,

There still seems to be a bug in RawRead().  I'm seeing a short read
exactly 16384 bytes into some files, which sounds like a buffer
size...  If I add code to handle the short reads, RawRead() still
fails to return the last section bytes in some files.

Where would I find the code that actually implements RawRead for a
rndfile (underneath all the ISO layers of abstraction)?


On Thu, Feb 25, 2010 at 11:46 AM, Gaius Mulley <address@hidden> wrote:
> SiTex Graphics <address@hidden> writes:
>> Hi Gaius,
>> The RawRead() function in GM2 exhibits some unexpected behavior
>> compared to the XDS and Stonybrook versions.  RawRead() sometimes
>> returns fewer than the number of bytes requested even when there are
>> more bytes remaining in the file.  I've attached a simple test module
>> which tries to read a file named test.dat.  Compile with
>> gm2 -fiso -fmakeall -o readtest readtest.mod
>> Every 16000-30000 bytes there is a short read.  I'm not sure if this
>> is a bug (does the ISO spec address this?), but it is unexpected.  I
>> have my own wrappers for all the file IO functions, and coding around
>> this behavior was simple enough once I discovered what was
>> happening.
> Hi Scott,
> thanks for the report - the standard doesn't mention short reads - so
> I suspect it should not happen.  I've fixed this now in the latest
> cvs,
> regards,
> Gaius

reply via email to

[Prev in Thread] Current Thread [Next in Thread]