DSL
Public Attributes | List of all members
DSL_FILE Struct Reference

Public Attributes

bool(* seek )(DSL_FILE *fp, int64 pos, int mode)
 
int64(* read )(void *buf, int64 size, DSL_FILE *fp)
 
int64(* write )(void *buf, int64 size, DSL_FILE *fp)
 
int64(* tell )(DSL_FILE *fp)
 
bool(* flush )(DSL_FILE *fp)
 
bool(* eof )(DSL_FILE *fp)
 
void(* close )(DSL_FILE *fp)
 
union {
   FILE *   fp
 
   void *   handle
 
}; 
 
void * p_extra
 

Detailed Description

Definition at line 24 of file rwops.h.

Member Data Documentation

◆ close

void(* DSL_FILE::close) (DSL_FILE *fp)

Close the handle when you are done.

Definition at line 54 of file rwops.h.

Referenced by hashfile(), hashfile_fp(), hmacfile(), hmacfile_fp(), RW_ConvertBuffer(), RW_ConvertFile(), RW_ConvertMemory(), RW_OpenBuffer(), and RW_OpenFile().

◆ eof

bool(* DSL_FILE::eof) (DSL_FILE *fp)

Are we at the end of the file?

Definition at line 50 of file rwops.h.

Referenced by RW_ConvertBuffer(), RW_ConvertFile(), RW_ConvertMemory(), RW_OpenBuffer(), and RW_OpenFile().

◆ read

int64(* DSL_FILE::read) (void *buf, int64 size, DSL_FILE *fp)

Read data from the file.

Returns
The number of bytes read. 0 on EOF, <0 on failure.

Definition at line 36 of file rwops.h.

Referenced by hashfile_rw(), hmacfile_rw(), RW_ConvertBuffer(), RW_ConvertFile(), RW_ConvertMemory(), RW_OpenBuffer(), and RW_OpenFile().

◆ seek

bool(* DSL_FILE::seek) (DSL_FILE *fp, int64 pos, int mode)

Seek within the file.

Parameters
fpThe file handle
posThe position to seek to, in accordance with what you set the mode to.
modeSEEK_SET/SEEK_CUR/SEEK_END as in fseek

Definition at line 31 of file rwops.h.

Referenced by hashfile_rw(), hmacfile_rw(), RW_ConvertBuffer(), RW_ConvertFile(), RW_ConvertMemory(), RW_OpenBuffer(), and RW_OpenFile().

◆ tell

int64(* DSL_FILE::tell) (DSL_FILE *fp)

The current position of the pointer within the file.

Definition at line 45 of file rwops.h.

Referenced by hashfile_rw(), hmacfile_rw(), RW_ConvertBuffer(), RW_ConvertFile(), RW_ConvertMemory(), RW_OpenBuffer(), and RW_OpenFile().

◆ write

int64(* DSL_FILE::write) (void *buf, int64 size, DSL_FILE *fp)

Write data to the file.

Returns
The number of bytes written. 0 on EOF, <0 on failure.

Definition at line 41 of file rwops.h.

Referenced by RW_ConvertBuffer(), RW_ConvertFile(), RW_ConvertMemory(), RW_OpenBuffer(), and RW_OpenFile().


The documentation for this struct was generated from the following file: