Rizin
unix-like reverse engineering framework and cli tools
mspack.h File Reference
#include <sys/types.h>
#include <stdlib.h>

Go to the source code of this file.

Classes

struct  mspack_system
 
struct  mspack_file
 
struct  mscabd_cabinet
 
struct  mscabd_folder
 
struct  mscabd_file
 
struct  mscab_compressor
 
struct  mscab_decompressor
 
struct  mschmc_file
 
struct  mschmd_section
 
struct  mschmd_sec_uncompressed
 
struct  mschmd_sec_mscompressed
 
struct  mschmd_header
 
struct  mschmd_file
 
struct  mschm_compressor
 
struct  mschm_decompressor
 
struct  mslit_compressor
 
struct  mslit_decompressor
 
struct  mshlp_compressor
 
struct  mshlp_decompressor
 
struct  msszddd_header
 
struct  msszdd_compressor
 
struct  msszdd_decompressor
 
struct  mskwajd_header
 
struct  mskwaj_compressor
 
struct  mskwaj_decompressor
 
struct  msoab_compressor
 
struct  msoab_decompressor
 

Macros

#define MSPACK_SYS_SELFTEST(result)
 
#define MSPACK_VER_LIBRARY   (0)
 
#define MSPACK_VER_SYSTEM   (1)
 
#define MSPACK_VER_MSCABD   (2)
 
#define MSPACK_VER_MSCABC   (3)
 
#define MSPACK_VER_MSCHMD   (4)
 
#define MSPACK_VER_MSCHMC   (5)
 
#define MSPACK_VER_MSLITD   (6)
 
#define MSPACK_VER_MSLITC   (7)
 
#define MSPACK_VER_MSHLPD   (8)
 
#define MSPACK_VER_MSHLPC   (9)
 
#define MSPACK_VER_MSSZDDD   (10)
 
#define MSPACK_VER_MSSZDDC   (11)
 
#define MSPACK_VER_MSKWAJD   (12)
 
#define MSPACK_VER_MSKWAJC   (13)
 
#define MSPACK_VER_MSOABD   (14)
 
#define MSPACK_VER_MSOABC   (15)
 
#define MSPACK_SYS_OPEN_READ   (0)
 
#define MSPACK_SYS_OPEN_WRITE   (1)
 
#define MSPACK_SYS_OPEN_UPDATE   (2)
 
#define MSPACK_SYS_OPEN_APPEND   (3)
 
#define MSPACK_SYS_SEEK_START   (0)
 
#define MSPACK_SYS_SEEK_CUR   (1)
 
#define MSPACK_SYS_SEEK_END   (2)
 
#define MSPACK_ERR_OK   (0)
 
#define MSPACK_ERR_ARGS   (1)
 
#define MSPACK_ERR_OPEN   (2)
 
#define MSPACK_ERR_READ   (3)
 
#define MSPACK_ERR_WRITE   (4)
 
#define MSPACK_ERR_SEEK   (5)
 
#define MSPACK_ERR_NOMEMORY   (6)
 
#define MSPACK_ERR_SIGNATURE   (7)
 
#define MSPACK_ERR_DATAFORMAT   (8)
 
#define MSPACK_ERR_CHECKSUM   (9)
 
#define MSPACK_ERR_CRUNCH   (10)
 
#define MSPACK_ERR_DECRUNCH   (11)
 
#define MSCAB_HDR_RESV_OFFSET   (0x28)
 
#define MSCAB_HDR_PREVCAB   (0x01)
 
#define MSCAB_HDR_NEXTCAB   (0x02)
 
#define MSCAB_HDR_RESV   (0x04)
 
#define MSCABD_COMP_METHOD(comp_type)   ((comp_type) & 0x0F)
 
#define MSCABD_COMP_LEVEL(comp_type)   (((comp_type) >> 8) & 0x1F)
 
#define MSCAB_COMP_NONE   (0)
 
#define MSCAB_COMP_MSZIP   (1)
 
#define MSCAB_COMP_QUANTUM   (2)
 
#define MSCAB_COMP_LZX   (3)
 
#define MSCAB_ATTRIB_RDONLY   (0x01)
 
#define MSCAB_ATTRIB_HIDDEN   (0x02)
 
#define MSCAB_ATTRIB_SYSTEM   (0x04)
 
#define MSCAB_ATTRIB_ARCH   (0x20)
 
#define MSCAB_ATTRIB_EXEC   (0x40)
 
#define MSCAB_ATTRIB_UTF_NAME   (0x80)
 
#define MSCABD_PARAM_SEARCHBUF   (0)
 
#define MSCABD_PARAM_FIXMSZIP   (1)
 
#define MSCABD_PARAM_DECOMPBUF   (2)
 
#define MSCABD_PARAM_SALVAGE   (3)
 
#define MSCHMC_ENDLIST   (0)
 
#define MSCHMC_UNCOMP   (1)
 
#define MSCHMC_MSCOMP   (2)
 
#define MSCHMC_PARAM_TIMESTAMP   (0)
 
#define MSCHMC_PARAM_LANGUAGE   (1)
 
#define MSCHMC_PARAM_LZXWINDOW   (2)
 
#define MSCHMC_PARAM_DENSITY   (3)
 
#define MSCHMC_PARAM_INDEX   (4)
 
#define MSSZDDC_PARAM_MISSINGCHAR   (0)
 
#define MSSZDD_FMT_NORMAL   (0)
 
#define MSSZDD_FMT_QBASIC   (1)
 
#define MSKWAJC_PARAM_COMP_TYPE   (0)
 
#define MSKWAJC_PARAM_INCLUDE_LENGTH   (1)
 
#define MSKWAJ_COMP_NONE   (0)
 
#define MSKWAJ_COMP_XOR   (1)
 
#define MSKWAJ_COMP_SZDD   (2)
 
#define MSKWAJ_COMP_LZH   (3)
 
#define MSKWAJ_COMP_MSZIP   (4)
 
#define MSKWAJ_HDR_HASLENGTH   (0x01)
 
#define MSKWAJ_HDR_HASUNKNOWN1   (0x02)
 
#define MSKWAJ_HDR_HASUNKNOWN2   (0x04)
 
#define MSKWAJ_HDR_HASFILENAME   (0x08)
 
#define MSKWAJ_HDR_HASFILEEXT   (0x10)
 
#define MSKWAJ_HDR_HASEXTRATEXT   (0x20)
 
#define MSOABD_PARAM_DECOMPBUF   (0)
 

