UFO: Alien Invasion
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.

◆ SEEK_END

#define SEEK_END   2

Definition at line 26 of file ioapi.cpp.

◆ SEEK_SET

#define SEEK_SET   0

Definition at line 30 of file ioapi.cpp.

Function Documentation

◆ fclose_file_func()

static int ZCALLBACK fclose_file_func ( voidpf  opaque,
voidpf  stream 
)
static

Definition at line 85 of file ioapi.cpp.

References FILE.

Referenced by fill_fopen_filefunc().

◆ ferror_file_func()

static int ZCALLBACK ferror_file_func ( voidpf  opaque,
voidpf  stream 
)
static

Definition at line 90 of file ioapi.cpp.

References FILE.

Referenced by fill_fopen_filefunc().

◆ fill_fopen_filefunc()

◆ fopen_file_func()

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

◆ fread_file_func()

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

Definition at line 51 of file ioapi.cpp.

References FILE, and uLong().

Referenced by fill_fopen_filefunc().

◆ fseek_file_func()

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

◆ ftell_file_func()

static long ZCALLBACK ftell_file_func ( voidpf  opaque,
voidpf  stream 
)
static

Definition at line 61 of file ioapi.cpp.

References FILE.

Referenced by fill_fopen_filefunc().

◆ fwrite_file_func()

static 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, and uLong().

Referenced by fill_fopen_filefunc().