Filesizes... an int ?

Marco Baye Marco.Baye at tu-clausthal.de
Thu Oct 31 20:50:49 GMT 2002


John Tytgat <John.Tytgat at aaug.net> wrote:

> I'm using xosfile_read_no_path() and see that the file size returned
> is an int.  Wouldn't an unsigned int not more appropriate ? Or even
> a proper typedef for it ?

And while we're at that: os_read_monotonic_time() returns something
called os_t, which is typedef'd to be int. Wouldn't "unsigned int"
be more appropriate?
I mean, the monotonic timer starts at zero and (theoretically) wraps
around after 497 days. If os_t is a signed int, things could go wrong
after half the time...
Okay, that's purely academic, as no RISC OS machine runs that long
without crashing, but I just wanted to tell someone... :)

Cu,

Marco Baye

-- 
ntalk://Marco@dionin.esw-heim.tu-clausthal.de
65816 Cross assembler    (RISC OS,DOS/Win,Unix/Linux,AmigaOS,OS/2)
ntalk, CBM drive access  (RISC OS)
Mouse driver, boot maker (C-128)
=> http://home.pages.de/~mac_bacon/ <=

... Motel mattresses are better on the side away from the phone.



More information about the oslib-user mailing list