Functions

int mspack_sys_selftest_internal (int)
 
int mspack_version (int entity)
 
struct mscab_compressormspack_create_cab_compressor (struct mspack_system *sys)
 
struct mscab_decompressormspack_create_cab_decompressor (struct mspack_system *sys)
 
void mspack_destroy_cab_compressor (struct mscab_compressor *self)
 
void mspack_destroy_cab_decompressor (struct mscab_decompressor *self)
 
struct mschm_compressormspack_create_chm_compressor (struct mspack_system *sys)
 
struct mschm_decompressormspack_create_chm_decompressor (struct mspack_system *sys)
 
void mspack_destroy_chm_compressor (struct mschm_compressor *self)
 
void mspack_destroy_chm_decompressor (struct mschm_decompressor *self)
 
struct mslit_compressormspack_create_lit_compressor (struct mspack_system *sys)
 
struct mslit_decompressormspack_create_lit_decompressor (struct mspack_system *sys)
 
void mspack_destroy_lit_compressor (struct mslit_compressor *self)
 
void mspack_destroy_lit_decompressor (struct mslit_decompressor *self)
 
struct mshlp_compressormspack_create_hlp_compressor (struct mspack_system *sys)
 
struct mshlp_decompressormspack_create_hlp_decompressor (struct mspack_system *sys)
 
void mspack_destroy_hlp_compressor (struct mshlp_compressor *self)
 
void mspack_destroy_hlp_decompressor (struct mshlp_decompressor *self)
 
struct msszdd_compressormspack_create_szdd_compressor (struct mspack_system *sys)
 
struct msszdd_decompressormspack_create_szdd_decompressor (struct mspack_system *sys)
 
void mspack_destroy_szdd_compressor (struct msszdd_compressor *self)
 
void mspack_destroy_szdd_decompressor (struct msszdd_decompressor *self)
 
struct mskwaj_compressormspack_create_kwaj_compressor (struct mspack_system *sys)
 
struct mskwaj_decompressormspack_create_kwaj_decompressor (struct mspack_system *sys)
 
void mspack_destroy_kwaj_compressor (struct mskwaj_compressor *self)
 
void mspack_destroy_kwaj_decompressor (struct mskwaj_decompressor *self)
 
struct msoab_compressormspack_create_oab_compressor (struct mspack_system *sys)
 
struct msoab_decompressormspack_create_oab_decompressor (struct mspack_system *sys)
 
void mspack_destroy_oab_compressor (struct msoab_compressor *self)
 
void mspack_destroy_oab_decompressor (struct msoab_decompressor *self)
 

Macro Definition Documentation

◆ MSCAB_ATTRIB_ARCH

#define MSCAB_ATTRIB_ARCH   (0x20)

mscabd_file::attribs attribute: file is "archived".

Definition at line 925 of file mspack.h.

◆ MSCAB_ATTRIB_EXEC

#define MSCAB_ATTRIB_EXEC   (0x40)

mscabd_file::attribs attribute: file is an executable program.

Definition at line 927 of file mspack.h.

◆ MSCAB_ATTRIB_HIDDEN

#define MSCAB_ATTRIB_HIDDEN   (0x02)

mscabd_file::attribs attribute: file is hidden.

Definition at line 921 of file mspack.h.

◆ MSCAB_ATTRIB_RDONLY

#define MSCAB_ATTRIB_RDONLY   (0x01)

mscabd_file::attribs attribute: file is read-only.

Definition at line 919 of file mspack.h.

◆ MSCAB_ATTRIB_SYSTEM

#define MSCAB_ATTRIB_SYSTEM   (0x04)

mscabd_file::attribs attribute: file is an operating system file.

Definition at line 923 of file mspack.h.

◆ MSCAB_ATTRIB_UTF_NAME

#define MSCAB_ATTRIB_UTF_NAME   (0x80)

mscabd_file::attribs attribute: filename is UTF8, not ISO-8859-1.

Definition at line 929 of file mspack.h.

◆ MSCAB_COMP_LZX

#define MSCAB_COMP_LZX   (3)

Compression mode: LZX compression

Definition at line 856 of file mspack.h.

◆ MSCAB_COMP_MSZIP

#define MSCAB_COMP_MSZIP   (1)

Compression mode: MSZIP (deflate) compression.

Definition at line 852 of file mspack.h.

◆ MSCAB_COMP_NONE

#define MSCAB_COMP_NONE   (0)

Compression mode: no compression.

Definition at line 850 of file mspack.h.

◆ MSCAB_COMP_QUANTUM

#define MSCAB_COMP_QUANTUM   (2)

Compression mode: Quantum compression

Definition at line 854 of file mspack.h.

◆ MSCAB_HDR_NEXTCAB

#define MSCAB_HDR_NEXTCAB   (0x02)

Cabinet header flag: cabinet has a successor

Definition at line 793 of file mspack.h.

◆ MSCAB_HDR_PREVCAB

#define MSCAB_HDR_PREVCAB   (0x01)

Cabinet header flag: cabinet has a predecessor

Definition at line 791 of file mspack.h.

◆ MSCAB_HDR_RESV

#define MSCAB_HDR_RESV   (0x04)

Cabinet header flag: cabinet has reserved header space

Definition at line 795 of file mspack.h.

◆ MSCAB_HDR_RESV_OFFSET

#define MSCAB_HDR_RESV_OFFSET   (0x28)

Offset from start of cabinet to the reserved header data (if present).

Definition at line 788 of file mspack.h.

◆ MSCABD_COMP_LEVEL

#define MSCABD_COMP_LEVEL (   comp_type)    (((comp_type) >> 8) & 0x1F)

Returns the compression level used by a folder.

Parameters
comp_typea mscabd_folder::comp_type value
Returns
the compression level. This is only defined by LZX and Quantum compression

Definition at line 847 of file mspack.h.

◆ MSCABD_COMP_METHOD

#define MSCABD_COMP_METHOD (   comp_type)    ((comp_type) & 0x0F)

Returns the compression method used by a folder.

Parameters
comp_typea mscabd_folder::comp_type value
Returns
one of MSCAB_COMP_NONE, MSCAB_COMP_MSZIP, MSCAB_COMP_QUANTUM or MSCAB_COMP_LZX

Definition at line 839 of file mspack.h.

◆ MSCABD_PARAM_DECOMPBUF

#define MSCABD_PARAM_DECOMPBUF   (2)

mscab_decompressor::set_param() parameter: size of decompression buffer

