Public function reference

Function header: void WIArchive::add (char *filename, char *arcname, short package)
Description: Adds a file to the archive
Arguments:
    filename - Name of the file to read
    arcname - Name of the file after it's been put into the archive
    package - Which package number this file belongs to

Function header: const list *WIArchive::get_file_list ()
Description: Returns a pointer to the cute archive header
Return: A constant pointer to the file list

Function header: const WIArcHeader *WIArchive::get_arc_header ()
Description: Gives the caller a pointer to our dirty little list
Return: A pointer to the actual archive header

Function header: int WIArchive::open (char *filename)
Description: Opens the archive
Arguments: filename - Name of the archive
Return: If anything went wrong, you get a zero back

Function header: void WIArchive::remove (char *filename, short package)
Description: Removes a file from the archive
Arguments:
    filename - Name of the file to remove
    package - Which package it belongs to

Public structure reference

struct WIFile
{
    char *name;                 // Name of file
    char *extra;                // Possible extra information
    short package;              // Which package it belongs to
};

struct WIArcHeader
{
    char  v1, v2, v3, v4;       // Archive verification
    short wi_revision_needed;   // Minimum WarpIN version required
    char  path[64];             // Installation path
    char  name_app[64];         // Application name
    char  name_dev[64];         // Delevoper name
    short rev_app;              // Application revision
    short os;                   // Operating system to install to
    short packs;                // Number of packages in archive
};

struct WIPackHeader
{
    short number;               // Package number
    short files;                // Number of files in package
    long  pos;                  // Position in archive
    long  origsize;             // Size of package (original)
    long  compsize;             // Size of package (compressed)
    char  name[32];             // Name of package
};

struct WIFileHeader
{
    short checksum;             // Header checksum
    short method;               // Compression method used
    short package;              // Which package it belongs to
    long  origsize;             // Size of file (original)
    long  compsize;             // Size of file (compressed)
    long  crc;                  // File CRC checksum
    char  name [128];           // Filename
    short extended;             // Size of extended information (if any)
};