author | alfadur |
Tue, 26 Mar 2019 22:29:48 +0300 | |
changeset 14743 | c97faf0aef78 |
parent 11046 | 47a8c19ecb60 |
child 15976 | 69479ac8f4c8 |
permissions | -rw-r--r-- |
9991 | 1 |
/* |
2 |
* Hedgewars, a free turn based strategy game |
|
11046 | 3 |
* Copyright (c) 2004-2015 Andrey Korotaev <unC0Rr@gmail.com> |
9991 | 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 |
|
10108
c68cf030eded
update FSF address. note: two sdl include files (by Sam Lantinga) still have the old FSF address in their copyright - but I ain't gonna touch their copyright headers
sheepluva
parents:
10017
diff
changeset
|
16 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
9991 | 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_ */ |