Definition at line 936 of file mspack.h.

◆ MSCABD_PARAM_FIXMSZIP

#define MSCABD_PARAM_FIXMSZIP   (1)

mscab_decompressor::set_param() parameter: repair MS-ZIP streams?

Definition at line 934 of file mspack.h.

◆ MSCABD_PARAM_SALVAGE

#define MSCABD_PARAM_SALVAGE   (3)

mscab_decompressor::set_param() parameter: salvage data from bad cabinets? If enabled, open() will skip file with bad folder indices or filenames rather than reject the whole cabinet, and extract() will limit rather than reject files with invalid offsets and lengths, and bad data block checksums will be ignored. Available only in CAB decoder version 2 and above.

Definition at line 943 of file mspack.h.

◆ MSCABD_PARAM_SEARCHBUF

#define MSCABD_PARAM_SEARCHBUF   (0)

mscab_decompressor::set_param() parameter: search buffer size.

Definition at line 932 of file mspack.h.

◆ MSCHMC_ENDLIST

#define MSCHMC_ENDLIST   (0)

mschmc_file::section value: end of CHM file list

Definition at line 1394 of file mspack.h.

◆ MSCHMC_MSCOMP

#define MSCHMC_MSCOMP   (2)

mschmc_file::section value: this file is in the MSCompressed section

Definition at line 1398 of file mspack.h.

◆ MSCHMC_PARAM_DENSITY

#define MSCHMC_PARAM_DENSITY   (3)

mschm_compressor::set_param() parameter: intra-chunk quickref density

Definition at line 1407 of file mspack.h.

◆ MSCHMC_PARAM_INDEX

#define MSCHMC_PARAM_INDEX   (4)

mschm_compressor::set_param() parameter: whether to create indices

Definition at line 1409 of file mspack.h.

◆ MSCHMC_PARAM_LANGUAGE

#define MSCHMC_PARAM_LANGUAGE   (1)

mschm_compressor::set_param() parameter: "language" header

Definition at line 1403 of file mspack.h.

◆ MSCHMC_PARAM_LZXWINDOW

#define MSCHMC_PARAM_LZXWINDOW   (2)

mschm_compressor::set_param() parameter: LZX window size

Definition at line 1405 of file mspack.h.

◆ MSCHMC_PARAM_TIMESTAMP

#define MSCHMC_PARAM_TIMESTAMP   (0)

mschm_compressor::set_param() parameter: "timestamp" header

Definition at line 1401 of file mspack.h.

◆ MSCHMC_UNCOMP

#define MSCHMC_UNCOMP   (1)

mschmc_file::section value: this file is in the Uncompressed section

Definition at line 1396 of file mspack.h.

◆ MSKWAJ_COMP_LZH

#define MSKWAJ_COMP_LZH   (3)

KWAJ compression type: LZ+Huffman compression

Definition at line 1984 of file mspack.h.

◆ MSKWAJ_COMP_MSZIP

#define MSKWAJ_COMP_MSZIP   (4)

KWAJ compression type: MSZIP

Definition at line 1986 of file mspack.h.

◆ MSKWAJ_COMP_NONE

#define MSKWAJ_COMP_NONE   (0)

KWAJ compression type: no compression.

Definition at line 1978 of file mspack.h.

◆ MSKWAJ_COMP_SZDD

#define MSKWAJ_COMP_SZDD   (2)

KWAJ compression type: LZSS (same method as SZDD)

Definition at line 1982 of file mspack.h.

◆ MSKWAJ_COMP_XOR

#define MSKWAJ_COMP_XOR   (1)

KWAJ compression type: no compression, 0xFF XOR "encryption".

Definition at line 1980 of file mspack.h.

◆ MSKWAJ_HDR_HASEXTRATEXT

#define MSKWAJ_HDR_HASEXTRATEXT   (0x20)

KWAJ optional header flag: extra text is included

Definition at line 2004 of file mspack.h.

◆ MSKWAJ_HDR_HASFILEEXT

#define MSKWAJ_HDR_HASFILEEXT   (0x10)

KWAJ optional header flag: file extension is included

Definition at line 2001 of file mspack.h.

◆ MSKWAJ_HDR_HASFILENAME

#define MSKWAJ_HDR_HASFILENAME   (0x08)

KWAJ optional header flag: file name (no extension) is included

Definition at line 1998 of file mspack.h.

◆ MSKWAJ_HDR_HASLENGTH

#define MSKWAJ_HDR_HASLENGTH   (0x01)

KWAJ optional header flag: decompressed file length is included

Definition at line 1989 of file mspack.h.

◆ MSKWAJ_HDR_HASUNKNOWN1

#define MSKWAJ_HDR_HASUNKNOWN1   (0x02)

KWAJ optional header flag: unknown 2-byte structure is included

Definition at line 1992 of file mspack.h.

◆ MSKWAJ_HDR_HASUNKNOWN2

#define MSKWAJ_HDR_HASUNKNOWN2   (0x04)

KWAJ optional header flag: unknown multi-sized structure is included

Definition at line 1995 of file mspack.h.

◆ MSKWAJC_PARAM_COMP_TYPE

#define MSKWAJC_PARAM_COMP_TYPE   (0)

mskwaj_compressor::set_param() parameter: compression type

Definition at line 1970 of file mspack.h.

◆ MSKWAJC_PARAM_INCLUDE_LENGTH

#define MSKWAJC_PARAM_INCLUDE_LENGTH   (1)

mskwaj_compressor::set_param() parameter: include the length of the uncompressed file in the header?

Definition at line 1975 of file mspack.h.

◆ MSOABD_PARAM_DECOMPBUF

#define MSOABD_PARAM_DECOMPBUF   (0)

msoab_decompressor::set_param() parameter: size of decompression buffer

Definition at line 2379 of file mspack.h.

◆ MSPACK_ERR_ARGS

#define MSPACK_ERR_ARGS   (1)

Error code: bad arguments to method

Definition at line 487 of file mspack.h.

◆ MSPACK_ERR_CHECKSUM

#define MSPACK_ERR_CHECKSUM   (9)

Error code: bad checksum or CRC

Definition at line 503 of file mspack.h.

◆ MSPACK_ERR_CRUNCH

#define MSPACK_ERR_CRUNCH   (10)

Error code: error during compression

Definition at line 505 of file mspack.h.

◆ MSPACK_ERR_DATAFORMAT

#define MSPACK_ERR_DATAFORMAT   (8)

Error code: bad or corrupt file format

