RetroArch
Classes | Functions | Variables
memory_stream.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <streams/memory_stream.h>
Include dependency graph for memory_stream.c:

Classes

struct  memstream
 

Functions

static void memstream_update_pos (memstream_t *stream)
 
void memstream_set_buffer (uint8_t *buffer, uint64_t size)
 
uint64_t memstream_get_last_size (void)
 
static void memstream_init (memstream_t *stream, uint8_t *buffer, uint64_t max_size, unsigned writing)
 
memstream_tmemstream_open (unsigned writing)
 
void memstream_close (memstream_t *stream)
 
uint64_t memstream_read (memstream_t *stream, void *data, uint64_t bytes)
 
uint64_t memstream_write (memstream_t *stream, const void *data, uint64_t bytes)
 
int64_t memstream_seek (memstream_t *stream, int64_t offset, int whence)
 
void memstream_rewind (memstream_t *stream)
 
uint64_t memstream_pos (memstream_t *stream)
 
char * memstream_gets (memstream_t *stream, char *buffer, size_t len)
 
int memstream_getc (memstream_t *stream)
 
void memstream_putc (memstream_t *stream, int c)
 

Variables

static uint8_tg_buffer = NULL
 
static uint64_t g_size = 0
 
static uint64_t last_file_size = 0
 

Function Documentation

◆ memstream_close()

void memstream_close ( memstream_t stream)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ memstream_get_last_size()

uint64_t memstream_get_last_size ( void  )

◆ memstream_getc()

int memstream_getc ( memstream_t stream)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ memstream_gets()

char* memstream_gets ( memstream_t stream,
char *  buffer,
size_t  len 
)
Here is the caller graph for this function:

◆ memstream_init()

static void memstream_init ( memstream_t stream,
uint8_t buffer,
uint64_t  max_size,
unsigned  writing 
)
static
Here is the caller graph for this function:

◆ memstream_open()

memstream_t* memstream_open ( unsigned  writing)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ memstream_pos()

uint64_t memstream_pos ( memstream_t stream)
Here is the caller graph for this function:

◆ memstream_putc()

void memstream_putc ( memstream_t stream,
int  c 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ memstream_read()

uint64_t memstream_read ( memstream_t stream,
void data,
uint64_t  bytes 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ memstream_rewind()

void memstream_rewind ( memstream_t stream)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ memstream_seek()

int64_t memstream_seek ( memstream_t stream,
int64_t  offset,
int  whence 
)
Here is the caller graph for this function:

◆ memstream_set_buffer()

void memstream_set_buffer ( uint8_t buffer,
uint64_t  size 
)
Here is the caller graph for this function:

◆ memstream_update_pos()

static void memstream_update_pos ( memstream_t stream)
static
Here is the caller graph for this function:

◆ memstream_write()

uint64_t memstream_write ( memstream_t stream,
const void data,
uint64_t  bytes 
)
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ g_buffer

uint8_t* g_buffer = NULL
static

◆ g_size

uint64_t g_size = 0
static

◆ last_file_size

uint64_t last_file_size = 0
static