Skip to content

Latest commit

 

History

History
1386 lines (1260 loc) · 66.9 KB

physfs_internal.h

File metadata and controls

1386 lines (1260 loc) · 66.9 KB
 
Jul 6, 2001
Jul 6, 2001
1
2
3
4
/*
* Internal function/structure declaration. Do NOT include in your
* application.
*
Mar 11, 2007
Mar 11, 2007
5
* Please see the file LICENSE.txt in the source's root directory.
Jul 6, 2001
Jul 6, 2001
6
7
8
9
10
11
12
13
14
15
16
*
* This file written by Ryan C. Gordon.
*/
#ifndef _INCLUDE_PHYSFS_INTERNAL_H_
#define _INCLUDE_PHYSFS_INTERNAL_H_
#ifndef __PHYSICSFS_INTERNAL__
#error Do not include this header from your applications.
#endif
Mar 24, 2002
Mar 24, 2002
17
18
#include "physfs.h"
Sep 6, 2010
Sep 6, 2010
19
20
21
22
/* The holy trinity. */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Mar 15, 2007
Mar 15, 2007
23
Nov 22, 2002
Nov 22, 2002
24
25
#ifdef HAVE_ASSERT_H
#include <assert.h>
Jul 24, 2005
Jul 24, 2005
26
#elif (!defined assert)
Nov 22, 2002
Nov 22, 2002
27
28
29
#define assert(x)
#endif
Mar 19, 2007
Mar 19, 2007
30
/* !!! FIXME: remove this when revamping stack allocation code... */
Jul 12, 2007
Jul 12, 2007
31
#if defined(_MSC_VER) || defined(__MINGW32__)
Mar 19, 2007
Mar 19, 2007
32
33
34
#include <malloc.h>
#endif
Apr 8, 2010
Apr 8, 2010
35
36
37
38
#if defined(__sun) || defined(sun)
#include <alloca.h>
#endif
Mar 24, 2002
Mar 24, 2002
39
40
41
42
#ifdef __cplusplus
extern "C" {
#endif
Mar 12, 2008
Mar 12, 2008
43
#ifdef __GNUC__
Mar 12, 2008
Mar 12, 2008
44
#define PHYSFS_MINIMUM_GCC_VERSION(major, minor) \
Mar 12, 2008
Mar 12, 2008
45
46
( ((__GNUC__ << 16) + __GNUC_MINOR__) >= (((major) << 16) + (minor)) )
#else
Mar 12, 2008
Mar 12, 2008
47
#define PHYSFS_MINIMUM_GCC_VERSION(major, minor) (0)
Mar 12, 2008
Mar 12, 2008
48
49
#endif
Aug 21, 2010
Aug 21, 2010
50
51
52
53
54
55
56
57
#ifdef __cplusplus
/* C++ always has a real inline keyword. */
#elif (defined macintosh) && !(defined __MWERKS__)
# define inline
#elif (defined _MSC_VER)
# define inline __inline
#endif
Mar 24, 2007
Mar 24, 2007
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*
* Interface for small allocations. If you need a little scratch space for
* a throwaway buffer or string, use this. It will make small allocations
* on the stack if possible, and use allocator.Malloc() if they are too
* large. This helps reduce malloc pressure.
* There are some rules, though:
* NEVER return a pointer from this, as stack-allocated buffers go away
* when your function returns.
* NEVER allocate in a loop, as stack-allocated pointers will pile up. Call
* a function that uses smallAlloc from your loop, so the allocation can
* free each time.
* NEVER call smallAlloc with any complex expression (it's a macro that WILL
* have side effects...it references the argument multiple times). Use a
* variable or a literal.
* NEVER free a pointer from this with anything but smallFree. It will not
* be a valid pointer to the allocator, regardless of where the memory came
* from.
* NEVER realloc a pointer from this.
* NEVER forget to use smallFree: it may not be a pointer from the stack.
* NEVER forget to check for NULL...allocation can fail here, of course!
*/
Mar 10, 2012
Mar 10, 2012
79
#define __PHYSFS_SMALLALLOCTHRESHOLD 256
Mar 24, 2007
Mar 24, 2007
80
81
82
void *__PHYSFS_initSmallAlloc(void *ptr, PHYSFS_uint64 len);
#define __PHYSFS_smallAlloc(bytes) ( \
Mar 12, 2012
Mar 12, 2012
83
84
85
__PHYSFS_initSmallAlloc( \
(((bytes) < __PHYSFS_SMALLALLOCTHRESHOLD) ? \
alloca((size_t)((bytes)+sizeof(void*))) : NULL), (bytes)) \
Mar 24, 2007
Mar 24, 2007
86
87
88
89
90
)
void __PHYSFS_smallFree(void *ptr);
Mar 14, 2005
Mar 14, 2005
91
92
93
94
/* Use the allocation hooks. */
#define malloc(x) Do not use malloc() directly.
#define realloc(x, y) Do not use realloc() directly.
#define free(x) Do not use free() directly.
Mar 19, 2007
Mar 19, 2007
95
/* !!! FIXME: add alloca check here. */
Jul 28, 2002
Jul 28, 2002
96
97
/* The LANG section. */
Jan 1, 2006
Jan 1, 2006
98
/* please send questions/translations to Ryan: icculus@icculus.org. */
Jul 28, 2002
Jul 28, 2002
99
100
101
102
103
#if (!defined PHYSFS_LANG)
# define PHYSFS_LANG PHYSFS_LANG_ENGLISH
#endif
Mar 11, 2008
Mar 11, 2008
104
/* All language strings are UTF-8 encoded! */
Jul 30, 2002
Jul 30, 2002
105
#define PHYSFS_LANG_ENGLISH 1 /* English by Ryan C. Gordon */
Mar 11, 2008
Mar 11, 2008
106
107
108
109
110
#define PHYSFS_LANG_RUSSIAN 2 /* Russian by Ed Sinjiashvili */
#define PHYSFS_LANG_SPANISH 3 /* Spanish by Pedro J. Pérez */
#define PHYSFS_LANG_FRENCH 4 /* French by Stéphane Peter */
#define PHYSFS_LANG_GERMAN 5 /* German by Michael Renner */
#define PHYSFS_LANG_PORTUGUESE_BR 6 /* pt-br by Danny Angelo Carminati Grein */
Jul 28, 2002
Jul 28, 2002
111
112
113
114
#if (PHYSFS_LANG == PHYSFS_LANG_ENGLISH)
#define DIR_ARCHIVE_DESCRIPTION "Non-archive, direct filesystem I/O"
#define GRP_ARCHIVE_DESCRIPTION "Build engine Groupfile format"
Mar 30, 2003
Mar 30, 2003
115
116
#define HOG_ARCHIVE_DESCRIPTION "Descent I/II HOG file format"
#define MVL_ARCHIVE_DESCRIPTION "Descent II Movielib format"
Jul 21, 2003
Jul 21, 2003
117
#define QPAK_ARCHIVE_DESCRIPTION "Quake I/II format"
Jul 28, 2002
Jul 28, 2002
118
#define ZIP_ARCHIVE_DESCRIPTION "PkZip/WinZip/Info-Zip compatible"
Mar 16, 2005
Mar 16, 2005
119
#define WAD_ARCHIVE_DESCRIPTION "DOOM engine format"
Apr 11, 2006
Apr 11, 2006
120
#define LZMA_ARCHIVE_DESCRIPTION "LZMA (7zip) format"
Jul 28, 2002
Jul 28, 2002
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#define ERR_IS_INITIALIZED "Already initialized"
#define ERR_NOT_INITIALIZED "Not initialized"
#define ERR_INVALID_ARGUMENT "Invalid argument"
#define ERR_FILES_STILL_OPEN "Files still open"
#define ERR_NO_DIR_CREATE "Failed to create directories"
#define ERR_OUT_OF_MEMORY "Out of memory"
#define ERR_NOT_IN_SEARCH_PATH "No such entry in search path"
#define ERR_NOT_SUPPORTED "Operation not supported"
#define ERR_UNSUPPORTED_ARCHIVE "Archive type unsupported"
#define ERR_NOT_A_HANDLE "Not a file handle"
#define ERR_INSECURE_FNAME "Insecure filename"
#define ERR_SYMLINK_DISALLOWED "Symbolic links are disabled"
#define ERR_NO_WRITE_DIR "Write directory is not set"
#define ERR_NO_SUCH_FILE "File not found"
#define ERR_NO_SUCH_PATH "Path not found"
#define ERR_NO_SUCH_VOLUME "Volume not found"
#define ERR_PAST_EOF "Past end of file"
#define ERR_ARC_IS_READ_ONLY "Archive is read-only"
#define ERR_IO_ERROR "I/O error"
#define ERR_CANT_SET_WRITE_DIR "Can't set write directory"
#define ERR_SYMLINK_LOOP "Infinite symbolic link loop"
#define ERR_COMPRESSION "(De)compression error"
#define ERR_NOT_IMPLEMENTED "Not implemented"
#define ERR_OS_ERROR "Operating system reported error"
#define ERR_FILE_EXISTS "File already exists"
#define ERR_NOT_A_FILE "Not a file"
#define ERR_NOT_A_DIR "Not a directory"
#define ERR_NOT_AN_ARCHIVE "Not an archive"
#define ERR_CORRUPTED "Corrupted archive"
#define ERR_SEEK_OUT_OF_RANGE "Seek out of range"
#define ERR_BAD_FILENAME "Bad filename"
#define ERR_PHYSFS_BAD_OS_CALL "(BUG) PhysicsFS made a bad system call"
#define ERR_ARGV0_IS_NULL "argv0 is NULL"
Apr 11, 2006
Apr 11, 2006
155
156
157
158
159
160
#define ERR_NEED_DICT "need dictionary"
#define ERR_DATA_ERROR "data error"
#define ERR_MEMORY_ERROR "memory error"
#define ERR_BUFFER_ERROR "buffer error"
#define ERR_VERSION_ERROR "version error"
#define ERR_UNKNOWN_ERROR "unknown error"
Jul 28, 2002
Jul 28, 2002
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
#define ERR_SEARCHPATH_TRUNC "Search path was truncated"
#define ERR_GETMODFN_TRUNC "GetModuleFileName() was truncated"
#define ERR_GETMODFN_NO_DIR "GetModuleFileName() had no dir"
#define ERR_DISK_FULL "Disk is full"
#define ERR_DIRECTORY_FULL "Directory full"
#define ERR_MACOS_GENERIC "MacOS reported error (%d)"
#define ERR_VOL_LOCKED_HW "Volume is locked through hardware"
#define ERR_VOL_LOCKED_SW "Volume is locked through software"
#define ERR_FILE_LOCKED "File is locked"
#define ERR_FILE_OR_DIR_BUSY "File/directory is busy"
#define ERR_FILE_ALREADY_OPEN_W "File already open for writing"
#define ERR_FILE_ALREADY_OPEN_R "File already open for reading"
#define ERR_INVALID_REFNUM "Invalid reference number"
#define ERR_GETTING_FILE_POS "Error getting file position"
#define ERR_VOLUME_OFFLINE "Volume is offline"
#define ERR_PERMISSION_DENIED "Permission denied"
#define ERR_VOL_ALREADY_ONLINE "Volume already online"
#define ERR_NO_SUCH_DRIVE "No such drive"
#define ERR_NOT_MAC_DISK "Not a Macintosh disk"
#define ERR_VOL_EXTERNAL_FS "Volume belongs to an external filesystem"
#define ERR_PROBLEM_RENAME "Problem during rename"
#define ERR_BAD_MASTER_BLOCK "Bad master directory block"
#define ERR_CANT_MOVE_FORBIDDEN "Attempt to move forbidden"
#define ERR_WRONG_VOL_TYPE "Wrong volume type"
#define ERR_SERVER_VOL_LOST "Server volume has been disconnected"
#define ERR_FILE_ID_NOT_FOUND "File ID not found"
#define ERR_FILE_ID_EXISTS "File ID already exists"
#define ERR_SERVER_NO_RESPOND "Server not responding"
#define ERR_USER_AUTH_FAILED "User authentication failed"
#define ERR_PWORD_EXPIRED "Password has expired on server"
#define ERR_ACCESS_DENIED "Access denied"
#define ERR_NOT_A_DOS_DISK "Not a DOS disk"
#define ERR_SHARING_VIOLATION "Sharing violation"
#define ERR_CANNOT_MAKE "Cannot make"
#define ERR_DEV_IN_USE "Device already in use"
#define ERR_OPEN_FAILED "Open failed"
#define ERR_PIPE_BUSY "Pipe is busy"
#define ERR_SHARING_BUF_EXCEEDED "Sharing buffer exceeded"
#define ERR_TOO_MANY_HANDLES "Too many open handles"
#define ERR_SEEK_ERROR "Seek error"
#define ERR_DEL_CWD "Trying to delete current working directory"
#define ERR_WRITE_PROTECT_ERROR "Write protect error"
#define ERR_WRITE_FAULT "Write fault"
#define ERR_LOCK_VIOLATION "Lock violation"
#define ERR_GEN_FAILURE "General failure"
#define ERR_UNCERTAIN_MEDIA "Uncertain media"
#define ERR_PROT_VIOLATION "Protection violation"
#define ERR_BROKEN_PIPE "Broken pipe"
Jul 29, 2002
Jul 29, 2002
209
Dec 3, 2002
Dec 3, 2002
210
211
#elif (PHYSFS_LANG == PHYSFS_LANG_GERMAN)
#define DIR_ARCHIVE_DESCRIPTION "Kein Archiv, direkte Ein/Ausgabe in das Dateisystem"
Jul 21, 2003
Jul 21, 2003
212
#define GRP_ARCHIVE_DESCRIPTION "Build engine Groupfile format"
Mar 30, 2003
Mar 30, 2003
213
214
#define HOG_ARCHIVE_DESCRIPTION "Descent I/II HOG file format"
#define MVL_ARCHIVE_DESCRIPTION "Descent II Movielib format"
Jul 21, 2003
Jul 21, 2003
215
#define QPAK_ARCHIVE_DESCRIPTION "Quake I/II format"
Dec 3, 2002
Dec 3, 2002
216
#define ZIP_ARCHIVE_DESCRIPTION "PkZip/WinZip/Info-Zip kompatibel"
Apr 11, 2006
Apr 11, 2006
217
218
#define WAD_ARCHIVE_DESCRIPTION "DOOM engine format" /* !!! FIXME: translate this line if needed */
#define LZMA_ARCHIVE_DESCRIPTION "LZMA (7zip) format" /* !!! FIXME: translate this line if needed */
Dec 3, 2002
Dec 3, 2002
219
220
221
#define ERR_IS_INITIALIZED "Bereits initialisiert"
#define ERR_NOT_INITIALIZED "Nicht initialisiert"
Mar 11, 2008
Mar 11, 2008
222
223
#define ERR_INVALID_ARGUMENT "Ungültiges Argument"
#define ERR_FILES_STILL_OPEN "Dateien noch immer geöffnet"
Dec 3, 2002
Dec 3, 2002
224
225
226
#define ERR_NO_DIR_CREATE "Fehler beim Erzeugen der Verzeichnisse"
#define ERR_OUT_OF_MEMORY "Kein Speicher mehr frei"
#define ERR_NOT_IN_SEARCH_PATH "Eintrag nicht im Suchpfad enthalten"
Mar 11, 2008
Mar 11, 2008
227
228
#define ERR_NOT_SUPPORTED "Befehl nicht unterstützt"
#define ERR_UNSUPPORTED_ARCHIVE "Archiv-Typ nicht unterstützt"
Dec 3, 2002
Dec 3, 2002
229
230
231
232
233
234
235
236
#define ERR_NOT_A_HANDLE "Ist kein Dateideskriptor"
#define ERR_INSECURE_FNAME "Unsicherer Dateiname"
#define ERR_SYMLINK_DISALLOWED "Symbolische Verweise deaktiviert"
#define ERR_NO_WRITE_DIR "Schreibverzeichnis ist nicht gesetzt"
#define ERR_NO_SUCH_FILE "Datei nicht gefunden"
#define ERR_NO_SUCH_PATH "Pfad nicht gefunden"
#define ERR_NO_SUCH_VOLUME "Datencontainer nicht gefunden"
#define ERR_PAST_EOF "Hinter dem Ende der Datei"
Mar 11, 2008
Mar 11, 2008
237
#define ERR_ARC_IS_READ_ONLY "Archiv ist schreibgeschützt"
Dec 3, 2002
Dec 3, 2002
238
239
240
241
242
243
244
245
246
247
#define ERR_IO_ERROR "Ein/Ausgabe Fehler"
#define ERR_CANT_SET_WRITE_DIR "Kann Schreibverzeichnis nicht setzen"
#define ERR_SYMLINK_LOOP "Endlosschleife durch symbolische Verweise"
#define ERR_COMPRESSION "(De)Kompressionsfehler"
#define ERR_NOT_IMPLEMENTED "Nicht implementiert"
#define ERR_OS_ERROR "Betriebssystem meldete Fehler"
#define ERR_FILE_EXISTS "Datei existiert bereits"
#define ERR_NOT_A_FILE "Ist keine Datei"
#define ERR_NOT_A_DIR "Ist kein Verzeichnis"
#define ERR_NOT_AN_ARCHIVE "Ist kein Archiv"
Mar 11, 2008
Mar 11, 2008
248
#define ERR_CORRUPTED "Beschädigtes Archiv"
Dec 3, 2002
Dec 3, 2002
249
#define ERR_SEEK_OUT_OF_RANGE "Suche war ausserhalb der Reichweite"
Mar 11, 2008
Mar 11, 2008
250
251
#define ERR_BAD_FILENAME "Unzulässiger Dateiname"
#define ERR_PHYSFS_BAD_OS_CALL "(BUG) PhysicsFS verursachte einen ungültigen Systemaufruf"
Dec 3, 2002
Dec 3, 2002
252
#define ERR_ARGV0_IS_NULL "argv0 ist NULL"
Mar 11, 2008
Mar 11, 2008
253
#define ERR_NEED_DICT "brauche Wörterbuch"
Apr 11, 2006
Apr 11, 2006
254
255
256
257
258
#define ERR_DATA_ERROR "Datenfehler"
#define ERR_MEMORY_ERROR "Speicherfehler"
#define ERR_BUFFER_ERROR "Bufferfehler"
#define ERR_VERSION_ERROR "Versionskonflikt"
#define ERR_UNKNOWN_ERROR "Unbekannter Fehler"
Dec 3, 2002
Dec 3, 2002
259
260
261
262
263
264
265
266
267
#define ERR_SEARCHPATH_TRUNC "Suchpfad war abgeschnitten"
#define ERR_GETMODFN_TRUNC "GetModuleFileName() war abgeschnitten"
#define ERR_GETMODFN_NO_DIR "GetModuleFileName() bekam kein Verzeichnis"
#define ERR_DISK_FULL "Laufwerk ist voll"
#define ERR_DIRECTORY_FULL "Verzeichnis ist voll"
#define ERR_MACOS_GENERIC "MacOS meldete Fehler (%d)"
#define ERR_VOL_LOCKED_HW "Datencontainer ist durch Hardware gesperrt"
#define ERR_VOL_LOCKED_SW "Datencontainer ist durch Software gesperrt"
#define ERR_FILE_LOCKED "Datei ist gesperrt"
Mar 11, 2008
Mar 11, 2008
268
269
270
271
#define ERR_FILE_OR_DIR_BUSY "Datei/Verzeichnis ist beschäftigt"
#define ERR_FILE_ALREADY_OPEN_W "Datei schon im Schreibmodus geöffnet"
#define ERR_FILE_ALREADY_OPEN_R "Datei schon im Lesemodus geöffnet"
#define ERR_INVALID_REFNUM "Ungültige Referenznummer"
Dec 3, 2002
Dec 3, 2002
272
273
274
275
276
277
278
279
#define ERR_GETTING_FILE_POS "Fehler beim Finden der Dateiposition"
#define ERR_VOLUME_OFFLINE "Datencontainer ist offline"
#define ERR_PERMISSION_DENIED "Zugriff verweigert"
#define ERR_VOL_ALREADY_ONLINE "Datencontainer ist bereits online"
#define ERR_NO_SUCH_DRIVE "Laufwerk nicht vorhanden"
#define ERR_NOT_MAC_DISK "Ist kein Macintosh Laufwerk"
#define ERR_VOL_EXTERNAL_FS "Datencontainer liegt auf einem externen Dateisystem"
#define ERR_PROBLEM_RENAME "Fehler beim Umbenennen"
Mar 11, 2008
Mar 11, 2008
280
#define ERR_BAD_MASTER_BLOCK "Beschädigter Hauptverzeichnisblock"
Dec 3, 2002
Dec 3, 2002
281
282
283
284
285
286
287
288
289
290
291
292
#define ERR_CANT_MOVE_FORBIDDEN "Verschieben nicht erlaubt"
#define ERR_WRONG_VOL_TYPE "Falscher Datencontainer-Typ"
#define ERR_SERVER_VOL_LOST "Datencontainer am Server wurde getrennt"
#define ERR_FILE_ID_NOT_FOUND "Dateikennung nicht gefunden"
#define ERR_FILE_ID_EXISTS "Dateikennung existiert bereits"
#define ERR_SERVER_NO_RESPOND "Server antwortet nicht"
#define ERR_USER_AUTH_FAILED "Benutzerauthentifizierung fehlgeschlagen"
#define ERR_PWORD_EXPIRED "Passwort am Server ist abgelaufen"
#define ERR_ACCESS_DENIED "Zugriff verweigert"
#define ERR_NOT_A_DOS_DISK "Ist kein DOS-Laufwerk"
#define ERR_SHARING_VIOLATION "Zugriffsverletzung"
#define ERR_CANNOT_MAKE "Kann nicht erzeugen"
Mar 11, 2008
Mar 11, 2008
293
294
#define ERR_DEV_IN_USE "Gerät wird bereits benutzt"
#define ERR_OPEN_FAILED "Öffnen fehlgeschlagen"
Dec 3, 2002
Dec 3, 2002
295
#define ERR_PIPE_BUSY "Pipeverbindung ist belegt"
Mar 11, 2008
Mar 11, 2008
296
#define ERR_SHARING_BUF_EXCEEDED "Zugriffsbuffer überschritten"
Dec 3, 2002
Dec 3, 2002
297
298
#define ERR_TOO_MANY_HANDLES "Zu viele offene Dateien"
#define ERR_SEEK_ERROR "Fehler beim Suchen"
Mar 11, 2008
Mar 11, 2008
299
#define ERR_DEL_CWD "Aktuelles Arbeitsverzeichnis darf nicht gelöscht werden"
Dec 3, 2002
Dec 3, 2002
300
301
302
303
304
305
306
307
#define ERR_WRITE_PROTECT_ERROR "Schreibschutzfehler"
#define ERR_WRITE_FAULT "Schreibfehler"
#define ERR_LOCK_VIOLATION "Sperrverletzung"
#define ERR_GEN_FAILURE "Allgemeiner Fehler"
#define ERR_UNCERTAIN_MEDIA "Unsicheres Medium"
#define ERR_PROT_VIOLATION "Schutzverletzung"
#define ERR_BROKEN_PIPE "Pipeverbindung unterbrochen"
Mar 11, 2008
Mar 11, 2008
308
309
310
#elif (PHYSFS_LANG == PHYSFS_LANG_RUSSIAN)
#define DIR_ARCHIVE_DESCRIPTION "Не архив, непосредственный ввод/вывод файловой системы"
#define GRP_ARCHIVE_DESCRIPTION "Формат группового файла Build engine"
Jul 21, 2003
Jul 21, 2003
311
312
#define HOG_ARCHIVE_DESCRIPTION "Descent I/II HOG file format"
#define MVL_ARCHIVE_DESCRIPTION "Descent II Movielib format"
Mar 11, 2008
Mar 11, 2008
313
#define ZIP_ARCHIVE_DESCRIPTION "PkZip/WinZip/Info-Zip совместимый"
Apr 11, 2006
Apr 11, 2006
314
315
#define WAD_ARCHIVE_DESCRIPTION "DOOM engine format" /* !!! FIXME: translate this line if needed */
#define LZMA_ARCHIVE_DESCRIPTION "LZMA (7zip) format" /* !!! FIXME: translate this line if needed */
Jul 21, 2003
Jul 21, 2003
316
Mar 11, 2008
Mar 11, 2008
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
#define ERR_IS_INITIALIZED "Уже инициализирован"
#define ERR_NOT_INITIALIZED "Не инициализирован"
#define ERR_INVALID_ARGUMENT "Неверный аргумент"
#define ERR_FILES_STILL_OPEN "Файлы еще открыты"
#define ERR_NO_DIR_CREATE "Не могу создать каталоги"
#define ERR_OUT_OF_MEMORY "Кончилась память"
#define ERR_NOT_IN_SEARCH_PATH "Нет такого элемента в пути поиска"
#define ERR_NOT_SUPPORTED "Операция не поддерживается"
#define ERR_UNSUPPORTED_ARCHIVE "Архивы такого типа не поддерживаются"
#define ERR_NOT_A_HANDLE "Не файловый дескриптор"
#define ERR_INSECURE_FNAME "Небезопасное имя файла"
#define ERR_SYMLINK_DISALLOWED "Символьные ссылки отключены"
#define ERR_NO_WRITE_DIR "Каталог для записи не установлен"
#define ERR_NO_SUCH_FILE "Файл не найден"
#define ERR_NO_SUCH_PATH "Путь не найден"
#define ERR_NO_SUCH_VOLUME "Том не найден"
#define ERR_PAST_EOF "За концом файла"
#define ERR_ARC_IS_READ_ONLY "Архив только для чтения"
#define ERR_IO_ERROR "Ошибка ввода/вывода"
#define ERR_CANT_SET_WRITE_DIR "Не могу установить каталог для записи"
#define ERR_SYMLINK_LOOP "Бесконечный цикл символьной ссылки"
#define ERR_COMPRESSION "Ошибка (Рас)паковки"
#define ERR_NOT_IMPLEMENTED "Не реализовано"
#define ERR_OS_ERROR "Операционная система сообщила ошибку"
#define ERR_FILE_EXISTS "Файл уже существует"
#define ERR_NOT_A_FILE "Не файл"
#define ERR_NOT_A_DIR "Не каталог"
#define ERR_NOT_AN_ARCHIVE "Не архив"
#define ERR_CORRUPTED "Поврежденный архив"
#define ERR_SEEK_OUT_OF_RANGE "Позиционирование за пределы"
#define ERR_BAD_FILENAME "Неверное имя файла"
#define ERR_PHYSFS_BAD_OS_CALL "(BUG) PhysicsFS выполнила неверный системный вызов"
Jul 21, 2003
Jul 21, 2003
349
#define ERR_ARGV0_IS_NULL "argv0 is NULL"
Mar 11, 2008
Mar 11, 2008
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
#define ERR_NEED_DICT "нужен словарь"
#define ERR_DATA_ERROR "ошибка данных"
#define ERR_MEMORY_ERROR "ошибка памяти"
#define ERR_BUFFER_ERROR "ошибка буфера"
#define ERR_VERSION_ERROR "ошибка версии"
#define ERR_UNKNOWN_ERROR "неизвестная ошибка"
#define ERR_SEARCHPATH_TRUNC "Путь поиска обрезан"
#define ERR_GETMODFN_TRUNC "GetModuleFileName() обрезан"
#define ERR_GETMODFN_NO_DIR "GetModuleFileName() не получил каталог"
#define ERR_DISK_FULL "Диск полон"
#define ERR_DIRECTORY_FULL "Каталог полон"
#define ERR_MACOS_GENERIC "MacOS сообщила ошибку (%d)"
#define ERR_VOL_LOCKED_HW "Том блокирован аппаратно"
#define ERR_VOL_LOCKED_SW "Том блокирован программно"
#define ERR_FILE_LOCKED "Файл заблокирован"
#define ERR_FILE_OR_DIR_BUSY "Файл/каталог занят"
#define ERR_FILE_ALREADY_OPEN_W "Файл уже открыт на запись"
#define ERR_FILE_ALREADY_OPEN_R "Файл уже открыт на чтение"
#define ERR_INVALID_REFNUM "Неверное количество ссылок"
#define ERR_GETTING_FILE_POS "Ошибка при получении позиции файла"
#define ERR_VOLUME_OFFLINE "Том отсоединен"
#define ERR_PERMISSION_DENIED "Отказано в разрешении"
#define ERR_VOL_ALREADY_ONLINE "Том уже подсоединен"
#define ERR_NO_SUCH_DRIVE "Нет такого диска"
#define ERR_NOT_MAC_DISK "Не диск Macintosh"
#define ERR_VOL_EXTERNAL_FS "Том принадлежит внешней файловой системе"
#define ERR_PROBLEM_RENAME "Проблема при переименовании"
#define ERR_BAD_MASTER_BLOCK "Плохой главный блок каталога"
#define ERR_CANT_MOVE_FORBIDDEN "Попытка переместить запрещена"
#define ERR_WRONG_VOL_TYPE "Неверный тип тома"
#define ERR_SERVER_VOL_LOST "Серверный том был отсоединен"
#define ERR_FILE_ID_NOT_FOUND "Идентификатор файла не найден"
#define ERR_FILE_ID_EXISTS "Идентификатор файла уже существует"
#define ERR_SERVER_NO_RESPOND "Сервер не отвечает"
#define ERR_USER_AUTH_FAILED "Идентификация пользователя не удалась"
#define ERR_PWORD_EXPIRED "Пароль на сервере устарел"
#define ERR_ACCESS_DENIED "Отказано в доступе"
#define ERR_NOT_A_DOS_DISK "Не диск DOS"
#define ERR_SHARING_VIOLATION "Нарушение совместного доступа"
#define ERR_CANNOT_MAKE "Не могу собрать"
#define ERR_DEV_IN_USE "Устройство уже используется"
#define ERR_OPEN_FAILED "Открытие не удалось"
#define ERR_PIPE_BUSY "Конвейер занят"
#define ERR_SHARING_BUF_EXCEEDED "Разделяемый буфер переполнен"
#define ERR_TOO_MANY_HANDLES "Слишком много открытых дескрипторов"
#define ERR_SEEK_ERROR "Ошибка позиционирования"
#define ERR_DEL_CWD "Попытка удалить текущий рабочий каталог"
#define ERR_WRITE_PROTECT_ERROR "Ошибка защиты записи"
#define ERR_WRITE_FAULT "Ошибка записи"
#define ERR_LOCK_VIOLATION "Нарушение блокировки"
#define ERR_GEN_FAILURE "Общий сбой"
#define ERR_UNCERTAIN_MEDIA "Неопределенный носитель"
#define ERR_PROT_VIOLATION "Нарушение защиты"
#define ERR_BROKEN_PIPE "Сломанный конвейер"
Jul 21, 2003
Jul 21, 2003
404
405
Jul 30, 2002
Jul 30, 2002
406
#elif (PHYSFS_LANG == PHYSFS_LANG_FRENCH)
Mar 11, 2008
Mar 11, 2008
407
#define DIR_ARCHIVE_DESCRIPTION "Pas d'archive, E/S directes sur système de fichiers"
Jul 30, 2002
Jul 30, 2002
408
#define GRP_ARCHIVE_DESCRIPTION "Format Groupfile du moteur Build"
Mar 30, 2003
Mar 30, 2003
409
410
#define HOG_ARCHIVE_DESCRIPTION "Descent I/II HOG file format"
#define MVL_ARCHIVE_DESCRIPTION "Descent II Movielib format"
Jul 21, 2003
Jul 21, 2003
411
#define QPAK_ARCHIVE_DESCRIPTION "Quake I/II format"
Jul 30, 2002
Jul 30, 2002
412
#define ZIP_ARCHIVE_DESCRIPTION "Compatible PkZip/WinZip/Info-Zip"
Mar 16, 2005
Mar 16, 2005
413
#define WAD_ARCHIVE_DESCRIPTION "Format WAD du moteur DOOM"
Apr 11, 2006
Apr 11, 2006
414
#define LZMA_ARCHIVE_DESCRIPTION "LZMA (7zip) format" /* !!! FIXME: translate this line if needed */
Jul 30, 2002
Jul 30, 2002
415
Mar 11, 2008
Mar 11, 2008
416
417
#define ERR_IS_INITIALIZED "Déjà initialisé"
#define ERR_NOT_INITIALIZED "Non initialisé"
Jul 30, 2002
Jul 30, 2002
418
419
#define ERR_INVALID_ARGUMENT "Argument invalide"
#define ERR_FILES_STILL_OPEN "Fichiers encore ouverts"
Mar 11, 2008
Mar 11, 2008
420
421
422
423
424
#define ERR_NO_DIR_CREATE "Echec de la création de répertoires"
#define ERR_OUT_OF_MEMORY "A court de mémoire"
#define ERR_NOT_IN_SEARCH_PATH "Aucune entrée dans le chemin de recherche"
#define ERR_NOT_SUPPORTED "Opération non supportée"
#define ERR_UNSUPPORTED_ARCHIVE "Type d'archive non supportée"
Jul 30, 2002
Jul 30, 2002
425
426
#define ERR_NOT_A_HANDLE "Pas un descripteur de fichier"
#define ERR_INSECURE_FNAME "Nom de fichier dangereux"
Mar 11, 2008
Mar 11, 2008
427
428
429
430
431
432
#define ERR_SYMLINK_DISALLOWED "Les liens symboliques sont désactivés"
#define ERR_NO_WRITE_DIR "Le répertoire d'écriture n'est pas spécifié"
#define ERR_NO_SUCH_FILE "Fichier non trouvé"
#define ERR_NO_SUCH_PATH "Chemin non trouvé"
#define ERR_NO_SUCH_VOLUME "Volume non trouvé"
#define ERR_PAST_EOF "Au-delà de la fin du fichier"
Jul 30, 2002
Jul 30, 2002
433
434
#define ERR_ARC_IS_READ_ONLY "L'archive est en lecture seule"
#define ERR_IO_ERROR "Erreur E/S"
Mar 11, 2008
Mar 11, 2008
435
#define ERR_CANT_SET_WRITE_DIR "Ne peut utiliser le répertoire d'écriture"
Jul 30, 2002
Jul 30, 2002
436
#define ERR_SYMLINK_LOOP "Boucle infinie dans les liens symboliques"
Mar 11, 2008
Mar 11, 2008
437
438
439
440
#define ERR_COMPRESSION "Erreur de (dé)compression"
#define ERR_NOT_IMPLEMENTED "Non implémenté"
#define ERR_OS_ERROR "Erreur rapportée par le système d'exploitation"
#define ERR_FILE_EXISTS "Le fichier existe déjà"
Jul 30, 2002
Jul 30, 2002
441
#define ERR_NOT_A_FILE "Pas un fichier"
Mar 11, 2008
Mar 11, 2008
442
#define ERR_NOT_A_DIR "Pas un répertoire"
Jul 30, 2002
Jul 30, 2002
443
444
#define ERR_NOT_AN_ARCHIVE "Pas une archive"
#define ERR_CORRUPTED "Archive corrompue"
Mar 11, 2008
Mar 11, 2008
445
#define ERR_SEEK_OUT_OF_RANGE "Pointeur de fichier hors de portée"
Jul 30, 2002
Jul 30, 2002
446
#define ERR_BAD_FILENAME "Mauvais nom de fichier"
Mar 11, 2008
Mar 11, 2008
447
#define ERR_PHYSFS_BAD_OS_CALL "(BOGUE) PhysicsFS a fait un mauvais appel système, le salaud"
Jul 30, 2002
Jul 30, 2002
448
#define ERR_ARGV0_IS_NULL "argv0 est NULL"
Apr 11, 2006
Apr 11, 2006
449
#define ERR_NEED_DICT "a besoin du dico"
Mar 11, 2008
Mar 11, 2008
450
451
#define ERR_DATA_ERROR "erreur de données"
#define ERR_MEMORY_ERROR "erreur mémoire"
Apr 11, 2006
Apr 11, 2006
452
453
454
#define ERR_BUFFER_ERROR "erreur tampon"
#define ERR_VERSION_ERROR "erreur de version"
#define ERR_UNKNOWN_ERROR "erreur inconnue"
Mar 11, 2008
Mar 11, 2008
455
456
457
#define ERR_SEARCHPATH_TRUNC "Le chemin de recherche a été tronqué"
#define ERR_GETMODFN_TRUNC "GetModuleFileName() a été tronqué"
#define ERR_GETMODFN_NO_DIR "GetModuleFileName() n'a pas de répertoire"
Jul 30, 2002
Jul 30, 2002
458
#define ERR_DISK_FULL "Disque plein"
Mar 11, 2008
Mar 11, 2008
459
460
461
462
463
464
465
466
467
#define ERR_DIRECTORY_FULL "Répertoire plein"
#define ERR_MACOS_GENERIC "Erreur rapportée par MacOS (%d)"
#define ERR_VOL_LOCKED_HW "Le volume est verrouillé matériellement"
#define ERR_VOL_LOCKED_SW "Le volume est verrouillé par logiciel"
#define ERR_FILE_LOCKED "Fichier verrouillé"
#define ERR_FILE_OR_DIR_BUSY "Fichier/répertoire occupé"
#define ERR_FILE_ALREADY_OPEN_W "Fichier déjà ouvert en écriture"
#define ERR_FILE_ALREADY_OPEN_R "Fichier déjà ouvert en lecture"
#define ERR_INVALID_REFNUM "Numéro de référence invalide"
Jul 30, 2002
Jul 30, 2002
468
469
#define ERR_GETTING_FILE_POS "Erreur lors de l'obtention de la position du pointeur de fichier"
#define ERR_VOLUME_OFFLINE "Le volume n'est pas en ligne"
Mar 11, 2008
Mar 11, 2008
470
471
#define ERR_PERMISSION_DENIED "Permission refusée"
#define ERR_VOL_ALREADY_ONLINE "Volumé déjà en ligne"
Jul 30, 2002
Jul 30, 2002
472
473
#define ERR_NO_SUCH_DRIVE "Lecteur inexistant"
#define ERR_NOT_MAC_DISK "Pas un disque Macintosh"
Mar 11, 2008
Mar 11, 2008
474
475
476
477
#define ERR_VOL_EXTERNAL_FS "Le volume appartient à un système de fichiers externe"
#define ERR_PROBLEM_RENAME "Problème lors du renommage"
#define ERR_BAD_MASTER_BLOCK "Mauvais block maitre de répertoire"
#define ERR_CANT_MOVE_FORBIDDEN "Essai de déplacement interdit"
Jul 30, 2002
Jul 30, 2002
478
#define ERR_WRONG_VOL_TYPE "Mauvais type de volume"
Mar 11, 2008
Mar 11, 2008
479
480
481
482
483
484
485
#define ERR_SERVER_VOL_LOST "Le volume serveur a été déconnecté"
#define ERR_FILE_ID_NOT_FOUND "Identificateur de fichier non trouvé"
#define ERR_FILE_ID_EXISTS "Identificateur de fichier existe déjà"
#define ERR_SERVER_NO_RESPOND "Le serveur ne répond pas"
#define ERR_USER_AUTH_FAILED "Authentification de l'utilisateur échouée"
#define ERR_PWORD_EXPIRED "Le mot de passe a expiré sur le serveur"
#define ERR_ACCESS_DENIED "Accès refusé"
Jul 30, 2002
Jul 30, 2002
486
487
488
#define ERR_NOT_A_DOS_DISK "Pas un disque DOS"
#define ERR_SHARING_VIOLATION "Violation de partage"
#define ERR_CANNOT_MAKE "Ne peut faire"
Mar 11, 2008
Mar 11, 2008
489
490
491
492
#define ERR_DEV_IN_USE "Périphérique déjà en utilisation"
#define ERR_OPEN_FAILED "Ouverture échouée"
#define ERR_PIPE_BUSY "Le tube est occupé"
#define ERR_SHARING_BUF_EXCEEDED "Tampon de partage dépassé"
Jul 30, 2002
Jul 30, 2002
493
494
#define ERR_TOO_MANY_HANDLES "Trop de descripteurs ouverts"
#define ERR_SEEK_ERROR "Erreur de positionement"
Mar 11, 2008
Mar 11, 2008
495
496
497
#define ERR_DEL_CWD "Essai de supprimer le répertoire courant"
#define ERR_WRITE_PROTECT_ERROR "Erreur de protection en écriture"
#define ERR_WRITE_FAULT "Erreur d'écriture"
Jul 30, 2002
Jul 30, 2002
498
#define ERR_LOCK_VIOLATION "Violation de verrou"
Mar 11, 2008
Mar 11, 2008
499
500
#define ERR_GEN_FAILURE "Echec général"
#define ERR_UNCERTAIN_MEDIA "Média incertain"
Jul 30, 2002
Jul 30, 2002
501
#define ERR_PROT_VIOLATION "Violation de protection"
Mar 11, 2008
Mar 11, 2008
502
#define ERR_BROKEN_PIPE "Tube cassé"
Jul 30, 2002
Jul 30, 2002
503
Jan 15, 2004
Jan 15, 2004
504
#elif (PHYSFS_LANG == PHYSFS_LANG_PORTUGUESE_BR)
Mar 11, 2008
Mar 11, 2008
505
#define DIR_ARCHIVE_DESCRIPTION "Não arquivo, E/S sistema de arquivos direto"
Mar 16, 2005
Mar 16, 2005
506
#define GRP_ARCHIVE_DESCRIPTION "Formato Groupfile do engine Build"
Jan 15, 2004
Jan 15, 2004
507
508
509
#define HOG_ARCHIVE_DESCRIPTION "Formato Descent I/II HOG file"
#define MVL_ARCHIVE_DESCRIPTION "Formato Descent II Movielib"
#define QPAK_ARCHIVE_DESCRIPTION "Formato Quake I/II"
Mar 11, 2008
Mar 11, 2008
510
#define ZIP_ARCHIVE_DESCRIPTION "Formato compatível PkZip/WinZip/Info-Zip"
Mar 16, 2005
Mar 16, 2005
511
#define WAD_ARCHIVE_DESCRIPTION "Formato WAD do engine DOOM"
Apr 11, 2006
Apr 11, 2006
512
513
#define WAD_ARCHIVE_DESCRIPTION "DOOM engine format" /* !!! FIXME: translate this line if needed */
#define LZMA_ARCHIVE_DESCRIPTION "LZMA (7zip) format" /* !!! FIXME: translate this line if needed */
Jan 15, 2004
Jan 15, 2004
514
Mar 11, 2008
Mar 11, 2008
515
516
517
#define ERR_IS_INITIALIZED "Já inicializado"
#define ERR_NOT_INITIALIZED "Não inicializado"
#define ERR_INVALID_ARGUMENT "Argumento inválido"
Jan 15, 2004
Jan 15, 2004
518
#define ERR_FILES_STILL_OPEN "Arquivos ainda abertos"
Mar 11, 2008
Mar 11, 2008
519
520
521
522
523
524
#define ERR_NO_DIR_CREATE "Falha na criação de diretórios"
#define ERR_OUT_OF_MEMORY "Memória insuficiente"
#define ERR_NOT_IN_SEARCH_PATH "Entrada não encontrada no caminho de busca"
#define ERR_NOT_SUPPORTED "Operação não suportada"
#define ERR_UNSUPPORTED_ARCHIVE "Tipo de arquivo não suportado"
#define ERR_NOT_A_HANDLE "Não é um handler de arquivo"
Jan 15, 2004
Jan 15, 2004
525
#define ERR_INSECURE_FNAME "Nome de arquivo inseguro"
Mar 11, 2008
Mar 11, 2008
526
527
528
529
530
#define ERR_SYMLINK_DISALLOWED "Links simbólicos desabilitados"
#define ERR_NO_WRITE_DIR "Diretório de escrita não definido"
#define ERR_NO_SUCH_FILE "Arquivo não encontrado"
#define ERR_NO_SUCH_PATH "Caminho não encontrado"
#define ERR_NO_SUCH_VOLUME "Volume não encontrado"
Jan 15, 2004
Jan 15, 2004
531
#define ERR_PAST_EOF "Passou o fim do arquivo"
Mar 11, 2008
Mar 11, 2008
532
#define ERR_ARC_IS_READ_ONLY "Arquivo é somente de leitura"
Jan 15, 2004
Jan 15, 2004
533
#define ERR_IO_ERROR "Erro de E/S"
Mar 11, 2008
Mar 11, 2008
534
535
536
537
#define ERR_CANT_SET_WRITE_DIR "Não foi possível definir diretório de escrita"
#define ERR_SYMLINK_LOOP "Loop infinito de link simbólico"
#define ERR_COMPRESSION "Erro de (Des)compressão"
#define ERR_NOT_IMPLEMENTED "Não implementado"
Jan 15, 2004
Jan 15, 2004
538
#define ERR_OS_ERROR "Erro reportado pelo Sistema Operacional"
Mar 11, 2008
Mar 11, 2008
539
540
541
542
#define ERR_FILE_EXISTS "Arquivo já existente"
#define ERR_NOT_A_FILE "Não é um arquivo"
#define ERR_NOT_A_DIR "Não é um diretório"
#define ERR_NOT_AN_ARCHIVE "Não é um pacote"
Jan 15, 2004
Jan 15, 2004
543
#define ERR_CORRUPTED "Pacote corrompido"
Mar 11, 2008
Mar 11, 2008
544
545
546
547
548
#define ERR_SEEK_OUT_OF_RANGE "Posicionamento além do tamanho"
#define ERR_BAD_FILENAME "Nome de arquivo inválido"
#define ERR_PHYSFS_BAD_OS_CALL "(BUG) PhysicsFS realizou uma chamada de sistema inválida"
#define ERR_ARGV0_IS_NULL "argv0 é NULL"
#define ERR_NEED_DICT "precisa de diretório"
Apr 11, 2006
Apr 11, 2006
549
#define ERR_DATA_ERROR "erro nos dados"
Mar 11, 2008
Mar 11, 2008
550
#define ERR_MEMORY_ERROR "erro de memória"
Apr 11, 2006
Apr 11, 2006
551
552
553
#define ERR_BUFFER_ERROR "erro de buffer"
#define ERR_VERSION_ERROR "erro na version"
#define ERR_UNKNOWN_ERROR "erro desconhecido"
Jan 15, 2004
Jan 15, 2004
554
555
#define ERR_SEARCHPATH_TRUNC "Caminho de procura quebrado"
#define ERR_GETMODFN_TRUNC "GetModuleFileName() foi quebrado"
Mar 11, 2008
Mar 11, 2008
556
#define ERR_GETMODFN_NO_DIR "GetModuleFileName() nao teve diretório"
Jan 15, 2004
Jan 15, 2004
557
#define ERR_DISK_FULL "Disco cheio"
Mar 11, 2008
Mar 11, 2008
558
#define ERR_DIRECTORY_FULL "Diretório cheio"
Jan 15, 2004
Jan 15, 2004
559
560
561
562
#define ERR_MACOS_GENERIC "MacOS reportou um erro (%d)"
#define ERR_VOL_LOCKED_HW "Volume travado por hardware"
#define ERR_VOL_LOCKED_SW "Volume travado por software"
#define ERR_FILE_LOCKED "Arquivo travado"
Mar 11, 2008
Mar 11, 2008
563
564
565
566
567
568
569
570
#define ERR_FILE_OR_DIR_BUSY "Arquivo/Diretório está em uso"
#define ERR_FILE_ALREADY_OPEN_W "Arquivo já aberto para escrita"
#define ERR_FILE_ALREADY_OPEN_R "Arquivo já aberto para leitura"
#define ERR_INVALID_REFNUM "Número de referência"
#define ERR_GETTING_FILE_POS "Erro ao tentar obter posição do arquivo"
#define ERR_VOLUME_OFFLINE "Volume está indisponível"
#define ERR_PERMISSION_DENIED "Permissão negada"
#define ERR_VOL_ALREADY_ONLINE "Volume disponível"
Jan 15, 2004
Jan 15, 2004
571
#define ERR_NO_SUCH_DRIVE "Drive inexistente"
Mar 11, 2008
Mar 11, 2008
572
#define ERR_NOT_MAC_DISK "Não é um disco Macintosh"
Jan 15, 2004
Jan 15, 2004
573
#define ERR_VOL_EXTERNAL_FS "Volume pertence a um sistema de arquivos externo"
Mar 11, 2008
Mar 11, 2008
574
575
#define ERR_PROBLEM_RENAME "Problema durante renomeação"
#define ERR_BAD_MASTER_BLOCK "Bloco master do diretório inválido"
Jan 15, 2004
Jan 15, 2004
576
#define ERR_CANT_MOVE_FORBIDDEN "Tentativa de mover proibida"
Mar 11, 2008
Mar 11, 2008
577
#define ERR_WRONG_VOL_TYPE "Tipo inválido de volume"
Jan 15, 2004
Jan 15, 2004
578
#define ERR_SERVER_VOL_LOST "Volume servidor desconectado"
Mar 11, 2008
Mar 11, 2008
579
580
581
582
#define ERR_FILE_ID_NOT_FOUND "ID de Arquivo não encontrado"
#define ERR_FILE_ID_EXISTS "ID de Arquivo já existente"
#define ERR_SERVER_NO_RESPOND "Servidor não respondendo"
#define ERR_USER_AUTH_FAILED "Autenticação de usuário falhada"
Jan 15, 2004
Jan 15, 2004
583
584
#define ERR_PWORD_EXPIRED "Password foi expirada no servidor"
#define ERR_ACCESS_DENIED "Accesso negado"
Mar 11, 2008
Mar 11, 2008
585
586
587
588
#define ERR_NOT_A_DOS_DISK "Não é um disco DOS"
#define ERR_SHARING_VIOLATION "Violação de compartilhamento"
#define ERR_CANNOT_MAKE "Não pode ser feito"
#define ERR_DEV_IN_USE "Device já em uso"
Jan 15, 2004
Jan 15, 2004
589
590
591
592
593
#define ERR_OPEN_FAILED "Falaha na abertura"
#define ERR_PIPE_BUSY "Fila ocupada"
#define ERR_SHARING_BUF_EXCEEDED "Buffer de compartilhamento excedeu"
#define ERR_TOO_MANY_HANDLES "Muitos handles abertos"
#define ERR_SEEK_ERROR "Erro de posicionamento"
Mar 11, 2008
Mar 11, 2008
594
595
#define ERR_DEL_CWD "Tentando remover diretório de trabalho atual"
#define ERR_WRITE_PROTECT_ERROR "Erro de proteção de escrita"
Jan 15, 2004
Jan 15, 2004
596
#define ERR_WRITE_FAULT "Erro de escrita"
Mar 11, 2008
Mar 11, 2008
597
#define ERR_LOCK_VIOLATION "Violação de trava"
Jan 15, 2004
Jan 15, 2004
598
599
#define ERR_GEN_FAILURE "Falha geral"
#define ERR_UNCERTAIN_MEDIA "Media incerta"
Mar 11, 2008
Mar 11, 2008
600
#define ERR_PROT_VIOLATION "Violação de proteção"
Jan 15, 2004
Jan 15, 2004
601
602
#define ERR_BROKEN_PIPE "Fila quebrada"
Sep 23, 2004
Sep 23, 2004
603
604
605
606
607
608
609
#elif (PHYSFS_LANG == PHYSFS_LANG_SPANISH)
#define DIR_ARCHIVE_DESCRIPTION "No es un archivo, E/S directa al sistema de ficheros"
#define GRP_ARCHIVE_DESCRIPTION "Formato Build engine Groupfile"
#define HOG_ARCHIVE_DESCRIPTION "Formato Descent I/II HOG file"
#define MVL_ARCHIVE_DESCRIPTION "Formato Descent II Movielib"
#define QPAK_ARCHIVE_DESCRIPTION "Formato Quake I/II"
#define ZIP_ARCHIVE_DESCRIPTION "Compatible con PkZip/WinZip/Info-Zip"
Apr 11, 2006
Apr 11, 2006
610
611
#define WAD_ARCHIVE_DESCRIPTION "DOOM engine format" /* !!! FIXME: translate this line if needed */
#define LZMA_ARCHIVE_DESCRIPTION "LZMA (7zip) format" /* !!! FIXME: translate this line if needed */
Sep 23, 2004
Sep 23, 2004
612
613
#define ERR_IS_INITIALIZED "Ya estaba inicializado"
Mar 11, 2008
Mar 11, 2008
614
615
616
#define ERR_NOT_INITIALIZED "No está inicializado"
#define ERR_INVALID_ARGUMENT "Argumento inválido"
#define ERR_FILES_STILL_OPEN "Archivos aún abiertos"
Sep 23, 2004
Sep 23, 2004
617
618
#define ERR_NO_DIR_CREATE "Fallo al crear los directorios"
#define ERR_OUT_OF_MEMORY "Memoria agotada"
Mar 11, 2008
Mar 11, 2008
619
620
#define ERR_NOT_IN_SEARCH_PATH "No existe tal entrada en la ruta de búsqueda"
#define ERR_NOT_SUPPORTED "Operación no soportada"
Sep 23, 2004
Sep 23, 2004
621
622
623
#define ERR_UNSUPPORTED_ARCHIVE "Tipo de archivo no soportado"
#define ERR_NOT_A_HANDLE "No es un manejador de ficheo (file handle)"
#define ERR_INSECURE_FNAME "Nombre de archivo inseguro"
Mar 11, 2008
Mar 11, 2008
624
#define ERR_SYMLINK_DISALLOWED "Los enlaces simbólicos están desactivados"
Sep 23, 2004
Sep 23, 2004
625
626
627
628
629
#define ERR_NO_WRITE_DIR "No has configurado un directorio de escritura"
#define ERR_NO_SUCH_FILE "Archivo no encontrado"
#define ERR_NO_SUCH_PATH "Ruta no encontrada"
#define ERR_NO_SUCH_VOLUME "Volumen no encontrado"
#define ERR_PAST_EOF "Te pasaste del final del archivo"
Mar 11, 2008
Mar 11, 2008
630
#define ERR_ARC_IS_READ_ONLY "El archivo es de sólo lectura"
Sep 23, 2004
Sep 23, 2004
631
632
#define ERR_IO_ERROR "Error E/S"
#define ERR_CANT_SET_WRITE_DIR "No puedo configurar el directorio de escritura"
Mar 11, 2008
Mar 11, 2008
633
634
#define ERR_SYMLINK_LOOP "Bucle infnito de enlaces simbólicos"
#define ERR_COMPRESSION "Error de (des)compresión"
Sep 23, 2004
Sep 23, 2004
635
636
637
638
639
640
641
#define ERR_NOT_IMPLEMENTED "No implementado"
#define ERR_OS_ERROR "El sistema operativo ha devuelto un error"
#define ERR_FILE_EXISTS "El archivo ya existe"
#define ERR_NOT_A_FILE "No es un archivo"
#define ERR_NOT_A_DIR "No es un directorio"
#define ERR_NOT_AN_ARCHIVE "No es un archivo"
#define ERR_CORRUPTED "Archivo corrupto"
Mar 11, 2008
Mar 11, 2008
642
#define ERR_SEEK_OUT_OF_RANGE "Búsqueda fuera de rango"
Sep 23, 2004
Sep 23, 2004
643
644
645
#define ERR_BAD_FILENAME "Nombre de archivo incorrecto"
#define ERR_PHYSFS_BAD_OS_CALL "(BUG) PhysicsFS ha hecho una llamada incorrecta al sistema"
#define ERR_ARGV0_IS_NULL "argv0 es NULL"
Apr 11, 2006
Apr 11, 2006
646
647
648
649
#define ERR_NEED_DICT "necesito diccionario"
#define ERR_DATA_ERROR "error de datos"
#define ERR_MEMORY_ERROR "error de memoria"
#define ERR_BUFFER_ERROR "error de buffer"
Mar 11, 2008
Mar 11, 2008
650
#define ERR_VERSION_ERROR "error de versión"
Apr 11, 2006
Apr 11, 2006
651
#define ERR_UNKNOWN_ERROR "error desconocido"
Mar 11, 2008
Mar 11, 2008
652
#define ERR_SEARCHPATH_TRUNC "La ruta de búsqueda ha sido truncada"
Sep 23, 2004
Sep 23, 2004
653
654
#define ERR_GETMODFN_TRUNC "GetModuleFileName() ha sido truncado"
#define ERR_GETMODFN_NO_DIR "GetModuleFileName() no tenia directorio"
Mar 11, 2008
Mar 11, 2008
655
656
#define ERR_DISK_FULL "El disco está lleno"
#define ERR_DIRECTORY_FULL "El directorio está lleno"
Sep 23, 2004
Sep 23, 2004
657
#define ERR_MACOS_GENERIC "MacOS ha devuelto un error (%d)"
Mar 11, 2008
Mar 11, 2008
658
659
660
#define ERR_VOL_LOCKED_HW "El volumen está bloqueado por el hardware"
#define ERR_VOL_LOCKED_SW "El volumen está bloqueado por el software"
#define ERR_FILE_LOCKED "El archivo está bloqueado"
Sep 23, 2004
Sep 23, 2004
661
662
663
#define ERR_FILE_OR_DIR_BUSY "Fichero o directorio ocupados"
#define ERR_FILE_ALREADY_OPEN_W "Fichero ya abierto para escritura"
#define ERR_FILE_ALREADY_OPEN_R "Fichero ya abierto para lectura"
Mar 11, 2008
Mar 11, 2008
664
665
666
#define ERR_INVALID_REFNUM "El número de referencia no es válido"
#define ERR_GETTING_FILE_POS "Error al tomar la posición del fichero"
#define ERR_VOLUME_OFFLINE "El volumen está desconectado"
Sep 23, 2004
Sep 23, 2004
667
668
669
670
671
672
673
674
675
#define ERR_PERMISSION_DENIED "Permiso denegado"
#define ERR_VOL_ALREADY_ONLINE "El volumen ya estaba conectado"
#define ERR_NO_SUCH_DRIVE "No existe tal unidad"
#define ERR_NOT_MAC_DISK "No es un disco Macintosh"
#define ERR_VOL_EXTERNAL_FS "El volumen pertence a un sistema de ficheros externo"
#define ERR_PROBLEM_RENAME "Problemas al renombrar"
#define ERR_BAD_MASTER_BLOCK "Bloque maestro de directorios incorrecto"
#define ERR_CANT_MOVE_FORBIDDEN "Intento de mover forbidden"
#define ERR_WRONG_VOL_TYPE "Tipo de volumen incorrecto"
Mar 11, 2008
Mar 11, 2008
676
#define ERR_SERVER_VOL_LOST "El servidor de volúmenes ha sido desconectado"
Sep 23, 2004
Sep 23, 2004
677
678
679
680
681
682
683
#define ERR_FILE_ID_NOT_FOUND "Identificador de archivo no encontrado"
#define ERR_FILE_ID_EXISTS "El identificador de archivo ya existe"
#define ERR_SERVER_NO_RESPOND "El servidor no responde"
#define ERR_USER_AUTH_FAILED "Fallo al autentificar el usuario"
#define ERR_PWORD_EXPIRED "La Password en el servidor ha caducado"
#define ERR_ACCESS_DENIED "Acceso denegado"
#define ERR_NOT_A_DOS_DISK "No es un disco de DOS"
Mar 11, 2008
Mar 11, 2008
684
#define ERR_SHARING_VIOLATION "Violación al compartir"
Sep 23, 2004
Sep 23, 2004
685
686
687
#define ERR_CANNOT_MAKE "No puedo hacer make"
#define ERR_DEV_IN_USE "El dispositivo ya estaba en uso"
#define ERR_OPEN_FAILED "Fallo al abrir"
Mar 11, 2008
Mar 11, 2008
688
689
#define ERR_PIPE_BUSY "Tubería ocupada"
#define ERR_SHARING_BUF_EXCEEDED "Buffer de compartición sobrepasado"
Sep 23, 2004
Sep 23, 2004
690
#define ERR_TOO_MANY_HANDLES "Demasiados manejadores (handles)"
Mar 11, 2008
Mar 11, 2008
691
#define ERR_SEEK_ERROR "Error de búsqueda"
Sep 23, 2004
Sep 23, 2004
692
#define ERR_DEL_CWD "Intentando borrar el directorio de trabajo actual"
Mar 11, 2008
Mar 11, 2008
693
#define ERR_WRITE_PROTECT_ERROR "Error de protección contra escritura"
Sep 23, 2004
Sep 23, 2004
694
#define ERR_WRITE_FAULT "Fallo al escribir"
Mar 11, 2008
Mar 11, 2008
695
#define ERR_LOCK_VIOLATION "Violación del bloqueo"
Sep 23, 2004
Sep 23, 2004
696
697
#define ERR_GEN_FAILURE "Fallo general"
#define ERR_UNCERTAIN_MEDIA "Medio incierto"
Mar 11, 2008
Mar 11, 2008
698
699
#define ERR_PROT_VIOLATION "Violación de la protección"
#define ERR_BROKEN_PIPE "Tubería rota"
Sep 23, 2004
Sep 23, 2004
700
Jul 28, 2002
Jul 28, 2002
701
702
703
704
705
706
#else
#error Please define PHYSFS_LANG.
#endif
/* end LANG section. */
Jul 8, 2001
Jul 8, 2001
707
Sep 26, 2004
Sep 26, 2004
708
709
710
/* !!! FIXME: find something better than "dvoid" and "fvoid" ... */
/* Opaque data for file and dir handlers... */
typedef void dvoid;
Dec 1, 2002
Dec 1, 2002
711
712
Sep 26, 2004
Sep 26, 2004
713
typedef struct
Jul 6, 2001
Jul 6, 2001
714
{
Jul 6, 2001
Jul 6, 2001
715
/*
Sep 26, 2004
Sep 26, 2004
716
* Basic info about this archiver...
Jul 9, 2001
Jul 9, 2001
717
*/
Sep 26, 2004
Sep 26, 2004
718
const PHYSFS_ArchiveInfo *info;
Jul 9, 2001
Jul 9, 2001
719
Jul 6, 2001
Jul 6, 2001
720
Sep 26, 2004
Sep 26, 2004
721
722
723
724
725
726
/*
* DIRECTORY ROUTINES:
* These functions are for dir handles. Generate a handle with the
* openArchive() method, then pass it as the "opaque" dvoid to the
* others.
*
Sep 5, 2010
Sep 5, 2010
727
728
729
* Symlinks should always be followed (except in stat()); PhysicsFS will
* use the stat() method to check for symlinks and make a judgement on
* whether to continue to call other methods based on that.
Sep 26, 2004
Sep 26, 2004
730
*/
Jul 6, 2001
Jul 6, 2001
731
Jul 6, 2001
Jul 6, 2001
732
/*
Aug 30, 2010
Aug 30, 2010
733
734
735
736
737
* Open a dirhandle for dir/archive data provided by (io).
* (name) is a filename associated with (io), but doesn't necessarily
* map to anything, let alone a real filename. This possibly-
* meaningless name is in platform-dependent notation.
* (forWriting) is non-zero if this is to be used for
Jul 7, 2001
Jul 7, 2001
738
739
740
* the write directory, and zero if this is to be used for an
* element of the search path.
* Returns NULL on failure, and calls __PHYSFS_setError().
Sep 26, 2004
Sep 26, 2004
741
742
* Returns non-NULL on success. The pointer returned will be
* passed as the "opaque" parameter for later calls.
Jul 6, 2001
Jul 6, 2001
743
*/
Aug 30, 2010
Aug 30, 2010
744
dvoid *(*openArchive)(PHYSFS_Io *io, const char *name, int forWriting);
Jul 6, 2001
Jul 6, 2001
745
Jul 6, 2001
Jul 6, 2001
746
/*
Sep 29, 2004
Sep 29, 2004
747
748
749
750
751
752
* List all files in (dirname). Each file is passed to (callback),
* where a copy is made if appropriate, so you should dispose of
* it properly upon return from the callback.
* You should omit symlinks if (omitSymLinks) is non-zero.
* If you have a failure, report as much as you can.
* (dirname) is in platform-independent notation.
Jul 6, 2001
Jul 6, 2001
753
*/
Sep 29, 2004
Sep 29, 2004
754
755
756
void (*enumerateFiles)(dvoid *opaque,
const char *dirname,
int omitSymLinks,
Sep 18, 2005
Sep 18, 2005
757
758
PHYSFS_EnumFilesCallback callback,
const char *origdir,
Sep 29, 2004
Sep 29, 2004
759
void *callbackdata);
Jul 6, 2001
Jul 6, 2001
760
761
/*
Sep 26, 2004
Sep 26, 2004
762
* Open file for reading.
Jul 6, 2001
Jul 6, 2001
763
* This filename is in platform-independent notation.
Jul 7, 2001
Jul 7, 2001
764
765
* If you can't handle multiple opens of the same file,
* you can opt to fail for the second call.
Jul 8, 2001
Jul 8, 2001
766
* Fail if the file does not exist.
Jul 7, 2001
Jul 7, 2001
767
* Returns NULL on failure, and calls __PHYSFS_setError().
Sep 26, 2004
Sep 26, 2004
768
769
* Returns non-NULL on success. The pointer returned will be
* passed as the "opaque" parameter for later file calls.
Aug 21, 2002
Aug 21, 2002
770
771
772
773
*
* Regardless of success or failure, please set *fileExists to
* non-zero if the file existed (even if it's a broken symlink!),
* zero if it did not.
Jul 6, 2001
Jul 6, 2001
774
*/
Aug 30, 2010
Aug 30, 2010
775
PHYSFS_Io *(*openRead)(dvoid *opaque, const char *fname, int *fileExists);
Jul 6, 2001
Jul 6, 2001
776
777
/*
Sep 26, 2004
Sep 26, 2004
778
* Open file for writing.
Jul 8, 2001
Jul 8, 2001
779
780
781
782
* If the file does not exist, it should be created. If it exists,
* it should be truncated to zero bytes. The writing
* offset should be the start of the file.
* This filename is in platform-independent notation.
Jul 7, 2001
Jul 7, 2001
783
784
785
* If you can't handle multiple opens of the same file,
* you can opt to fail for the second call.
* Returns NULL on failure, and calls __PHYSFS_setError().
Sep 26, 2004
Sep 26, 2004
786
787
* Returns non-NULL on success. The pointer returned will be
* passed as the "opaque" parameter for later file calls.
Jul 6, 2001
Jul 6, 2001
788
*/
Aug 30, 2010
Aug 30, 2010
789
PHYSFS_Io *(*openWrite)(dvoid *opaque, const char *filename);
Jul 6, 2001
Jul 6, 2001
790
791
/*
Sep 26, 2004
Sep 26, 2004
792
* Open file for appending.
Jul 8, 2001
Jul 8, 2001
793
794
795
* If the file does not exist, it should be created. The writing
* offset should be the end of the file.
* This filename is in platform-independent notation.
Jul 7, 2001
Jul 7, 2001
796
797
798
* If you can't handle multiple opens of the same file,
* you can opt to fail for the second call.
* Returns NULL on failure, and calls __PHYSFS_setError().
Sep 26, 2004
Sep 26, 2004
799
800
* Returns non-NULL on success. The pointer returned will be
* passed as the "opaque" parameter for later file calls.
Jul 6, 2001
Jul 6, 2001
801
*/
Aug 30, 2010
Aug 30, 2010
802
PHYSFS_Io *(*openAppend)(dvoid *opaque, const char *filename);
Jul 6, 2001
Jul 6, 2001
803
Jul 7, 2001
Jul 7, 2001
804
805
806
807
808
809
810
/*
* Delete a file in the archive/directory.
* Return non-zero on success, zero on failure.
* This filename is in platform-independent notation.
* This method may be NULL.
* On failure, call __PHYSFS_setError().
*/
Sep 26, 2004
Sep 26, 2004
811
int (*remove)(dvoid *opaque, const char *filename);
Jul 7, 2001
Jul 7, 2001
812
813
814
815
816
817
818
819
820
821
822
/*
* Create a directory in the archive/directory.
* If the application is trying to make multiple dirs, PhysicsFS
* will split them up into multiple calls before passing them to
* your driver.
* Return non-zero on success, zero on failure.
* This filename is in platform-independent notation.
* This method may be NULL.
* On failure, call __PHYSFS_setError().
*/
Sep 26, 2004
Sep 26, 2004
823
int (*mkdir)(dvoid *opaque, const char *filename);
Jul 7, 2001
Jul 7, 2001
824
Jul 6, 2001
Jul 6, 2001
825
/*
Sep 26, 2004
Sep 26, 2004
826
* Close directories/archives, and free any associated memory,
Aug 30, 2010
Aug 30, 2010
827
828
829
* including the original PHYSFS_Io and (opaque) itself, if
* applicable. Implementation can assume that it won't be called if
* there are still files open from this archive.
Jul 6, 2001
Jul 6, 2001
830
*/
Sep 26, 2004
Sep 26, 2004
831
832
void (*dirClose)(dvoid *opaque);
Aug 22, 2010
Aug 22, 2010
833
834
835
836
837
838
/*
* Obtain basic file metadata.
* Returns non-zero on success, zero on failure.
* On failure, call __PHYSFS_setError().
*/
int (*stat)(dvoid *opaque, const char *fn, int *exists, PHYSFS_Stat *stat);
Sep 26, 2004
Sep 26, 2004
839
} PHYSFS_Archiver;
Jul 6, 2001
Jul 6, 2001
840
841
842
843
844
845
/*
* Call this to set the message returned by PHYSFS_getLastError().
* Please only use the ERR_* constants above, or add new constants to the
* above group, but I want these all in one place.
Jul 7, 2001
Jul 7, 2001
846
847
*
* Calling this with a NULL argument is a safe no-op.
Jul 6, 2001
Jul 6, 2001
848
849
850
851
*/
void __PHYSFS_setError(const char *err);
Jul 7, 2001
Jul 7, 2001
852
853
854
855
856
/*
* Convert (dirName) to platform-dependent notation, then prepend (prepend)
* and append (append) to the converted string.
*
* So, on Win32, calling:
Jul 8, 2001
Jul 8, 2001
857
* __PHYSFS_convertToDependent("C:\", "my/files", NULL);
Jul 7, 2001
Jul 7, 2001
858
859
860
861
862
* ...will return the string "C:\my\files".
*
* This is a convenience function; you might want to hack something out that
* is less generic (and therefore more efficient).
*
Mar 11, 2012
Mar 11, 2012
863
* Be sure to allocator.Free() the return value when done with it.
Jul 7, 2001
Jul 7, 2001
864
*/
Jul 8, 2001
Jul 8, 2001
865
866
867
char *__PHYSFS_convertToDependent(const char *prepend,
const char *dirName,
const char *append);
Jul 7, 2001
Jul 7, 2001
868
Jul 23, 2002
Jul 23, 2002
869
Apr 9, 2004
Apr 9, 2004
870
871
872
873
/* This byteorder stuff was lifted from SDL. http://www.libsdl.org/ */
#define PHYSFS_LIL_ENDIAN 1234
#define PHYSFS_BIG_ENDIAN 4321
Oct 5, 2011
Oct 5, 2011
874
#if defined(__i386__) || defined(__ia64__) || \
Oct 6, 2011
Oct 6, 2011
875
defined(_M_IX86) || defined(_M_IA64) || defined(_M_X64) || \
Apr 9, 2004
Apr 9, 2004
876
877
878
879
880
881
882
883
884
885
886
887
(defined(__alpha__) || defined(__alpha)) || \
defined(__arm__) || defined(ARM) || \
(defined(__mips__) && defined(__MIPSEL__)) || \
defined(__SYMBIAN32__) || \
defined(__x86_64__) || \
defined(__LITTLE_ENDIAN__)
#define PHYSFS_BYTEORDER PHYSFS_LIL_ENDIAN
#else
#define PHYSFS_BYTEORDER PHYSFS_BIG_ENDIAN
#endif
Aug 20, 2002
Aug 20, 2002
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
/*
* When sorting the entries in an archive, we use a modified QuickSort.
* When there are less then PHYSFS_QUICKSORT_THRESHOLD entries left to sort,
* we switch over to a BubbleSort for the remainder. Tweak to taste.
*
* You can override this setting by defining PHYSFS_QUICKSORT_THRESHOLD
* before #including "physfs_internal.h".
*/
#ifndef PHYSFS_QUICKSORT_THRESHOLD
#define PHYSFS_QUICKSORT_THRESHOLD 4
#endif
/*
* Sort an array (or whatever) of (max) elements. This uses a mixture of
* a QuickSort and BubbleSort internally.
* (cmpfn) is used to determine ordering, and (swapfn) does the actual
* swapping of elements in the list.
*
* See zip.c for an example.
*/
void __PHYSFS_sort(void *entries, PHYSFS_uint32 max,
int (*cmpfn)(void *, PHYSFS_uint32, PHYSFS_uint32),
void (*swapfn)(void *, PHYSFS_uint32, PHYSFS_uint32));
Jul 23, 2002
Jul 23, 2002
912
Aug 23, 2001
Aug 23, 2001
913
/* These get used all over for lessening code clutter. */
Aug 21, 2010
Aug 21, 2010
914
915
916
917
918
919
920
921
#define BAIL_MACRO(e, r) do { __PHYSFS_setError(e); return r; } while (0)
#define BAIL_IF_MACRO(c, e, r) do { if (c) { __PHYSFS_setError(e); return r; } } while (0)
#define BAIL_MACRO_MUTEX(e, m, r) do { __PHYSFS_setError(e); __PHYSFS_platformReleaseMutex(m); return r; } while (0)
#define BAIL_IF_MACRO_MUTEX(c, e, m, r) do { if (c) { __PHYSFS_setError(e); __PHYSFS_platformReleaseMutex(m); return r; } } while (0)
#define GOTO_MACRO(e, g) do { __PHYSFS_setError(e); goto g; } while (0)
#define GOTO_IF_MACRO(c, e, g) do { if (c) { __PHYSFS_setError(e); goto g; } } while (0)
#define GOTO_MACRO_MUTEX(e, m, g) do { __PHYSFS_setError(e); __PHYSFS_platformReleaseMutex(m); goto g; } while (0)
#define GOTO_IF_MACRO_MUTEX(c, e, m, g) do { if (c) { __PHYSFS_setError(e); __PHYSFS_platformReleaseMutex(m); goto g; } } while (0)
Jul 6, 2001
Jul 6, 2001
922
Mar 15, 2007
Mar 15, 2007
923
924
#define __PHYSFS_ARRAYLEN(x) ( (sizeof (x)) / (sizeof (x[0])) )
Aug 21, 2010
Aug 21, 2010
925
926
927
928
#ifdef PHYSFS_NO_64BIT_SUPPORT
#define __PHYSFS_SI64(x) ((PHYSFS_sint64) (x))
#define __PHYSFS_UI64(x) ((PHYSFS_uint64) (x))
#elif (defined __GNUC__)
Mar 21, 2007
Mar 21, 2007
929
930
#define __PHYSFS_SI64(x) x##LL
#define __PHYSFS_UI64(x) x##ULL
Mar 21, 2007
Mar 21, 2007
931
932
933
#elif (defined _MSC_VER)
#define __PHYSFS_SI64(x) x##i64
#define __PHYSFS_UI64(x) x##ui64
Jan 1, 2006
Jan 1, 2006
934
#else
Aug 21, 2010
Aug 21, 2010
935
936
#define __PHYSFS_SI64(x) ((PHYSFS_sint64) (x))
#define __PHYSFS_UI64(x) ((PHYSFS_uint64) (x))
Jan 1, 2006
Jan 1, 2006
937
938
#endif
Mar 12, 2008
Mar 12, 2008
939
Jan 1, 2006
Jan 1, 2006
940
941
942
943
944
945
946
947
/*
* Check if a ui64 will fit in the platform's address space.
* The initial sizeof check will optimize this macro out entirely on
* 64-bit (and larger?!) platforms, and the other condition will
* return zero or non-zero if the variable will fit in the platform's
* size_t, suitable to pass to malloc. This is kinda messy, but effective.
*/
#define __PHYSFS_ui64FitsAddressSpace(s) ( \
Aug 24, 2010
Aug 24, 2010
948
949
(sizeof (PHYSFS_uint64) <= sizeof (size_t)) || \
((s) < (__PHYSFS_UI64(0xFFFFFFFFFFFFFFFF) >> (64-(sizeof(size_t)*8)))) \
Jan 1, 2006
Jan 1, 2006
950
)
Jul 6, 2001
Jul 6, 2001
951
Mar 12, 2008
Mar 12, 2008
952
Mar 15, 2007
Mar 15, 2007
953
954
955
956
957
958
959
960
961
962
963
964
/*
* This is a strcasecmp() or stricmp() replacement that expects both strings
* to be in UTF-8 encoding. It will do "case folding" to decide if the
* Unicode codepoints in the strings match.
*
* It will report which string is "greater than" the other, but be aware that
* this doesn't necessarily mean anything: 'a' may be "less than" 'b', but
* a random Kanji codepoint has no meaningful alphabetically relationship to
* a Greek Lambda, but being able to assign a reliable "value" makes sorting
* algorithms possible, if not entirely sane. Most cases should treat the
* return value as "equal" or "not equal".
*/
Sep 5, 2010
Sep 5, 2010
965
/* !!! FIXME: why is this casecmp, when everyone else is icmp? */
Mar 15, 2007
Mar 15, 2007
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
int __PHYSFS_utf8strcasecmp(const char *s1, const char *s2);
/*
* This works like __PHYSFS_utf8strcasecmp(), but takes a character (NOT BYTE
* COUNT) argument, like strcasencmp().
*/
int __PHYSFS_utf8strnicmp(const char *s1, const char *s2, PHYSFS_uint32 l);
/*
* stricmp() that guarantees to only work with low ASCII. The C runtime
* stricmp() might try to apply a locale/codepage/etc, which we don't want.
*/
int __PHYSFS_stricmpASCII(const char *s1, const char *s2);
/*
* strnicmp() that guarantees to only work with low ASCII. The C runtime
* strnicmp() might try to apply a locale/codepage/etc, which we don't want.
*/
int __PHYSFS_strnicmpASCII(const char *s1, const char *s2, PHYSFS_uint32 l);
Sep 23, 2004
Sep 23, 2004
987
/*
Mar 14, 2005
Mar 14, 2005
988
* The current allocator. Not valid before PHYSFS_init is called!
Sep 23, 2004
Sep 23, 2004
989
*/
Mar 14, 2005
Mar 14, 2005
990
extern PHYSFS_Allocator __PHYSFS_AllocatorHooks;
Jul 6, 2001
Jul 6, 2001
991
Mar 14, 2005
Mar 14, 2005
992
993
/* convenience macro to make this less cumbersome internally... */
#define allocator __PHYSFS_AllocatorHooks
Jul 6, 2001
Jul 6, 2001
994
Aug 30, 2010
Aug 30, 2010
995
996
997
998
999
1000
/*
* Create a PHYSFS_Io for a file in the physical filesystem.
* This path is in platform-dependent notation. (mode) must be 'r', 'w', or
* 'a' for Read, Write, or Append.
*/
PHYSFS_Io *__PHYSFS_createNativeIo(const char *path, const int mode);