Logo Search packages:      
Sourcecode: cabextract version File versions  Download package

int(* mscab_decompressor::append)(struct mscab_decompressor *self, struct mscabd_cabinet *cab, struct mscabd_cabinet *nextcab)

Appends one mscabd_cabinet to another, forming or extending a cabinet set.

This will attempt to append one cabinet to another such that (cab->nextcab == nextcab) && (nextcab->prevcab == cab) and any folders split between the two cabinets are merged.

The cabinets MUST be part of a cabinet set -- a cabinet set is a cabinet that spans more than one physical cabinet file on disk -- and must be appropriately matched.

It can be determined if a cabinet has further parts to load by examining the mscabd_cabinet::flags field:

If the cabinets do not match, an error code will be returned. Neither cabinet has been altered, and both should be closed seperately.

Files and folders in a cabinet set are a single entity. All cabinets in a set use the same file list, which is updated as cabinets in the set are added. All pointers to mscabd_folder and mscabd_file structures in either cabinet must be discarded and re-obtained after merging.

self a self-referential pointer to the mscab_decompressor instance being called
cab the cabinet which will be appended to, predecessor of nextcab
nextcab the cabinet which will be appended, successor of cab
an error code, or MSPACK_ERR_OK if successful
See also:
prepend(), open(), close()

Generated by  Doxygen 1.6.0   Back to index