Definition at line 501 of file mspack.h.

◆ MSPACK_ERR_DECRUNCH

#define MSPACK_ERR_DECRUNCH   (11)

Error code: error during decompression

Definition at line 507 of file mspack.h.

◆ MSPACK_ERR_NOMEMORY

#define MSPACK_ERR_NOMEMORY   (6)

Error code: out of memory

Definition at line 497 of file mspack.h.

◆ MSPACK_ERR_OK

#define MSPACK_ERR_OK   (0)

Error code: no error

Definition at line 485 of file mspack.h.

◆ MSPACK_ERR_OPEN

#define MSPACK_ERR_OPEN   (2)

Error code: error opening file

Definition at line 489 of file mspack.h.

◆ MSPACK_ERR_READ

#define MSPACK_ERR_READ   (3)

Error code: error reading file

Definition at line 491 of file mspack.h.

◆ MSPACK_ERR_SEEK

#define MSPACK_ERR_SEEK   (5)

Error code: seek error

Definition at line 495 of file mspack.h.

◆ MSPACK_ERR_SIGNATURE

#define MSPACK_ERR_SIGNATURE   (7)

Error code: bad "magic id" in file

Definition at line 499 of file mspack.h.

◆ MSPACK_ERR_WRITE

#define MSPACK_ERR_WRITE   (4)

Error code: error writing file

Definition at line 493 of file mspack.h.

◆ MSPACK_SYS_OPEN_APPEND

#define MSPACK_SYS_OPEN_APPEND   (3)

mspack_system::open() mode: open existing file for writing

Definition at line 464 of file mspack.h.

◆ MSPACK_SYS_OPEN_READ

#define MSPACK_SYS_OPEN_READ   (0)

mspack_system::open() mode: open existing file for reading.

Definition at line 458 of file mspack.h.

◆ MSPACK_SYS_OPEN_UPDATE

#define MSPACK_SYS_OPEN_UPDATE   (2)

mspack_system::open() mode: open existing file for writing

Definition at line 462 of file mspack.h.

◆ MSPACK_SYS_OPEN_WRITE

#define MSPACK_SYS_OPEN_WRITE   (1)

mspack_system::open() mode: open new file for writing

Definition at line 460 of file mspack.h.

◆ MSPACK_SYS_SEEK_CUR

#define MSPACK_SYS_SEEK_CUR   (1)

mspack_system::seek() mode: seek relative to current offset

Definition at line 469 of file mspack.h.

◆ MSPACK_SYS_SEEK_END

#define MSPACK_SYS_SEEK_END   (2)

mspack_system::seek() mode: seek relative to end of file

Definition at line 471 of file mspack.h.

◆ MSPACK_SYS_SEEK_START

#define MSPACK_SYS_SEEK_START   (0)

mspack_system::seek() mode: seek relative to start of file

Definition at line 467 of file mspack.h.

◆ MSPACK_SYS_SELFTEST

#define MSPACK_SYS_SELFTEST (   result)
Value:
do { \
(result) = mspack_sys_selftest_internal(sizeof(off_t)); \
} while (0)
int mspack_sys_selftest_internal(int)
Definition: system.c:53
int off_t
Definition: sftypes.h:41

System self-test function, to ensure both library and calling program can use one another.

A result of MSPACK_ERR_OK means the library and caller are compatible. Any other result indicates that the library and caller are not compatible and should not be used. In particular, a value of MSPACK_ERR_SEEK means the library and caller use different off_t datatypes.

It should be used like so:

int selftest_result;
MSPACK_SYS_SELFTEST(selftest_result);
if (selftest_result != MSPACK_ERR_OK) {
fprintf(stderr, "incompatible with this build of libmspack\n");
exit(0);
}
#define MSPACK_ERR_OK
Definition: mspack.h:485
#define MSPACK_SYS_SELFTEST(result)
Definition: mspack.h:191
Parameters
resultan int variable to store the result of the self-test

Definition at line 191 of file mspack.h.

◆ MSPACK_VER_LIBRARY

#define MSPACK_VER_LIBRARY   (0)

Pass to mspack_version() to get the overall library version

Definition at line 232 of file mspack.h.

◆ MSPACK_VER_MSCABC

#define MSPACK_VER_MSCABC   (3)

Pass to mspack_version() to get the mscab_compressor version

Definition at line 238 of file mspack.h.

◆ MSPACK_VER_MSCABD

#define MSPACK_VER_MSCABD   (2)

Pass to mspack_version() to get the mscab_decompressor version

Definition at line 236 of file mspack.h.

◆ MSPACK_VER_MSCHMC

#define MSPACK_VER_MSCHMC   (5)

Pass to mspack_version() to get the mschm_compressor version

Definition at line 242 of file mspack.h.

◆ MSPACK_VER_MSCHMD

#define MSPACK_VER_MSCHMD   (4)

Pass to mspack_version() to get the mschm_decompressor version

Definition at line 240 of file mspack.h.

◆ MSPACK_VER_MSHLPC

#define MSPACK_VER_MSHLPC   (9)

Pass to mspack_version() to get the mshlp_compressor version

Definition at line 250 of file mspack.h.

◆ MSPACK_VER_MSHLPD

#define MSPACK_VER_MSHLPD   (8)

Pass to mspack_version() to get the mshlp_decompressor version

Definition at line 248 of file mspack.h.

◆ MSPACK_VER_MSKWAJC

#define MSPACK_VER_MSKWAJC   (13)

Pass to mspack_version() to get the mskwaj_compressor version

Definition at line 258 of file mspack.h.

◆ MSPACK_VER_MSKWAJD

#define MSPACK_VER_MSKWAJD   (12)

Pass to mspack_version() to get the mskwaj_decompressor version

Definition at line 256 of file mspack.h.

◆ MSPACK_VER_MSLITC

#define MSPACK_VER_MSLITC   (7)

Pass to mspack_version() to get the mslit_compressor version

Definition at line 246 of file mspack.h.

◆ MSPACK_VER_MSLITD

#define MSPACK_VER_MSLITD   (6)

Pass to mspack_version() to get the mslit_decompressor version

Definition at line 244 of file mspack.h.

◆ MSPACK_VER_MSOABC

#define MSPACK_VER_MSOABC   (15)

Pass to mspack_version() to get the msoab_compressor version

Definition at line 262 of file mspack.h.

◆ MSPACK_VER_MSOABD

#define MSPACK_VER_MSOABD   (14)

