read

read — Binary file reading helper functions

Synopsis




gint32      g3d_read_int8                   (FILE *f);
gint32      g3d_read_int16_be               (FILE *f);
gint32      g3d_read_int16_le               (FILE *f);
gint32      g3d_read_int32_be               (FILE *f);
gint32      g3d_read_int32_le               (FILE *f);
gfloat      g3d_read_float_be               (FILE *f);
gfloat      g3d_read_float_le               (FILE *f);

Description

Details

g3d_read_int8 ()

gint32      g3d_read_int8                   (FILE *f);

Read a 1 byte signed integer from file.

f : the file to read from
Returns : The read value, 0 in case of error

g3d_read_int16_be ()

gint32      g3d_read_int16_be               (FILE *f);

Read a 2 byte big-endian signed integer from file.

f : the file to read from
Returns : The read value, 0 in case of error

g3d_read_int16_le ()

gint32      g3d_read_int16_le               (FILE *f);

Read a 2 byte little-endian signed integer from file.

f : the file to read from
Returns : The read value, 0 in case of error

g3d_read_int32_be ()

gint32      g3d_read_int32_be               (FILE *f);

Read a 4 byte big-endian signed integer from file.

f : the file to read from
Returns : The read value, 0 in case of error

g3d_read_int32_le ()

gint32      g3d_read_int32_le               (FILE *f);

Read a 4 byte little-endian signed integer from file.

f : the file to read from
Returns : The read value, 0 in case of error

g3d_read_float_be ()

gfloat      g3d_read_float_be               (FILE *f);

Read a 4 byte big-endian floating point number from file.

f : the file to read from
Returns : The read value, 0 in case of error

g3d_read_float_le ()

gfloat      g3d_read_float_le               (FILE *f);

Read a 4 byte little-endian floating point number from file.

f : the file to read from
Returns : The read value, 0 in case of error