zenilib: zenilib/jni/external/sdl/src/file/SDL_rwops.c File Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Macros | Functions
SDL_rwops.c File Reference
`#include "SDL_config.h"`
`#include "SDL_endian.h"`
`#include "SDL_rwops.h"`

Go to the source code of this file.

## Macros

#define | _LARGEFILE64_SOURCE

## Functions

static int SDLCALL | mem_close (SDL_RWops *context)
static size_t SDLCALL | mem_read (SDL_RWops *context, void *ptr, size_t size, size_t maxnum)
static Sint64 SDLCALL | mem_seek (SDL_RWops *context, Sint64 offset, int whence)
static Sint64 SDLCALL | mem_size (SDL_RWops *context)
static size_t SDLCALL | mem_write (SDL_RWops *context, const void *ptr, size_t size, size_t num)
static size_t SDLCALL | mem_writeconst (SDL_RWops *context, const void *ptr, size_t size, size_t num)
SDL_RWops * | SDL_AllocRW (void)
void | SDL_FreeRW (SDL_RWops *area)
Uint16 | SDL_ReadBE16 (SDL_RWops *src)
Uint32 | SDL_ReadBE32 (SDL_RWops *src)
Uint64 | SDL_ReadBE64 (SDL_RWops *src)
Uint16 | SDL_ReadLE16 (SDL_RWops *src)
Uint32 | SDL_ReadLE32 (SDL_RWops *src)
Uint64 | SDL_ReadLE64 (SDL_RWops *src)
Uint8 | SDL_ReadU8 (SDL_RWops *src)
SDL_RWops * | SDL_RWFromConstMem (const void *mem, int size)
SDL_RWops * | SDL_RWFromFile (const char *file, const char *mode)
SDL_RWops * | SDL_RWFromFP (void *fp, SDL_bool autoclose)
SDL_RWops * | SDL_RWFromMem (void *mem, int size)
size_t | SDL_WriteBE16 (SDL_RWops *dst, Uint16 value)
size_t | SDL_WriteBE32 (SDL_RWops *dst, Uint32 value)
size_t | SDL_WriteBE64 (SDL_RWops *dst, Uint64 value)
size_t | SDL_WriteLE16 (SDL_RWops *dst, Uint16 value)
size_t | SDL_WriteLE32 (SDL_RWops *dst, Uint32 value)
size_t | SDL_WriteLE64 (SDL_RWops *dst, Uint64 value)
size_t | SDL_WriteU8 (SDL_RWops *dst, Uint8 value)

## Macro Definition Documentation

#define _LARGEFILE64_SOURCE

Definition at line 22 of file SDL_rwops.c.

## Function Documentation

static int SDLCALL mem_close | ( | SDL_RWops * | context | ) |

static

Definition at line 443 of file SDL_rwops.c.

References SDL_FreeRW().

Referenced by SDL_RWFromConstMem(), and SDL_RWFromMem().

static size_t SDLCALL mem_read | ( | SDL_RWops * | context,
|  | void * | ptr,
|  | size_t | size,
|  | size_t | maxnum
| ) |  |

static

Definition at line 402 of file SDL_rwops.c.

References SDL_RWops::hidden, SDL_RWops::mem, and SDL_memcpy().

Referenced by SDL_RWFromConstMem(), and SDL_RWFromMem().

static Sint64 SDLCALL mem_seek | ( | SDL_RWops * | context,
|  | Sint64 | offset,
|  | int | whence
| ) |  |

static

Definition at line 374 of file SDL_rwops.c.

References SDL_RWops::hidden, SDL_RWops::mem, RW_SEEK_CUR, RW_SEEK_END, RW_SEEK_SET, and SDL_SetError().

Referenced by SDL_RWFromConstMem(), and SDL_RWFromMem().

static Sint64 SDLCALL mem_size | ( | SDL_RWops * | context | ) |

static

Definition at line 368 of file SDL_rwops.c.

References SDL_RWops::hidden, and SDL_RWops::mem.

Referenced by SDL_RWFromConstMem(), and SDL_RWFromMem().

static size_t SDLCALL mem_write | ( | SDL_RWops * | context,
|  | const void * | ptr,
|  | size_t | size,
|  | size_t | num
| ) |  |

static

Definition at line 425 of file SDL_rwops.c.

References SDL_RWops::hidden, SDL_RWops::mem, and SDL_memcpy().

Referenced by SDL_RWFromMem().

static size_t SDLCALL mem_writeconst | ( | SDL_RWops * | context,
|  | const void * | ptr,
|  | size_t | size,
|  | size_t | num
| ) |  |

static

Definition at line 436 of file SDL_rwops.c.

References SDL_SetError().

Referenced by SDL_RWFromConstMem().

SDL_RWops* SDL_AllocRW | ( | void |  | ) |

Definition at line 623 of file SDL_rwops.c.

References NULL, SDL_malloc(), SDL_OutOfMemory, SDL_RWOPS_UNKNOWN, and SDL_RWops::type.

Referenced by SDL_RWFromConstMem(), SDL_RWFromFile(), and SDL_RWFromMem().

void SDL_FreeRW | ( | SDL_RWops * | area | ) |

Definition at line 637 of file SDL_rwops.c.