Pass to mspack_version() to get the msoab_decompressor version

Definition at line 260 of file mspack.h.

◆ MSPACK_VER_MSSZDDC

#define MSPACK_VER_MSSZDDC   (11)

Pass to mspack_version() to get the msszdd_compressor version

Definition at line 254 of file mspack.h.

◆ MSPACK_VER_MSSZDDD

#define MSPACK_VER_MSSZDDD   (10)

Pass to mspack_version() to get the msszdd_decompressor version

Definition at line 252 of file mspack.h.

◆ MSPACK_VER_SYSTEM

#define MSPACK_VER_SYSTEM   (1)

Pass to mspack_version() to get the mspack_system version

Definition at line 234 of file mspack.h.

◆ MSSZDD_FMT_NORMAL

#define MSSZDD_FMT_NORMAL   (0)

msszddd_header::format value - a regular SZDD file

Definition at line 1758 of file mspack.h.

◆ MSSZDD_FMT_QBASIC

#define MSSZDD_FMT_QBASIC   (1)

msszddd_header::format value - a special QBasic SZDD file

Definition at line 1761 of file mspack.h.

◆ MSSZDDC_PARAM_MISSINGCHAR

#define MSSZDDC_PARAM_MISSINGCHAR   (0)

msszdd_compressor::set_param() parameter: the missing character

Definition at line 1755 of file mspack.h.

Function Documentation

◆ mspack_create_cab_compressor()

struct mscab_compressor* mspack_create_cab_compressor ( struct mspack_system sys)

Creates a new CAB compressor.

Parameters
sysa custom mspack_system structure, or NULL to use the default
Returns
a mscab_compressor or NULL

Definition at line 16 of file cabc.c.

17 {
18  /* todo */
19  return NULL;
20 }
#define NULL
Definition: cris-opc.c:27

References NULL.

◆ mspack_create_cab_decompressor()

struct mscab_decompressor* mspack_create_cab_decompressor ( struct mspack_system sys)

Creates a new CAB decompressor.

Parameters
sysa custom mspack_system structure, or NULL to use the default
Returns
a mscab_decompressor or NULL

Definition at line 140 of file cabd.c.

141 {
142  struct mscab_decompressor_p *self = NULL;
143 
144  if (!sys) sys = mspack_default_system;
145  if (!mspack_valid_system(sys)) return NULL;
146 
147  if ((self = (struct mscab_decompressor_p *) sys->alloc(sys, sizeof(struct mscab_decompressor_p)))) {
148  self->base.open = &cabd_open;
149  self->base.close = &cabd_close;
150  self->base.search = &cabd_search;
151  self->base.extract = &cabd_extract;
152  self->base.prepend = &cabd_prepend;
153  self->base.append = &cabd_append;
154  self->base.set_param = &cabd_param;
155  self->base.last_error = &cabd_error;
156  self->system = sys;
157  self->d = NULL;
158  self->error = MSPACK_ERR_OK;
159 
160  self->searchbuf_size = 32768;
161  self->fix_mszip = 0;
162  self->buf_size = 4096;
163  self->salvage = 0;
164  }
165  return (struct mscab_decompressor *) self;
166 }
struct mspack_system * mspack_default_system
Definition: system.c:238
int mspack_valid_system(struct mspack_system *sys)
Definition: system.c:58
static int cabd_append(struct mscab_decompressor *base, struct mscabd_cabinet *cab, struct mscabd_cabinet *nextcab)
Definition: cabd.c:807
static void cabd_close(struct mscab_decompressor *base, struct mscabd_cabinet *origcab)
Definition: cabd.c:230
static int cabd_error(struct mscab_decompressor *base)
Definition: cabd.c:1511
static struct mscabd_cabinet * cabd_open(struct mscab_decompressor *base, const char *filename)
Definition: cabd.c:192
static int cabd_param(struct mscab_decompressor *base, int param, int value)
Definition: cabd.c:1481
static struct mscabd_cabinet * cabd_search(struct mscab_decompressor *base, const char *filename)
Definition: cabd.c:591
static int cabd_prepend(struct mscab_decompressor *base, struct mscabd_cabinet *cab, struct mscabd_cabinet *prevcab)
Definition: cabd.c:800
static int cabd_extract(struct mscab_decompressor *base, struct mscabd_file *file, const char *filename)
Definition: cabd.c:1010
void *(* alloc)(struct mspack_system *self, size_t bytes)
Definition: mspack.h:421

◆ mspack_create_chm_compressor()

struct mschm_compressor* mspack_create_chm_compressor ( struct mspack_system sys)

Creates a new CHM compressor.

Parameters
sysa custom mspack_system structure, or NULL to use the default
Returns
a mschm_compressor or NULL

Definition at line 16 of file chmc.c.

17 {
18  /* todo */
19  return NULL;
20 }

References NULL.

◆ mspack_create_chm_decompressor()

struct mschm_decompressor* mspack_create_chm_decompressor ( struct mspack_system sys)

Creates a new CHM decompressor.

Parameters
sysa custom mspack_system structure, or NULL to use the default
Returns
a mschm_decompressor or NULL

Definition at line 78 of file chmd.c.

79 {
80  struct mschm_decompressor_p *self = NULL;
81 
82  if (!sys) sys = mspack_default_system;
83  if (!mspack_valid_system(sys)) return NULL;
84 
85  if ((self = (struct mschm_decompressor_p *) sys->alloc(sys, sizeof(struct mschm_decompressor_p)))) {
86  self->base.open = &chmd_open;
87  self->base.close = &chmd_close;
88  self->base.extract = &chmd_extract;
89  self->base.last_error = &chmd_error;
90  self->base.fast_open = &chmd_fast_open;
91  self->base.fast_find = &chmd_fast_find;
92  self->system = sys;
93  self->error = MSPACK_ERR_OK;
94  self->d = NULL;
95  }
96  return (struct mschm_decompressor *) self;
97 }
static int chmd_extract(struct mschm_decompressor *base, struct mschmd_file *file, const char *filename)
Definition: chmd.c:887
static int chmd_error(struct mschm_decompressor *base)
Definition: chmd.c:1356
static void chmd_close(struct mschm_decompressor *base, struct mschmd_header *chm)
Definition: chmd.c:194
static int chmd_fast_find(struct mschm_decompressor *base, struct mschmd_header *chm, const char *filename, struct mschmd_file *f_ptr, int f_size)
Definition: chmd.c:534
static struct mschmd_header * chmd_fast_open(struct mschm_decompressor *base, const char *filename)
Definition: chmd.c:135
static struct mschmd_header * chmd_open(struct mschm_decompressor *base, const char *filename)
Definition: chmd.c:123

