Back to index

scribus-ng  1.3.4.dfsg+svn20071115
Classes | Defines | Typedefs | Functions
unzip.h File Reference
#include "scconfig.h"
#include "zlib.h"
#include "ioapi.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tm_unz_s
struct  unz_global_info_s
struct  unz_file_info_s
struct  unz_file_pos_s

Defines

#define UNZ_OK   (0)
#define UNZ_END_OF_LIST_OF_FILE   (-100)
#define UNZ_ERRNO   (Z_ERRNO)
#define UNZ_EOF   (0)
#define UNZ_PARAMERROR   (-102)
#define UNZ_BADZIPFILE   (-103)
#define UNZ_INTERNALERROR   (-104)
#define UNZ_CRCERROR   (-105)

Typedefs

typedef voidp unzFile
typedef struct tm_unz_s tm_unz
typedef struct unz_global_info_s unz_global_info
typedef struct unz_file_info_s unz_file_info
typedef struct unz_file_pos_s unz_file_pos

Functions

int ZEXPORT
unzStringFileNameCompare 
OF ((const char *fileName1, const char *fileName2, int iCaseSensitivity))
unzFile ZEXPORT unzOpen OF ((const char *path))
unzFile ZEXPORT unzOpen2 OF ((const char *path, zlib_filefunc_def *pzlib_filefunc_def))
int ZEXPORT unzClose OF ((unzFile file))
int ZEXPORT unzGetGlobalInfo OF ((unzFile file, unz_global_info *pglobal_info))
int ZEXPORT unzGetGlobalComment OF ((unzFile file, char *szComment, uLong uSizeBuf))
int ZEXPORT unzLocateFile OF ((unzFile file, const char *szFileName, int iCaseSensitivity))
int ZEXPORT unzGetFilePos (unzFile file, unz_file_pos *file_pos)
int ZEXPORT unzGoToFilePos (unzFile file, unz_file_pos *file_pos)
int ZEXPORT unzGetCurrentFileInfo OF ((unzFile file, unz_file_info *pfile_info, char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char *szComment, uLong commentBufferSize))
int ZEXPORT
unzOpenCurrentFilePassword 
OF ((unzFile file, const char *password))
int ZEXPORT unzOpenCurrentFile2 OF ((unzFile file, int *method, int *level, int raw))
int ZEXPORT unzOpenCurrentFile3 OF ((unzFile file, int *method, int *level, int raw, const char *password))
int ZEXPORT unzReadCurrentFile OF ((unzFile file, voidp buf, unsigned len))
uLong ZEXPORT unzGetOffset (unzFile file)
int ZEXPORT unzSetOffset (unzFile file, uLong pos)

Class Documentation

struct tm_unz_s

Definition at line 86 of file unzip.h.

Class Members
uInt tm_hour
uInt tm_mday
uInt tm_min
uInt tm_mon
uInt tm_sec
uInt tm_year
struct unz_global_info_s

Definition at line 98 of file unzip.h.

Class Members
uLong number_entry
uLong size_comment
struct unz_file_info_s

Definition at line 107 of file unzip.h.

Collaboration diagram for unz_file_info_s:
Class Members
uLong compressed_size
uLong compression_method
uLong crc
uLong disk_num_start
uLong dosDate
uLong external_fa
uLong flag
uLong internal_fa
uLong size_file_comment
uLong size_file_extra
uLong size_filename
tm_unz tmu_date
uLong uncompressed_size
uLong version
uLong version_needed
struct unz_file_pos_s

Definition at line 216 of file unzip.h.

Class Members
uLong num_of_file
uLong pos_in_zip_directory

Define Documentation

#define UNZ_BADZIPFILE   (-103)

Definition at line 81 of file unzip.h.

#define UNZ_CRCERROR   (-105)

Definition at line 83 of file unzip.h.

#define UNZ_END_OF_LIST_OF_FILE   (-100)

Definition at line 77 of file unzip.h.

#define UNZ_EOF   (0)

Definition at line 79 of file unzip.h.

#define UNZ_ERRNO   (Z_ERRNO)

Definition at line 78 of file unzip.h.

#define UNZ_INTERNALERROR   (-104)

