libdigidocpp
iowin32.c File Reference
#include <stdlib.h>
#include "zlib.h"
#include "ioapi.h"
#include "iowin32.h"
Include dependency graph for iowin32.c:

Go to the source code of this file.

Classes

struct  WIN32FILE_IOWIN

Macros

#define INVALID_HANDLE_VALUE   (0xFFFFFFFF)
#define INVALID_SET_FILE_POINTER   ((DWORD)-1)

Functions

voidpf ZCALLBACK
win32_open_file_func 
OF ((voidpf opaque, const char *filename, int mode))
uLong ZCALLBACK
win32_read_file_func 
OF ((voidpf opaque, voidpf stream, void *buf, uLong size))
uLong ZCALLBACK
win32_write_file_func 
OF ((voidpf opaque, voidpf stream, const void *buf, uLong size))
ZPOS64_T ZCALLBACK
win32_tell64_file_func 
OF ((voidpf opaque, voidpf stream))
long ZCALLBACK
win32_seek64_file_func 
OF ((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin))
static void win32_translate_open_mode (int mode, DWORD *lpdwDesiredAccess, DWORD *lpdwCreationDisposition, DWORD *lpdwShareMode, DWORD *lpdwFlagsAndAttributes)
static voidpf win32_build_iowin (HANDLE hFile)
voidpf ZCALLBACK win32_open64_file_func (voidpf opaque, const void *filename, int mode)
voidpf ZCALLBACK win32_open64_file_funcA (voidpf opaque, const void *filename, int mode)
voidpf ZCALLBACK win32_open64_file_funcW (voidpf opaque, const void *filename, int mode)
voidpf ZCALLBACK win32_open_file_func (voidpf opaque, const char *filename, int mode)
uLong ZCALLBACK win32_read_file_func (voidpf opaque, voidpf stream, void *buf, uLong size)
uLong ZCALLBACK win32_write_file_func (voidpf opaque, voidpf stream, const void *buf, uLong size)
long ZCALLBACK win32_tell_file_func (voidpf opaque, voidpf stream)
ZPOS64_T ZCALLBACK win32_tell64_file_func (voidpf opaque, voidpf stream)
long ZCALLBACK win32_seek_file_func (voidpf opaque, voidpf stream, uLong offset, int origin)
long ZCALLBACK win32_seek64_file_func (voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)
int ZCALLBACK win32_close_file_func (voidpf opaque, voidpf stream)
int ZCALLBACK win32_error_file_func (voidpf opaque, voidpf stream)
void fill_win32_filefunc (zlib_filefunc_def *pzlib_filefunc_def)
void fill_win32_filefunc64 (zlib_filefunc64_def *pzlib_filefunc_def)
void fill_win32_filefunc64A (zlib_filefunc64_def *pzlib_filefunc_def)
void fill_win32_filefunc64W (zlib_filefunc64_def *pzlib_filefunc_def)

Macro Definition Documentation

#define INVALID_HANDLE_VALUE   (0xFFFFFFFF)

Definition at line 21 of file iowin32.c.

Referenced by digidoc::util::File::getDirSubElements(), and win32_build_iowin().

#define INVALID_SET_FILE_POINTER   ((DWORD)-1)

Definition at line 25 of file iowin32.c.

Referenced by win32_seek64_file_func(), win32_seek_file_func(), and win32_tell_file_func().

Function Documentation