References mspack_system::alloc, chmd_close(), chmd_error(), chmd_extract(), chmd_fast_find(), chmd_fast_open(), chmd_open(), mspack_default_system, MSPACK_ERR_OK, mspack_valid_system(), and NULL.

Referenced by main().

◆ mspack_create_hlp_compressor()

struct mshlp_compressor* mspack_create_hlp_compressor ( struct mspack_system sys)

Creates a new HLP compressor.

Parameters
sysa custom mspack_system structure, or NULL to use the default
Returns
a mshlp_compressor or NULL

Definition at line 16 of file hlpc.c.

17 {
18  /* todo */
19  return NULL;
20 }

References NULL.

◆ mspack_create_hlp_decompressor()

struct mshlp_decompressor* mspack_create_hlp_decompressor ( struct mspack_system sys)

Creates a new HLP decompressor.

Parameters
sysa custom mspack_system structure, or NULL to use the default
Returns
a mshlp_decompressor or NULL

Definition at line 16 of file hlpd.c.

17 {
18  /* todo */
19  return NULL;
20 }

References NULL.

◆ mspack_create_kwaj_compressor()

struct mskwaj_compressor* mspack_create_kwaj_compressor ( struct mspack_system sys)

Creates a new KWAJ compressor.

Parameters
sysa custom mspack_system structure, or NULL to use the default
Returns
a mskwaj_compressor or NULL

Definition at line 16 of file kwajc.c.

17 {
18  /* todo */
19  return NULL;
20 }

References NULL.

◆ mspack_create_kwaj_decompressor()

struct mskwaj_decompressor* mspack_create_kwaj_decompressor ( struct mspack_system sys)

Creates a new KWAJ decompressor.

Parameters
sysa custom mspack_system structure, or NULL to use the default
Returns
a mskwaj_decompressor or NULL

Definition at line 55 of file kwajd.c.

56 {
57  struct mskwaj_decompressor_p *self = NULL;
58 
59  if (!sys) sys = mspack_default_system;
60  if (!mspack_valid_system(sys)) return NULL;
61 
62  if ((self = (struct mskwaj_decompressor_p *) sys->alloc(sys, sizeof(struct mskwaj_decompressor_p)))) {
63  self->base.open = &kwajd_open;
64  self->base.close = &kwajd_close;
65  self->base.extract = &kwajd_extract;
66  self->base.decompress = &kwajd_decompress;
67  self->base.last_error = &kwajd_error;
68  self->system = sys;
69  self->error = MSPACK_ERR_OK;
70  }
71  return (struct mskwaj_decompressor *) self;
72 }
static struct mskwajd_header * kwajd_open(struct mskwaj_decompressor *base, const char *filename)
Definition: kwajd.c:93
static int kwajd_decompress(struct mskwaj_decompressor *base, const char *input, const char *output)
Definition: kwajd.c:331
static int kwajd_extract(struct mskwaj_decompressor *base, struct mskwajd_header *hdr, const char *filename)
Definition: kwajd.c:253
static void kwajd_close(struct mskwaj_decompressor *base, struct mskwajd_header *hdr)
Definition: kwajd.c:129
static int kwajd_error(struct mskwaj_decompressor *base)
Definition: kwajd.c:351

References mspack_system::alloc, kwajd_close(), kwajd_decompress(), kwajd_error(), kwajd_extract(), kwajd_open(), mspack_default_system, MSPACK_ERR_OK, mspack_valid_system(), and NULL.

Referenced by main().

◆ mspack_create_lit_compressor()

struct mslit_compressor* mspack_create_lit_compressor ( struct mspack_system sys)

Creates a new LIT compressor.

Parameters
sysa custom mspack_system structure, or NULL to use the default
Returns
a mslit_compressor or NULL

Definition at line 16 of file litc.c.

17 {
18  /* todo */
19  return NULL;
20 }

References NULL.

◆ mspack_create_lit_decompressor()

struct mslit_decompressor* mspack_create_lit_decompressor ( struct mspack_system sys)

Creates a new LIT decompressor.

Parameters
sysa custom mspack_system structure, or NULL to use the default
Returns
a mslit_decompressor or NULL

Definition at line 16 of file litd.c.

17 {
18  /* todo */
19  return NULL;
20 }

References NULL.

◆ mspack_create_oab_compressor()

struct msoab_compressor* mspack_create_oab_compressor ( struct mspack_system sys)

Creates a new OAB compressor.

Parameters
sysa custom mspack_system structure, or NULL to use the default
Returns
a msoab_compressor or NULL

Definition at line 16 of file oabc.c.

17 {
18  /* todo */
19  return NULL;
20 }

References NULL.

◆ mspack_create_oab_decompressor()

struct msoab_decompressor* mspack_create_oab_decompressor ( struct mspack_system sys)

Creates a new OAB decompressor.

Parameters
sysa custom mspack_system structure, or NULL to use the default
Returns
a msoab_decompressor or NULL

Definition at line 43 of file oabd.c.

44 {
45  struct msoab_decompressor_p *self = NULL;
46 
47  if (!sys) sys = mspack_default_system;
48  if (!mspack_valid_system(sys)) return NULL;
49 
50  if ((self = (struct msoab_decompressor_p *) sys->alloc(sys, sizeof(struct msoab_decompressor_p)))) {
51  self->base.decompress = &oabd_decompress;
52  self->base.decompress_incremental = &oabd_decompress_incremental;
53  self->base.set_param = &oabd_param;
54  self->system = sys;
55  self->buf_size = 4096;
56  }
57  return (struct msoab_decompressor *) self;
58 }
static int oabd_decompress_incremental(struct msoab_decompressor *self, const char *input, const char *base, const char *output)
Definition: oabd.c:234
static int oabd_decompress(struct msoab_decompressor *self, const char *input, const char *output)
Definition: oabd.c:103
static int oabd_param(struct msoab_decompressor *base, int param, int value)
Definition: oabd.c:395

References mspack_system::alloc, mspack_default_system, mspack_valid_system(), NULL, oabd_decompress(), oabd_decompress_incremental(), and oabd_param().

Referenced by main().

◆ mspack_create_szdd_compressor()

struct msszdd_compressor* mspack_create_szdd_compressor ( struct mspack_system sys)

Creates a new SZDD compressor.

