ZEDA
1.6.18
|
binary data file manipulation. More...
#include <zeda/zeda_bit.h>
Go to the source code of this file.
Data Structures | |
struct | _zBinFile |
Macros | |
#define | ZEDA_BINFILE_DEF_FREAD_PROTOTYPE(bit) size_t fread_int##bit(FILE *fp, int##bit##_t *val) |
#define | ZEDA_BINFILE_DEF_FREAD_REV_PROTOTYPE(bit) size_t fread_int##bit##_rev(FILE *fp, int##bit##_t *val) |
#define | ZEDA_BINFILE_DEF_FWRITE_PROTOTYPE(bit) size_t fwrite_int##bit(FILE *fp, int##bit##_t *val) |
#define | ZEDA_BINFILE_DEF_FWRITE_REV_PROTOTYPE(bit) size_t fwrite_int##bit##_rev(FILE *fp, int##bit##_t *val) |
#define | ZEDA_BINFILE_DEF_FREAD_TYPE_PROTOTYPE(type) type fread_##type(FILE *fp) |
#define | ZEDA_BINFILE_DEF_FREAD_REV_TYPE_PROTOTYPE(type) type fread_##type##_rev(FILE *fp) |
#define | ZEDA_BINFILE_DEF_FWRITE_TYPE_PROTOTYPE(type) size_t fwrite_##type(FILE *fp, type val) |
#define | ZEDA_BINFILE_DEF_FWRITE_REV_TYPE_PROTOTYPE(type) size_t fwrite_##type##_rev(FILE *fp, type val) |
#define | ZBINFILE_CURRENT_VERSION 0x00000001 |
#define | ZBINFILE_ID "ZBD " |
#define | ZBINFILE_ENDIAN_CHECKER 0xaabbccdd |
#define | Z_ENDIAN_LITTLE 1234 |
#define | Z_ENDIAN_BIG 4321 |
#define | Z_ENDIAN_UNKNOWN 9999 |
#define | zBinFileIntFRead(bf) ( (bf)->_fread_int( (bf) ) ) |
#define | zBinFileIntFWrite(bf, val) ( (bf)->_fwrite_int( (bf), (val) ) ) |
#define | zBinFileLongFRead(bf) ( (bf)->_fread_long( (bf) ) ) |
#define | zBinFileLongFWrite(bf, val) ( (bf)->_fwrite_long( (bf), (val) ) ) |
Typedefs | |
typedef struct _zBinFile | zBinFile |
Functions | |
size_t | fread_int8 (FILE *fp, int8_t *val) |
size_t | fwrite_int8 (FILE *fp, int8_t *val) |
size_t | fread_int16 (FILE *fp, int16_t *val) |
size_t | fread_int16_rev (FILE *fp, int16_t *val) |
size_t | fwrite_int16 (FILE *fp, int16_t *val) |
size_t | fwrite_int16_rev (FILE *fp, int16_t *val) |
size_t | fread_int32 (FILE *fp, int32_t *val) |
size_t | fread_int32_rev (FILE *fp, int32_t *val) |
size_t | fwrite_int32 (FILE *fp, int32_t *val) |
size_t | fwrite_int32_rev (FILE *fp, int32_t *val) |
size_t | fread_int64 (FILE *fp, int64_t *val) |
size_t | fread_int64_rev (FILE *fp, int64_t *val) |
size_t | fwrite_int64 (FILE *fp, int64_t *val) |
size_t | fwrite_int64_rev (FILE *fp, int64_t *val) |
byte | fread_byte (FILE *fp) |
size_t | fwrite_byte (FILE *fp, byte val) |
word | fread_word (FILE *fp) |
word | fread_word_rev (FILE *fp) |
size_t | fwrite_word (FILE *fp, word val) |
size_t | fwrite_word_rev (FILE *fp, word val) |
dword | fread_dword (FILE *fp) |
dword | fread_dword_rev (FILE *fp) |
size_t | fwrite_dword (FILE *fp, dword val) |
size_t | fwrite_dword_rev (FILE *fp, dword val) |
float | fread_float (FILE *fp) |
float | fread_float_rev (FILE *fp) |
size_t | fwrite_float (FILE *fp, float val) |
size_t | fwrite_float_rev (FILE *fp, float val) |
double | fread_double (FILE *fp) |
double | fread_double_rev (FILE *fp) |
size_t | fwrite_double (FILE *fp, double val) |
size_t | fwrite_double_rev (FILE *fp, double val) |
bool | zBinFileOpen (zBinFile *bf, char filename[], const char *mode) |
int | zBinFileClose (zBinFile *bf) |
byte | zBinFileByteFRead (zBinFile *bf) |
size_t | zBinFileByteFWrite (zBinFile *bf, byte val) |
bool | zBinFileHeaderFRead (zBinFile *bf) |
size_t | zBinFileHeaderFWrite (zBinFile *bf) |
void | zBinFileInfoSet (zBinFile *bf, int16_t version, int16_t endian_type, int16_t size_int, int16_t size_long) |
void | zBinFileInfoSetThis (zBinFile *bf) |
float | zBinFileFloatFRead (zBinFile *bf) |
size_t | zBinFileFloatFWrite (zBinFile *bf, float val) |
double | zBinFileDoubleFRead (zBinFile *bf) |
size_t | zBinFileDoubleFWrite (zBinFile *bf, double val) |
binary data file manipulation.
#define ZEDA_BINFILE_DEF_FREAD_PROTOTYPE | ( | bit | ) | size_t fread_int##bit(FILE *fp, int##bit##_t *val) |
#define ZEDA_BINFILE_DEF_FREAD_REV_PROTOTYPE | ( | bit | ) | size_t fread_int##bit##_rev(FILE *fp, int##bit##_t *val) |
#define ZEDA_BINFILE_DEF_FWRITE_PROTOTYPE | ( | bit | ) | size_t fwrite_int##bit(FILE *fp, int##bit##_t *val) |
#define ZEDA_BINFILE_DEF_FWRITE_REV_PROTOTYPE | ( | bit | ) | size_t fwrite_int##bit##_rev(FILE *fp, int##bit##_t *val) |
#define ZEDA_BINFILE_DEF_FREAD_TYPE_PROTOTYPE | ( | type | ) | type fread_##type(FILE *fp) |
#define ZEDA_BINFILE_DEF_FREAD_REV_TYPE_PROTOTYPE | ( | type | ) | type fread_##type##_rev(FILE *fp) |
#define ZEDA_BINFILE_DEF_FWRITE_TYPE_PROTOTYPE | ( | type | ) | size_t fwrite_##type(FILE *fp, type val) |
#define ZEDA_BINFILE_DEF_FWRITE_REV_TYPE_PROTOTYPE | ( | type | ) | size_t fwrite_##type##_rev(FILE *fp, type val) |
#define ZBINFILE_CURRENT_VERSION 0x00000001 |
#define ZBINFILE_ID "ZBD " |
#define ZBINFILE_ENDIAN_CHECKER 0xaabbccdd |
#define Z_ENDIAN_LITTLE 1234 |
#define Z_ENDIAN_BIG 4321 |
#define Z_ENDIAN_UNKNOWN 9999 |
#define zBinFileIntFRead | ( | bf | ) | ( (bf)->_fread_int( (bf) ) ) |
#define zBinFileIntFWrite | ( | bf, | |
val | |||
) | ( (bf)->_fwrite_int( (bf), (val) ) ) |
#define zBinFileLongFRead | ( | bf | ) | ( (bf)->_fread_long( (bf) ) ) |
#define zBinFileLongFWrite | ( | bf, | |
val | |||
) | ( (bf)->_fwrite_long( (bf), (val) ) ) |
size_t fread_int8 | ( | FILE * | fp, |
int8_t * | val | ||
) |
size_t fwrite_int8 | ( | FILE * | fp, |
int8_t * | val | ||
) |
size_t fread_int16 | ( | FILE * | fp, |
int16_t * | val | ||
) |
size_t fread_int16_rev | ( | FILE * | fp, |
int16_t * | val | ||
) |
size_t fwrite_int16 | ( | FILE * | fp, |
int16_t * | val | ||
) |
size_t fwrite_int16_rev | ( | FILE * | fp, |
int16_t * | val | ||
) |
size_t fread_int32 | ( | FILE * | fp, |
int32_t * | val | ||
) |
size_t fread_int32_rev | ( | FILE * | fp, |
int32_t * | val | ||
) |
size_t fwrite_int32 | ( | FILE * | fp, |
int32_t * | val | ||
) |
size_t fwrite_int32_rev | ( | FILE * | fp, |
int32_t * | val | ||
) |
size_t fread_int64 | ( | FILE * | fp, |
int64_t * | val | ||
) |
size_t fread_int64_rev | ( | FILE * | fp, |
int64_t * | val | ||
) |
size_t fwrite_int64 | ( | FILE * | fp, |
int64_t * | val | ||
) |
size_t fwrite_int64_rev | ( | FILE * | fp, |
int64_t * | val | ||
) |
byte fread_byte | ( | FILE * | fp | ) |
size_t fwrite_byte | ( | FILE * | fp, |
byte | val | ||
) |
word fread_word | ( | FILE * | fp | ) |
word fread_word_rev | ( | FILE * | fp | ) |
size_t fwrite_word | ( | FILE * | fp, |
word | val | ||
) |
size_t fwrite_word_rev | ( | FILE * | fp, |
word | val | ||
) |
dword fread_dword | ( | FILE * | fp | ) |
dword fread_dword_rev | ( | FILE * | fp | ) |
size_t fwrite_dword | ( | FILE * | fp, |
dword | val | ||
) |
size_t fwrite_dword_rev | ( | FILE * | fp, |
dword | val | ||
) |
float fread_float | ( | FILE * | fp | ) |
float fread_float_rev | ( | FILE * | fp | ) |
size_t fwrite_float | ( | FILE * | fp, |
float | val | ||
) |
size_t fwrite_float_rev | ( | FILE * | fp, |
float | val | ||
) |
double fread_double | ( | FILE * | fp | ) |
double fread_double_rev | ( | FILE * | fp | ) |
size_t fwrite_double | ( | FILE * | fp, |
double | val | ||
) |
size_t fwrite_double_rev | ( | FILE * | fp, |
double | val | ||
) |
int zBinFileClose | ( | zBinFile * | bf | ) |
size_t zBinFileHeaderFWrite | ( | zBinFile * | bf | ) |
void zBinFileInfoSet | ( | zBinFile * | bf, |
int16_t | version, | ||
int16_t | endian_type, | ||
int16_t | size_int, | ||
int16_t | size_long | ||
) |
void zBinFileInfoSetThis | ( | zBinFile * | bf | ) |
float zBinFileFloatFRead | ( | zBinFile * | bf | ) |
size_t zBinFileFloatFWrite | ( | zBinFile * | bf, |
float | val | ||
) |
double zBinFileDoubleFRead | ( | zBinFile * | bf | ) |
size_t zBinFileDoubleFWrite | ( | zBinFile * | bf, |
double | val | ||
) |