| 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 |
#define BOOL_1BYTE char /* Boolean value on 1 byte exactly, used to |
| 30 |
replace the C++ bool type during the C++=>C |
| 31 |
conversion. Do not change to int, else |
| 32 |
player_info (among others) will have a |
| 33 |
different size and savegame format will |
| 34 |
change! */ |
| 35 |
|
| 36 |
extern void ciconvert (char *filename); |
| 37 |
extern /*bool*/int exist(char *name); |
| 38 |
extern int is_directory(const char *name); |
| 39 |
extern char* pdirname(const char *filename); |
| 40 |
|
| 41 |
extern int read_lsb_int(FILE *f); |
| 42 |
extern void write_lsb_int(int n, FILE *f); |
| 43 |
extern unsigned int read_lsb_uint(FILE *f); |
| 44 |
extern void write_lsb_uint(unsigned int n, FILE *f); |
| 45 |
extern short read_lsb_short(FILE *f); |
| 46 |
extern void write_lsb_short(short n, FILE *f); |
| 47 |
|
| 48 |
#endif |