Parameters
sysa custom mspack_system structure, or NULL to use the default
Returns
a msszdd_compressor or NULL

Definition at line 16 of file szddc.c.

17 {
18  /* todo */
19  return NULL;
20 }

References NULL.

◆ mspack_create_szdd_decompressor()

struct msszdd_decompressor* mspack_create_szdd_decompressor ( struct mspack_system sys)

Creates a new SZDD decompressor.

Parameters
sysa custom mspack_system structure, or NULL to use the default
Returns
a msszdd_decompressor or NULL

Definition at line 41 of file szddd.c.

42 {
43  struct msszdd_decompressor_p *self = NULL;
44 
45  if (!sys) sys = mspack_default_system;
46  if (!mspack_valid_system(sys)) return NULL;
47 
48  if ((self = (struct msszdd_decompressor_p *) sys->alloc(sys, sizeof(struct msszdd_decompressor_p)))) {
49  self->base.open = &szddd_open;
50  self->base.close = &szddd_close;
51  self->base.extract = &szddd_extract;
52  self->base.decompress = &szddd_decompress;
53  self->base.last_error = &szddd_error;
54  self->system = sys;
55  self->error = MSPACK_ERR_OK;
56  }
57  return (struct msszdd_decompressor *) self;
58 }
static void szddd_close(struct msszdd_decompressor *base, struct msszddd_header *hdr)
Definition: szddd.c:115
static struct msszddd_header * szddd_open(struct msszdd_decompressor *base, const char *filename)
Definition: szddd.c:79
static int szddd_error(struct msszdd_decompressor *base)
Definition: szddd.c:243
static int szddd_extract(struct msszdd_decompressor *base, struct msszddd_header *hdr, const char *filename)
Definition: szddd.c:181
static int szddd_decompress(struct msszdd_decompressor *base, const char *input, const char *output)
Definition: szddd.c:223

References mspack_system::alloc, mspack_default_system, MSPACK_ERR_OK, mspack_valid_system(), NULL, szddd_close(), szddd_decompress(), szddd_error(), szddd_extract(), and szddd_open().

Referenced by main().

◆ mspack_destroy_cab_compressor()

void mspack_destroy_cab_compressor ( struct mscab_compressor self)

Destroys an existing CAB compressor.

Parameters
selfthe mscab_compressor to destroy

Definition at line 22 of file cabc.c.

22  {
23  /* todo */
24 }

◆ mspack_destroy_cab_decompressor()

void mspack_destroy_cab_decompressor ( struct mscab_decompressor self)

Destroys an existing CAB decompressor.

Parameters
selfthe mscab_decompressor to destroy

Definition at line 173 of file cabd.c.

173  {
174  struct mscab_decompressor_p *self = (struct mscab_decompressor_p *) base;
175  if (self) {
176  struct mspack_system *sys = self->system;
177  if (self->d) {
178  if (self->d->infh) sys->close(self->d->infh);
179  cabd_free_decomp(self);
180  sys->free(self->d);
181  }
182  sys->free(self);
183  }
184 }
static void cabd_free_decomp(struct mscab_decompressor_p *self)
Definition: cabd.c:1193
struct mscab_decompressor base
Definition: cab.h:113
void(* close)(struct mspack_file *file)
Definition: mspack.h:321
void(* free)(void *ptr)
Definition: mspack.h:430

◆ mspack_destroy_chm_compressor()

void mspack_destroy_chm_compressor ( struct mschm_compressor self)

Destroys an existing CHM compressor.

Parameters
selfthe mschm_compressor to destroy

Definition at line 22 of file chmc.c.

22  {
23  /* todo */
24 }

◆ mspack_destroy_chm_decompressor()

void mspack_destroy_chm_decompressor ( struct mschm_decompressor self)

Destroys an existing CHM decompressor.

Parameters
selfthe mschm_decompressor to destroy

Definition at line 104 of file chmd.c.

104  {
105  struct mschm_decompressor_p *self = (struct mschm_decompressor_p *) base;
106  if (self) {
107  struct mspack_system *sys = self->system;
108  if (self->d) {
109  if (self->d->infh) sys->close(self->d->infh);
110  if (self->d->state) lzxd_free(self->d->state);
111  sys->free(self->d);
112  }
113  sys->free(self);
114  }
115 }
void lzxd_free(struct lzxd_stream *lzx)
Definition: lzxd.c:800
struct mschm_decompressor base
Definition: chm.h:116

References mschm_decompressor_p::base, mspack_system::close, mspack_system::free, and lzxd_free().

Referenced by main().

◆ mspack_destroy_hlp_compressor()

void mspack_destroy_hlp_compressor ( struct mshlp_compressor self)

Destroys an existing hlp compressor.

Parameters
selfthe mshlp_compressor to destroy

Definition at line 22 of file hlpc.c.

22  {
23  /* todo */
24 }

◆ mspack_destroy_hlp_decompressor()

void mspack_destroy_hlp_decompressor ( struct mshlp_decompressor self)

Destroys an existing hlp decompressor.

Parameters
selfthe mshlp_decompressor to destroy

Definition at line 22 of file hlpd.c.

22  {
23  /* todo */
24 }

◆ mspack_destroy_kwaj_compressor()

void mspack_destroy_kwaj_compressor ( struct mskwaj_compressor self)

Destroys an existing KWAJ compressor.

Parameters
selfthe mskwaj_compressor to destroy

Definition at line 22 of file kwajc.c.

22  {
23  /* todo */
24 }

◆ mspack_destroy_kwaj_decompressor()

void mspack_destroy_kwaj_decompressor ( struct mskwaj_decompressor self)

Destroys an existing KWAJ decompressor.

Parameters
selfthe mskwaj_decompressor to destroy

Definition at line 79 of file kwajd.c.

80 {
81  struct mskwaj_decompressor_p *self = (struct mskwaj_decompressor_p *) base;
82  if (self) {
83  struct mspack_system *sys = self->system;
84  sys->free(self);
85  }
86 }
struct mskwaj_decompressor base
Definition: kwaj.h:36

References mskwaj_decompressor_p::base, and mspack_system::free.

Referenced by main().

◆ mspack_destroy_lit_compressor()

void mspack_destroy_lit_compressor ( struct mslit_compressor self)

Destroys an existing LIT compressor.

Parameters
selfthe mslit_compressor to destroy

Definition at line 22 of file litc.c.

22  {
23  /* todo */
24 }

◆ mspack_destroy_lit_decompressor()

