1 /*
2  *  fileio.c
3  *
4  *  Load a normal file, or ZIP/GZ archive.
5  *  Returns loaded ROM size (zero if an error occured)
6  *
7  *  Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003  Charles Mac Donald
8  *  modified by Eke-Eke (Genesis Plus GX)
9  *
10  *  Redistribution and use of this code or any derivative works are permitted
11  *  provided that the following conditions are met:
12  *
13  *   - Redistributions may not be sold, nor may they be used in a commercial
14  *     product or activity.
15  *
16  *   - Redistributions that are modified from the original source must include the
17  *     complete source code, including the source code for all components used by a
18  *     binary built from the modified sources. However, as a special exception, the
19  *     source code distributed need not include anything that is normally distributed
20  *     (in either source or binary form) with the major components (compiler, kernel,
21  *     and so on) of the operating system on which the executable runs, unless that
22  *     component itself accompanies the executable.
23  *
24  *   - Redistributions must reproduce the above copyright notice, this list of
25  *     conditions and the following disclaimer in the documentation and/or other
26  *     materials provided with the distribution.
27  *
28  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29  *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30  *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31  *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
32  *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
33  *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
34  *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
35  *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
36  *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
37  *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38  *  POSSIBILITY OF SUCH DAMAGE.
39  *
40  ****************************************************************************************/
41 
42 #ifndef _FILEIO_H_
43 #define _FILEIO_H_
44 
45 /* Function prototypes */
46 extern int load_archive(char *filename, unsigned char *buffer, int maxsize, char *extension);
47 
48 #endif /* _FILEIO_H_ */
49