author | Ryan C. Gordon <icculus@icculus.org> |
Sun, 30 Mar 2003 18:59:54 +0000 | |
changeset 553 | 4338d9c0bbcd |
parent 240 | 052041af9001 |
child 596 | 381b6ca0dd85 |
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 |
||
71 |
int __PHYSFS_platformExists(const char *fname) |
|
72 |
{ |
|
73 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, 0); |
|
74 |
} /* __PHYSFS_platformExists */ |
|
75 |
||
76 |
||
77 |
int __PHYSFS_platformIsSymLink(const char *fname) |
|
78 |
{ |
|
79 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, 0); |
|
80 |
} /* __PHYSFS_platformIsSymlink */ |
|
81 |
||
82 |
||
83 |
int __PHYSFS_platformIsDirectory(const char *fname) |
|
84 |
{ |
|
85 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, 0); |
|
86 |
} /* __PHYSFS_platformIsDirectory */ |
|
87 |
||
88 |
||
89 |
char *__PHYSFS_platformCvtToDependent(const char *prepend, |
|
90 |
const char *dirName, |
|
91 |
const char *append) |
|
92 |
{ |
|
93 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, NULL); |
|
94 |
} /* __PHYSFS_platformCvtToDependent */ |
|
95 |
||
96 |
||
97 |
void __PHYSFS_platformTimeslice(void) |
|
98 |
{ |
|
99 |
} /* __PHYSFS_platformTimeslice */ |
|
100 |
||
101 |
||
102 |
LinkedStringList *__PHYSFS_platformEnumerateFiles(const char *dirname, |
|
103 |
int omitSymLinks) |
|
104 |
{ |
|
105 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, NULL); |
|
106 |
} /* __PHYSFS_platformEnumerateFiles */ |
|
107 |
||
108 |
||
109 |
char *__PHYSFS_platformCurrentDir(void) |
|
110 |
{ |
|
111 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, NULL); |
|
112 |
} /* __PHYSFS_platformCurrentDir */ |
|
113 |
||
114 |
||
115 |
char *__PHYSFS_platformRealPath(const char *path) |
|
116 |
{ |
|
117 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, NULL); |
|
118 |
} /* __PHYSFS_platformRealPath */ |
|
119 |
||
120 |
||
121 |
int __PHYSFS_platformMkDir(const char *path) |
|
122 |
{ |
|
123 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, 0); |
|
124 |
} /* __PHYSFS_platformMkDir */ |
|
125 |
||
126 |
||
127 |
void *__PHYSFS_platformOpenRead(const char *filename) |
|
128 |
{ |
|
129 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, NULL); |
|
130 |
} /* __PHYSFS_platformOpenRead */ |
|
131 |
||
132 |
||
133 |
void *__PHYSFS_platformOpenWrite(const char *filename) |
|
134 |
{ |
|
135 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, NULL); |
|
136 |
} /* __PHYSFS_platformOpenWrite */ |
|
137 |
||
138 |
||
139 |
void *__PHYSFS_platformOpenAppend(const char *filename) |
|
140 |
{ |
|
141 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, NULL); |
|
142 |
} /* __PHYSFS_platformOpenAppend */ |
|
143 |
||
144 |
||
145 |
PHYSFS_sint64 __PHYSFS_platformRead(void *opaque, void *buffer, |
|
146 |
PHYSFS_uint32 size, PHYSFS_uint32 count) |
|
147 |
{ |
|
148 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, -1); |
|
149 |
} /* __PHYSFS_platformRead */ |
|
150 |
||
151 |
||
152 |
PHYSFS_sint64 __PHYSFS_platformWrite(void *opaque, const void *buffer, |
|
153 |
PHYSFS_uint32 size, PHYSFS_uint32 count) |
|
154 |
{ |
|
155 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, -1); |
|
156 |
} /* __PHYSFS_platformWrite */ |
|
157 |
||
158 |
||
159 |
int __PHYSFS_platformSeek(void *opaque, PHYSFS_uint64 pos) |
|
160 |
{ |
|
161 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, -1); |
|
162 |
} /* __PHYSFS_platformSeek */ |
|
163 |
||
164 |
||
165 |
PHYSFS_sint64 __PHYSFS_platformTell(void *opaque) |
|
166 |
{ |
|
167 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, -1); |
|
168 |
} /* __PHYSFS_platformTell */ |
|
169 |
||
170 |
||
171 |
PHYSFS_sint64 __PHYSFS_platformFileLength(void *opaque) |
|
172 |
{ |
|
173 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, -1); |
|
174 |
} /* __PHYSFS_platformFileLength */ |
|
175 |
||
176 |
||
177 |
int __PHYSFS_platformEOF(void *opaque) |
|
178 |
{ |
|
179 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, -1); |
|
180 |
} /* __PHYSFS_platformEOF */ |
|
181 |
||
182 |
||
183 |
int __PHYSFS_platformFlush(void *opaque) |
|
184 |
{ |
|
185 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, 0); |
|
186 |
} /* __PHYSFS_platformFlush */ |
|
187 |
||
188 |
||
189 |
int __PHYSFS_platformClose(void *opaque) |
|
190 |
{ |
|
191 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, 0); |
|
192 |
} /* __PHYSFS_platformClose */ |
|
193 |
||
194 |
||
195 |
int __PHYSFS_platformDelete(const char *path) |
|
196 |
{ |
|
197 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, 0); |
|
198 |
} /* __PHYSFS_platformDelete */ |
|
199 |
||
200 |
||
201 |
void *__PHYSFS_platformCreateMutex(void) |
|
202 |
{ |
|
203 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, NULL); |
|
204 |
} /* __PHYSFS_platformCreateMutex */ |
|
205 |
||
206 |
||
207 |
void __PHYSFS_platformDestroyMutex(void *mutex) |
|
208 |
{ |
|
209 |
} /* __PHYSFS_platformDestroyMutex */ |
|
210 |
||
211 |
||
212 |
int __PHYSFS_platformGrabMutex(void *mutex) |
|
213 |
{ |
|
156
f45e26b5f398
Added warning about potential infinite recursion between setError and grabMutex.
Ryan C. Gordon <icculus@icculus.org>
parents:
152
diff
changeset
|
214 |
/* 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
|
215 |
return(0); |
152 | 216 |
} /* __PHYSFS_platformGrabMutex */ |
217 |
||
218 |
||
219 |
void __PHYSFS_platformReleaseMutex(void *mutex) |
|
220 |
{ |
|
156
f45e26b5f398
Added warning about potential infinite recursion between setError and grabMutex.
Ryan C. Gordon <icculus@icculus.org>
parents:
152
diff
changeset
|
221 |
/* not implemented, but can't call __PHYSFS_setError! */ |
152 | 222 |
} /* __PHYSFS_platformReleaseMutex */ |
223 |
||
240
052041af9001
Added PHYSFS_getLastModTime() API. (Thanks, John Hall!)
Ryan C. Gordon <icculus@icculus.org>
parents:
214
diff
changeset
|
224 |
|
052041af9001
Added PHYSFS_getLastModTime() API. (Thanks, John Hall!)
Ryan C. Gordon <icculus@icculus.org>
parents:
214
diff
changeset
|
225 |
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
|
226 |
{ |
052041af9001
Added PHYSFS_getLastModTime() API. (Thanks, John Hall!)
Ryan C. Gordon <icculus@icculus.org>
parents:
214
diff
changeset
|
227 |
BAIL_MACRO(ERR_NOT_IMPLEMENTED, -1); |
052041af9001
Added PHYSFS_getLastModTime() API. (Thanks, John Hall!)
Ryan C. Gordon <icculus@icculus.org>
parents:
214
diff
changeset
|
228 |
} /* __PHYSFS_platformGetLastModTime */ |
052041af9001
Added PHYSFS_getLastModTime() API. (Thanks, John Hall!)
Ryan C. Gordon <icculus@icculus.org>
parents:
214
diff
changeset
|
229 |
|
152 | 230 |
/* end of skeleton.c ... */ |
231 |