void mspack_destroy_lit_decompressor ( struct mslit_decompressor self)

Destroys an existing LIT decompressor.

Parameters
selfthe mslit_decompressor to destroy

Definition at line 22 of file litd.c.

22  {
23  /* todo */
24 }

◆ mspack_destroy_oab_compressor()

void mspack_destroy_oab_compressor ( struct msoab_compressor self)

Destroys an existing OAB compressor.

Parameters
selfthe msoab_compressor to destroy

Definition at line 22 of file oabc.c.

22  {
23  /* todo */
24 }

◆ mspack_destroy_oab_decompressor()

void mspack_destroy_oab_decompressor ( struct msoab_decompressor self)

Destroys an existing OAB decompressor.

Parameters
selfthe msoab_decompressor to destroy

Definition at line 60 of file oabd.c.

60  {
61  struct msoab_decompressor_p *self = (struct msoab_decompressor_p *)base;
62  if (self) {
63  struct mspack_system *sys = self->system;
64  sys->free(self);
65  }
66 }
struct msoab_decompressor base
Definition: oab.h:28

References msoab_decompressor_p::base, and mspack_system::free.

Referenced by main().

◆ mspack_destroy_szdd_compressor()

void mspack_destroy_szdd_compressor ( struct msszdd_compressor self)

Destroys an existing SZDD compressor.

Parameters
selfthe msszdd_compressor to destroy

Definition at line 22 of file szddc.c.

22  {
23  /* todo */
24 }

◆ mspack_destroy_szdd_decompressor()

void mspack_destroy_szdd_decompressor ( struct msszdd_decompressor self)

Destroys an existing SZDD decompressor.

Parameters
selfthe msszdd_decompressor to destroy

Definition at line 65 of file szddd.c.

66 {
67  struct msszdd_decompressor_p *self = (struct msszdd_decompressor_p *) base;
68  if (self) {
69  struct mspack_system *sys = self->system;
70  sys->free(self);
71  }
72 }
struct msszdd_decompressor base
Definition: szdd.h:29

References msszdd_decompressor_p::base, and mspack_system::free.

Referenced by main().

◆ mspack_sys_selftest_internal()

int mspack_sys_selftest_internal ( int  offt_size)

Part of the MSPACK_SYS_SELFTEST() macro, must not be used directly.

Definition at line 53 of file system.c.

53  {
54  return (sizeof(off_t) == offt_size) ? MSPACK_ERR_OK : MSPACK_ERR_SEEK;
55 }
#define MSPACK_ERR_SEEK
Definition: mspack.h:495

References MSPACK_ERR_OK, and MSPACK_ERR_SEEK.

◆ mspack_version()

int mspack_version ( int  entity)

Enquire about the binary compatibility version of a specific interface in the library. Currently, the following interfaces are defined:

The result of the function should be interpreted as follows:

  • -1: this interface is completely unknown to the library
  • 0: this interface is known, but non-functioning
  • 1: this interface has all basic functionality
  • 2, 3, ...: this interface has additional functionality, clearly marked in the documentation as "version 2", "version 3" and so on.
Parameters
entitythe interface to request current version of
Returns
the version of the requested interface

Definition at line 16 of file system.c.

16  {
17  switch (entity) {
18  /* CHM decoder version 1 -> 2 changes:
19  * - added mschmd_sec_mscompressed::spaninfo
20  * - added mschmd_header::first_pmgl
21  * - added mschmd_header::last_pmgl
22  * - added mschmd_header::chunk_cache;
23  */
24  case MSPACK_VER_MSCHMD:
25  /* CAB decoder version 1 -> 2 changes:
26  * - added MSCABD_PARAM_SALVAGE
27  */
28  case MSPACK_VER_MSCABD:
29  /* OAB decoder version 1 -> 2 changes:
30  * - added msoab_decompressor::set_param and MSOABD_PARAM_DECOMPBUF
31  */
32  case MSPACK_VER_MSOABD:
33  return 2;
34  case MSPACK_VER_LIBRARY:
35  case MSPACK_VER_SYSTEM:
36  case MSPACK_VER_MSSZDDD:
37  case MSPACK_VER_MSKWAJD:
38  return 1;
39  case MSPACK_VER_MSCABC:
40  case MSPACK_VER_MSCHMC:
41  case MSPACK_VER_MSLITD:
42  case MSPACK_VER_MSLITC:
43  case MSPACK_VER_MSHLPD:
44  case MSPACK_VER_MSHLPC:
45  case MSPACK_VER_MSSZDDC:
46  case MSPACK_VER_MSKWAJC:
47  case MSPACK_VER_MSOABC:
48  return 0;
49  }
50  return -1;
51 }
#define MSPACK_VER_MSOABD
Definition: mspack.h:260
#define MSPACK_VER_MSCABD
Definition: mspack.h:236
#define MSPACK_VER_MSCHMC
Definition: mspack.h:242
#define MSPACK_VER_SYSTEM
Definition: mspack.h:234
#define MSPACK_VER_MSOABC
Definition: mspack.h:262
#define MSPACK_VER_MSKWAJD
Definition: mspack.h:256
#define MSPACK_VER_MSLITD
Definition: mspack.h:244
#define MSPACK_VER_MSKWAJC
Definition: mspack.h:258
#define MSPACK_VER_MSHLPC
Definition: mspack.h:250
#define MSPACK_VER_LIBRARY
Definition: mspack.h:232
#define MSPACK_VER_MSCHMD
Definition: mspack.h:240
#define MSPACK_VER_MSLITC
Definition: mspack.h:246
#define MSPACK_VER_MSCABC
Definition: mspack.h:238
#define MSPACK_VER_MSSZDDD
Definition: mspack.h:252
#define MSPACK_VER_MSHLPD
Definition: mspack.h:248
#define MSPACK_VER_MSSZDDC
Definition: mspack.h:254

References MSPACK_VER_LIBRARY, MSPACK_VER_MSCABC, MSPACK_VER_MSCABD, MSPACK_VER_MSCHMC, MSPACK_VER_MSCHMD, MSPACK_VER_MSHLPC, MSPACK_VER_MSHLPD, MSPACK_VER_MSKWAJC, MSPACK_VER_MSKWAJD, MSPACK_VER_MSLITC, MSPACK_VER_MSLITD, MSPACK_VER_MSOABC, MSPACK_VER_MSOABD, MSPACK_VER_MSSZDDC, MSPACK_VER_MSSZDDD, and MSPACK_VER_SYSTEM.