endianrw.h File Reference
Go to the source code of this file.
Data Structures
Defines
- #define MGUI_RWseek(ctx, offset, whence) (ctx)->seek(ctx, offset, whence)
- Seeks an MG_RWops object.
- #define MGUI_RWtell(ctx) (ctx)->seek(ctx, 0, SEEK_CUR)
- Obtains the current value of the position indicator for a data source.
- #define MGUI_RWread(ctx, ptr, size, n) (ctx)->read(ctx, ptr, size, n)
- Reads data blocks from a data source.
- #define MGUI_RWwrite(ctx, ptr, size, n) (ctx)->write(ctx, ptr, size, n)
- Writes data blocks to a data source.
- #define MGUI_RWclose(ctx) (ctx)->close(ctx)
- Closes an MG_RWops object.
- #define MGUI_RWeof(ctx) (ctx)->eof(ctx)
- Tests the end-of-file indicator for an data source.
- #define ArchSwapLE16(X) (X)
- #define ArchSwapLE32(X) (X)
- #define ArchSwapLE64(X) (X)
- #define ArchSwapBE16(X) ArchSwap16(X)
- #define ArchSwapBE32(X) ArchSwap32(X)
- #define ArchSwapBE64(X) ArchSwap64(X)
Typedefs
Functions
- MG_EXPORT MG_RWops * MGUI_RWFromFile (const char *file, const char *mode)
- Creates an MG_RWops object from a file.
- MG_EXPORT MG_RWops * MGUI_RWFromFP (FILE *fp, int autoclose)
- Creates an MG_RWops object from an opened stdio FILE object.
- MG_EXPORT MG_RWops * MGUI_RWFromMem (void *mem, int size)
- Creates an MG_RWops object from a block of memory.
- MG_EXPORT void MGUI_InitMemRW (MG_RWops *area, void *mem, int size)
- Initializes an MG_RWops object from a block of memory.
- MG_EXPORT MG_RWops * MGUI_AllocRW (void)
- Allocates an uninitialized MG_RWops object.
- MG_EXPORT void MGUI_FreeRW (MG_RWops *area)
- Frees an MG_RWops object.
- MG_EXPORT int MGUI_RWgetc (MG_RWops *area)
- Reads the next character from an data source.
- Uint16 MGUI_ReadLE16 (MG_RWops *src)
- Reads a 16-bit little endian integer from a MG_RWops object.
- Uint16 MGUI_ReadBE16 (MG_RWops *src)
- Reads a 16-bit big endian integer from a MG_RWops object.
- Uint32 MGUI_ReadLE32 (MG_RWops *src)
- Reads a 32-bit little endian integer from a MG_RWops object.
- Uint32 MGUI_ReadBE32 (MG_RWops *src)
- Reads a 32-bit big endian integer from a MG_RWops object.
- Uint64 MGUI_ReadLE64 (MG_RWops *src)
- Reads a 64-bit little endian integer from a MG_RWops object.
- Uint64 MGUI_ReadBE64 (MG_RWops *src)
- Reads a 64-bit big endian integer from a MG_RWops object.
- int MGUI_WriteLE16 (MG_RWops *dst, Uint16 value)
- Writes an 16-bit integer of native format to a MG_RWops object in littlen endianness.
- int MGUI_WriteBE16 (MG_RWops *dst, Uint16 value)
- Writes an 16-bit integer of native format to a MG_RWops object in big endianness.
- int MGUI_WriteLE32 (MG_RWops *dst, Uint32 value)
- Writes an 32-bit integer of native format to a MG_RWops object in littlen endianness.
- int MGUI_WriteBE32 (MG_RWops *dst, Uint32 value)
- Writes an 32-bit integer of native format to a MG_RWops object in big endianness.
- int MGUI_WriteLE64 (MG_RWops *dst, Uint64 value)
- Writes an 64-bit integer of native format to a MG_RWops object in littlen endianness.
- int MGUI_WriteBE64 (MG_RWops *dst, Uint64 value)
- Writes an 64-bit integer of native format to a MG_RWops object in big endianness.
- Uint16 MGUI_ReadLE16FP (FILE *src)
- Reads a 16-bit little endian integer from a stdio FILE object.
- Uint32 MGUI_ReadLE32FP (FILE *src)
- Reads a 32-bit little endian integer from a stdio FILE object.
- int MGUI_WriteLE16FP (FILE *dst, Uint16 value)
- Writes an 16-bit integer of native format to a stdio FILE object in littlen endianness.
- int MGUI_WriteLE32FP (FILE *dst, Uint32 value)
- Writes an 32-bit integer of native format to a stdio FILE object in littlen endianness.
Detailed Description
- Author:
- Wei Yongming <ymwei@minigui.org>
- Date:
- 2002/01/06
This file includes functions for reading and writing data from general sources, such as file, memory, etc., and also includes functions for reading and writing endian-specific values.
Copyright (C) 2002-2009 Feynman Software.
Copyright (C) 1998-2002 Wei Yongming.
All rights reserved by Feynman Software.
This file is part of MiniGUI, a compact cross-platform Graphics
User Interface (GUI) support system for real-time embedded systems.
Definition in file endianrw.h.