Definition at line 82 of file unzip.h.

#define UNZ_OK   (0)

Definition at line 76 of file unzip.h.

#define UNZ_PARAMERROR   (-102)

Definition at line 80 of file unzip.h.


Typedef Documentation

typedef struct tm_unz_s tm_unz
typedef struct unz_file_pos_s unz_file_pos
typedef voidp unzFile

Definition at line 72 of file unzip.h.


Function Documentation

int ZEXPORT unzStringFileNameCompare OF ( (const char *fileName1, const char *fileName2, int iCaseSensitivity)  )
unzFile ZEXPORT unzOpen OF ( (const char *path)  )
unzFile ZEXPORT unzOpen2 OF ( (const char *path, zlib_filefunc_def *pzlib_filefunc_def)  )
int ZEXPORT unzeof OF ( (unzFile file)  )
int ZEXPORT unzGetGlobalInfo OF ( (unzFile file, unz_global_info *pglobal_info)  )
int ZEXPORT unzGetGlobalComment OF ( (unzFile file, char *szComment, uLong uSizeBuf)  )
int ZEXPORT unzLocateFile OF ( (unzFile file, const char *szFileName, int iCaseSensitivity)  )
int ZEXPORT unzGetCurrentFileInfo OF ( (unzFile file, unz_file_info *pfile_info, char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char *szComment, uLong commentBufferSize)  )
int ZEXPORT unzOpenCurrentFilePassword OF ( (unzFile file, const char *password)  )
int ZEXPORT unzOpenCurrentFile2 OF ( (unzFile file, int *method, int *level, int raw)  )
int ZEXPORT unzOpenCurrentFile3 OF ( (unzFile file, int *method, int *level, int raw, const char *password)  )
int ZEXPORT unzGetLocalExtrafield OF ( (unzFile file, voidp buf, unsigned len)  )
int ZEXPORT unzGetFilePos ( unzFile  file,
unz_file_pos file_pos 
)

Definition at line 913 of file unzip.c.

{
    unz_s* s;

    if (file==NULL || file_pos==NULL)
        return UNZ_PARAMERROR;
    s=(unz_s*)file;
    if (!s->current_file_ok)
        return UNZ_END_OF_LIST_OF_FILE;

    file_pos->pos_in_zip_directory  = s->pos_in_central_dir;
    file_pos->num_of_file           = s->num_file;

    return UNZ_OK;
}
uLong ZEXPORT unzGetOffset ( unzFile  file)

Definition at line 1560 of file unzip.c.

{
    unz_s* s;

    if (file==NULL)
          return UNZ_PARAMERROR;
    s=(unz_s*)file;
    if (!s->current_file_ok)
      return 0;
    if (s->gi.number_entry != 0 && s->gi.number_entry != 0xffff)
      if (s->num_file==s->gi.number_entry)
         return 0;
    return s->pos_in_central_dir;
}
int ZEXPORT unzGoToFilePos ( unzFile  file,
unz_file_pos file_pos 
)

Definition at line 931 of file unzip.c.

{
    unz_s* s;
    int err;

    if (file==NULL || file_pos==NULL)
        return UNZ_PARAMERROR;
    s=(unz_s*)file;

    /* jump to the right spot */
    s->pos_in_central_dir = file_pos->pos_in_zip_directory;
    s->num_file           = file_pos->num_of_file;

    /* set the current file */
    err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
                                               &s->cur_file_info_internal,
                                               NULL,0,NULL,0,NULL,0);
    /* return results */
    s->current_file_ok = (err == UNZ_OK);
    return err;
}

Here is the call graph for this function:

int ZEXPORT unzSetOffset ( unzFile  file,
uLong  pos 
)

Definition at line 1576 of file unzip.c.

{
    unz_s* s;
    int err;

    if (file==NULL)
        return UNZ_PARAMERROR;
    s=(unz_s*)file;

    s->pos_in_central_dir = pos;
    s->num_file = s->gi.number_entry;      /* hack */
    err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
                                              &s->cur_file_info_internal,
                                              NULL,0,NULL,0,NULL,0);
    s->current_file_ok = (err == UNZ_OK);
    return err;
}

Here is the call graph for this function: