Closed a-a closed 1 year ago
I just had a look at OS code to see what the difference between the magic values is. The format is:
*TIMLP
: SignatureThis is probably due to the changes in Document.xml for BMP file support.
Can you make that more obvious in the minizip changes? So instead of the api version, it should use the document version directly in the magic.
Then it's also possible to improve the luna.c changes: Use 0x700 if there are BMP files inside and 0x500 otherwise. The "platform.apilevel" parsing can be removed.
apilevel parsing removed, minizip now directly takes major and minor versions as passed by luna and formulates a magic number for the headers appropriately.
Could someone with enough motivation finish the work started here? :P
bumpity bump
If this could be finished in order to solve https://tiplanet.org/forum/viewtopic.php?f=15&t=25749 ... :)
Follow-up available in https://github.com/ndless-nspire/Luna/pull/13
Scans input files for platform.apiLevel and if major is defined as 2 ("2.0", '2.0', "2.3" etc) sets appropriate LOCALHEADERMAGIC2 within minizip. If apiLevel isn't defined or something else/unsupported, it defaults to 1 for compatibility with older calcs. Parameters are now passed into minizip to help support adding later major API versions as/when they become a thing. For input on stdin, the original default/behavior of using apiLevel 2 is retained (needs a separate re-write of various parts of luna to deal with this nicely).