voidpf ZCALLBACK win32_open_file_func OF ( (voidpf opaque, const char *filename, int mode )
static voidpf win32_build_iowin ( HANDLE  hFile)
static

Definition at line 69 of file iowin32.c.

References WIN32FILE_IOWIN::error, WIN32FILE_IOWIN::hf, INVALID_HANDLE_VALUE, and voidpf().

Referenced by win32_open64_file_func(), win32_open64_file_funcA(), win32_open64_file_funcW(), and win32_open_file_func().

Here is the call graph for this function:

Here is the caller graph for this function:

int ZCALLBACK win32_close_file_func ( voidpf  opaque,
voidpf  stream 
)

Definition at line 313 of file iowin32.c.

Referenced by fill_win32_filefunc(), fill_win32_filefunc64(), fill_win32_filefunc64A(), and fill_win32_filefunc64W().

Here is the caller graph for this function:

int ZCALLBACK win32_error_file_func ( voidpf  opaque,
voidpf  stream 
)

Definition at line 331 of file iowin32.c.

Referenced by fill_win32_filefunc(), fill_win32_filefunc64(), fill_win32_filefunc64A(), and fill_win32_filefunc64W().

Here is the caller graph for this function:

voidpf ZCALLBACK win32_open64_file_func ( voidpf  opaque,
const void *  filename,
int  mode 
)

Definition at line 88 of file iowin32.c.

References win32_build_iowin(), and win32_translate_open_mode().

Referenced by fill_win32_filefunc64().

Here is the call graph for this function:

Here is the caller graph for this function:

voidpf ZCALLBACK win32_open64_file_funcA ( voidpf  opaque,
const void *  filename,
int  mode 
)

Definition at line 103 of file iowin32.c.

References win32_build_iowin(), and win32_translate_open_mode().

Referenced by fill_win32_filefunc64A().

Here is the call graph for this function:

Here is the caller graph for this function:

voidpf ZCALLBACK win32_open64_file_funcW ( voidpf  opaque,
const void *  filename,
int  mode 
)

Definition at line 118 of file iowin32.c.

References win32_build_iowin(), and win32_translate_open_mode().

Referenced by fill_win32_filefunc64W().

Here is the call graph for this function:

Here is the caller graph for this function:

voidpf ZCALLBACK win32_open_file_func ( voidpf  opaque,
const char *  filename,
int  mode 
)

Definition at line 133 of file iowin32.c.

References win32_build_iowin(), and win32_translate_open_mode().

Referenced by fill_win32_filefunc().

Here is the call graph for this function:

Here is the caller graph for this function:

uLong ZCALLBACK win32_read_file_func ( voidpf  opaque,
voidpf  stream,
void *  buf,
uLong  size 
)

Definition at line 148 of file iowin32.c.

References int(), and uLong().

Referenced by fill_win32_filefunc(), fill_win32_filefunc64(), fill_win32_filefunc64A(), and fill_win32_filefunc64W().

Here is the call graph for this function:

Here is the caller graph for this function:

long ZCALLBACK win32_seek64_file_func ( voidpf  opaque,
voidpf  stream,
ZPOS64_T  offset,
int  origin 
)

Definition at line 274 of file iowin32.c.

References int(), INVALID_SET_FILE_POINTER, ZLIB_FILEFUNC_SEEK_CUR, ZLIB_FILEFUNC_SEEK_END, and ZLIB_FILEFUNC_SEEK_SET.

Referenced by fill_win32_filefunc64(), fill_win32_filefunc64A(), and fill_win32_filefunc64W().

Here is the call graph for this function:

Here is the caller graph for this function:

long ZCALLBACK win32_seek_file_func ( voidpf  opaque,
voidpf  stream,
uLong  offset,
int  origin 
)

Definition at line 237 of file iowin32.c.

References int(), INVALID_SET_FILE_POINTER, ZLIB_FILEFUNC_SEEK_CUR, ZLIB_FILEFUNC_SEEK_END, and ZLIB_FILEFUNC_SEEK_SET.

Referenced by fill_win32_filefunc().

Here is the call graph for this function:

Here is the caller graph for this function:

ZPOS64_T ZCALLBACK win32_tell64_file_func ( voidpf  opaque,
voidpf  stream 
)

Definition at line 212 of file iowin32.c.

References int().

Referenced by fill_win32_filefunc64(), fill_win32_filefunc64A(), and fill_win32_filefunc64W().

Here is the call graph for this function:

Here is the caller graph for this function:

long ZCALLBACK win32_tell_file_func ( voidpf  opaque,
voidpf  stream 
)

Definition at line 191 of file iowin32.c.

References int(), INVALID_SET_FILE_POINTER, and long().

Referenced by fill_win32_filefunc().

Here is the call graph for this function:

Here is the caller graph for this function:

static void win32_translate_open_mode ( int  mode,
DWORD *  lpdwDesiredAccess,
DWORD *  lpdwCreationDisposition,
DWORD *  lpdwShareMode,
DWORD *  lpdwFlagsAndAttributes 
)
static
uLong ZCALLBACK win32_write_file_func ( voidpf  opaque,
voidpf  stream,
const void *  buf,
uLong  size 
)

Definition at line 170 of file iowin32.c.

References int(), and uLong().

Referenced by fill_win32_filefunc(), fill_win32_filefunc64(), fill_win32_filefunc64A(), and fill_win32_filefunc64W().

Here is the call graph for this function:

Here is the caller graph for this function: