author | Ryan C. Gordon <icculus@icculus.org> |
Wed, 03 Oct 2018 22:45:05 -0400 | |
branch | stable-1.0 |
changeset 1648 | 93b4c3bc6b9d |
parent 596 | 381b6ca0dd85 |
child 657 | dad3b5c307a9 |
permissions | -rw-r--r-- |
152 | 1 |
/* |
2 |
* Skeleton platform-dependent support routines for PhysicsFS. |
|
3 |
* |
|
4 |
* Please see the file LICENSE in the source's root directory. |
|
5 |
* |
|
6 |
* This file written by Ryan C. Gordon. |
|
7 |
*/ |
|
8 |
||
214
19846c18071b
Initial autoconf support.
Ryan C. Gordon <icculus@icculus.org>
parents:
156
diff
changeset
|
9 |
#if HAVE_CONFIG_H |
19846c18071b
Initial autoconf support.
Ryan C. Gordon <icculus@icculus.org>
parents:
156
diff
changeset
|
10 |
# include <config.h> |
19846c18071b
Initial autoconf support.
Ryan C. Gordon <icculus@icculus.org>
parents:
156
diff
changeset
|
11 |
#endif |
19846c18071b
Initial autoconf support.
Ryan C. Gordon <icculus@icculus.org>
parents:
156
diff
changeset
|
12 |
|
152 | 13 |
#define __PHYSICSFS_INTERNAL__ |
14 |
#include "physfs_internal.h" |
|
15 |
||
16 |
||
17 |
#error DO NOT COMPILE THIS. IT IS JUST A SKELETON EXAMPLE FILE. |
|
18 |
||
19 |
||
20 |
const char *__PHYSFS_platformDirSeparator = ":"; |
|
21 |
||
22 |
||
23 |
int __PHYSFS_platformInit(void) |
|
24 |
{ |
|
25 |
return(1); /* always succeed. */ |
|
26 |
} /* __PHYSFS_platformInit */ |
|
27 |
||
28 |
||
29 |
int __PHYSFS_platformDeinit(void) |
|
30 |
{ |
|
31 |
return(1); /* always succeed. */ |
|
32 |
} /* __PHYSFS_platformDeinit */ |
|
33 |
||
34 |
||
35 |
char **__PHYSFS_platformDetectAvailableCDs(void) |
|
36 |
{ |
|
37 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, NULL); |
|
38 |
} /* __PHYSFS_platformDetectAvailableCDs */ |
|
39 |
||
40 |
||
41 |
char *__PHYSFS_platformCalcBaseDir(const char *argv0) |
|
42 |
{ |
|
43 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, NULL); |
|
44 |
} /* __PHYSFS_platformCalcBaseDir */ |
|
45 |
||
46 |
||
47 |
char *__PHYSFS_platformGetUserName(void) |
|
48 |
{ |
|
49 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, NULL); |
|
50 |
} /* __PHYSFS_platformGetUserName */ |
|
51 |
||
52 |
||
53 |
char *__PHYSFS_platformGetUserDir(void) |
|
54 |
{ |
|
55 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, NULL); |
|
56 |
} /* __PHYSFS_platformGetUserDir */ |
|
57 |
||
58 |
||
59 |
PHYSFS_uint64 __PHYSFS_platformGetThreadID(void) |
|
60 |
{ |
|
61 |
return(1); /* single threaded. */ |
|
62 |
} /* __PHYSFS_platformGetThreadID */ |
|
63 |
||
64 |
||
65 |
int __PHYSFS_platformStricmp(const char *x, const char *y) |
|
66 |
{ |
|
67 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, 0); |
|
68 |
} /* __PHYSFS_platformStricmp */ |
|
69 |
||
70 |
||
596
381b6ca0dd85
Added internal function __PHYSFS_platformStrnicmp().
Ryan C. Gordon <icculus@icculus.org>
parents:
240
diff
changeset
|
71 |
int __PHYSFS_platformStrnicmp(const char *x, const char *y, PHYSFS_uint32 l) |
381b6ca0dd85
Added internal function __PHYSFS_platformStrnicmp().
Ryan C. Gordon <icculus@icculus.org>
parents:
240
diff
changeset
|
72 |
{ |
381b6ca0dd85
Added internal function __PHYSFS_platformStrnicmp().
Ryan C. Gordon <icculus@icculus.org>
parents:
240
diff
changeset
|
73 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, 0); |
381b6ca0dd85
Added internal function __PHYSFS_platformStrnicmp().
Ryan C. Gordon <icculus@icculus.org>
parents:
240
diff
changeset
|
74 |
} /* __PHYSFS_platformStrnicmp */ |
381b6ca0dd85
Added internal function __PHYSFS_platformStrnicmp().
Ryan C. Gordon <icculus@icculus.org>
parents:
240
diff
changeset
|
75 |
|
381b6ca0dd85
Added internal function __PHYSFS_platformStrnicmp().
Ryan C. Gordon <icculus@icculus.org>
parents:
240
diff
changeset
|
76 |
|
152 | 77 |
int __PHYSFS_platformExists(const char *fname) |
78 |
{ |
|
79 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, 0); |
|
80 |
} /* __PHYSFS_platformExists */ |
|
81 |
||
82 |
||
83 |
int __PHYSFS_platformIsSymLink(const char *fname) |
|
84 |
{ |
|
85 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, 0); |
|
86 |
} /* __PHYSFS_platformIsSymlink */ |
|
87 |
||
88 |
||
89 |
int __PHYSFS_platformIsDirectory(const char *fname) |
|
90 |
{ |
|
91 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, 0); |
|
92 |
} /* __PHYSFS_platformIsDirectory */ |
|
93 |
||
94 |
||
95 |
char *__PHYSFS_platformCvtToDependent(const char *prepend, |
|
96 |
const char *dirName, |
|
97 |
const char *append) |
|
98 |
{ |
|
99 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, NULL); |
|
100 |
} /* __PHYSFS_platformCvtToDependent */ |
|
101 |
||
102 |
||
103 |
void __PHYSFS_platformTimeslice(void) |
|
104 |
{ |
|
105 |
} /* __PHYSFS_platformTimeslice */ |
|
106 |
||
107 |
||
108 |
LinkedStringList *__PHYSFS_platformEnumerateFiles(const char *dirname, |
|
109 |
int omitSymLinks) |
|
110 |
{ |
|
111 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, NULL); |
|
112 |
} /* __PHYSFS_platformEnumerateFiles */ |
|
113 |
||
114 |
||
115 |
char *__PHYSFS_platformCurrentDir(void) |
|
116 |
{ |
|
117 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, NULL); |
|
118 |
} /* __PHYSFS_platformCurrentDir */ |
|
119 |
||
120 |
||
121 |
char *__PHYSFS_platformRealPath(const char *path) |
|
122 |
{ |
|
123 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, NULL); |
|
124 |
} /* __PHYSFS_platformRealPath */ |
|
125 |
||
126 |
||
127 |
int __PHYSFS_platformMkDir(const char *path) |
|
128 |
{ |
|
129 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, 0); |
|
130 |
} /* __PHYSFS_platformMkDir */ |
|
131 |
||
132 |
||
133 |
void *__PHYSFS_platformOpenRead(const char *filename) |
|
134 |
{ |
|
135 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, NULL); |
|
136 |
} /* __PHYSFS_platformOpenRead */ |
|
137 |
||
138 |
||
139 |
void *__PHYSFS_platformOpenWrite(const char *filename) |
|
140 |
{ |
|
141 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, NULL); |
|
142 |
} /* __PHYSFS_platformOpenWrite */ |
|
143 |
||
144 |
||
145 |
void *__PHYSFS_platformOpenAppend(const char *filename) |
|
146 |
{ |
|
147 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, NULL); |
|
148 |
} /* __PHYSFS_platformOpenAppend */ |
|
149 |
||
150 |
||
151 |
PHYSFS_sint64 __PHYSFS_platformRead(void *opaque, void *buffer, |
|
152 |
PHYSFS_uint32 size, PHYSFS_uint32 count) |
|
153 |
{ |
|
154 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, -1); |
|
155 |
} /* __PHYSFS_platformRead */ |
|
156 |
||
157 |
||
158 |
PHYSFS_sint64 __PHYSFS_platformWrite(void *opaque, const void *buffer, |
|
159 |
PHYSFS_uint32 size, PHYSFS_uint32 count) |
|
160 |
{ |
|
161 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, -1); |
|
162 |
} /* __PHYSFS_platformWrite */ |
|
163 |
||
164 |
||
165 |
int __PHYSFS_platformSeek(void *opaque, PHYSFS_uint64 pos) |
|
166 |
{ |
|
167 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, -1); |
|
168 |
} /* __PHYSFS_platformSeek */ |
|
169 |
||
170 |
||
171 |
PHYSFS_sint64 __PHYSFS_platformTell(void *opaque) |
|
172 |
{ |
|
173 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, -1); |
|
174 |
} /* __PHYSFS_platformTell */ |
|
175 |
||
176 |
||
177 |
PHYSFS_sint64 __PHYSFS_platformFileLength(void *opaque) |
|
178 |
{ |
|
179 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, -1); |
|
180 |
} /* __PHYSFS_platformFileLength */ |
|
181 |
||
182 |
||
183 |
int __PHYSFS_platformEOF(void *opaque) |
|
184 |
{ |
|
185 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, -1); |
|
186 |
} /* __PHYSFS_platformEOF */ |
|
187 |
||
188 |
||
189 |
int __PHYSFS_platformFlush(void *opaque) |
|
190 |
{ |
|
191 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, 0); |
|
192 |
} /* __PHYSFS_platformFlush */ |
|
193 |
||
194 |
||
195 |
int __PHYSFS_platformClose(void *opaque) |
|
196 |
{ |
|
197 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, 0); |
|
198 |
} /* __PHYSFS_platformClose */ |
|
199 |
||
200 |
||
201 |
int __PHYSFS_platformDelete(const char *path) |
|
202 |
{ |
|
203 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, 0); |
|
204 |
} /* __PHYSFS_platformDelete */ |
|
205 |
||
206 |
||
207 |
void *__PHYSFS_platformCreateMutex(void) |
|
208 |
{ |
|
209 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, NULL); |
|
210 |
} /* __PHYSFS_platformCreateMutex */ |
|
211 |
||
212 |
||
213 |
void __PHYSFS_platformDestroyMutex(void *mutex) |
|
214 |
{ |
|
215 |
} /* __PHYSFS_platformDestroyMutex */ |
|
216 |
||
217 |
||
218 |
int __PHYSFS_platformGrabMutex(void *mutex) |
|
219 |
{ |
|
156
f45e26b5f398
Added warning about potential infinite recursion between setError and grabMutex.
Ryan C. Gordon <icculus@icculus.org>
parents:
152
diff
changeset
|
220 |
/* not implemented, but can't call __PHYSFS_setError! */ |
f45e26b5f398
Added warning about potential infinite recursion between setError and grabMutex.
Ryan C. Gordon <icculus@icculus.org>
parents:
152
diff
changeset
|
221 |
return(0); |
152 | 222 |
} /* __PHYSFS_platformGrabMutex */ |
223 |
||
224 |
||
225 |
void __PHYSFS_platformReleaseMutex(void *mutex) |
|
226 |
{ |
|
156
f45e26b5f398
Added warning about potential infinite recursion between setError and grabMutex.
Ryan C. Gordon <icculus@icculus.org>
parents:
152
diff
changeset
|
227 |
/* not implemented, but can't call __PHYSFS_setError! */ |
152 | 228 |
} /* __PHYSFS_platformReleaseMutex */ |
229 |
||
240
052041af9001
Added PHYSFS_getLastModTime() API. (Thanks, John Hall!)
Ryan C. Gordon <icculus@icculus.org>
parents:
214
diff
changeset
|
230 |
|
052041af9001
Added PHYSFS_getLastModTime() API. (Thanks, John Hall!)
Ryan C. Gordon <icculus@icculus.org>
parents:
214
diff
changeset
|
231 |
PHYSFS_sint64 __PHYSFS_platformGetLastModTime(const char *fname) |
052041af9001
Added PHYSFS_getLastModTime() API. (Thanks, John Hall!)
Ryan C. Gordon <icculus@icculus.org>
parents:
214
diff
changeset
|
232 |
{ |
052041af9001
Added PHYSFS_getLastModTime() API. (Thanks, John Hall!)
Ryan C. Gordon <icculus@icculus.org>
parents:
214
diff
changeset
|
233 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, -1); |
052041af9001
Added PHYSFS_getLastModTime() API. (Thanks, John Hall!)
Ryan C. Gordon <icculus@icculus.org>
parents:
214
diff
changeset
|
234 |
} /* __PHYSFS_platformGetLastModTime */ |
052041af9001
Added PHYSFS_getLastModTime() API. (Thanks, John Hall!)
Ryan C. Gordon <icculus@icculus.org>
parents:
214
diff
changeset
|
235 |
|
152 | 236 |
/* end of skeleton.c ... */ |
237 |