MorphOS Developer
Posts: 587 from 2003/2/24
From: finland, the l...
Quote:MaaG wrote:
Quote:
boot_wb wrote:
Fails here.
Probable cause:
progdir:pci.ids is a text file
mossys:pci.ids is compressed since MorphOS 2.5.
Yep. pci.ids must be a plain text file. I don't know, why on Morphos it's compressed (crypted ?) Maybe becouse in morphos have special library to operate on compressed pci.ids file...
I prefer plain text than compressed/crypted...
The file is LZMA compressed. You can use xadmaster.library to uncompress it. Roughly the process is:
1. call xadAllocObjectA(XADOBJ_ARCHIVEINFO, 0);
2. call xadGetInfo passing the xadarchiveinfo (ai) we just allocated, and filehandle like with tag XAD_INFILEHANDLE.
3. allocate ai->xai_FileInfo->xfi_Size bytes of memory
4. xadFileUnArc(ai, XAD_OUTMEMORY, buf, XAD_OUTSIZE, ai->xai_FileInfo->xfi_Size, XAD_ENTRYNUMBER, ai->xai_FileInfo->xfi_EntryNumber, TAG_DONE)
5. call xadFreeInfo(ai)
6. call xadFreeObjectA(ai, 0);
Once you're done with the file free the buffer you allocated.
Of course you need to check for errors, but in short that's it.