1 /**
2  * Filesystem helpers
3 
4  * Copyright (C) 2007, 2008, 2009  Sylvain Beucler
5 
6  * This file is part of GNU FreeDink
7 
8  * GNU FreeDink is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License as
10  * published by the Free Software Foundation; either version 3 of the
11  * License, or (at your option) any later version.
12 
13  * GNU FreeDink is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * General Public License for more details.
17 
18  * You should have received a copy of the GNU General Public License
19  * along with this program.  If not, see
20  * <http://www.gnu.org/licenses/>.
21  */
22 
23 #ifndef _IO_UTIL_H
24 #define _IO_UTIL_H
25 
26 #include <limits.h>
27 #include "SDL.h"
28 
29 #ifdef __cplusplus
30 extern "C"
31 {
32 #endif
33 
34 #define BOOL_1BYTE char /* Boolean value on 1 byte exactly, used to
35 			   replace the C++ bool type during the C++=>C
36 			   conversion. Do not change to int, else
37 			   player_info (among others) will have a
38 			   different size and savegame format will
39 			   change! */
40 
41   extern void ciconvert (char *filename);
42   extern SDL_RWops *find_resource_as_rwops(const char *filename);
43   extern /*bool*/int exist(char *name);
44   extern int is_directory(char *name);
45   extern char* pdirname(char *filename);
46   extern void add_text(char *tex ,char *filename);
47 
48   extern int read_lsb_int(FILE *f);
49   extern void write_lsb_int(int n, FILE *f);
50   extern short read_lsb_short(FILE *f);
51   extern void write_lsb_short(short n, FILE *f);
52 
53 #ifdef __cplusplus
54 }
55 #endif
56 
57 #endif
58