SimCenterCommon
Common functionality used within different SimCenter projects
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "zlib.h"
#include "zip.h"
#include <errno.h>
#include "crypt.h"
Go to the source code of this file.
Classes | |
struct | linkedlist_datablock_internal_s |
struct | linkedlist_data_s |
struct | curfile_info |
struct | zip_internal |
Macros | |
#define | local static |
#define | VERSIONMADEBY (0x0) /* platform depedent */ |
#define | Z_BUFSIZE (16384) |
#define | Z_MAXFILENAMEINZIP (256) |
#define | ALLOC(size) (malloc(size)) |
#define | TRYFREE(p) {if (p) free(p);} |
#define | SEEK_CUR 1 |
#define | SEEK_END 2 |
#define | SEEK_SET 0 |
#define | SIZEDATA_INDATABLOCK (4096-(4*4)) |
#define | LOCALHEADERMAGIC (0x04034b50) |
#define | CENTRALHEADERMAGIC (0x02014b50) |
#define | ENDHEADERMAGIC (0x06054b50) |
#define | FLAG_LOCALHEADER_OFFSET (0x06) |
#define | CRC_LOCALHEADER_OFFSET (0x0e) |
#define | SIZECENTRALHEADER (0x2e) /* 46 */ |
#define | INCLUDECRYPTINGCODE_IFCRYPTALLOWED |
#define | BUFREADCOMMENT (0x400) |
Typedefs | |
typedef struct linkedlist_datablock_internal_s | linkedlist_datablock_internal |
typedef struct linkedlist_data_s | linkedlist_data |
Functions | |
local linkedlist_datablock_internal * | allocate_new_datablock () |
local void | free_datablock (linkedlist_datablock_internal *ldi) |
local void | init_linkedlist (linkedlist_data *ll) |
local int | add_data_in_datablock (linkedlist_data *ll, const void *buf, uLong len) |
local int ziplocal_putValue | OF ((const zlib_filefunc_def *pzlib_filefunc_def, voidpf filestream, uLong x, int nbByte)) |
local int | ziplocal_putValue (zlib_filefunc_def *pzlib_filefunc_def, voidpf filestream, uLong x, int nbByte) const |
local void ziplocal_putValue_inmemory | OF ((void *dest, uLong x, int nbByte)) |
local void | ziplocal_putValue_inmemory (void *dest, uLong x, int nbByte) |
local uLong | ziplocal_TmzDateToDosDate (tm_zip *ptm, uLong dosDate) const |
local int ziplocal_getByte | OF ((const zlib_filefunc_def *pzlib_filefunc_def, voidpf filestream, int *pi)) |
local int | ziplocal_getByte (zlib_filefunc_def *pzlib_filefunc_def, voidpf filestream, int *pi) const |
local int ziplocal_getShort | OF ((const zlib_filefunc_def *pzlib_filefunc_def, voidpf filestream, uLong *pX)) |
local int | ziplocal_getShort (zlib_filefunc_def *pzlib_filefunc_def, voidpf filestream, uLong *pX) const |
local int | ziplocal_getLong (zlib_filefunc_def *pzlib_filefunc_def, voidpf filestream, uLong *pX) const |
local uLong ziplocal_SearchCentralDir | OF ((const zlib_filefunc_def *pzlib_filefunc_def, voidpf filestream)) |
local uLong | ziplocal_SearchCentralDir (zlib_filefunc_def *pzlib_filefunc_def, voidpf filestream) const |
zipFile ZEXPORT | zipOpen2 (char *pathname, int append, zipcharpc *globalcomment, zlib_filefunc_def *pzlib_filefunc_def) const |
zipFile ZEXPORT | zipOpen (char *pathname, int append) const |
int ZEXPORT | zipOpenNewFileInZip3 (zipFile file, const char *filename, const zip_fileinfo *zipfi, const void *extrafield_local, uInt size_extrafield_local, const void *extrafield_global, uInt size_extrafield_global, const char *comment, int method, int level, int raw, int windowBits, int memLevel, int strategy, const char *password, uLong crcForCrypting) |
int ZEXPORT | zipOpenNewFileInZip2 (zipFile file, const char *filename, const zip_fileinfo *zipfi, const void *extrafield_local, uInt size_extrafield_local, const void *extrafield_global, uInt size_extrafield_global, const char *comment, int method, int level, int raw) |
int ZEXPORT | zipOpenNewFileInZip (zipFile file, const char *filename, const zip_fileinfo *zipfi, const void *extrafield_local, uInt size_extrafield_local, const void *extrafield_global, uInt size_extrafield_global, const char *comment, int method, int level) |
local int | zipFlushWriteBuffer (zip_internal *zi) |
int ZEXPORT | zipWriteInFileInZip (zipFile file, const void *buf, unsigned len) |
int ZEXPORT | zipCloseFileInZipRaw (zipFile file, uLong uncompressed_size, uLong crc32) |
int ZEXPORT | zipCloseFileInZip (zipFile file) |
int ZEXPORT | zipClose (zipFile file, const char *global_comment) |
Variables | |
const char | zip_copyright [] |
typedef struct linkedlist_data_s linkedlist_data |
typedef struct linkedlist_datablock_internal_s linkedlist_datablock_internal |
local int add_data_in_datablock | ( | linkedlist_data* | ll, |
const void* | buf, | ||
uLong | len | ||
) |
local linkedlist_datablock_internal* allocate_new_datablock | ( | ) |
local void free_datablock | ( | linkedlist_datablock_internal* | ldi | ) |
local void init_linkedlist | ( | linkedlist_data* | ll | ) |
local int ziplocal_putValue OF | ( | (const zlib_filefunc_def *pzlib_filefunc_def, voidpf filestream, uLong x, int nbByte) | ) |
local void ziplocal_putValue_inmemory OF | ( | (void *dest, uLong x, int nbByte) | ) |
local int ziplocal_getByte OF | ( | (const zlib_filefunc_def *pzlib_filefunc_def, voidpf filestream, int *pi) | ) |
local int ziplocal_getShort OF | ( | (const zlib_filefunc_def *pzlib_filefunc_def, voidpf filestream, uLong *pX) | ) |
local uLong ziplocal_SearchCentralDir OF | ( | (const zlib_filefunc_def *pzlib_filefunc_def, voidpf filestream) | ) |
local int zipFlushWriteBuffer | ( | zip_internal* | zi | ) |
local int ziplocal_getByte | ( | zlib_filefunc_def* | pzlib_filefunc_def, |
voidpf | filestream, | ||
int * | pi | ||
) | const |
local int ziplocal_getLong | ( | zlib_filefunc_def* | pzlib_filefunc_def, |
voidpf | filestream, | ||
uLong * | pX | ||
) | const |
local int ziplocal_getShort | ( | zlib_filefunc_def* | pzlib_filefunc_def, |
voidpf | filestream, | ||
uLong * | pX | ||
) | const |
local uLong ziplocal_SearchCentralDir | ( | zlib_filefunc_def* | pzlib_filefunc_def, |
voidpf | filestream | ||
) | const |
zipFile ZEXPORT zipOpen2 | ( | char * | pathname, |
int | append, | ||
zipcharpc* | globalcomment, | ||
zlib_filefunc_def* | pzlib_filefunc_def | ||
) | const |
int ZEXPORT zipOpenNewFileInZip | ( | zipFile | file, |
const char* | filename, | ||
const zip_fileinfo* | zipfi, | ||
const void* | extrafield_local, | ||
uInt | size_extrafield_local, | ||
const void* | extrafield_global, | ||
uInt | size_extrafield_global, | ||
const char* | comment, | ||
int | method, | ||
int | level | ||
) |
int ZEXPORT zipOpenNewFileInZip3 | ( | zipFile | file, |
const char* | filename, | ||
const zip_fileinfo* | zipfi, | ||
const void* | extrafield_local, | ||
uInt | size_extrafield_local, | ||
const void* | extrafield_global, | ||
uInt | size_extrafield_global, | ||
const char* | comment, | ||
int | method, | ||
int | level, | ||
int | raw, | ||
int | windowBits, | ||
int | memLevel, | ||
int | strategy, | ||
const char* | password, | ||
uLong | crcForCrypting | ||
) |