UFO: Alien Invasion
Loading...
Searching...
No Matches
ioapi.cpp File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <zlib.h>
#include "ioapi.h"
#include "../ports/system.h"
Include dependency graph for ioapi.cpp:

Go to the source code of this file.

Macros

#define SEEK_CUR   1
#define SEEK_END   2
#define SEEK_SET   0

Functions

static voidpf ZCALLBACK fopen_file_func (voidpf opaque, const char *filename, int mode)
static uLong ZCALLBACK fread_file_func (voidpf opaque, voidpf stream, void *buf, uLong size)
static uLong ZCALLBACK fwrite_file_func (voidpf opaque, voidpf stream, const void *buf, uLong size)
static long ZCALLBACK ftell_file_func (voidpf opaque, voidpf stream)
static long ZCALLBACK fseek_file_func (voidpf opaque, voidpf stream, uLong offset, int origin)
static int ZCALLBACK fclose_file_func (voidpf opaque, voidpf stream)
static int ZCALLBACK ferror_file_func (voidpf opaque, voidpf stream)
void fill_fopen_filefunc (zlib_filefunc_def *pzlib_filefunc_def)

Macro Definition Documentation

◆ SEEK_CUR

#define SEEK_CUR   1

Definition at line 22 of file ioapi.cpp.

Referenced by FS_Seek(), and fseek_file_func().

◆ SEEK_END

#define SEEK_END   2

Definition at line 26 of file ioapi.cpp.

Referenced by FS_CopyFile(), FS_FileLength(), FS_Seek(), and fseek_file_func().

◆ SEEK_SET

#define SEEK_SET   0

Function Documentation

◆ fclose_file_func()

int ZCALLBACK fclose_file_func ( voidpf opaque,
voidpf stream )
static

Definition at line 85 of file ioapi.cpp.

References FILE, voidpf(), and ZCALLBACK.

Referenced by fill_fopen_filefunc().

◆ ferror_file_func()

int ZCALLBACK ferror_file_func ( voidpf opaque,
voidpf stream )
static

Definition at line 90 of file ioapi.cpp.

References FILE, voidpf(), and ZCALLBACK.

Referenced by fill_fopen_filefunc().

◆ fill_fopen_filefunc()

◆ fopen_file_func()

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

◆ fread_file_func()

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

Definition at line 51 of file ioapi.cpp.

References FILE, uLong(), voidpf(), and ZCALLBACK.

Referenced by fill_fopen_filefunc().

◆ fseek_file_func()

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

◆ ftell_file_func()

long ZCALLBACK ftell_file_func ( voidpf opaque,
voidpf stream )
static

Definition at line 61 of file ioapi.cpp.

References FILE, voidpf(), and ZCALLBACK.

Referenced by fill_fopen_filefunc().

◆ fwrite_file_func()

uLong ZCALLBACK fwrite_file_func ( voidpf opaque,
voidpf stream,
const void * buf,
uLong size )
static

Definition at line 56 of file ioapi.cpp.

References FILE, uLong(), voidpf(), and ZCALLBACK.

Referenced by fill_fopen_filefunc().