Quote:
Originally Posted by meynaf
It is negative if you think it is negative. Else it is 4294967295.
|
It is negative because dos/dos.h defines it to be a LONG. That's the interface. Yes, it's a silly interface, but that is the situation. It is documented to be a LONG and not a ULONG.
Quote:
Originally Posted by meynaf
Normally a coder should know a file size is an unsigned number...
|
Normally a coder should use the system provided header files and not make assumptions.
Quote:
Originally Posted by meynaf
Nothing will break, as long as big files are not used with such old software.
|
Except that all software on Amiga is "such old software". Again, if this would be a living vivid system, the situation would be somewhat different.
There are many possible ideas how to resolve such problems. One option is to encode the maximum LONG integer (0x7fffffff) and use that as indicator. Or use -1 as indicator. Or skip over such files when iterating over a directory. Or throwing an error in case such a file is examined with the old API (which is probably the most conservative approach avoiding too much breakage).
There are many possible approaches, each with drawbacks and advantages. I'm not happy with "shoot first" solutions.
Quote:
Originally Posted by meynaf
Some file systems support names much larger than 30. This is when the problem happens : software reserves buffer for 30, and...
|
Sure.