Oolite 1.91.0.7646-241128-10e222e
Loading...
Searching...
No Matches
ioapi.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include "zlib.h"
+ Include dependency graph for ioapi.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  zlib_filefunc_def_s
 
struct  zlib_filefunc64_def_s
 
struct  zlib_filefunc64_32_def_s
 

Macros

#define __USE_FILE_OFFSET64
 
#define __USE_LARGEFILE64
 
#define _LARGEFILE64_SOURCE
 
#define _FILE_OFFSET_BIT   64
 
#define ZLIB_FILEFUNC_SEEK_CUR   (1)
 
#define ZLIB_FILEFUNC_SEEK_END   (2)
 
#define ZLIB_FILEFUNC_SEEK_SET   (0)
 
#define ZLIB_FILEFUNC_MODE_READ   (1)
 
#define ZLIB_FILEFUNC_MODE_WRITE   (2)
 
#define ZLIB_FILEFUNC_MODE_READWRITEFILTER   (3)
 
#define ZLIB_FILEFUNC_MODE_EXISTING   (4)
 
#define ZLIB_FILEFUNC_MODE_CREATE   (8)
 
#define ZCALLBACK
 
#define ZREAD64(filefunc, filestream, buf, size)
 
#define ZWRITE64(filefunc, filestream, buf, size)
 
#define ZCLOSE64(filefunc, filestream)
 
#define ZERROR64(filefunc, filestream)
 
#define ZOPEN64(filefunc, filename, mode)
 
#define ZTELL64(filefunc, filestream)
 
#define ZSEEK64(filefunc, filestream, pos, mode)
 

Typedefs

typedef unsigned long long int ZPOS64_T
 
typedef const char * filename
 
typedef const char int mode
 
typedef voidpf stream
 
typedef voidpf void * buf
 
typedef voidpf void uLong size
 
typedef voidpf uLong offset
 
typedef voidpf uLong int origin
 
typedef struct zlib_filefunc_def_s zlib_filefunc_def
 
typedef struct zlib_filefunc64_def_s zlib_filefunc64_def
 
typedef struct zlib_filefunc64_32_def_s zlib_filefunc64_32_def
 

Functions

typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque
 
typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque
 
typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque
 
typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque
 
typedef ZPOS64_T (ZCALLBACK *tell64_file_func) OF((voidpf opaque
 
void fill_fopen64_filefunc OF ((zlib_filefunc64_def *pzlib_filefunc_def))
 
void fill_fopen_filefunc OF ((zlib_filefunc_def *pzlib_filefunc_def))
 
voidpf call_zopen64 OF ((const zlib_filefunc64_32_def *pfilefunc, const void *filename, int mode))
 
long call_zseek64 OF ((const zlib_filefunc64_32_def *pfilefunc, voidpf filestream, ZPOS64_T offset, int origin))
 
ZPOS64_T call_ztell64 OF ((const zlib_filefunc64_32_def *pfilefunc, voidpf filestream))
 
void fill_zlib_filefunc64_32_def_from_filefunc32 (zlib_filefunc64_32_def *p_filefunc64_32, const zlib_filefunc_def *p_filefunc32)
 

Macro Definition Documentation

◆ __USE_FILE_OFFSET64

#define __USE_FILE_OFFSET64

Definition at line 30 of file ioapi.h.

◆ __USE_LARGEFILE64

#define __USE_LARGEFILE64

Definition at line 33 of file ioapi.h.

◆ _FILE_OFFSET_BIT

#define _FILE_OFFSET_BIT   64

Definition at line 39 of file ioapi.h.

◆ _LARGEFILE64_SOURCE

#define _LARGEFILE64_SOURCE

Definition at line 36 of file ioapi.h.

◆ ZCALLBACK

#define ZCALLBACK

Definition at line 126 of file ioapi.h.

◆ ZCLOSE64

#define ZCLOSE64 ( filefunc,
filestream )
Value:
((*((filefunc).zfile_func64.zclose_file)) ((filefunc).zfile_func64.opaque,filestream))

Definition at line 189 of file ioapi.h.

Referenced by unzClose(), and unzOpenInternal().

◆ ZERROR64

#define ZERROR64 ( filefunc,
filestream )
Value:
((*((filefunc).zfile_func64.zerror_file)) ((filefunc).zfile_func64.opaque,filestream))

Definition at line 190 of file ioapi.h.

Referenced by unz64local_getByte().

◆ ZLIB_FILEFUNC_MODE_CREATE

#define ZLIB_FILEFUNC_MODE_CREATE   (8)

Definition at line 119 of file ioapi.h.

Referenced by fopen64_file_func(), and fopen_file_func().