References SDL_free().

Referenced by mem_close(), and SDL_RWFromFile().

Uint16 SDL_ReadBE16 | ( | SDL_RWops * | src | ) |

Definition at line 663 of file SDL_rwops.c.

References SDL_RWread, and SDL_SwapBE16.

Uint32 SDL_ReadBE32 | ( | SDL_RWops * | src | ) |

Definition at line 681 of file SDL_rwops.c.

References SDL_RWread, and SDL_SwapBE32.

Uint64 SDL_ReadBE64 | ( | SDL_RWops * | src | ) |

Definition at line 699 of file SDL_rwops.c.

References SDL_RWread, and SDL_SwapBE64.

Uint16 SDL_ReadLE16 | ( | SDL_RWops * | src | ) |

Definition at line 654 of file SDL_rwops.c.

References SDL_RWread, and SDL_SwapLE16.

Referenced by SDL_LoadBMP_RW().

Uint32 SDL_ReadLE32 | ( | SDL_RWops * | src | ) |

Definition at line 672 of file SDL_rwops.c.

References SDL_RWread, and SDL_SwapLE32.

Referenced by ReadChunk(), SDL_LoadBMP_RW(), and SDL_LoadWAV_RW().

Uint64 SDL_ReadLE64 | ( | SDL_RWops * | src | ) |

Definition at line 690 of file SDL_rwops.c.

References SDL_RWread, and SDL_SwapLE64.

Uint8 SDL_ReadU8 | ( | SDL_RWops * | src | ) |

Definition at line 645 of file SDL_rwops.c.

References SDL_RWread.

SDL_RWops* SDL_RWFromConstMem | ( | const void * | mem,
|  | int | size
| ) |  |

Definition at line 595 of file SDL_rwops.c.

References SDL_RWops::hidden, SDL_RWops::mem, mem_close(), mem_read(), mem_seek(), mem_size(), mem_writeconst(), NULL, SDL_AllocRW(), SDL_InvalidParamError, SDL_RWOPS_MEMORY_RO, SDL_RWops::size, and SDL_RWops::type.

SDL_RWops* SDL_RWFromFile | ( | const char * | file,
|  | const char * | mode
| ) |  |

Definition at line 455 of file SDL_rwops.c.

References Android_JNI_FileClose(), Android_JNI_FileOpen(), Android_JNI_FileRead(), Android_JNI_FileSeek(), Android_JNI_FileSize(), Android_JNI_FileWrite(), NULL, PATH_MAX, SDL_AllocRW(), SDL_FreeRW(), SDL_RWFromFP(), SDL_RWOPS_JNIFILE, SDL_RWOPS_WINFILE, SDL_SetError(), SDL_snprintf(), SDL_stack_alloc, SDL_stack_free, SDL_RWops::size, and SDL_RWops::type.

SDL_RWops* SDL_RWFromFP | ( | void * | fp,
|  | SDL_bool | autoclose
| ) |  |

Definition at line 559 of file SDL_rwops.c.

References NULL, and SDL_SetError().

Referenced by SDL_RWFromFile().

SDL_RWops* SDL_RWFromMem | ( | void * | mem,
|  | int | size
| ) |  |

Definition at line 567 of file SDL_rwops.c.

References SDL_RWops::hidden, SDL_RWops::mem, mem_close(), mem_read(), mem_seek(), mem_size(), mem_write(), NULL, SDL_AllocRW(), SDL_InvalidParamError, SDL_RWOPS_MEMORY, SDL_RWops::size, and SDL_RWops::type.

size_t SDL_WriteBE16 | ( | SDL_RWops * | dst,
|  | Uint16 | value
| ) |  |

Definition at line 721 of file SDL_rwops.c.

References SDL_RWwrite, and SDL_SwapBE16.

size_t SDL_WriteBE32 | ( | SDL_RWops * | dst,
|  | Uint32 | value
| ) |  |

Definition at line 735 of file SDL_rwops.c.

References SDL_RWwrite, and SDL_SwapBE32.

size_t SDL_WriteBE64 | ( | SDL_RWops * | dst,
|  | Uint64 | value
| ) |  |

Definition at line 749 of file SDL_rwops.c.

References SDL_RWwrite, and SDL_SwapBE64.

size_t SDL_WriteLE16 | ( | SDL_RWops * | dst,
|  | Uint16 | value
| ) |  |

Definition at line 714 of file SDL_rwops.c.

References SDL_RWwrite, and SDL_SwapLE16.

Referenced by SDL_SaveBMP_RW().

size_t SDL_WriteLE32 | ( | SDL_RWops * | dst,
|  | Uint32 | value
| ) |  |

Definition at line 728 of file SDL_rwops.c.

References SDL_RWwrite, and SDL_SwapLE32.

Referenced by SDL_SaveBMP_RW().

size_t SDL_WriteLE64 | ( | SDL_RWops * | dst,
|  | Uint64 | value
| ) |  |

Definition at line 742 of file SDL_rwops.c.

References SDL_RWwrite, and SDL_SwapLE64.

size_t SDL_WriteU8 | ( | SDL_RWops * | dst,
|  | Uint8 | value
| ) |  |

Definition at line 708 of file SDL_rwops.c.

References SDL_RWwrite.