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);
gdouble     g3d_read_double_be              (FILE *f);
gdouble     g3d_read_double_le              (FILE *f);
gint32      g3d_read_cstr                   (FILE *f,
                                             gchar *buffer,
                                             gint32 max_len);

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

g3d_read_double_be ()

gdouble     g3d_read_double_be              (FILE *f);

Read a 8 byte little-endian double-precision floating point number from file.

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

g3d_read_double_le ()

gdouble     g3d_read_double_le              (FILE *f);

f :
Returns :

g3d_read_cstr ()

gint32      g3d_read_cstr                   (FILE *f,
                                             gchar *buffer,
                                             gint32 max_len);

f :
buffer :
max_len :
Returns :