◆ ZLIB_FILEFUNC_MODE_EXISTING

#define ZLIB_FILEFUNC_MODE_EXISTING   (4)

Definition at line 118 of file ioapi.h.

Referenced by fopen64_file_func(), fopen_file_func(), and unzOpenInternal().

◆ ZLIB_FILEFUNC_MODE_READ

#define ZLIB_FILEFUNC_MODE_READ   (1)

Definition at line 114 of file ioapi.h.

Referenced by fopen64_file_func(), fopen_file_func(), and unzOpenInternal().

◆ ZLIB_FILEFUNC_MODE_READWRITEFILTER

#define ZLIB_FILEFUNC_MODE_READWRITEFILTER   (3)

Definition at line 116 of file ioapi.h.

Referenced by fopen64_file_func(), and fopen_file_func().

◆ ZLIB_FILEFUNC_MODE_WRITE

#define ZLIB_FILEFUNC_MODE_WRITE   (2)

Definition at line 115 of file ioapi.h.

◆ ZLIB_FILEFUNC_SEEK_CUR

#define ZLIB_FILEFUNC_SEEK_CUR   (1)

◆ ZLIB_FILEFUNC_SEEK_END

#define ZLIB_FILEFUNC_SEEK_END   (2)

◆ ZLIB_FILEFUNC_SEEK_SET

◆ ZOPEN64

#define ZOPEN64 ( filefunc,
filename,
mode )
Value:
(call_zopen64((&(filefunc)),(filename),(mode)))
voidpf call_zopen64(const zlib_filefunc64_32_def *pfilefunc, const void *filename, int mode)
Definition ioapi.c:26
const char * filename
Definition ioapi.h:133
const char int mode
Definition ioapi.h:133

Definition at line 198 of file ioapi.h.

Referenced by unzOpenInternal().

◆ ZREAD64

#define ZREAD64 ( filefunc,
filestream,
buf,
size )
Value:
((*((filefunc).zfile_func64.zread_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size))
voidpf void uLong size
Definition ioapi.h:134
voidpf void * buf
Definition ioapi.h:134

Definition at line 185 of file ioapi.h.

Referenced by unz64local_getByte(), unz64local_GetCurrentFileInfoInternal(), unz64local_SearchCentralDir(), unz64local_SearchCentralDir64(), unzGetGlobalComment(), unzGetLocalExtrafield(), unzOpenCurrentFile3(), and unzReadCurrentFile().

◆ ZSEEK64

#define ZSEEK64 ( filefunc,
filestream,
pos,
mode )
Value:
(call_zseek64((&(filefunc)),(filestream),(pos),(mode)))
long call_zseek64(const zlib_filefunc64_32_def *pfilefunc, voidpf filestream, ZPOS64_T offset, int origin)
Definition ioapi.c:36

Definition at line 200 of file ioapi.h.

Referenced by unz64local_CheckCurrentFileCoherencyHeader(), unz64local_GetCurrentFileInfoInternal(), unz64local_SearchCentralDir(), unz64local_SearchCentralDir64(), unzGetGlobalComment(), unzGetLocalExtrafield(), unzOpenCurrentFile3(), unzOpenInternal(), and unzReadCurrentFile().

◆ ZTELL64

#define ZTELL64 ( filefunc,
filestream )
Value:
(call_ztell64((&(filefunc)),(filestream)))
ZPOS64_T call_ztell64(const zlib_filefunc64_32_def *pfilefunc, voidpf filestream)
Definition ioapi.c:50

Definition at line 199 of file ioapi.h.

Referenced by unz64local_SearchCentralDir(), and unz64local_SearchCentralDir64().

◆ ZWRITE64

