osargs functions and 32 bit values

David J. Ruck druck at freeuk.com
Wed Aug 2 19:47:14 BST 2000


On 2 Aug 2000 Tony van der Hoff <OSLib at mk-net.demon.co.uk> wrote:

> On Tue, 1 Aug 2000, at 21:53:10, David J. Ruck <druck at freeuk.com> wrote
> on the subject "osargs functions and 32 bit values":
> 
> >Shouldn't all the OS_Args file pointer and extent calls use unsigned types,
> >bits rather than int ?
> >
> >And before anyone mentions it, FileCore may be limited to 2G max filesize,
> >bit FileSwitch allows 4G.
> >
> Yup, I guess you're right, Dave. What a pity we didn't spot it when we
> introduced wide file handles. I hardly dare mention this ;-) but in
> order to avoid breaking existing stuff, we appear to be looking at yet
> another set of functions along the lines of OSArgs_ReadPtrWU. Hmm...
> 
> How serious is the problem? Do any current filing systems allow 32-bit
> extents? 

Its not a big problem because it doesn't break anything, (unlike 8 bit
file handles), I just noticed because it flagged up a compiler warning
when I passed an unsigned integer - the low word of a 64bit class used
for disc addresses.

> Do any current filing systems allow 32-bit extents? 

None that I know of currently. The difference between 2G and 4G isn't
really that useful, it would be OK for things such a PC partitions, but
multimedia file handling needs far more than 4G.

> I think it was yourself who raised the prospect of a complete
> rewrite of FileCore in the future. This would undoubtedly change many
> interfaces, and maybe an update is best left 'till then.

With the lack of progress at RISC OS Ltd its more likely that a 64bit
capable file system will be ported to RISC OS (possibly one of those
being developed for Linux), and will provide a completely new API to deal
with the 64bit quantities. The legacy FileSwitch API will be supported, but
with file sizes limited to 2G - should be 4G but obviously there is a large
amount of code using signed values which would break.

Cheers
---Dave

-- 
____________________________________________________________________________

  David J. Ruck    Phone: +44- (0)7974 108301    Email: druck at freeuk.com
____________________________________________________________________________




More information about the oslib-user mailing list