9991
|
1 |
/*
|
|
2 |
* Hedgewars, a free turn based strategy game
|
|
3 |
* Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
|
|
4 |
*
|
|
5 |
* This program is free software; you can redistribute it and/or modify
|
|
6 |
* it under the terms of the GNU General Public License as published by
|
|
7 |
* the Free Software Foundation; version 2 of the License
|
|
8 |
*
|
|
9 |
* This program is distributed in the hope that it will be useful,
|
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12 |
* GNU General Public License for more details.
|
|
13 |
*
|
|
14 |
* You should have received a copy of the GNU General Public License
|
|
15 |
* along with this program; if not, write to the Free Software
|
|
16 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
|
17 |
*/
|
|
18 |
|
|
19 |
#ifndef _HEDGEWARS_PHYSFSCOMPAT_C_
|
|
20 |
#define _HEDGEWARS_PHYSFSCOMPAT_C_
|
|
21 |
|
|
22 |
#include "physfs.h"
|
|
23 |
|
|
24 |
#if PHYSFS_VER_MAJOR == 2
|
|
25 |
#if PHYSFS_VER_MINOR == 0
|
|
26 |
|
|
27 |
#define HW_PHYSFS_COMPAT
|
|
28 |
|
|
29 |
#ifdef __cplusplus
|
|
30 |
extern "C" {
|
|
31 |
#endif
|
|
32 |
|
|
33 |
#define PHYSFS_DECL __EXPORT__
|
|
34 |
|
|
35 |
typedef enum PHYSFS_FileType
|
|
36 |
{
|
10017
|
37 |
PHYSFS_FILETYPE_REGULAR,
|
|
38 |
PHYSFS_FILETYPE_DIRECTORY,
|
|
39 |
PHYSFS_FILETYPE_SYMLINK,
|
|
40 |
PHYSFS_FILETYPE_OTHER
|
9991
|
41 |
} PHYSFS_FileType;
|
|
42 |
|
|
43 |
typedef struct PHYSFS_Stat
|
|
44 |
{
|
10017
|
45 |
PHYSFS_sint64 filesize;
|
|
46 |
PHYSFS_sint64 modtime;
|
|
47 |
PHYSFS_sint64 createtime;
|
|
48 |
PHYSFS_sint64 accesstime;
|
|
49 |
PHYSFS_FileType filetype;
|
|
50 |
int readonly;
|
9991
|
51 |
} PHYSFS_Stat;
|
|
52 |
|
|
53 |
PHYSFS_DECL int PHYSFS_stat(const char *fname, PHYSFS_Stat *stat);
|
|
54 |
|
|
55 |
PHYSFS_DECL PHYSFS_sint64 PHYSFS_readBytes(PHYSFS_File *handle, void *buffer,
|
|
56 |
PHYSFS_uint64 len);
|
|
57 |
|
|
58 |
|
|
59 |
PHYSFS_DECL PHYSFS_sint64 PHYSFS_writeBytes(PHYSFS_File *handle,
|
|
60 |
const void *buffer,
|
|
61 |
PHYSFS_uint64 len);
|
|
62 |
|
|
63 |
|
|
64 |
#ifdef __cplusplus
|
|
65 |
}
|
|
66 |
#endif
|
|
67 |
|
|
68 |
#endif /* PHYSFS_VER_MAJOR == 2 */
|
|
69 |
#endif /* PHYSFS_VER_MINOR == 0 */
|
|
70 |
|
|
71 |
#endif /* _HEDGEWARS_PHYSFSCOMPAT_C_ */
|