#define ZWRITE64 ( filefunc,
filestream,
buf,
size )
Value:
((*((filefunc).zfile_func64.zwrite_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size))

Definition at line 186 of file ioapi.h.

Typedef Documentation

◆ buf

typedef voidpf const void * buf

Definition at line 134 of file ioapi.h.

◆ filename

typedef const void * filename

Definition at line 133 of file ioapi.h.

◆ mode

typedef const void int mode

Definition at line 133 of file ioapi.h.

◆ offset

Definition at line 140 of file ioapi.h.

◆ origin

Definition at line 140 of file ioapi.h.

◆ size

typedef voidpf const void uLong size

Definition at line 134 of file ioapi.h.

◆ stream

typedef voidpf stream

Definition at line 134 of file ioapi.h.

◆ zlib_filefunc64_32_def

◆ zlib_filefunc64_def

◆ zlib_filefunc_def

◆ ZPOS64_T

typedef unsigned long long int ZPOS64_T

Definition at line 98 of file ioapi.h.

Function Documentation

◆ fill_zlib_filefunc64_32_def_from_filefunc32()

void fill_zlib_filefunc64_32_def_from_filefunc32 ( zlib_filefunc64_32_def * p_filefunc64_32,
const zlib_filefunc_def * p_filefunc32 )

Definition at line 64 of file ioapi.c.

65{
66 p_filefunc64_32->zfile_func64.zopen64_file = NULL;
67 p_filefunc64_32->zopen32_file = p_filefunc32->zopen_file;
68 p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_file;
69 p_filefunc64_32->zfile_func64.zread_file = p_filefunc32->zread_file;
70 p_filefunc64_32->zfile_func64.zwrite_file = p_filefunc32->zwrite_file;
71 p_filefunc64_32->zfile_func64.ztell64_file = NULL;
72 p_filefunc64_32->zfile_func64.zseek64_file = NULL;
73 p_filefunc64_32->zfile_func64.zclose_file = p_filefunc32->zclose_file;
74 p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_file;
75 p_filefunc64_32->zfile_func64.opaque = p_filefunc32->opaque;
76 p_filefunc64_32->zseek32_file = p_filefunc32->zseek_file;
77 p_filefunc64_32->ztell32_file = p_filefunc32->ztell_file;
78}
seek_file_func zseek32_file
Definition ioapi.h:181
zlib_filefunc64_def zfile_func64
Definition ioapi.h:178
open_file_func zopen32_file
Definition ioapi.h:179
tell_file_func ztell32_file
Definition ioapi.h:180
write_file_func zwrite_file
Definition ioapi.h:164
open64_file_func zopen64_file
Definition ioapi.h:162
read_file_func zread_file
Definition ioapi.h:163
tell64_file_func ztell64_file
Definition ioapi.h:165
close_file_func zclose_file
Definition ioapi.h:167
seek64_file_func zseek64_file
Definition ioapi.h:166
testerror_file_func zerror_file
Definition ioapi.h:168
seek_file_func zseek_file
Definition ioapi.h:150
open_file_func zopen_file
Definition ioapi.h:146
testerror_file_func zerror_file
Definition ioapi.h:152
write_file_func zwrite_file
Definition ioapi.h:148
read_file_func zread_file
Definition ioapi.h:147
close_file_func zclose_file
Definition ioapi.h:151
tell_file_func ztell_file
Definition ioapi.h:149

References zlib_filefunc64_def_s::opaque, zlib_filefunc_def_s::opaque, zlib_filefunc64_def_s::zclose_file, zlib_filefunc_def_s::zclose_file, zlib_filefunc64_def_s::zerror_file, zlib_filefunc_def_s::zerror_file, zlib_filefunc64_32_def_s::zfile_func64, zlib_filefunc64_32_def_s::zopen32_file, zlib_filefunc64_def_s::zopen64_file, zlib_filefunc_def_s::zopen_file, zlib_filefunc64_def_s::zread_file, zlib_filefunc_def_s::zread_file, zlib_filefunc64_32_def_s::zseek32_file, zlib_filefunc64_def_s::zseek64_file, zlib_filefunc_def_s::zseek_file, zlib_filefunc64_32_def_s::ztell32_file, zlib_filefunc64_def_s::ztell64_file, zlib_filefunc_def_s::ztell_file, zlib_filefunc64_def_s::zwrite_file, and zlib_filefunc_def_s::zwrite_file.

Referenced by unzOpen2().

+ Here is the caller graph for this function:

◆ int()

◆ long()

typedef long ( ZCALLBACK * tell_file_func)

◆ OF() [1/5]

voidpf call_zopen64 OF ( (const zlib_filefunc64_32_def *pfilefunc, const void *filename, int mode) )

◆ OF() [2/5]

ZPOS64_T call_ztell64 OF ( (const zlib_filefunc64_32_def *pfilefunc, voidpf filestream) )

◆ OF() [3/5]

long call_zseek64 OF ( (const zlib_filefunc64_32_def *pfilefunc, voidpf filestream, ZPOS64_T offset, int origin) )

◆ OF() [4/5]

void fill_fopen64_filefunc OF ( (zlib_filefunc64_def *pzlib_filefunc_def) )

◆ OF() [5/5]

void fill_fopen_filefunc OF ( (zlib_filefunc_def *pzlib_filefunc_def) )

◆ uLong()

typedef uLong ( ZCALLBACK * read_file_func)

◆ voidpf()

typedef voidpf ( ZCALLBACK * open_file_func)

◆ ZPOS64_T()

typedef ZPOS64_T ( ZCALLBACK * tell64_file_func)