## read

read — file reading abstraction (deprecated)

## Functions

gint32 | g3d_read_int8 ()
gint32 | g3d_read_int16_be ()
gint32 | g3d_read_int16_le ()
gint32 | g3d_read_int32_be ()
gint32 | g3d_read_int32_le ()
G3DFloat | g3d_read_float_be ()
G3DFloat | g3d_read_float_le ()
G3DDouble | g3d_read_double_be ()
G3DDouble | g3d_read_double_le ()
gint32 | g3d_read_cstr ()

## Includes

    #include <g3d/read.h>

## Description

The g3d_read_* family of functions is deprecated in favour of the G3DStream interface.

## Functions

### g3d_read_int8 ()

    gint32
    g3d_read_int8 (FILE *f);

Read a 1 byte signed integer from file.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

f | the file to read from |

#### Returns

The read value, 0 in case of error

### g3d_read_float_be ()

    G3DFloat
    g3d_read_float_be (FILE *f);

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

#### Parameters

f | the file to read from |

#### Returns

The read value, 0 in case of error

### g3d_read_float_le ()

    G3DFloat
    g3d_read_float_le (FILE *f);

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

#### Parameters

f | the file to read from |

#### Returns

The read value, 0 in case of error

### g3d_read_double_be ()

    G3DDouble
    g3d_read_double_be (FILE *f);

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

#### Parameters

f | the file to read from |

#### Returns

The read value, 0 in case of error

### g3d_read_double_le ()

    G3DDouble
    g3d_read_double_le (FILE *f);

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

#### Parameters

f | the file to read from |

#### Returns

The read value, 0 in case of error

### g3d_read_cstr ()

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

Read a zero-terminated string from file.

#### Parameters

f | the file to read from |
buffer | the buffer to store line in |
max_len | maximum length of string including termination character |

#### Returns

number of bytes read from file.

## Types and Values

## See Also

g3d_stream_open_file