1 ///////////////////////////////////////////////////////////////////////////////
4 /// \brief I/O types and functions
6 // Copyright (C) 2007 Lasse Collin
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU Lesser General Public
10 // License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
18 ///////////////////////////////////////////////////////////////////////////////
26 # define IO_BUFFER_SIZE 8192
28 # define IO_BUFFER_SIZE BUFSIZ
47 extern void io_init(void);
49 extern void io_finish(void);
51 extern file_pair *io_open(const char *src_name);
53 extern void io_close(file_pair *pair, bool success);
55 extern size_t io_read(file_pair *pair, uint8_t *buf, size_t size);
57 extern int io_write(const file_pair *pair, const uint8_t *buf, size_t size);