sdk-world v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Loading...
Searching...
No Matches
ioapi.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include "zlib.h"

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 MAXU32   (0xffffffff)
#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 voidpf(ZCALLBACK *) open_file_func(voidpf opaque, const char *filename, int mode)
typedef uLong(ZCALLBACK *) read_file_func(voidpf opaque, voidpf stream, void *buf, uLong size)
typedef uLong(ZCALLBACK *) write_file_func(voidpf opaque, voidpf stream, const void *buf, uLong size)
typedef int(ZCALLBACK *) close_file_func(voidpf opaque, voidpf stream)
typedef int(ZCALLBACK *) testerror_file_func(voidpf opaque, voidpf stream)
typedef long(ZCALLBACK *) tell_file_func(voidpf opaque, voidpf stream)
typedef long(ZCALLBACK *) seek_file_func(voidpf opaque, voidpf stream, uLong offset, int origin)
typedef struct zlib_filefunc_def_s zlib_filefunc_def
typedef ZPOS64_T(ZCALLBACK *) tell64_file_func(voidpf opaque, voidpf stream)
typedef long(ZCALLBACK *) seek64_file_func(voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)
typedef voidpf(ZCALLBACK *) open64_file_func(voidpf opaque, const void *filename, int mode)
typedef struct zlib_filefunc64_def_s zlib_filefunc64_def
typedef struct zlib_filefunc64_32_def_s zlib_filefunc64_32_def

Functions

void fill_fopen64_filefunc (zlib_filefunc64_def *pzlib_filefunc_def)
void fill_fopen_filefunc (zlib_filefunc_def *pzlib_filefunc_def)
voidpf call_zopen64 (const zlib_filefunc64_32_def *pfilefunc, const void *filename, int mode)
long call_zseek64 (const zlib_filefunc64_32_def *pfilefunc, voidpf filestream, ZPOS64_T offset, int origin)
ZPOS64_T call_ztell64 (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 34 of file ioapi.h.

◆ __USE_LARGEFILE64

#define __USE_LARGEFILE64

Definition at line 37 of file ioapi.h.

◆ _FILE_OFFSET_BIT

#define _FILE_OFFSET_BIT   64

Definition at line 43 of file ioapi.h.

◆ _LARGEFILE64_SOURCE

#define _LARGEFILE64_SOURCE

Definition at line 40 of file ioapi.h.

◆ MAXU32

#define MAXU32   (0xffffffff)

Definition at line 110 of file ioapi.h.

◆ ZCALLBACK

#define ZCALLBACK

Definition at line 134 of file ioapi.h.

◆ ZCLOSE64

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

Definition at line 197 of file ioapi.h.

◆ ZERROR64

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

Definition at line 198 of file ioapi.h.

◆ ZLIB_FILEFUNC_MODE_CREATE

#define ZLIB_FILEFUNC_MODE_CREATE   (8)

Definition at line 127 of file ioapi.h.

◆ ZLIB_FILEFUNC_MODE_EXISTING

#define ZLIB_FILEFUNC_MODE_EXISTING   (4)

Definition at line 126 of file ioapi.h.

◆ ZLIB_FILEFUNC_MODE_READ

#define ZLIB_FILEFUNC_MODE_READ   (1)

Definition at line 122 of file ioapi.h.

◆ ZLIB_FILEFUNC_MODE_READWRITEFILTER

#define ZLIB_FILEFUNC_MODE_READWRITEFILTER   (3)

Definition at line 124 of file ioapi.h.

◆ ZLIB_FILEFUNC_MODE_WRITE

#define ZLIB_FILEFUNC_MODE_WRITE   (2)

Definition at line 123 of file ioapi.h.

◆ ZLIB_FILEFUNC_SEEK_CUR

#define ZLIB_FILEFUNC_SEEK_CUR   (1)

Definition at line 118 of file ioapi.h.

◆ ZLIB_FILEFUNC_SEEK_END

#define ZLIB_FILEFUNC_SEEK_END   (2)

Definition at line 119 of file ioapi.h.

◆ ZLIB_FILEFUNC_SEEK_SET

#define ZLIB_FILEFUNC_SEEK_SET   (0)

Definition at line 120 of file ioapi.h.

◆ ZOPEN64

#define ZOPEN64 ( filefunc,
filename,
mode )
Value:
(call_zopen64((&(filefunc)),(filename),(mode)))

Definition at line 206 of file ioapi.h.

◆ ZREAD64

#define ZREAD64 ( filefunc,
filestream,
buf,
size )
Value:
((*((filefunc).zfile_func64.zread_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size))

Definition at line 193 of file ioapi.h.

◆ ZSEEK64

#define ZSEEK64 ( filefunc,
filestream,
pos,
mode )
Value:
(call_zseek64((&(filefunc)),(filestream),(pos),(mode)))

Definition at line 208 of file ioapi.h.

◆ ZTELL64

#define ZTELL64 ( filefunc,
filestream )
Value:
(call_ztell64((&(filefunc)),(filestream)))

Definition at line 207 of file ioapi.h.

◆ ZWRITE64

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

Definition at line 194 of file ioapi.h.

Typedef Documentation

◆ close_file_func

typedef int(ZCALLBACK *) close_file_func(voidpf opaque, voidpf stream)

Definition at line 144 of file ioapi.h.

◆ open64_file_func

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

Definition at line 166 of file ioapi.h.

◆ open_file_func

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

Definition at line 141 of file ioapi.h.

◆ read_file_func

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

Definition at line 142 of file ioapi.h.

◆ seek64_file_func

typedef long(ZCALLBACK *) seek64_file_func(voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)

Definition at line 165 of file ioapi.h.

◆ seek_file_func

typedef long(ZCALLBACK *) seek_file_func(voidpf opaque, voidpf stream, uLong offset, int origin)

Definition at line 148 of file ioapi.h.

◆ tell64_file_func

typedef ZPOS64_T(ZCALLBACK *) tell64_file_func(voidpf opaque, voidpf stream)

Definition at line 164 of file ioapi.h.

◆ tell_file_func

typedef long(ZCALLBACK *) tell_file_func(voidpf opaque, voidpf stream)

Definition at line 147 of file ioapi.h.

◆ testerror_file_func

typedef int(ZCALLBACK *) testerror_file_func(voidpf opaque, voidpf stream)

Definition at line 145 of file ioapi.h.

◆ write_file_func

typedef uLong(ZCALLBACK *) write_file_func(voidpf opaque, voidpf stream, const void *buf, uLong size)

Definition at line 143 of file ioapi.h.

◆ ZPOS64_T

typedef unsigned long long int ZPOS64_T

Definition at line 103 of file ioapi.h.

Function Documentation

◆ call_zopen64()

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

Definition at line 31 of file ioapi.c.

◆ call_zseek64()

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

Definition at line 40 of file ioapi.c.

◆ call_ztell64()

ZPOS64_T call_ztell64 ( const zlib_filefunc64_32_def * pfilefunc,
voidpf filestream )

Definition at line 53 of file ioapi.c.

◆ fill_fopen64_filefunc()

void fill_fopen64_filefunc ( zlib_filefunc64_def * pzlib_filefunc_def)

Definition at line 222 of file ioapi.c.

◆ fill_fopen_filefunc()

void fill_fopen_filefunc ( zlib_filefunc_def * pzlib_filefunc_def)

Definition at line 211 of file ioapi.c.

◆ 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 66 of file ioapi.c.