Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# io.c File Reference

`#include <lib3ds/io.h>`
`#include <stdlib.h>`
`#include <string.h>`

Include dependency graph for io.c:

## Compounds
struct | _Lib3dsIo
## Defines
#define | LIB3DS_EXPORT
## Functions
Lib3dsIo * | lib3ds_io_new (void *self, Lib3dsIoErrorFunc error_func, Lib3dsIoSeekFunc seek_func, Lib3dsIoTellFunc tell_func, Lib3dsIoReadFunc read_func, Lib3dsIoWriteFunc write_func)
void | lib3ds_io_free (Lib3dsIo *io)
Lib3dsBool | lib3ds_io_error (Lib3dsIo *io)
long | lib3ds_io_seek (Lib3dsIo *io, long offset, Lib3dsIoSeek origin)
long | lib3ds_io_tell (Lib3dsIo *io)
int | lib3ds_io_read (Lib3dsIo *io, Lib3dsByte *buffer, int size)
int | lib3ds_io_write (Lib3dsIo *io, const Lib3dsByte *buffer, int size)
Lib3dsByte | lib3ds_io_read_byte (Lib3dsIo *io)
Lib3dsWord | lib3ds_io_read_word (Lib3dsIo *io)
Lib3dsDword | lib3ds_io_read_dword (Lib3dsIo *io)
Lib3dsIntb | lib3ds_io_read_intb (Lib3dsIo *io)
Lib3dsIntw | lib3ds_io_read_intw (Lib3dsIo *io)
Lib3dsIntd | lib3ds_io_read_intd (Lib3dsIo *io)
Lib3dsFloat | lib3ds_io_read_float (Lib3dsIo *io)
Lib3dsBool | lib3ds_io_read_vector (Lib3dsIo *io, Lib3dsVector v)
Lib3dsBool | lib3ds_io_read_rgb (Lib3dsIo *io, Lib3dsRgb rgb)
Lib3dsBool | lib3ds_io_read_string (Lib3dsIo *io, char *s, int buflen)
Lib3dsBool | lib3ds_io_write_byte (Lib3dsIo *io, Lib3dsByte b)
Lib3dsBool | lib3ds_io_write_word (Lib3dsIo *io, Lib3dsWord w)
Lib3dsBool | lib3ds_io_write_dword (Lib3dsIo *io, Lib3dsDword d)
Lib3dsBool | lib3ds_io_write_intb (Lib3dsIo *io, Lib3dsIntb b)
Lib3dsBool | lib3ds_io_write_intw (Lib3dsIo *io, Lib3dsIntw w)
Lib3dsBool | lib3ds_io_write_intd (Lib3dsIo *io, Lib3dsIntd d)
Lib3dsBool | lib3ds_io_write_float (Lib3dsIo *io, Lib3dsFloat l)
Lib3dsBool | lib3ds_io_write_vector (Lib3dsIo *io, Lib3dsVector v)
Lib3dsBool | lib3ds_io_write_rgb (Lib3dsIo *io, Lib3dsRgb rgb)
Lib3dsBool | lib3ds_io_write_string (Lib3dsIo *io, const char *s)

## Define Documentation

#define LIB3DS_EXPORT

## Function Documentation

Lib3dsBool lib3ds_io_error | ( | Lib3dsIo * | io | ) |

void lib3ds_io_free | ( | Lib3dsIo * | io | ) |

Lib3dsIo* lib3ds_io_new | ( | void * | self,
|  | Lib3dsIoErrorFunc | error_func,
|  | Lib3dsIoSeekFunc | seek_func,
|  | Lib3dsIoTellFunc | tell_func,
|  | Lib3dsIoReadFunc | read_func,
|  | Lib3dsIoWriteFunc | write_func
| ) |

int lib3ds_io_read | ( | Lib3dsIo * | io,
|  | Lib3dsByte * | buffer,
|  | int | size
| ) |

Lib3dsWord lib3ds_io_read_word | ( | Lib3dsIo * | io | ) |

| Read a word from a file stream in little endian format.

long lib3ds_io_seek | ( | Lib3dsIo * | io,
|  | long | offset,
|  | Lib3dsIoSeek | origin
| ) |

long lib3ds_io_tell | ( | Lib3dsIo * | io | ) |

int lib3ds_io_write | ( | Lib3dsIo * | io,
|  | const Lib3dsByte * | buffer,
|  | int | size
| ) |