View Single Post
Old 09 April 2024, 11:26   #42
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 56
Posts: 2,018
Quote:
Originally Posted by Thomas Richter View Post
Because just because you update a library does not mean that you update its users. Once again: FindConfigDev() of expansion *passes out* a pointer to an expansion library database structure (a ConfigDev). There is no interface to *release this pointer again*. Even if a future release would provide such a function, the library cannot assume that every user calls this function, and thus, the design is stuck. Or, to put it differently:


"It's as in real life: Once you make a mistake, you have to support it for your lifetime."



If expansion is ever supposed to be updated, then rather into the direction of detecting autoconfiguring hardware on other bus systems and provide them to the user, but transparently with existing interfaces. That is a potential and useful development direction, and not to worry about its minimal RAM footprint (and it is really minimal compared to other system libraries).




That is exactly the same question and has exactly the same reasons. It does not help to update a library if you do not update its users. See RKRM AmigaDOS. How to represent a file size >2GB in a FileInfoBlock where the file size is indicated as LONG? What happens if the file size in the FileInfoBlock does not correspond to its true file size? What does a Seek() with a OFFSET_BEGINNING and a negative argument mean? Can we depend that this is actually a seek beyond 2GB, or is it actually an error by attempting to seek backwards?



At this point, my usual canon starts: The problem is that the *interface* of the dos.library is not properly defined to handle such cases, and it is too late to change an interface if we have implementations in the wild that instead depend on the actual implementation details since the documentation of this interface was so lousy (and in case of the dos.library, that was unfortunately really the case).
This is easy, if this LONG is equal (-1) $ffffffff, then this is extended FileInfoBlock structure.
And file size is stored as 2 longs or 3 words (this is enough for file size) in different place.

For OFFSET_BEGINING 2 longs or 3 words are necessary, again easy using combination of D0 and D1.

And for expansion.library, only 2 changes must be done.
If I understand correctly all infos.
1st. Expansion library must be available to close like every standard Amiga library.
2nd. Allocaction memory must be changed from chip mem (D1=2) to any mem (D1=1).

Then first opening will be for chip mem, and after closing this lib. Expansion.library will be opened in fast mem (if available).
Don_Adan is offline  
 
Page generated in 0.04351 seconds with 11 queries