Initial integration, lots of broken stuff
[supertux.git] / src / unison / physfs-1.1.1 / physfs_internal.h
1 /*
2  * Internal function/structure declaration. Do NOT include in your
3  *  application.
4  *
5  * Please see the file LICENSE.txt in the source's root directory.
6  *
7  *  This file written by Ryan C. Gordon.
8  */
9
10 #ifndef _INCLUDE_PHYSFS_INTERNAL_H_
11 #define _INCLUDE_PHYSFS_INTERNAL_H_
12
13 #ifndef __PHYSICSFS_INTERNAL__
14 #error Do not include this header from your applications.
15 #endif
16
17 #include "physfs.h"
18
19 #include <stdlib.h>  /* make sure NULL is defined... */
20
21 #ifdef HAVE_ASSERT_H
22 #include <assert.h>
23 #elif (!defined assert)
24 #define assert(x)
25 #endif
26
27 /* !!! FIXME: remove this when revamping stack allocation code... */
28 #ifdef _MSC_VER
29 #include <malloc.h>
30 #endif
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36 /*
37  * Interface for small allocations. If you need a little scratch space for
38  *  a throwaway buffer or string, use this. It will make small allocations
39  *  on the stack if possible, and use allocator.Malloc() if they are too
40  *  large. This helps reduce malloc pressure.
41  * There are some rules, though:
42  * NEVER return a pointer from this, as stack-allocated buffers go away
43  *  when your function returns.
44  * NEVER allocate in a loop, as stack-allocated pointers will pile up. Call
45  *  a function that uses smallAlloc from your loop, so the allocation can
46  *  free each time.
47  * NEVER call smallAlloc with any complex expression (it's a macro that WILL
48  *  have side effects...it references the argument multiple times). Use a
49  *  variable or a literal.
50  * NEVER free a pointer from this with anything but smallFree. It will not
51  *  be a valid pointer to the allocator, regardless of where the memory came
52  *  from.
53  * NEVER realloc a pointer from this.
54  * NEVER forget to use smallFree: it may not be a pointer from the stack.
55  * NEVER forget to check for NULL...allocation can fail here, of course!
56  */
57 #define __PHYSFS_SMALLALLOCTHRESHOLD 128
58 void *__PHYSFS_initSmallAlloc(void *ptr, PHYSFS_uint64 len);
59
60 #define __PHYSFS_smallAlloc(bytes) ( \
61     __PHYSFS_initSmallAlloc((((bytes) < __PHYSFS_SMALLALLOCTHRESHOLD) ? \
62                              alloca((size_t)((bytes)+1)) : NULL), (bytes)) \
63 )
64
65 void __PHYSFS_smallFree(void *ptr);
66
67
68 /* Use the allocation hooks. */
69 #define malloc(x) Do not use malloc() directly.
70 #define realloc(x, y) Do not use realloc() directly.
71 #define free(x) Do not use free() directly.
72 /* !!! FIXME: add alloca check here. */
73
74 /* The LANG section. */
75 /*  please send questions/translations to Ryan: icculus@icculus.org. */
76
77 #if (!defined PHYSFS_LANG)
78 #  define PHYSFS_LANG PHYSFS_LANG_ENGLISH
79 #endif
80
81 #define PHYSFS_LANG_ENGLISH            1  /* English by Ryan C. Gordon  */
82 #define PHYSFS_LANG_RUSSIAN_KOI8_R     2  /* Russian by Ed Sinjiashvili */
83 #define PHYSFS_LANG_RUSSIAN_CP1251     3  /* Russian by Ed Sinjiashvili */
84 #define PHYSFS_LANG_RUSSIAN_CP866      4  /* Russian by Ed Sinjiashvili */
85 #define PHYSFS_LANG_RUSSIAN_ISO_8859_5 5  /* Russian by Ed Sinjiashvili */
86 #define PHYSFS_LANG_SPANISH            6  /* Spanish by Pedro J. Pérez  */
87 #define PHYSFS_LANG_FRENCH             7  /*  French by Stéphane Peter  */
88 #define PHYSFS_LANG_GERMAN             8  /*  German by Michael Renner  */
89 #define PHYSFS_LANG_PORTUGUESE_BR      9  /* pt-br by Danny Angelo Carminati Grein  */
90
91 #if (PHYSFS_LANG == PHYSFS_LANG_ENGLISH)
92  #define DIR_ARCHIVE_DESCRIPTION  "Non-archive, direct filesystem I/O"
93  #define GRP_ARCHIVE_DESCRIPTION  "Build engine Groupfile format"
94  #define HOG_ARCHIVE_DESCRIPTION  "Descent I/II HOG file format"
95  #define MVL_ARCHIVE_DESCRIPTION  "Descent II Movielib format"
96  #define QPAK_ARCHIVE_DESCRIPTION "Quake I/II format"
97  #define ZIP_ARCHIVE_DESCRIPTION  "PkZip/WinZip/Info-Zip compatible"
98  #define WAD_ARCHIVE_DESCRIPTION  "DOOM engine format"
99  #define LZMA_ARCHIVE_DESCRIPTION "LZMA (7zip) format"
100
101  #define ERR_IS_INITIALIZED       "Already initialized"
102  #define ERR_NOT_INITIALIZED      "Not initialized"
103  #define ERR_INVALID_ARGUMENT     "Invalid argument"
104  #define ERR_FILES_STILL_OPEN     "Files still open"
105  #define ERR_NO_DIR_CREATE        "Failed to create directories"
106  #define ERR_OUT_OF_MEMORY        "Out of memory"
107  #define ERR_NOT_IN_SEARCH_PATH   "No such entry in search path"
108  #define ERR_NOT_SUPPORTED        "Operation not supported"
109  #define ERR_UNSUPPORTED_ARCHIVE  "Archive type unsupported"
110  #define ERR_NOT_A_HANDLE         "Not a file handle"
111  #define ERR_INSECURE_FNAME       "Insecure filename"
112  #define ERR_SYMLINK_DISALLOWED   "Symbolic links are disabled"
113  #define ERR_NO_WRITE_DIR         "Write directory is not set"
114  #define ERR_NO_SUCH_FILE         "File not found"
115  #define ERR_NO_SUCH_PATH         "Path not found"
116  #define ERR_NO_SUCH_VOLUME       "Volume not found"
117  #define ERR_PAST_EOF             "Past end of file"
118  #define ERR_ARC_IS_READ_ONLY     "Archive is read-only"
119  #define ERR_IO_ERROR             "I/O error"
120  #define ERR_CANT_SET_WRITE_DIR   "Can't set write directory"
121  #define ERR_SYMLINK_LOOP         "Infinite symbolic link loop"
122  #define ERR_COMPRESSION          "(De)compression error"
123  #define ERR_NOT_IMPLEMENTED      "Not implemented"
124  #define ERR_OS_ERROR             "Operating system reported error"
125  #define ERR_FILE_EXISTS          "File already exists"
126  #define ERR_NOT_A_FILE           "Not a file"
127  #define ERR_NOT_A_DIR            "Not a directory"
128  #define ERR_NOT_AN_ARCHIVE       "Not an archive"
129  #define ERR_CORRUPTED            "Corrupted archive"
130  #define ERR_SEEK_OUT_OF_RANGE    "Seek out of range"
131  #define ERR_BAD_FILENAME         "Bad filename"
132  #define ERR_PHYSFS_BAD_OS_CALL   "(BUG) PhysicsFS made a bad system call"
133  #define ERR_ARGV0_IS_NULL        "argv0 is NULL"
134  #define ERR_NEED_DICT            "need dictionary"
135  #define ERR_DATA_ERROR           "data error"
136  #define ERR_MEMORY_ERROR         "memory error"
137  #define ERR_BUFFER_ERROR         "buffer error"
138  #define ERR_VERSION_ERROR        "version error"
139  #define ERR_UNKNOWN_ERROR        "unknown error"
140  #define ERR_SEARCHPATH_TRUNC     "Search path was truncated"
141  #define ERR_GETMODFN_TRUNC       "GetModuleFileName() was truncated"
142  #define ERR_GETMODFN_NO_DIR      "GetModuleFileName() had no dir"
143  #define ERR_DISK_FULL            "Disk is full"
144  #define ERR_DIRECTORY_FULL       "Directory full"
145  #define ERR_MACOS_GENERIC        "MacOS reported error (%d)"
146  #define ERR_OS2_GENERIC          "OS/2 reported error (%d)"
147  #define ERR_VOL_LOCKED_HW        "Volume is locked through hardware"
148  #define ERR_VOL_LOCKED_SW        "Volume is locked through software"
149  #define ERR_FILE_LOCKED          "File is locked"
150  #define ERR_FILE_OR_DIR_BUSY     "File/directory is busy"
151  #define ERR_FILE_ALREADY_OPEN_W  "File already open for writing"
152  #define ERR_FILE_ALREADY_OPEN_R  "File already open for reading"
153  #define ERR_INVALID_REFNUM       "Invalid reference number"
154  #define ERR_GETTING_FILE_POS     "Error getting file position"
155  #define ERR_VOLUME_OFFLINE       "Volume is offline"
156  #define ERR_PERMISSION_DENIED    "Permission denied"
157  #define ERR_VOL_ALREADY_ONLINE   "Volume already online"
158  #define ERR_NO_SUCH_DRIVE        "No such drive"
159  #define ERR_NOT_MAC_DISK         "Not a Macintosh disk"
160  #define ERR_VOL_EXTERNAL_FS      "Volume belongs to an external filesystem"
161  #define ERR_PROBLEM_RENAME       "Problem during rename"
162  #define ERR_BAD_MASTER_BLOCK     "Bad master directory block"
163  #define ERR_CANT_MOVE_FORBIDDEN  "Attempt to move forbidden"
164  #define ERR_WRONG_VOL_TYPE       "Wrong volume type"
165  #define ERR_SERVER_VOL_LOST      "Server volume has been disconnected"
166  #define ERR_FILE_ID_NOT_FOUND    "File ID not found"
167  #define ERR_FILE_ID_EXISTS       "File ID already exists"
168  #define ERR_SERVER_NO_RESPOND    "Server not responding"
169  #define ERR_USER_AUTH_FAILED     "User authentication failed"
170  #define ERR_PWORD_EXPIRED        "Password has expired on server"
171  #define ERR_ACCESS_DENIED        "Access denied"
172  #define ERR_NOT_A_DOS_DISK       "Not a DOS disk"
173  #define ERR_SHARING_VIOLATION    "Sharing violation"
174  #define ERR_CANNOT_MAKE          "Cannot make"
175  #define ERR_DEV_IN_USE           "Device already in use"
176  #define ERR_OPEN_FAILED          "Open failed"
177  #define ERR_PIPE_BUSY            "Pipe is busy"
178  #define ERR_SHARING_BUF_EXCEEDED "Sharing buffer exceeded"
179  #define ERR_TOO_MANY_HANDLES     "Too many open handles"
180  #define ERR_SEEK_ERROR           "Seek error"
181  #define ERR_DEL_CWD              "Trying to delete current working directory"
182  #define ERR_WRITE_PROTECT_ERROR  "Write protect error"
183  #define ERR_WRITE_FAULT          "Write fault"
184  #define ERR_LOCK_VIOLATION       "Lock violation"
185  #define ERR_GEN_FAILURE          "General failure"
186  #define ERR_UNCERTAIN_MEDIA      "Uncertain media"
187  #define ERR_PROT_VIOLATION       "Protection violation"
188  #define ERR_BROKEN_PIPE          "Broken pipe"
189
190 #elif (PHYSFS_LANG == PHYSFS_LANG_GERMAN)
191  #define DIR_ARCHIVE_DESCRIPTION  "Kein Archiv, direkte Ein/Ausgabe in das Dateisystem"
192  #define GRP_ARCHIVE_DESCRIPTION  "Build engine Groupfile format"
193  #define HOG_ARCHIVE_DESCRIPTION  "Descent I/II HOG file format"
194  #define MVL_ARCHIVE_DESCRIPTION  "Descent II Movielib format"
195  #define QPAK_ARCHIVE_DESCRIPTION "Quake I/II format"
196  #define ZIP_ARCHIVE_DESCRIPTION  "PkZip/WinZip/Info-Zip kompatibel"
197  #define WAD_ARCHIVE_DESCRIPTION  "DOOM engine format" /* !!! FIXME: translate this line if needed */
198  #define LZMA_ARCHIVE_DESCRIPTION "LZMA (7zip) format" /* !!! FIXME: translate this line if needed */
199
200  #define ERR_IS_INITIALIZED       "Bereits initialisiert"
201  #define ERR_NOT_INITIALIZED      "Nicht initialisiert"
202  #define ERR_INVALID_ARGUMENT     "Ungültiges Argument"
203  #define ERR_FILES_STILL_OPEN     "Dateien noch immer geöffnet"
204  #define ERR_NO_DIR_CREATE        "Fehler beim Erzeugen der Verzeichnisse"
205  #define ERR_OUT_OF_MEMORY        "Kein Speicher mehr frei"
206  #define ERR_NOT_IN_SEARCH_PATH   "Eintrag nicht im Suchpfad enthalten"
207  #define ERR_NOT_SUPPORTED        "Befehl nicht unterstützt"
208  #define ERR_UNSUPPORTED_ARCHIVE  "Archiv-Typ nicht unterstützt"
209  #define ERR_NOT_A_HANDLE         "Ist kein Dateideskriptor"
210  #define ERR_INSECURE_FNAME       "Unsicherer Dateiname"
211  #define ERR_SYMLINK_DISALLOWED   "Symbolische Verweise deaktiviert"
212  #define ERR_NO_WRITE_DIR         "Schreibverzeichnis ist nicht gesetzt"
213  #define ERR_NO_SUCH_FILE         "Datei nicht gefunden"
214  #define ERR_NO_SUCH_PATH         "Pfad nicht gefunden"
215  #define ERR_NO_SUCH_VOLUME       "Datencontainer nicht gefunden"
216  #define ERR_PAST_EOF             "Hinter dem Ende der Datei"
217  #define ERR_ARC_IS_READ_ONLY     "Archiv ist schreibgeschützt"
218  #define ERR_IO_ERROR             "Ein/Ausgabe Fehler"
219  #define ERR_CANT_SET_WRITE_DIR   "Kann Schreibverzeichnis nicht setzen"
220  #define ERR_SYMLINK_LOOP         "Endlosschleife durch symbolische Verweise"
221  #define ERR_COMPRESSION          "(De)Kompressionsfehler"
222  #define ERR_NOT_IMPLEMENTED      "Nicht implementiert"
223  #define ERR_OS_ERROR             "Betriebssystem meldete Fehler"
224  #define ERR_FILE_EXISTS          "Datei existiert bereits"
225  #define ERR_NOT_A_FILE           "Ist keine Datei"
226  #define ERR_NOT_A_DIR            "Ist kein Verzeichnis"
227  #define ERR_NOT_AN_ARCHIVE       "Ist kein Archiv"
228  #define ERR_CORRUPTED            "Beschädigtes Archiv"
229  #define ERR_SEEK_OUT_OF_RANGE    "Suche war ausserhalb der Reichweite"
230  #define ERR_BAD_FILENAME         "Unzulässiger Dateiname"
231  #define ERR_PHYSFS_BAD_OS_CALL   "(BUG) PhysicsFS verursachte einen ungültigen Systemaufruf"
232  #define ERR_ARGV0_IS_NULL        "argv0 ist NULL"
233  #define ERR_NEED_DICT            "brauche Wörterbuch"
234  #define ERR_DATA_ERROR           "Datenfehler"
235  #define ERR_MEMORY_ERROR         "Speicherfehler"
236  #define ERR_BUFFER_ERROR         "Bufferfehler"
237  #define ERR_VERSION_ERROR        "Versionskonflikt"
238  #define ERR_UNKNOWN_ERROR        "Unbekannter Fehler"
239  #define ERR_SEARCHPATH_TRUNC     "Suchpfad war abgeschnitten"
240  #define ERR_GETMODFN_TRUNC       "GetModuleFileName() war abgeschnitten"
241  #define ERR_GETMODFN_NO_DIR      "GetModuleFileName() bekam kein Verzeichnis"
242  #define ERR_DISK_FULL            "Laufwerk ist voll"
243  #define ERR_DIRECTORY_FULL       "Verzeichnis ist voll"
244  #define ERR_MACOS_GENERIC        "MacOS meldete Fehler (%d)"
245  #define ERR_OS2_GENERIC          "OS/2 meldete Fehler (%d)"
246  #define ERR_VOL_LOCKED_HW        "Datencontainer ist durch Hardware gesperrt"
247  #define ERR_VOL_LOCKED_SW        "Datencontainer ist durch Software gesperrt"
248  #define ERR_FILE_LOCKED          "Datei ist gesperrt"
249  #define ERR_FILE_OR_DIR_BUSY     "Datei/Verzeichnis ist beschäftigt"
250  #define ERR_FILE_ALREADY_OPEN_W  "Datei schon im Schreibmodus geöffnet"
251  #define ERR_FILE_ALREADY_OPEN_R  "Datei schon im Lesemodus geöffnet"
252  #define ERR_INVALID_REFNUM       "Ungültige Referenznummer"
253  #define ERR_GETTING_FILE_POS     "Fehler beim Finden der Dateiposition"
254  #define ERR_VOLUME_OFFLINE       "Datencontainer ist offline"
255  #define ERR_PERMISSION_DENIED    "Zugriff verweigert"
256  #define ERR_VOL_ALREADY_ONLINE   "Datencontainer ist bereits online"
257  #define ERR_NO_SUCH_DRIVE        "Laufwerk nicht vorhanden"
258  #define ERR_NOT_MAC_DISK         "Ist kein Macintosh Laufwerk"
259  #define ERR_VOL_EXTERNAL_FS      "Datencontainer liegt auf einem externen Dateisystem"
260  #define ERR_PROBLEM_RENAME       "Fehler beim Umbenennen"
261  #define ERR_BAD_MASTER_BLOCK     "Beschädigter Hauptverzeichnisblock"
262  #define ERR_CANT_MOVE_FORBIDDEN  "Verschieben nicht erlaubt"
263  #define ERR_WRONG_VOL_TYPE       "Falscher Datencontainer-Typ"
264  #define ERR_SERVER_VOL_LOST      "Datencontainer am Server wurde getrennt"
265  #define ERR_FILE_ID_NOT_FOUND    "Dateikennung nicht gefunden"
266  #define ERR_FILE_ID_EXISTS       "Dateikennung existiert bereits"
267  #define ERR_SERVER_NO_RESPOND    "Server antwortet nicht"
268  #define ERR_USER_AUTH_FAILED     "Benutzerauthentifizierung fehlgeschlagen"
269  #define ERR_PWORD_EXPIRED        "Passwort am Server ist abgelaufen"
270  #define ERR_ACCESS_DENIED        "Zugriff verweigert"
271  #define ERR_NOT_A_DOS_DISK       "Ist kein DOS-Laufwerk"
272  #define ERR_SHARING_VIOLATION    "Zugriffsverletzung"
273  #define ERR_CANNOT_MAKE          "Kann nicht erzeugen"
274  #define ERR_DEV_IN_USE           "Gerät wird bereits benutzt"
275  #define ERR_OPEN_FAILED          "Öffnen fehlgeschlagen"
276  #define ERR_PIPE_BUSY            "Pipeverbindung ist belegt"
277  #define ERR_SHARING_BUF_EXCEEDED "Zugriffsbuffer überschritten"
278  #define ERR_TOO_MANY_HANDLES     "Zu viele offene Dateien"
279  #define ERR_SEEK_ERROR           "Fehler beim Suchen"
280  #define ERR_DEL_CWD              "Aktuelles Arbeitsverzeichnis darf nicht gelöscht werden"
281  #define ERR_WRITE_PROTECT_ERROR  "Schreibschutzfehler"
282  #define ERR_WRITE_FAULT          "Schreibfehler"
283  #define ERR_LOCK_VIOLATION       "Sperrverletzung"
284  #define ERR_GEN_FAILURE          "Allgemeiner Fehler"
285  #define ERR_UNCERTAIN_MEDIA      "Unsicheres Medium"
286  #define ERR_PROT_VIOLATION       "Schutzverletzung"
287  #define ERR_BROKEN_PIPE          "Pipeverbindung unterbrochen"
288
289 #elif (PHYSFS_LANG == PHYSFS_LANG_RUSSIAN_KOI8_R)
290  #define DIR_ARCHIVE_DESCRIPTION  "îÅ ÁÒÈÉ×, ÎÅÐÏÓÒÅÄÓÔ×ÅÎÎÙÊ ××ÏÄ/×Ù×ÏÄ ÆÁÊÌÏ×ÏÊ ÓÉÓÔÅÍÙ"
291  #define GRP_ARCHIVE_DESCRIPTION  "æÏÒÍÁÔ ÇÒÕÐÐÏ×ÏÇÏ ÆÁÊÌÁ Build engine"
292  #define HOG_ARCHIVE_DESCRIPTION  "Descent I/II HOG file format"
293  #define MVL_ARCHIVE_DESCRIPTION  "Descent II Movielib format"
294  #define ZIP_ARCHIVE_DESCRIPTION  "PkZip/WinZip/Info-Zip ÓÏ×ÍÅÓÔÉÍÙÊ"
295  #define WAD_ARCHIVE_DESCRIPTION  "DOOM engine format" /* !!! FIXME: translate this line if needed */
296  #define LZMA_ARCHIVE_DESCRIPTION "LZMA (7zip) format" /* !!! FIXME: translate this line if needed */
297
298  #define ERR_IS_INITIALIZED       "õÖÅ ÉÎÉÃÉÁÌÉÚÉÒÏ×ÁÎ"
299  #define ERR_NOT_INITIALIZED      "îÅ ÉÎÉÃÉÁÌÉÚÉÒÏ×ÁÎ"
300  #define ERR_INVALID_ARGUMENT     "îÅ×ÅÒÎÙÊ ÁÒÇÕÍÅÎÔ"
301  #define ERR_FILES_STILL_OPEN     "æÁÊÌÙ ÅÝÅ ÏÔËÒÙÔÙ"
302  #define ERR_NO_DIR_CREATE        "îÅ ÍÏÇÕ ÓÏÚÄÁÔØ ËÁÔÁÌÏÇÉ"
303  #define ERR_OUT_OF_MEMORY        "ëÏÎÞÉÌÁÓØ ÐÁÍÑÔØ"
304  #define ERR_NOT_IN_SEARCH_PATH   "îÅÔ ÔÁËÏÇÏ ÜÌÅÍÅÎÔÁ × ÐÕÔÉ ÐÏÉÓËÁ"
305  #define ERR_NOT_SUPPORTED        "ïÐÅÒÁÃÉÑ ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔÓÑ"
306  #define ERR_UNSUPPORTED_ARCHIVE  "áÒÈÉ×Ù ÔÁËÏÇÏ ÔÉÐÁ ÎÅ ÐÏÄÄÅÒÖÉ×ÁÀÔÓÑ"
307  #define ERR_NOT_A_HANDLE         "îÅ ÆÁÊÌÏ×ÙÊ ÄÅÓËÒÉÐÔÏÒ"
308  #define ERR_INSECURE_FNAME       "îÅÂÅÚÏÐÁÓÎÏÅ ÉÍÑ ÆÁÊÌÁ"
309  #define ERR_SYMLINK_DISALLOWED   "óÉÍ×ÏÌØÎÙÅ ÓÓÙÌËÉ ÏÔËÌÀÞÅÎÙ"
310  #define ERR_NO_WRITE_DIR         "ëÁÔÁÌÏÇ ÄÌÑ ÚÁÐÉÓÉ ÎÅ ÕÓÔÁÎÏ×ÌÅÎ"
311  #define ERR_NO_SUCH_FILE         "æÁÊÌ ÎÅ ÎÁÊÄÅÎ"
312  #define ERR_NO_SUCH_PATH         "ðÕÔØ ÎÅ ÎÁÊÄÅÎ"
313  #define ERR_NO_SUCH_VOLUME       "ôÏÍ ÎÅ ÎÁÊÄÅÎ"
314  #define ERR_PAST_EOF             "úÁ ËÏÎÃÏÍ ÆÁÊÌÁ"
315  #define ERR_ARC_IS_READ_ONLY     "áÒÈÉ× ÔÏÌØËÏ ÄÌÑ ÞÔÅÎÉÑ"
316  #define ERR_IO_ERROR             "ïÛÉÂËÁ ××ÏÄÁ/×Ù×ÏÄÁ"
317  #define ERR_CANT_SET_WRITE_DIR   "îÅ ÍÏÇÕ ÕÓÔÁÎÏ×ÉÔØ ËÁÔÁÌÏÇ ÄÌÑ ÚÁÐÉÓÉ"
318  #define ERR_SYMLINK_LOOP         "âÅÓËÏÎÅÞÎÙÊ ÃÉËÌ ÓÉÍ×ÏÌØÎÏÊ ÓÓÙÌËÉ"
319  #define ERR_COMPRESSION          "ïÛÉÂËÁ (òÁÓ)ÐÁËÏ×ËÉ"
320  #define ERR_NOT_IMPLEMENTED      "îÅ ÒÅÁÌÉÚÏ×ÁÎÏ"
321  #define ERR_OS_ERROR             "ïÐÅÒÁÃÉÏÎÎÁÑ ÓÉÓÔÅÍÁ ÓÏÏÂÝÉÌÁ ÏÛÉÂËÕ"
322  #define ERR_FILE_EXISTS          "æÁÊÌ ÕÖÅ ÓÕÝÅÓÔ×ÕÅÔ"
323  #define ERR_NOT_A_FILE           "îÅ ÆÁÊÌ"
324  #define ERR_NOT_A_DIR            "îÅ ËÁÔÁÌÏÇ"
325  #define ERR_NOT_AN_ARCHIVE       "îÅ ÁÒÈÉ×"
326  #define ERR_CORRUPTED            "ðÏ×ÒÅÖÄÅÎÎÙÊ ÁÒÈÉ×"
327  #define ERR_SEEK_OUT_OF_RANGE    "ðÏÚÉÃÉÏÎÉÒÏ×ÁÎÉÅ ÚÁ ÐÒÅÄÅÌÙ"
328  #define ERR_BAD_FILENAME         "îÅ×ÅÒÎÏÅ ÉÍÑ ÆÁÊÌÁ"
329  #define ERR_PHYSFS_BAD_OS_CALL   "(BUG) PhysicsFS ×ÙÐÏÌÎÉÌÁ ÎÅ×ÅÒÎÙÊ ÓÉÓÔÅÍÎÙÊ ×ÙÚÏ×"
330  #define ERR_ARGV0_IS_NULL        "argv0 is NULL"
331  #define ERR_NEED_DICT            "ÎÕÖÅΠÓÌÏ×ÁÒØ"
332  #define ERR_DATA_ERROR           "ÏÛÉÂËÁ ÄÁÎÎÙÈ"
333  #define ERR_MEMORY_ERROR         "ÏÛÉÂËÁ ÐÁÍÑÔÉ"
334  #define ERR_BUFFER_ERROR         "ÏÛÉÂËÁ ÂÕÆÅÒÁ"
335  #define ERR_VERSION_ERROR        "ÏÛÉÂËÁ ×ÅÒÓÉÉ"
336  #define ERR_UNKNOWN_ERROR        "ÎÅÉÚ×ÅÓÔÎÁÑ ÏÛÉÂËÁ"
337  #define ERR_SEARCHPATH_TRUNC     "ðÕÔØ ÐÏÉÓËÁ ÏÂÒÅÚÁÎ"
338  #define ERR_GETMODFN_TRUNC       "GetModuleFileName() ÏÂÒÅÚÁÎ"
339  #define ERR_GETMODFN_NO_DIR      "GetModuleFileName() ÎÅ ÐÏÌÕÞÉÌ ËÁÔÁÌÏÇ"
340  #define ERR_DISK_FULL            "äÉÓË ÐÏÌÏÎ"
341  #define ERR_DIRECTORY_FULL       "ëÁÔÁÌÏÇ ÐÏÌÏÎ"
342  #define ERR_MACOS_GENERIC        "MacOS ÓÏÏÂÝÉÌÁ ÏÛÉÂËÕ (%d)"
343  #define ERR_OS2_GENERIC          "OS/2 ÓÏÏÂÝÉÌÁ ÏÛÉÂËÕ (%d)"
344  #define ERR_VOL_LOCKED_HW        "ôÏÍ ÂÌÏËÉÒÏ×ÁΠÁÐÐÁÒÁÔÎÏ"
345  #define ERR_VOL_LOCKED_SW        "ôÏÍ ÂÌÏËÉÒÏ×ÁΠÐÒÏÇÒÁÍÍÎÏ"
346  #define ERR_FILE_LOCKED          "æÁÊÌ ÚÁÂÌÏËÉÒÏ×ÁÎ"
347  #define ERR_FILE_OR_DIR_BUSY     "æÁÊÌ/ËÁÔÁÌÏÇ ÚÁÎÑÔ"
348  #define ERR_FILE_ALREADY_OPEN_W  "æÁÊÌ ÕÖÅ ÏÔËÒÙÔ ÎÁ ÚÁÐÉÓØ"
349  #define ERR_FILE_ALREADY_OPEN_R  "æÁÊÌ ÕÖÅ ÏÔËÒÙÔ ÎÁ ÞÔÅÎÉÅ"
350  #define ERR_INVALID_REFNUM       "îÅ×ÅÒÎÏÅ ËÏÌÉÞÅÓÔ×Ï ÓÓÙÌÏË"
351  #define ERR_GETTING_FILE_POS     "ïÛÉÂËÁ ÐÒÉ ÐÏÌÕÞÅÎÉÉ ÐÏÚÉÃÉÉ ÆÁÊÌÁ"
352  #define ERR_VOLUME_OFFLINE       "ôÏÍ ÏÔÓÏÅÄÉÎÅÎ"
353  #define ERR_PERMISSION_DENIED    "ïÔËÁÚÁÎÏ × ÒÁÚÒÅÛÅÎÉÉ"
354  #define ERR_VOL_ALREADY_ONLINE   "ôÏÍ ÕÖÅ ÐÏÄÓÏÅÄÉÎÅÎ"
355  #define ERR_NO_SUCH_DRIVE        "îÅÔ ÔÁËÏÇÏ ÄÉÓËÁ"
356  #define ERR_NOT_MAC_DISK         "îÅ ÄÉÓË Macintosh"
357  #define ERR_VOL_EXTERNAL_FS      "ôÏÍ ÐÒÉÎÁÄÌÅÖÉÔ ×ÎÅÛÎÅÊ ÆÁÊÌÏ×ÏÊ ÓÉÓÔÅÍÅ"
358  #define ERR_PROBLEM_RENAME       "ðÒÏÂÌÅÍÁ ÐÒÉ ÐÅÒÅÉÍÅÎÏ×ÁÎÉÉ"
359  #define ERR_BAD_MASTER_BLOCK     "ðÌÏÈÏÊ ÇÌÁ×ÎÙÊ ÂÌÏË ËÁÔÁÌÏÇÁ"
360  #define ERR_CANT_MOVE_FORBIDDEN  "ðÏÐÙÔËÁ ÐÅÒÅÍÅÓÔÉÔØ ÚÁÐÒÅÝÅÎÁ"
361  #define ERR_WRONG_VOL_TYPE       "îÅ×ÅÒÎÙÊ ÔÉРÔÏÍÁ"
362  #define ERR_SERVER_VOL_LOST      "óÅÒ×ÅÒÎÙÊ ÔÏÍ ÂÙÌ ÏÔÓÏÅÄÉÎÅÎ"
363  #define ERR_FILE_ID_NOT_FOUND    "éÄÅÎÔÉÆÉËÁÔÏÒ ÆÁÊÌÁ ÎÅ ÎÁÊÄÅÎ"
364  #define ERR_FILE_ID_EXISTS       "éÄÅÎÔÉÆÉËÁÔÏÒ ÆÁÊÌÁ ÕÖÅ ÓÕÝÅÓÔ×ÕÅÔ"
365  #define ERR_SERVER_NO_RESPOND    "óÅÒ×ÅÒ ÎÅ ÏÔ×ÅÞÁÅÔ"
366  #define ERR_USER_AUTH_FAILED     "éÄÅÎÔÉÆÉËÁÃÉÑ ÐÏÌØÚÏ×ÁÔÅÌÑ ÎÅ ÕÄÁÌÁÓØ"
367  #define ERR_PWORD_EXPIRED        "ðÁÒÏÌØ ÎÁ ÓÅÒ×ÅÒÅ ÕÓÔÁÒÅÌ"
368  #define ERR_ACCESS_DENIED        "ïÔËÁÚÁÎÏ × ÄÏÓÔÕÐÅ"
369  #define ERR_NOT_A_DOS_DISK       "îÅ ÄÉÓË DOS"
370  #define ERR_SHARING_VIOLATION    "îÁÒÕÛÅÎÉÅ ÓÏ×ÍÅÓÔÎÏÇÏ ÄÏÓÔÕÐÁ"
371  #define ERR_CANNOT_MAKE          "îÅ ÍÏÇÕ ÓÏÂÒÁÔØ"
372  #define ERR_DEV_IN_USE           "õÓÔÒÏÊÓÔ×Ï ÕÖÅ ÉÓÐÏÌØÚÕÅÔÓÑ"
373  #define ERR_OPEN_FAILED          "ïÔËÒÙÔÉÅ ÎÅ ÕÄÁÌÏÓØ"
374  #define ERR_PIPE_BUSY            "ëÏÎ×ÅÊÅÒ ÚÁÎÑÔ"
375  #define ERR_SHARING_BUF_EXCEEDED "òÁÚÄÅÌÑÅÍÙÊ ÂÕÆÅÒ ÐÅÒÅÐÏÌÎÅÎ"
376  #define ERR_TOO_MANY_HANDLES     "óÌÉÛËÏÍ ÍÎÏÇÏ ÏÔËÒÙÔÙÈ ÄÅÓËÒÉÐÔÏÒÏ×"
377  #define ERR_SEEK_ERROR           "ïÛÉÂËÁ ÐÏÚÉÃÉÏÎÉÒÏ×ÁÎÉÑ"
378  #define ERR_DEL_CWD              "ðÏÐÙÔËÁ ÕÄÁÌÉÔØ ÔÅËÕÝÉÊ ÒÁÂÏÞÉÊ ËÁÔÁÌÏÇ"
379  #define ERR_WRITE_PROTECT_ERROR  "ïÛÉÂËÁ ÚÁÝÉÔÙ ÚÁÐÉÓÉ"
380  #define ERR_WRITE_FAULT          "ïÛÉÂËÁ ÚÁÐÉÓÉ"
381  #define ERR_LOCK_VIOLATION       "îÁÒÕÛÅÎÉÅ ÂÌÏËÉÒÏ×ËÉ"
382  #define ERR_GEN_FAILURE          "ïÂÝÉÊ ÓÂÏÊ"
383  #define ERR_UNCERTAIN_MEDIA      "îÅÏÐÒÅÄÅÌÅÎÎÙÊ ÎÏÓÉÔÅÌØ"
384  #define ERR_PROT_VIOLATION       "îÁÒÕÛÅÎÉÅ ÚÁÝÉÔÙ"
385  #define ERR_BROKEN_PIPE          "óÌÏÍÁÎÎÙÊ ËÏÎ×ÅÊÅÒ"
386
387 #elif (PHYSFS_LANG == PHYSFS_LANG_RUSSIAN_CP1251)
388  #define DIR_ARCHIVE_DESCRIPTION  "Íå àðõèâ, íåïîñðåäñòâåííûé ââîä/âûâîä ôàéëîâîé ñèñòåìû"
389  #define GRP_ARCHIVE_DESCRIPTION  "Ôîðìàò ãðóïïîâîãî ôàéëà Build engine"
390  #define HOG_ARCHIVE_DESCRIPTION  "Descent I/II HOG file format"
391  #define MVL_ARCHIVE_DESCRIPTION  "Descent II Movielib format"
392  #define ZIP_ARCHIVE_DESCRIPTION  "PkZip/WinZip/Info-Zip ñîâìåñòèìûé"
393  #define WAD_ARCHIVE_DESCRIPTION  "DOOM engine format" /* !!! FIXME: translate this line if needed */
394  #define LZMA_ARCHIVE_DESCRIPTION "LZMA (7zip) format" /* !!! FIXME: translate this line if needed */
395
396  #define ERR_IS_INITIALIZED       "Óæå èíèöèàëèçèðîâàí"
397  #define ERR_NOT_INITIALIZED      "Íå èíèöèàëèçèðîâàí"
398  #define ERR_INVALID_ARGUMENT     "Íåâåðíûé àðãóìåíò"
399  #define ERR_FILES_STILL_OPEN     "Ôàéëû åùå îòêðûòû"
400  #define ERR_NO_DIR_CREATE        "Íå ìîãó ñîçäàòü êàòàëîãè"
401  #define ERR_OUT_OF_MEMORY        "Êîí÷èëàñü ïàìÿòü"
402  #define ERR_NOT_IN_SEARCH_PATH   "Íåò òàêîãî ýëåìåíòà â ïóòè ïîèñêà"
403  #define ERR_NOT_SUPPORTED        "Îïåðàöèÿ íå ïîääåðæèâàåòñÿ"
404  #define ERR_UNSUPPORTED_ARCHIVE  "Àðõèâû òàêîãî òèïà íå ïîääåðæèâàþòñÿ"
405  #define ERR_NOT_A_HANDLE         "Íå ôàéëîâûé äåñêðèïòîð"
406  #define ERR_INSECURE_FNAME       "Íåáåçîïàñíîå èìÿ ôàéëà"
407  #define ERR_SYMLINK_DISALLOWED   "Ñèìâîëüíûå ññûëêè îòêëþ÷åíû"
408  #define ERR_NO_WRITE_DIR         "Êàòàëîã äëÿ çàïèñè íå óñòàíîâëåí"
409  #define ERR_NO_SUCH_FILE         "Ôàéë íå íàéäåí"
410  #define ERR_NO_SUCH_PATH         "Ïóòü íå íàéäåí"
411  #define ERR_NO_SUCH_VOLUME       "Òîì íå íàéäåí"
412  #define ERR_PAST_EOF             "Çà êîíöîì ôàéëà"
413  #define ERR_ARC_IS_READ_ONLY     "Àðõèâ òîëüêî äëÿ ÷òåíèÿ"
414  #define ERR_IO_ERROR             "Îøèáêà ââîäà/âûâîäà"
415  #define ERR_CANT_SET_WRITE_DIR   "Íå ìîãó óñòàíîâèòü êàòàëîã äëÿ çàïèñè"
416  #define ERR_SYMLINK_LOOP         "Áåñêîíå÷íûé öèêë ñèìâîëüíîé ññûëêè"
417  #define ERR_COMPRESSION          "Îøèáêà (Ðàñ)ïàêîâêè"
418  #define ERR_NOT_IMPLEMENTED      "Íå ðåàëèçîâàíî"
419  #define ERR_OS_ERROR             "Îïåðàöèîííàÿ ñèñòåìà ñîîáùèëà îøèáêó"
420  #define ERR_FILE_EXISTS          "Ôàéë óæå ñóùåñòâóåò"
421  #define ERR_NOT_A_FILE           "Íå ôàéë"
422  #define ERR_NOT_A_DIR            "Íå êàòàëîã"
423  #define ERR_NOT_AN_ARCHIVE       "Íå àðõèâ"
424  #define ERR_CORRUPTED            "Ïîâðåæäåííûé àðõèâ"
425  #define ERR_SEEK_OUT_OF_RANGE    "Ïîçèöèîíèðîâàíèå çà ïðåäåëû"
426  #define ERR_BAD_FILENAME         "Íåâåðíîå èìÿ ôàéëà"
427  #define ERR_PHYSFS_BAD_OS_CALL   "(BUG) PhysicsFS âûïîëíèëà íåâåðíûé ñèñòåìíûé âûçîâ"
428  #define ERR_ARGV0_IS_NULL        "argv0 is NULL"
429  #define ERR_NEED_DICT            "íóæåí ñëîâàðü"
430  #define ERR_DATA_ERROR           "îøèáêà äàííûõ"
431  #define ERR_MEMORY_ERROR         "îøèáêà ïàìÿòè"
432  #define ERR_BUFFER_ERROR         "îøèáêà áóôåðà"
433  #define ERR_VERSION_ERROR        "îøèáêà âåðñèè"
434  #define ERR_UNKNOWN_ERROR        "íåèçâåñòíàÿ îøèáêà"
435  #define ERR_SEARCHPATH_TRUNC     "Ïóòü ïîèñêà îáðåçàí"
436  #define ERR_GETMODFN_TRUNC       "GetModuleFileName() îáðåçàí"
437  #define ERR_GETMODFN_NO_DIR      "GetModuleFileName() íå ïîëó÷èë êàòàëîã"
438  #define ERR_DISK_FULL            "Äèñê ïîëîí"
439  #define ERR_DIRECTORY_FULL       "Êàòàëîã ïîëîí"
440  #define ERR_MACOS_GENERIC        "MacOS ñîîáùèëà îøèáêó (%d)"
441  #define ERR_OS2_GENERIC          "OS/2 ñîîáùèëà îøèáêó (%d)"
442  #define ERR_VOL_LOCKED_HW        "Òîì áëîêèðîâàí àïïàðàòíî"
443  #define ERR_VOL_LOCKED_SW        "Òîì áëîêèðîâàí ïðîãðàììíî"
444  #define ERR_FILE_LOCKED          "Ôàéë çàáëîêèðîâàí"
445  #define ERR_FILE_OR_DIR_BUSY     "Ôàéë/êàòàëîã çàíÿò"
446  #define ERR_FILE_ALREADY_OPEN_W  "Ôàéë óæå îòêðûò íà çàïèñü"
447  #define ERR_FILE_ALREADY_OPEN_R  "Ôàéë óæå îòêðûò íà ÷òåíèå"
448  #define ERR_INVALID_REFNUM       "Íåâåðíîå êîëè÷åñòâî ññûëîê"
449  #define ERR_GETTING_FILE_POS     "Îøèáêà ïðè ïîëó÷åíèè ïîçèöèè ôàéëà"
450  #define ERR_VOLUME_OFFLINE       "Òîì îòñîåäèíåí"
451  #define ERR_PERMISSION_DENIED    "Îòêàçàíî â ðàçðåøåíèè"
452  #define ERR_VOL_ALREADY_ONLINE   "Òîì óæå ïîäñîåäèíåí"
453  #define ERR_NO_SUCH_DRIVE        "Íåò òàêîãî äèñêà"
454  #define ERR_NOT_MAC_DISK         "Íå äèñê Macintosh"
455  #define ERR_VOL_EXTERNAL_FS      "Òîì ïðèíàäëåæèò âíåøíåé ôàéëîâîé ñèñòåìå"
456  #define ERR_PROBLEM_RENAME       "Ïðîáëåìà ïðè ïåðåèìåíîâàíèè"
457  #define ERR_BAD_MASTER_BLOCK     "Ïëîõîé ãëàâíûé áëîê êàòàëîãà"
458  #define ERR_CANT_MOVE_FORBIDDEN  "Ïîïûòêà ïåðåìåñòèòü çàïðåùåíà"
459  #define ERR_WRONG_VOL_TYPE       "Íåâåðíûé òèï òîìà"
460  #define ERR_SERVER_VOL_LOST      "Ñåðâåðíûé òîì áûë îòñîåäèíåí"
461  #define ERR_FILE_ID_NOT_FOUND    "Èäåíòèôèêàòîð ôàéëà íå íàéäåí"
462  #define ERR_FILE_ID_EXISTS       "Èäåíòèôèêàòîð ôàéëà óæå ñóùåñòâóåò"
463  #define ERR_SERVER_NO_RESPOND    "Ñåðâåð íå îòâå÷àåò"
464  #define ERR_USER_AUTH_FAILED     "Èäåíòèôèêàöèÿ ïîëüçîâàòåëÿ íå óäàëàñü"
465  #define ERR_PWORD_EXPIRED        "Ïàðîëü íà ñåðâåðå óñòàðåë"
466  #define ERR_ACCESS_DENIED        "Îòêàçàíî â äîñòóïå"
467  #define ERR_NOT_A_DOS_DISK       "Íå äèñê DOS"
468  #define ERR_SHARING_VIOLATION    "Íàðóøåíèå ñîâìåñòíîãî äîñòóïà"
469  #define ERR_CANNOT_MAKE          "Íå ìîãó ñîáðàòü"
470  #define ERR_DEV_IN_USE           "Óñòðîéñòâî óæå èñïîëüçóåòñÿ"
471  #define ERR_OPEN_FAILED          "Îòêðûòèå íå óäàëîñü"
472  #define ERR_PIPE_BUSY            "Êîíâåéåð çàíÿò"
473  #define ERR_SHARING_BUF_EXCEEDED "Ðàçäåëÿåìûé áóôåð ïåðåïîëíåí"
474  #define ERR_TOO_MANY_HANDLES     "Ñëèøêîì ìíîãî îòêðûòûõ äåñêðèïòîðîâ"
475  #define ERR_SEEK_ERROR           "Îøèáêà ïîçèöèîíèðîâàíèÿ"
476  #define ERR_DEL_CWD              "Ïîïûòêà óäàëèòü òåêóùèé ðàáî÷èé êàòàëîã"
477  #define ERR_WRITE_PROTECT_ERROR  "Îøèáêà çàùèòû çàïèñè"
478  #define ERR_WRITE_FAULT          "Îøèáêà çàïèñè"
479  #define ERR_LOCK_VIOLATION       "Íàðóøåíèå áëîêèðîâêè"
480  #define ERR_GEN_FAILURE          "Îáùèé ñáîé"
481  #define ERR_UNCERTAIN_MEDIA      "Íåîïðåäåëåííûé íîñèòåëü"
482  #define ERR_PROT_VIOLATION       "Íàðóøåíèå çàùèòû"
483  #define ERR_BROKEN_PIPE          "Ñëîìàííûé êîíâåéåð"
484
485 #elif (PHYSFS_LANG == PHYSFS_LANG_RUSSIAN_CP866)
486  #define DIR_ARCHIVE_DESCRIPTION  "\8d¥  à娢, ­¥¯®á।á⢥­­ë© ¢¢®¤/¢ë¢®¤ ä ©«®¢®© á¨á⥬ë"
487  #define GRP_ARCHIVE_DESCRIPTION  "\94®à¬ â £à㯯®¢®£® ä ©«  Build engine"
488  #define HOG_ARCHIVE_DESCRIPTION  "Descent I/II HOG file format"
489  #define MVL_ARCHIVE_DESCRIPTION  "Descent II Movielib format"
490  #define ZIP_ARCHIVE_DESCRIPTION  "PkZip/WinZip/Info-Zip á®¢¬¥á⨬ë©"
491  #define WAD_ARCHIVE_DESCRIPTION  "DOOM engine format" /* !!! FIXME: translate this line if needed */
492  #define LZMA_ARCHIVE_DESCRIPTION "LZMA (7zip) format" /* !!! FIXME: translate this line if needed */
493
494  #define ERR_IS_INITIALIZED       "\93¦¥ ¨­¨æ¨ «¨§¨à®¢ ­"
495  #define ERR_NOT_INITIALIZED      "\8d¥ ¨­¨æ¨ «¨§¨à®¢ ­"
496  #define ERR_INVALID_ARGUMENT     "\8d¥¢¥à­ë©  à£ã¬¥­â"
497  #define ERR_FILES_STILL_OPEN     "\94 ©«ë ¥é¥ ®âªàëâë"
498  #define ERR_NO_DIR_CREATE        "\8d¥ ¬®£ã á®§¤ âì ª â «®£¨"
499  #define ERR_OUT_OF_MEMORY        "\8a®­ç¨« áì ¯ ¬ïâì"
500  #define ERR_NOT_IN_SEARCH_PATH   "\8d¥â â ª®£® í«¥¬¥­â  ¢ ¯ã⨠¯®¨áª "
501  #define ERR_NOT_SUPPORTED        "\8e¯¥à æ¨ï ­¥ ¯®¤¤¥à¦¨¢ ¥âáï"
502  #define ERR_UNSUPPORTED_ARCHIVE  "\80à娢ë â ª®£® â¨¯  ­¥ ¯®¤¤¥à¦¨¢ îâáï"
503  #define ERR_NOT_A_HANDLE         "\8d¥ ä ©«®¢ë© ¤¥áªà¨¯â®à"
504  #define ERR_INSECURE_FNAME       "\8d¥¡¥§®¯ á­®¥ ¨¬ï ä ©« "
505  #define ERR_SYMLINK_DISALLOWED   "\91¨¬¢®«ì­ë¥ áá뫪¨ ®âª«î祭ë"
506  #define ERR_NO_WRITE_DIR         "\8a â «®£ ¤«ï § ¯¨á¨ ­¥ ãáâ ­®¢«¥­"
507  #define ERR_NO_SUCH_FILE         "\94 ©« ­¥ ­ ©¤¥­"
508  #define ERR_NO_SUCH_PATH         "\8fãâì ­¥ ­ ©¤¥­"
509  #define ERR_NO_SUCH_VOLUME       "\92®¬ ­¥ ­ ©¤¥­"
510  #define ERR_PAST_EOF             "\87  ª®­æ®¬ ä ©« "
511  #define ERR_ARC_IS_READ_ONLY     "\80à娢 â®«ìª® ¤«ï ç⥭¨ï"
512  #define ERR_IO_ERROR             "\8e訡ª  ¢¢®¤ /¢ë¢®¤ "
513  #define ERR_CANT_SET_WRITE_DIR   "\8d¥ ¬®£ã ãáâ ­®¢¨âì ª â «®£ ¤«ï § ¯¨á¨"
514  #define ERR_SYMLINK_LOOP         "\81¥áª®­¥ç­ë© æ¨ª« á¨¬¢®«ì­®© áá뫪¨"
515  #define ERR_COMPRESSION          "\8e訡ª  (\90 á)¯ ª®¢ª¨"
516  #define ERR_NOT_IMPLEMENTED      "\8d¥ à¥ «¨§®¢ ­®"
517  #define ERR_OS_ERROR             "\8e¯¥à æ¨®­­ ï á¨á⥬  á®®¡é¨«  ®è¨¡ªã"
518  #define ERR_FILE_EXISTS          "\94 ©« ã¦¥ áãé¥áâ¢ã¥â"
519  #define ERR_NOT_A_FILE           "\8d¥ ä ©«"
520  #define ERR_NOT_A_DIR            "\8d¥ ª â «®£"
521  #define ERR_NOT_AN_ARCHIVE       "\8d¥  à娢"
522  #define ERR_CORRUPTED            "\8f®¢à¥¦¤¥­­ë©  à娢"
523  #define ERR_SEEK_OUT_OF_RANGE    "\8f®§¨æ¨®­¨à®¢ ­¨¥ §  ¯à¥¤¥«ë"
524  #define ERR_BAD_FILENAME         "\8d¥¢¥à­®¥ ¨¬ï ä ©« "
525  #define ERR_PHYSFS_BAD_OS_CALL   "(BUG) PhysicsFS ¢ë¯®«­¨«  ­¥¢¥à­ë© á¨á⥬­ë© ¢ë§®¢"
526  #define ERR_ARGV0_IS_NULL        "argv0 is NULL"
527  #define ERR_NEED_DICT            "­ã¦¥­ á«®¢ àì"
528  #define ERR_DATA_ERROR           "®è¨¡ª  ¤ ­­ëå"
529  #define ERR_MEMORY_ERROR         "®è¨¡ª  ¯ ¬ïâ¨"
530  #define ERR_BUFFER_ERROR         "®è¨¡ª  ¡ãä¥à "
531  #define ERR_VERSION_ERROR        "®è¨¡ª  ¢¥àᨨ"
532  #define ERR_UNKNOWN_ERROR        "­¥¨§¢¥á⭠訡ª "
533  #define ERR_SEARCHPATH_TRUNC     "\8fãâì ¯®¨áª  ®¡à¥§ ­"
534  #define ERR_GETMODFN_TRUNC       "GetModuleFileName() ®¡à¥§ ­"
535  #define ERR_GETMODFN_NO_DIR      "GetModuleFileName() ­¥ ¯®«ã稫 ª â «®£"
536  #define ERR_DISK_FULL            "\84¨áª ¯®«®­"
537  #define ERR_DIRECTORY_FULL       "\8a â «®£ ¯®«®­"
538  #define ERR_MACOS_GENERIC        "MacOS á®®¡é¨«  ®è¨¡ªã (%d)"
539  #define ERR_OS2_GENERIC          "OS/2 á®®¡é¨«  ®è¨¡ªã (%d)"
540  #define ERR_VOL_LOCKED_HW        "\92®¬ ¡«®ª¨à®¢ ­  ¯¯ à â­®"
541  #define ERR_VOL_LOCKED_SW        "\92®¬ ¡«®ª¨à®¢ ­ ¯à®£à ¬¬­®"
542  #define ERR_FILE_LOCKED          "\94 ©« § ¡«®ª¨à®¢ ­"
543  #define ERR_FILE_OR_DIR_BUSY     "\94 ©«/ª â «®£ § ­ïâ"
544  #define ERR_FILE_ALREADY_OPEN_W  "\94 ©« ã¦¥ ®âªàëâ ­  § ¯¨áì"
545  #define ERR_FILE_ALREADY_OPEN_R  "\94 ©« ã¦¥ ®âªàëâ ­  ç⥭¨¥"
546  #define ERR_INVALID_REFNUM       "\8d¥¢¥à­®¥ ª®«¨ç¥á⢮ ááë«®ª"
547  #define ERR_GETTING_FILE_POS     "\8e訡ª  ¯à¨ ¯®«ã祭¨¨ ¯®§¨æ¨¨ ä ©« "
548  #define ERR_VOLUME_OFFLINE       "\92®¬ ®âᮥ¤¨­¥­"
549  #define ERR_PERMISSION_DENIED    "\8e⪠§ ­® ¢ à §à¥è¥­¨¨"
550  #define ERR_VOL_ALREADY_ONLINE   "\92®¬ ã¦¥ ¯®¤á®¥¤¨­¥­"
551  #define ERR_NO_SUCH_DRIVE        "\8d¥â â ª®£® ¤¨áª "
552  #define ERR_NOT_MAC_DISK         "\8d¥ ¤¨áª Macintosh"
553  #define ERR_VOL_EXTERNAL_FS      "\92®¬ ¯à¨­ ¤«¥¦¨â ¢­¥è­¥© ä ©«®¢®© á¨á⥬¥"
554  #define ERR_PROBLEM_RENAME       "\8f஡«¥¬  ¯à¨ ¯¥à¥¨¬¥­®¢ ­¨¨"
555  #define ERR_BAD_MASTER_BLOCK     "\8f«®å®© £« ¢­ë© ¡«®ª ª â «®£ "
556  #define ERR_CANT_MOVE_FORBIDDEN  "\8f®¯ë⪠ ¯¥à¥¬¥áâ¨âì § ¯à¥é¥­ "
557  #define ERR_WRONG_VOL_TYPE       "\8d¥¢¥à­ë© â¨¯ â®¬ "
558  #define ERR_SERVER_VOL_LOST      "\91¥à¢¥à­ë© â®¬ ¡ë« ®âᮥ¤¨­¥­"
559  #define ERR_FILE_ID_NOT_FOUND    "\88¤¥­â¨ä¨ª â®à ä ©«  ­¥ ­ ©¤¥­"
560  #define ERR_FILE_ID_EXISTS       "\88¤¥­â¨ä¨ª â®à ä ©«  ã¦¥ áãé¥áâ¢ã¥â"
561  #define ERR_SERVER_NO_RESPOND    "\91¥à¢¥à ­¥ ®â¢¥ç ¥â"
562  #define ERR_USER_AUTH_FAILED     "\88¤¥­â¨ä¨ª æ¨ï ¯®«ì§®¢ â¥«ï ­¥ ã¤ « áì"
563  #define ERR_PWORD_EXPIRED        "\8f à®«ì ­  á¥à¢¥à¥ ãáâ à¥«"
564  #define ERR_ACCESS_DENIED        "\8e⪠§ ­® ¢ ¤®áâ㯥"
565  #define ERR_NOT_A_DOS_DISK       "\8d¥ ¤¨áª DOS"
566  #define ERR_SHARING_VIOLATION    "\8d àã襭¨¥ á®¢¬¥áâ­®£® ¤®áâ㯠"
567  #define ERR_CANNOT_MAKE          "\8d¥ ¬®£ã á®¡à âì"
568  #define ERR_DEV_IN_USE           "\93áâனá⢮ ã¦¥ ¨á¯®«ì§ã¥âáï"
569  #define ERR_OPEN_FAILED          "\8eâªàë⨥ ­¥ ã¤ «®áì"
570  #define ERR_PIPE_BUSY            "\8a®­¢¥©¥à § ­ïâ"
571  #define ERR_SHARING_BUF_EXCEEDED "\90 §¤¥«ï¥¬ë© ¡ãä¥à ¯¥à¥¯®«­¥­"
572  #define ERR_TOO_MANY_HANDLES     "\91«¨èª®¬ ¬­®£® ®âªàëâëå ¤¥áªà¨¯â®à®¢"
573  #define ERR_SEEK_ERROR           "\8e訡ª  ¯®§¨æ¨®­¨à®¢ ­¨ï"
574  #define ERR_DEL_CWD              "\8f®¯ë⪠ ã¤ «¨âì â¥ªã騩 à ¡®ç¨© ª â «®£"
575  #define ERR_WRITE_PROTECT_ERROR  "\8e訡ª  § é¨âë § ¯¨á¨"
576  #define ERR_WRITE_FAULT          "\8e訡ª  § ¯¨á¨"
577  #define ERR_LOCK_VIOLATION       "\8d àã襭¨¥ ¡«®ª¨à®¢ª¨"
578  #define ERR_GEN_FAILURE          "\8e¡é¨© á¡®©"
579  #define ERR_UNCERTAIN_MEDIA      "\8d¥®¯à¥¤¥«¥­­ë© ­®á¨â¥«ì"
580  #define ERR_PROT_VIOLATION       "\8d àã襭¨¥ § é¨âë"
581  #define ERR_BROKEN_PIPE          "\91«®¬ ­­ë© ª®­¢¥©¥à"
582
583 #elif (PHYSFS_LANG == PHYSFS_LANG_RUSSIAN_ISO_8859_5)
584  #define DIR_ARCHIVE_DESCRIPTION  "½Õ ÐàåØÒ, ÝÕßÞáàÕÔáâÒÕÝÝëÙ ÒÒÞÔ/ÒëÒÞÔ äÐÙÛÞÒÞÙ áØáâÕÜë"
585  #define GRP_ARCHIVE_DESCRIPTION  "ÄÞàÜÐâ ÓàãßßÞÒÞÓÞ äÐÙÛРBuild engine"
586  #define HOG_ARCHIVE_DESCRIPTION  "Descent I/II HOG file format"
587  #define MVL_ARCHIVE_DESCRIPTION  "Descent II Movielib format"
588  #define ZIP_ARCHIVE_DESCRIPTION  "PkZip/WinZip/Info-Zip áÞÒÜÕáâØÜëÙ"
589  #define WAD_ARCHIVE_DESCRIPTION  "DOOM engine format" /* !!! FIXME: translate this line if needed */
590  #define LZMA_ARCHIVE_DESCRIPTION "LZMA (7zip) format" /* !!! FIXME: translate this line if needed */
591
592  #define ERR_IS_INITIALIZED       "ÃÖÕ ØÝØæØÐÛØ×ØàÞÒÐÝ"
593  #define ERR_NOT_INITIALIZED      "½Õ ØÝØæØÐÛØ×ØàÞÒÐÝ"
594  #define ERR_INVALID_ARGUMENT     "½ÕÒÕàÝëÙ ÐàÓãÜÕÝâ"
595  #define ERR_FILES_STILL_OPEN     "ÄÐÙÛë ÕéÕ ÞâÚàëâë"
596  #define ERR_NO_DIR_CREATE        "½Õ ÜÞÓã áÞ×ÔÐâì ÚÐâÐÛÞÓØ"
597  #define ERR_OUT_OF_MEMORY        "ºÞÝçØÛÐáì ßÐÜïâì"
598  #define ERR_NOT_IN_SEARCH_PATH   "½Õâ âÐÚÞÓÞ íÛÕÜÕÝâРҠßãâØ ßÞØáÚÐ"
599  #define ERR_NOT_SUPPORTED        "¾ßÕàÐæØï ÝÕ ßÞÔÔÕàÖØÒÐÕâáï"
600  #define ERR_UNSUPPORTED_ARCHIVE  "°àåØÒë âÐÚÞÓÞ âØßРÝÕ ßÞÔÔÕàÖØÒÐîâáï"
601  #define ERR_NOT_A_HANDLE         "½Õ äÐÙÛÞÒëÙ ÔÕáÚàØßâÞà"
602  #define ERR_INSECURE_FNAME       "½ÕÑÕ×ÞßÐáÝÞÕ ØÜï äÐÙÛÐ"
603  #define ERR_SYMLINK_DISALLOWED   "ÁØÜÒÞÛìÝëÕ ááëÛÚØ ÞâÚÛîçÕÝë"
604  #define ERR_NO_WRITE_DIR         "ºÐâÐÛÞÓ ÔÛï ×ÐßØáØ ÝÕ ãáâÐÝÞÒÛÕÝ"
605  #define ERR_NO_SUCH_FILE         "ÄÐÙÛ ÝÕ ÝÐÙÔÕÝ"
606  #define ERR_NO_SUCH_PATH         "¿ãâì ÝÕ ÝÐÙÔÕÝ"
607  #define ERR_NO_SUCH_VOLUME       "ÂÞÜ ÝÕ ÝÐÙÔÕÝ"
608  #define ERR_PAST_EOF             "·Ð ÚÞÝæÞÜ äÐÙÛÐ"
609  #define ERR_ARC_IS_READ_ONLY     "°àåØÒ âÞÛìÚÞ ÔÛï çâÕÝØï"
610  #define ERR_IO_ERROR             "¾èØÑÚРÒÒÞÔÐ/ÒëÒÞÔÐ"
611  #define ERR_CANT_SET_WRITE_DIR   "½Õ ÜÞÓã ãáâÐÝÞÒØâì ÚÐâÐÛÞÓ ÔÛï ×ÐßØáØ"
612  #define ERR_SYMLINK_LOOP         "±ÕáÚÞÝÕçÝëÙ æØÚÛ áØÜÒÞÛìÝÞÙ ááëÛÚØ"
613  #define ERR_COMPRESSION          "¾èØÑÚР(ÀÐá)ßÐÚÞÒÚØ"
614  #define ERR_NOT_IMPLEMENTED      "½Õ àÕÐÛØ×ÞÒÐÝÞ"
615  #define ERR_OS_ERROR             "¾ßÕàÐæØÞÝÝÐï áØáâÕÜРáÞÞÑéØÛРÞèØÑÚã"
616  #define ERR_FILE_EXISTS          "ÄÐÙÛ ãÖÕ áãéÕáâÒãÕâ"
617  #define ERR_NOT_A_FILE           "½Õ äÐÙÛ"
618  #define ERR_NOT_A_DIR            "½Õ ÚÐâÐÛÞÓ"
619  #define ERR_NOT_AN_ARCHIVE       "½Õ ÐàåØÒ"
620  #define ERR_CORRUPTED            "¿ÞÒàÕÖÔÕÝÝëÙ ÐàåØÒ"
621  #define ERR_SEEK_OUT_OF_RANGE    "¿Þ×ØæØÞÝØàÞÒÐÝØÕ ×РßàÕÔÕÛë"
622  #define ERR_BAD_FILENAME         "½ÕÒÕàÝÞÕ ØÜï äÐÙÛÐ"
623  #define ERR_PHYSFS_BAD_OS_CALL   "(BUG) PhysicsFS ÒëßÞÛÝØÛРÝÕÒÕàÝëÙ áØáâÕÜÝëÙ Òë×ÞÒ"
624  #define ERR_ARGV0_IS_NULL        "argv0 is NULL"
625  #define ERR_NEED_DICT            "ÝãÖÕÝ áÛÞÒÐàì"
626  #define ERR_DATA_ERROR           "ÞèØÑÚРÔÐÝÝëå"
627  #define ERR_MEMORY_ERROR         "ÞèØÑÚРßÐÜïâØ"
628  #define ERR_BUFFER_ERROR         "ÞèØÑÚРÑãäÕàÐ"
629  #define ERR_VERSION_ERROR        "ÞèØÑÚРÒÕàáØØ"
630  #define ERR_UNKNOWN_ERROR        "ÝÕØ×ÒÕáâÝÐï ÞèØÑÚÐ"
631  #define ERR_SEARCHPATH_TRUNC     "¿ãâì ßÞØáÚРÞÑàÕ×ÐÝ"
632  #define ERR_GETMODFN_TRUNC       "GetModuleFileName() ÞÑàÕ×ÐÝ"
633  #define ERR_GETMODFN_NO_DIR      "GetModuleFileName() ÝÕ ßÞÛãçØÛ ÚÐâÐÛÞÓ"
634  #define ERR_DISK_FULL            "´ØáÚ ßÞÛÞÝ"
635  #define ERR_DIRECTORY_FULL       "ºÐâÐÛÞÓ ßÞÛÞÝ"
636  #define ERR_MACOS_GENERIC        "MacOS áÞÞÑéØÛРÞèØÑÚã (%d)"
637  #define ERR_OS2_GENERIC          "OS/2 áÞÞÑéØÛРÞèØÑÚã (%d)"
638  #define ERR_VOL_LOCKED_HW        "ÂÞÜ ÑÛÞÚØàÞÒÐÝ ÐßßÐàÐâÝÞ"
639  #define ERR_VOL_LOCKED_SW        "ÂÞÜ ÑÛÞÚØàÞÒÐÝ ßàÞÓàÐÜÜÝÞ"
640  #define ERR_FILE_LOCKED          "ÄÐÙÛ ×ÐÑÛÞÚØàÞÒÐÝ"
641  #define ERR_FILE_OR_DIR_BUSY     "ÄÐÙÛ/ÚÐâÐÛÞÓ ×ÐÝïâ"
642  #define ERR_FILE_ALREADY_OPEN_W  "ÄÐÙÛ ãÖÕ ÞâÚàëâ ÝР×ÐßØáì"
643  #define ERR_FILE_ALREADY_OPEN_R  "ÄÐÙÛ ãÖÕ ÞâÚàëâ ÝРçâÕÝØÕ"
644  #define ERR_INVALID_REFNUM       "½ÕÒÕàÝÞÕ ÚÞÛØçÕáâÒÞ ááëÛÞÚ"
645  #define ERR_GETTING_FILE_POS     "¾èØÑÚРßàØ ßÞÛãçÕÝØØ ßÞ×ØæØØ äÐÙÛÐ"
646  #define ERR_VOLUME_OFFLINE       "ÂÞÜ ÞâáÞÕÔØÝÕÝ"
647  #define ERR_PERMISSION_DENIED    "¾âÚÐ×ÐÝÞ Ò àÐ×àÕèÕÝØØ"
648  #define ERR_VOL_ALREADY_ONLINE   "ÂÞÜ ãÖÕ ßÞÔáÞÕÔØÝÕÝ"
649  #define ERR_NO_SUCH_DRIVE        "½Õâ âÐÚÞÓÞ ÔØáÚÐ"
650  #define ERR_NOT_MAC_DISK         "½Õ ÔØáÚ Macintosh"
651  #define ERR_VOL_EXTERNAL_FS      "ÂÞÜ ßàØÝÐÔÛÕÖØâ ÒÝÕèÝÕÙ äÐÙÛÞÒÞÙ áØáâÕÜÕ"
652  #define ERR_PROBLEM_RENAME       "¿àÞÑÛÕÜРßàØ ßÕàÕØÜÕÝÞÒÐÝØØ"
653  #define ERR_BAD_MASTER_BLOCK     "¿ÛÞåÞÙ ÓÛÐÒÝëÙ ÑÛÞÚ ÚÐâÐÛÞÓÐ"
654  #define ERR_CANT_MOVE_FORBIDDEN  "¿ÞßëâÚРßÕàÕÜÕáâØâì ×ÐßàÕéÕÝÐ"
655  #define ERR_WRONG_VOL_TYPE       "½ÕÒÕàÝëÙ âØß âÞÜÐ"
656  #define ERR_SERVER_VOL_LOST      "ÁÕàÒÕàÝëÙ âÞÜ ÑëÛ ÞâáÞÕÔØÝÕÝ"
657  #define ERR_FILE_ID_NOT_FOUND    "¸ÔÕÝâØäØÚÐâÞà äÐÙÛРÝÕ ÝÐÙÔÕÝ"
658  #define ERR_FILE_ID_EXISTS       "¸ÔÕÝâØäØÚÐâÞà äÐÙÛРãÖÕ áãéÕáâÒãÕâ"
659  #define ERR_SERVER_NO_RESPOND    "ÁÕàÒÕà ÝÕ ÞâÒÕçÐÕâ"
660  #define ERR_USER_AUTH_FAILED     "¸ÔÕÝâØäØÚÐæØï ßÞÛì×ÞÒÐâÕÛï ÝÕ ãÔÐÛÐáì"
661  #define ERR_PWORD_EXPIRED        "¿ÐàÞÛì ÝРáÕàÒÕàÕ ãáâÐàÕÛ"
662  #define ERR_ACCESS_DENIED        "¾âÚÐ×ÐÝÞ Ò ÔÞáâãßÕ"
663  #define ERR_NOT_A_DOS_DISK       "½Õ ÔØáÚ DOS"
664  #define ERR_SHARING_VIOLATION    "½ÐàãèÕÝØÕ áÞÒÜÕáâÝÞÓÞ ÔÞáâãßÐ"
665  #define ERR_CANNOT_MAKE          "½Õ ÜÞÓã áÞÑàÐâì"
666  #define ERR_DEV_IN_USE           "ÃáâàÞÙáâÒÞ ãÖÕ ØáßÞÛì×ãÕâáï"
667  #define ERR_OPEN_FAILED          "¾âÚàëâØÕ ÝÕ ãÔÐÛÞáì"
668  #define ERR_PIPE_BUSY            "ºÞÝÒÕÙÕà ×ÐÝïâ"
669  #define ERR_SHARING_BUF_EXCEEDED "ÀÐ×ÔÕÛïÕÜëÙ ÑãäÕà ßÕàÕßÞÛÝÕÝ"
670  #define ERR_TOO_MANY_HANDLES     "ÁÛØèÚÞÜ ÜÝÞÓÞ ÞâÚàëâëå ÔÕáÚàØßâÞàÞÒ"
671  #define ERR_SEEK_ERROR           "¾èØÑÚРßÞ×ØæØÞÝØàÞÒÐÝØï"
672  #define ERR_DEL_CWD              "¿ÞßëâÚРãÔÐÛØâì âÕÚãéØÙ àÐÑÞçØÙ ÚÐâÐÛÞÓ"
673  #define ERR_WRITE_PROTECT_ERROR  "¾èØÑÚР×ÐéØâë ×ÐßØáØ"
674  #define ERR_WRITE_FAULT          "¾èØÑÚР×ÐßØáØ"
675  #define ERR_LOCK_VIOLATION       "½ÐàãèÕÝØÕ ÑÛÞÚØàÞÒÚØ"
676  #define ERR_GEN_FAILURE          "¾ÑéØÙ áÑÞÙ"
677  #define ERR_UNCERTAIN_MEDIA      "½ÕÞßàÕÔÕÛÕÝÝëÙ ÝÞáØâÕÛì"
678  #define ERR_PROT_VIOLATION       "½ÐàãèÕÝØÕ ×ÐéØâë"
679  #define ERR_BROKEN_PIPE          "ÁÛÞÜÐÝÝëÙ ÚÞÝÒÕÙÕà"
680
681
682 #elif (PHYSFS_LANG == PHYSFS_LANG_FRENCH)
683  #define DIR_ARCHIVE_DESCRIPTION  "Pas d'archive, E/S directes sur système de fichiers"
684  #define GRP_ARCHIVE_DESCRIPTION  "Format Groupfile du moteur Build"
685  #define HOG_ARCHIVE_DESCRIPTION  "Descent I/II HOG file format"
686  #define MVL_ARCHIVE_DESCRIPTION  "Descent II Movielib format"
687  #define QPAK_ARCHIVE_DESCRIPTION "Quake I/II format"
688  #define ZIP_ARCHIVE_DESCRIPTION  "Compatible PkZip/WinZip/Info-Zip"
689  #define WAD_ARCHIVE_DESCRIPTION  "Format WAD du moteur DOOM"
690  #define LZMA_ARCHIVE_DESCRIPTION "LZMA (7zip) format" /* !!! FIXME: translate this line if needed */
691
692  #define ERR_IS_INITIALIZED       "Déjà initialisé"
693  #define ERR_NOT_INITIALIZED      "Non initialisé"
694  #define ERR_INVALID_ARGUMENT     "Argument invalide"
695  #define ERR_FILES_STILL_OPEN     "Fichiers encore ouverts"
696  #define ERR_NO_DIR_CREATE        "Echec de la création de répertoires"
697  #define ERR_OUT_OF_MEMORY        "A court de mémoire"
698  #define ERR_NOT_IN_SEARCH_PATH   "Aucune entrée dans le chemin de recherche"
699  #define ERR_NOT_SUPPORTED        "Opération non supportée"
700  #define ERR_UNSUPPORTED_ARCHIVE  "Type d'archive non supportée"
701  #define ERR_NOT_A_HANDLE         "Pas un descripteur de fichier"
702  #define ERR_INSECURE_FNAME       "Nom de fichier dangereux"
703  #define ERR_SYMLINK_DISALLOWED   "Les liens symboliques sont désactivés"
704  #define ERR_NO_WRITE_DIR         "Le répertoire d'écriture n'est pas spécifié"
705  #define ERR_NO_SUCH_FILE         "Fichier non trouvé"
706  #define ERR_NO_SUCH_PATH         "Chemin non trouvé"
707  #define ERR_NO_SUCH_VOLUME       "Volume non trouvé"
708  #define ERR_PAST_EOF             "Au-delà de la fin du fichier"
709  #define ERR_ARC_IS_READ_ONLY     "L'archive est en lecture seule"
710  #define ERR_IO_ERROR             "Erreur E/S"
711  #define ERR_CANT_SET_WRITE_DIR   "Ne peut utiliser le répertoire d'écriture"
712  #define ERR_SYMLINK_LOOP         "Boucle infinie dans les liens symboliques"
713  #define ERR_COMPRESSION          "Erreur de (dé)compression"
714  #define ERR_NOT_IMPLEMENTED      "Non implémenté"
715  #define ERR_OS_ERROR             "Erreur rapportée par le système d'exploitation"
716  #define ERR_FILE_EXISTS          "Le fichier existe déjà"
717  #define ERR_NOT_A_FILE           "Pas un fichier"
718  #define ERR_NOT_A_DIR            "Pas un répertoire"
719  #define ERR_NOT_AN_ARCHIVE       "Pas une archive"
720  #define ERR_CORRUPTED            "Archive corrompue"
721  #define ERR_SEEK_OUT_OF_RANGE    "Pointeur de fichier hors de portée"
722  #define ERR_BAD_FILENAME         "Mauvais nom de fichier"
723  #define ERR_PHYSFS_BAD_OS_CALL   "(BOGUE) PhysicsFS a fait un mauvais appel système, le salaud"
724  #define ERR_ARGV0_IS_NULL        "argv0 est NULL"
725  #define ERR_NEED_DICT            "a besoin du dico"
726  #define ERR_DATA_ERROR           "erreur de données"
727  #define ERR_MEMORY_ERROR         "erreur mémoire"
728  #define ERR_BUFFER_ERROR         "erreur tampon"
729  #define ERR_VERSION_ERROR        "erreur de version"
730  #define ERR_UNKNOWN_ERROR        "erreur inconnue"
731  #define ERR_SEARCHPATH_TRUNC     "Le chemin de recherche a été tronqué"
732  #define ERR_GETMODFN_TRUNC       "GetModuleFileName() a été tronqué"
733  #define ERR_GETMODFN_NO_DIR      "GetModuleFileName() n'a pas de répertoire"
734  #define ERR_DISK_FULL            "Disque plein"
735  #define ERR_DIRECTORY_FULL       "Répertoire plein"
736  #define ERR_MACOS_GENERIC        "Erreur rapportée par MacOS (%d)"
737  #define ERR_OS2_GENERIC          "Erreur rapportée par OS/2 (%d)"
738  #define ERR_VOL_LOCKED_HW        "Le volume est verrouillé matériellement"
739  #define ERR_VOL_LOCKED_SW        "Le volume est verrouillé par logiciel"
740  #define ERR_FILE_LOCKED          "Fichier verrouillé"
741  #define ERR_FILE_OR_DIR_BUSY     "Fichier/répertoire occupé"
742  #define ERR_FILE_ALREADY_OPEN_W  "Fichier déjà ouvert en écriture"
743  #define ERR_FILE_ALREADY_OPEN_R  "Fichier déjà ouvert en lecture"
744  #define ERR_INVALID_REFNUM       "Numéro de référence invalide"
745  #define ERR_GETTING_FILE_POS     "Erreur lors de l'obtention de la position du pointeur de fichier"
746  #define ERR_VOLUME_OFFLINE       "Le volume n'est pas en ligne"
747  #define ERR_PERMISSION_DENIED    "Permission refusée"
748  #define ERR_VOL_ALREADY_ONLINE   "Volumé déjà en ligne"
749  #define ERR_NO_SUCH_DRIVE        "Lecteur inexistant"
750  #define ERR_NOT_MAC_DISK         "Pas un disque Macintosh"
751  #define ERR_VOL_EXTERNAL_FS      "Le volume appartient à un système de fichiers externe"
752  #define ERR_PROBLEM_RENAME       "Problème lors du renommage"
753  #define ERR_BAD_MASTER_BLOCK     "Mauvais block maitre de répertoire"
754  #define ERR_CANT_MOVE_FORBIDDEN  "Essai de déplacement interdit"
755  #define ERR_WRONG_VOL_TYPE       "Mauvais type de volume"
756  #define ERR_SERVER_VOL_LOST      "Le volume serveur a été déconnecté"
757  #define ERR_FILE_ID_NOT_FOUND    "Identificateur de fichier non trouvé"
758  #define ERR_FILE_ID_EXISTS       "Identificateur de fichier existe déjà"
759  #define ERR_SERVER_NO_RESPOND    "Le serveur ne répond pas"
760  #define ERR_USER_AUTH_FAILED     "Authentification de l'utilisateur échouée"
761  #define ERR_PWORD_EXPIRED        "Le mot de passe a expiré sur le serveur"
762  #define ERR_ACCESS_DENIED        "Accès refusé"
763  #define ERR_NOT_A_DOS_DISK       "Pas un disque DOS"
764  #define ERR_SHARING_VIOLATION    "Violation de partage"
765  #define ERR_CANNOT_MAKE          "Ne peut faire"
766  #define ERR_DEV_IN_USE           "Périphérique déjà en utilisation"
767  #define ERR_OPEN_FAILED          "Ouverture échouée"
768  #define ERR_PIPE_BUSY            "Le tube est occupé"
769  #define ERR_SHARING_BUF_EXCEEDED "Tampon de partage dépassé"
770  #define ERR_TOO_MANY_HANDLES     "Trop de descripteurs ouverts"
771  #define ERR_SEEK_ERROR           "Erreur de positionement"
772  #define ERR_DEL_CWD              "Essai de supprimer le répertoire courant"
773  #define ERR_WRITE_PROTECT_ERROR  "Erreur de protection en écriture"
774  #define ERR_WRITE_FAULT          "Erreur d'écriture"
775  #define ERR_LOCK_VIOLATION       "Violation de verrou"
776  #define ERR_GEN_FAILURE          "Echec général"
777  #define ERR_UNCERTAIN_MEDIA      "Média incertain"
778  #define ERR_PROT_VIOLATION       "Violation de protection"
779  #define ERR_BROKEN_PIPE          "Tube cassé"
780
781 #elif (PHYSFS_LANG == PHYSFS_LANG_PORTUGUESE_BR)
782  #define DIR_ARCHIVE_DESCRIPTION  "Não arquivo, E/S sistema de arquivos direto"
783  #define GRP_ARCHIVE_DESCRIPTION  "Formato Groupfile do engine Build"
784  #define HOG_ARCHIVE_DESCRIPTION  "Formato Descent I/II HOG file"
785  #define MVL_ARCHIVE_DESCRIPTION  "Formato Descent II Movielib"
786  #define QPAK_ARCHIVE_DESCRIPTION "Formato Quake I/II"
787  #define ZIP_ARCHIVE_DESCRIPTION  "Formato compatível PkZip/WinZip/Info-Zip"
788  #define WAD_ARCHIVE_DESCRIPTION  "Formato WAD do engine DOOM"
789  #define WAD_ARCHIVE_DESCRIPTION  "DOOM engine format" /* !!! FIXME: translate this line if needed */
790  #define LZMA_ARCHIVE_DESCRIPTION "LZMA (7zip) format" /* !!! FIXME: translate this line if needed */
791
792  #define ERR_IS_INITIALIZED       "Já inicializado"
793  #define ERR_NOT_INITIALIZED      "Não inicializado"
794  #define ERR_INVALID_ARGUMENT     "Argumento inválido"
795  #define ERR_FILES_STILL_OPEN     "Arquivos ainda abertos"
796  #define ERR_NO_DIR_CREATE        "Falha na criação de diretórios"
797  #define ERR_OUT_OF_MEMORY        "Memória insuficiente"
798  #define ERR_NOT_IN_SEARCH_PATH   "Entrada não encontrada no caminho de busca"
799  #define ERR_NOT_SUPPORTED        "Operação não suportada"
800  #define ERR_UNSUPPORTED_ARCHIVE  "Tipo de arquivo não suportado"
801  #define ERR_NOT_A_HANDLE         "Não é um handler de arquivo"
802  #define ERR_INSECURE_FNAME       "Nome de arquivo inseguro"
803  #define ERR_SYMLINK_DISALLOWED   "Links simbólicos desabilitados"
804  #define ERR_NO_WRITE_DIR         "Diretório de escrita não definido"
805  #define ERR_NO_SUCH_FILE         "Arquivo não encontrado"
806  #define ERR_NO_SUCH_PATH         "Caminho não encontrado"
807  #define ERR_NO_SUCH_VOLUME       "Volume não encontrado"
808  #define ERR_PAST_EOF             "Passou o fim do arquivo"
809  #define ERR_ARC_IS_READ_ONLY     "Arquivo é somente de leitura"
810  #define ERR_IO_ERROR             "Erro de E/S"
811  #define ERR_CANT_SET_WRITE_DIR   "Não foi possível definir diretório de escrita"
812  #define ERR_SYMLINK_LOOP         "Loop infinito de link simbólico"
813  #define ERR_COMPRESSION          "Erro de (Des)compressão"
814  #define ERR_NOT_IMPLEMENTED      "Não implementado"
815  #define ERR_OS_ERROR             "Erro reportado pelo Sistema Operacional"
816  #define ERR_FILE_EXISTS          "Arquivo já existente"
817  #define ERR_NOT_A_FILE           "Não é um arquivo"
818  #define ERR_NOT_A_DIR            "Não é um diretório"
819  #define ERR_NOT_AN_ARCHIVE       "Não é um pacote"
820  #define ERR_CORRUPTED            "Pacote corrompido"
821  #define ERR_SEEK_OUT_OF_RANGE    "Posicionamento além do tamanho"
822  #define ERR_BAD_FILENAME         "Nome de arquivo inválido"
823  #define ERR_PHYSFS_BAD_OS_CALL   "(BUG) PhysicsFS realizou uma chamada de sistema inválida"
824  #define ERR_ARGV0_IS_NULL        "argv0 é NULL"
825  #define ERR_NEED_DICT            "precisa de diretório"
826  #define ERR_DATA_ERROR           "erro nos dados"
827  #define ERR_MEMORY_ERROR         "erro de memória"
828  #define ERR_BUFFER_ERROR         "erro de buffer"
829  #define ERR_VERSION_ERROR        "erro na version"
830  #define ERR_UNKNOWN_ERROR        "erro desconhecido"
831  #define ERR_SEARCHPATH_TRUNC     "Caminho de procura quebrado"
832  #define ERR_GETMODFN_TRUNC       "GetModuleFileName() foi quebrado"
833  #define ERR_GETMODFN_NO_DIR      "GetModuleFileName() nao teve diretório"
834  #define ERR_DISK_FULL            "Disco cheio"
835  #define ERR_DIRECTORY_FULL       "Diretório cheio"
836  #define ERR_MACOS_GENERIC        "MacOS reportou um erro (%d)"
837  #define ERR_OS2_GENERIC          "OS/2 reportou um erro (%d)"
838  #define ERR_VOL_LOCKED_HW        "Volume travado por hardware"
839  #define ERR_VOL_LOCKED_SW        "Volume travado por software"
840  #define ERR_FILE_LOCKED          "Arquivo travado"
841  #define ERR_FILE_OR_DIR_BUSY     "Arquivo/Diretório está em uso"
842  #define ERR_FILE_ALREADY_OPEN_W  "Arquivo já aberto para escrita"
843  #define ERR_FILE_ALREADY_OPEN_R  "Arquivo já aberto para leitura"
844  #define ERR_INVALID_REFNUM       "Número de referência"
845  #define ERR_GETTING_FILE_POS     "Erro ao tentar obter posição do arquivo"
846  #define ERR_VOLUME_OFFLINE       "Volume está indisponível"
847  #define ERR_PERMISSION_DENIED    "Permissão negada"
848  #define ERR_VOL_ALREADY_ONLINE   "Volume disponível"
849  #define ERR_NO_SUCH_DRIVE        "Drive inexistente"
850  #define ERR_NOT_MAC_DISK         "Não é um disco Macintosh"
851  #define ERR_VOL_EXTERNAL_FS      "Volume pertence a um sistema de arquivos externo"
852  #define ERR_PROBLEM_RENAME       "Problema durante renomeação"
853  #define ERR_BAD_MASTER_BLOCK     "Bloco master do diretório inválido"
854  #define ERR_CANT_MOVE_FORBIDDEN  "Tentativa de mover proibida"
855  #define ERR_WRONG_VOL_TYPE       "Tipo inválido de volume"
856  #define ERR_SERVER_VOL_LOST      "Volume servidor desconectado"
857  #define ERR_FILE_ID_NOT_FOUND    "ID de Arquivo não encontrado"
858  #define ERR_FILE_ID_EXISTS       "ID de Arquivo já existente"
859  #define ERR_SERVER_NO_RESPOND    "Servidor não respondendo"
860  #define ERR_USER_AUTH_FAILED     "Autenticação de usuário falhada"
861  #define ERR_PWORD_EXPIRED        "Password foi expirada no servidor"
862  #define ERR_ACCESS_DENIED        "Accesso negado"
863  #define ERR_NOT_A_DOS_DISK       "Não é um disco DOS"
864  #define ERR_SHARING_VIOLATION    "Violação de compartilhamento"
865  #define ERR_CANNOT_MAKE          "Não pode ser feito"
866  #define ERR_DEV_IN_USE           "Device já em uso"
867  #define ERR_OPEN_FAILED          "Falaha na abertura"
868  #define ERR_PIPE_BUSY            "Fila ocupada"
869  #define ERR_SHARING_BUF_EXCEEDED "Buffer de compartilhamento excedeu"
870  #define ERR_TOO_MANY_HANDLES     "Muitos handles abertos"
871  #define ERR_SEEK_ERROR           "Erro de posicionamento"
872  #define ERR_DEL_CWD              "Tentando remover diretório de trabalho atual"
873  #define ERR_WRITE_PROTECT_ERROR  "Erro de proteção de escrita"
874  #define ERR_WRITE_FAULT          "Erro de escrita"
875  #define ERR_LOCK_VIOLATION       "Violação de trava"
876  #define ERR_GEN_FAILURE          "Falha geral"
877  #define ERR_UNCERTAIN_MEDIA      "Media incerta"
878  #define ERR_PROT_VIOLATION       "Violação de proteção"
879  #define ERR_BROKEN_PIPE          "Fila quebrada"
880
881 #elif (PHYSFS_LANG == PHYSFS_LANG_SPANISH)
882  #define DIR_ARCHIVE_DESCRIPTION  "No es un archivo, E/S directa al sistema de ficheros"
883  #define GRP_ARCHIVE_DESCRIPTION  "Formato Build engine Groupfile"
884  #define HOG_ARCHIVE_DESCRIPTION  "Formato Descent I/II HOG file"
885  #define MVL_ARCHIVE_DESCRIPTION  "Formato Descent II Movielib"
886  #define QPAK_ARCHIVE_DESCRIPTION "Formato Quake I/II"
887  #define ZIP_ARCHIVE_DESCRIPTION  "Compatible con PkZip/WinZip/Info-Zip"
888  #define WAD_ARCHIVE_DESCRIPTION  "DOOM engine format" /* !!! FIXME: translate this line if needed */
889  #define LZMA_ARCHIVE_DESCRIPTION "LZMA (7zip) format" /* !!! FIXME: translate this line if needed */
890
891  #define ERR_IS_INITIALIZED       "Ya estaba inicializado"
892  #define ERR_NOT_INITIALIZED      "No está inicializado"
893  #define ERR_INVALID_ARGUMENT     "Argumento inválido"
894  #define ERR_FILES_STILL_OPEN     "Archivos aún abiertos"
895  #define ERR_NO_DIR_CREATE        "Fallo al crear los directorios"
896  #define ERR_OUT_OF_MEMORY        "Memoria agotada"
897  #define ERR_NOT_IN_SEARCH_PATH   "No existe tal entrada en la ruta de búsqueda"
898  #define ERR_NOT_SUPPORTED        "Operación no soportada"
899  #define ERR_UNSUPPORTED_ARCHIVE  "Tipo de archivo no soportado"
900  #define ERR_NOT_A_HANDLE         "No es un manejador de ficheo (file handle)"
901  #define ERR_INSECURE_FNAME       "Nombre de archivo inseguro"
902  #define ERR_SYMLINK_DISALLOWED   "Los enlaces simbólicos están desactivados"
903  #define ERR_NO_WRITE_DIR         "No has configurado un directorio de escritura"
904  #define ERR_NO_SUCH_FILE         "Archivo no encontrado"
905  #define ERR_NO_SUCH_PATH         "Ruta no encontrada"
906  #define ERR_NO_SUCH_VOLUME       "Volumen no encontrado"
907  #define ERR_PAST_EOF             "Te pasaste del final del archivo"
908  #define ERR_ARC_IS_READ_ONLY     "El archivo es de sólo lectura"
909  #define ERR_IO_ERROR             "Error E/S"
910  #define ERR_CANT_SET_WRITE_DIR   "No puedo configurar el directorio de escritura"
911  #define ERR_SYMLINK_LOOP         "Bucle infnito de enlaces simbólicos"
912  #define ERR_COMPRESSION          "Error de (des)compresión"
913  #define ERR_NOT_IMPLEMENTED      "No implementado"
914  #define ERR_OS_ERROR             "El sistema operativo ha devuelto un error"
915  #define ERR_FILE_EXISTS          "El archivo ya existe"
916  #define ERR_NOT_A_FILE           "No es un archivo"
917  #define ERR_NOT_A_DIR            "No es un directorio"
918  #define ERR_NOT_AN_ARCHIVE       "No es un archivo"
919  #define ERR_CORRUPTED            "Archivo corrupto"
920  #define ERR_SEEK_OUT_OF_RANGE    "Búsqueda fuera de rango"
921  #define ERR_BAD_FILENAME         "Nombre de archivo incorrecto"
922  #define ERR_PHYSFS_BAD_OS_CALL   "(BUG) PhysicsFS ha hecho una llamada incorrecta al sistema"
923  #define ERR_ARGV0_IS_NULL        "argv0 es NULL"
924  #define ERR_NEED_DICT            "necesito diccionario"
925  #define ERR_DATA_ERROR           "error de datos"
926  #define ERR_MEMORY_ERROR         "error de memoria"
927  #define ERR_BUFFER_ERROR         "error de buffer"
928  #define ERR_VERSION_ERROR        "error de versión"
929  #define ERR_UNKNOWN_ERROR        "error desconocido"
930  #define ERR_SEARCHPATH_TRUNC     "La ruta de búsqueda ha sido truncada"
931  #define ERR_GETMODFN_TRUNC       "GetModuleFileName() ha sido truncado"
932  #define ERR_GETMODFN_NO_DIR      "GetModuleFileName() no tenia directorio"
933  #define ERR_DISK_FULL            "El disco está lleno"
934  #define ERR_DIRECTORY_FULL       "El directorio está lleno"
935  #define ERR_MACOS_GENERIC        "MacOS ha devuelto un error (%d)"
936  #define ERR_OS2_GENERIC          "OS/2 ha devuelto un error (%d)"
937  #define ERR_VOL_LOCKED_HW        "El volumen está bloqueado por el hardware"
938  #define ERR_VOL_LOCKED_SW        "El volumen está bloqueado por el software"
939  #define ERR_FILE_LOCKED          "El archivo está bloqueado"
940  #define ERR_FILE_OR_DIR_BUSY     "Fichero o directorio ocupados"
941  #define ERR_FILE_ALREADY_OPEN_W  "Fichero ya abierto para escritura"
942  #define ERR_FILE_ALREADY_OPEN_R  "Fichero ya abierto para lectura"
943  #define ERR_INVALID_REFNUM       "El número de referencia no es válido"
944  #define ERR_GETTING_FILE_POS     "Error al tomar la posición del fichero"
945  #define ERR_VOLUME_OFFLINE       "El volumen está desconectado"
946  #define ERR_PERMISSION_DENIED    "Permiso denegado"
947  #define ERR_VOL_ALREADY_ONLINE   "El volumen ya estaba conectado"
948  #define ERR_NO_SUCH_DRIVE        "No existe tal unidad"
949  #define ERR_NOT_MAC_DISK         "No es un disco Macintosh"
950  #define ERR_VOL_EXTERNAL_FS      "El volumen pertence a un sistema de ficheros externo"
951  #define ERR_PROBLEM_RENAME       "Problemas al renombrar"
952  #define ERR_BAD_MASTER_BLOCK     "Bloque maestro de directorios incorrecto"
953  #define ERR_CANT_MOVE_FORBIDDEN  "Intento de mover forbidden"
954  #define ERR_WRONG_VOL_TYPE       "Tipo de volumen incorrecto"
955  #define ERR_SERVER_VOL_LOST      "El servidor de volúmenes ha sido desconectado"
956  #define ERR_FILE_ID_NOT_FOUND    "Identificador de archivo no encontrado"
957  #define ERR_FILE_ID_EXISTS       "El identificador de archivo ya existe"
958  #define ERR_SERVER_NO_RESPOND    "El servidor no responde"
959  #define ERR_USER_AUTH_FAILED     "Fallo al autentificar el usuario"
960  #define ERR_PWORD_EXPIRED        "La Password  en el servidor ha caducado"
961  #define ERR_ACCESS_DENIED        "Acceso denegado"
962  #define ERR_NOT_A_DOS_DISK       "No es un disco de DOS"
963  #define ERR_SHARING_VIOLATION    "Violación al compartir"
964  #define ERR_CANNOT_MAKE          "No puedo hacer make"
965  #define ERR_DEV_IN_USE           "El dispositivo ya estaba en uso"
966  #define ERR_OPEN_FAILED          "Fallo al abrir"
967  #define ERR_PIPE_BUSY            "Tubería ocupada"
968  #define ERR_SHARING_BUF_EXCEEDED "Buffer de compartición sobrepasado"
969  #define ERR_TOO_MANY_HANDLES     "Demasiados manejadores (handles)"
970  #define ERR_SEEK_ERROR           "Error de búsqueda"
971  #define ERR_DEL_CWD              "Intentando borrar el directorio de trabajo actual"
972  #define ERR_WRITE_PROTECT_ERROR  "Error de protección contra escritura"
973  #define ERR_WRITE_FAULT          "Fallo al escribir"
974  #define ERR_LOCK_VIOLATION       "Violación del bloqueo"
975  #define ERR_GEN_FAILURE          "Fallo general"
976  #define ERR_UNCERTAIN_MEDIA      "Medio incierto"
977  #define ERR_PROT_VIOLATION       "Violación de la protección"
978  #define ERR_BROKEN_PIPE          "Tubería rota"
979
980 #else
981  #error Please define PHYSFS_LANG.
982 #endif
983
984 /* end LANG section. */
985
986 struct __PHYSFS_DIRHANDLE__;
987 struct __PHYSFS_FILEFUNCTIONS__;
988
989
990 /* !!! FIXME: find something better than "dvoid" and "fvoid" ... */
991 /* Opaque data for file and dir handlers... */
992 typedef void dvoid;
993 typedef void fvoid;
994
995
996 typedef struct
997 {
998         /*
999          * Basic info about this archiver...
1000          */
1001     const PHYSFS_ArchiveInfo *info;
1002
1003
1004     /*
1005      * DIRECTORY ROUTINES:
1006      * These functions are for dir handles. Generate a handle with the
1007      *  openArchive() method, then pass it as the "opaque" dvoid to the
1008      *  others.
1009      *
1010      * Symlinks should always be followed; PhysicsFS will use the
1011      *  isSymLink() method and make a judgement on whether to
1012      *  continue to call other methods based on that.
1013      */
1014
1015
1016         /*
1017          * Returns non-zero if (filename) is a valid archive that this
1018          *  driver can handle. This filename is in platform-dependent
1019          *  notation. forWriting is non-zero if this is to be used for
1020          *  the write directory, and zero if this is to be used for an
1021          *  element of the search path.
1022          */
1023     int (*isArchive)(const char *filename, int forWriting);
1024
1025         /*
1026          * Open a dirhandle for dir/archive (name).
1027          *  This filename is in platform-dependent notation.
1028          *  forWriting is non-zero if this is to be used for
1029          *  the write directory, and zero if this is to be used for an
1030          *  element of the search path.
1031          * Returns NULL on failure, and calls __PHYSFS_setError().
1032          *  Returns non-NULL on success. The pointer returned will be
1033          *  passed as the "opaque" parameter for later calls.
1034          */
1035     void *(*openArchive)(const char *name, int forWriting);
1036
1037         /*
1038          * List all files in (dirname). Each file is passed to (callback),
1039          *  where a copy is made if appropriate, so you should dispose of
1040          *  it properly upon return from the callback.
1041          * You should omit symlinks if (omitSymLinks) is non-zero.
1042          * If you have a failure, report as much as you can.
1043          *  (dirname) is in platform-independent notation.
1044          */
1045     void (*enumerateFiles)(dvoid *opaque,
1046                             const char *dirname,
1047                             int omitSymLinks,
1048                             PHYSFS_EnumFilesCallback callback,
1049                             const char *origdir,
1050                             void *callbackdata);
1051
1052         /*
1053          * Returns non-zero if filename can be opened for reading.
1054          *  This filename is in platform-independent notation.
1055          *  You should not follow symlinks.
1056          */
1057     int (*exists)(dvoid *opaque, const char *name);
1058
1059         /*
1060          * Returns non-zero if filename is really a directory.
1061          *  This filename is in platform-independent notation.
1062          *  Symlinks should be followed; if what the symlink points
1063          *  to is missing, or isn't a directory, then the retval is zero.
1064          *
1065          * Regardless of success or failure, please set *fileExists to
1066          *  non-zero if the file existed (even if it's a broken symlink!),
1067          *  zero if it did not.
1068          */
1069     int (*isDirectory)(dvoid *opaque, const char *name, int *fileExists);
1070
1071         /*
1072          * Returns non-zero if filename is really a symlink.
1073          *  This filename is in platform-independent notation.
1074          *
1075          * Regardless of success or failure, please set *fileExists to
1076          *  non-zero if the file existed (even if it's a broken symlink!),
1077          *  zero if it did not.
1078          */
1079     int (*isSymLink)(dvoid *opaque, const char *name, int *fileExists);
1080
1081         /*
1082          * Retrieve the last modification time (mtime) of a file.
1083          *  Returns -1 on failure, or the file's mtime in seconds since
1084          *  the epoch (Jan 1, 1970) on success.
1085          *  This filename is in platform-independent notation.
1086          *
1087          * Regardless of success or failure, please set *exists to
1088          *  non-zero if the file existed (even if it's a broken symlink!),
1089          *  zero if it did not.
1090          */
1091     PHYSFS_sint64 (*getLastModTime)(dvoid *opaque, const char *fnm, int *exist);
1092
1093         /*
1094          * Open file for reading.
1095          *  This filename is in platform-independent notation.
1096          * If you can't handle multiple opens of the same file,
1097          *  you can opt to fail for the second call.
1098          * Fail if the file does not exist.
1099          * Returns NULL on failure, and calls __PHYSFS_setError().
1100          *  Returns non-NULL on success. The pointer returned will be
1101          *  passed as the "opaque" parameter for later file calls.
1102          *
1103          * Regardless of success or failure, please set *fileExists to
1104          *  non-zero if the file existed (even if it's a broken symlink!),
1105          *  zero if it did not.
1106          */
1107     fvoid *(*openRead)(dvoid *opaque, const char *fname, int *fileExists);
1108
1109         /*
1110          * Open file for writing.
1111          * If the file does not exist, it should be created. If it exists,
1112          *  it should be truncated to zero bytes. The writing
1113          *  offset should be the start of the file.
1114          * This filename is in platform-independent notation.
1115          * If you can't handle multiple opens of the same file,
1116          *  you can opt to fail for the second call.
1117          * Returns NULL on failure, and calls __PHYSFS_setError().
1118          *  Returns non-NULL on success. The pointer returned will be
1119          *  passed as the "opaque" parameter for later file calls.
1120          */
1121     fvoid *(*openWrite)(dvoid *opaque, const char *filename);
1122
1123         /*
1124          * Open file for appending.
1125          * If the file does not exist, it should be created. The writing
1126          *  offset should be the end of the file.
1127          * This filename is in platform-independent notation.
1128          * If you can't handle multiple opens of the same file,
1129          *  you can opt to fail for the second call.
1130          * Returns NULL on failure, and calls __PHYSFS_setError().
1131          *  Returns non-NULL on success. The pointer returned will be
1132          *  passed as the "opaque" parameter for later file calls.
1133          */
1134     fvoid *(*openAppend)(dvoid *opaque, const char *filename);
1135
1136         /*
1137          * Delete a file in the archive/directory.
1138          *  Return non-zero on success, zero on failure.
1139          *  This filename is in platform-independent notation.
1140          *  This method may be NULL.
1141          * On failure, call __PHYSFS_setError().
1142          */
1143     int (*remove)(dvoid *opaque, const char *filename);
1144
1145         /*
1146          * Create a directory in the archive/directory.
1147          *  If the application is trying to make multiple dirs, PhysicsFS
1148          *  will split them up into multiple calls before passing them to
1149          *  your driver.
1150          *  Return non-zero on success, zero on failure.
1151          *  This filename is in platform-independent notation.
1152          *  This method may be NULL.
1153          * On failure, call __PHYSFS_setError().
1154          */
1155     int (*mkdir)(dvoid *opaque, const char *filename);
1156
1157         /*
1158          * Close directories/archives, and free any associated memory,
1159          *  including (opaque) itself if applicable. Implementation can assume
1160          *  that it won't be called if there are still files open from
1161          *  this archive.
1162          */
1163     void (*dirClose)(dvoid *opaque);
1164
1165
1166
1167     /*
1168      * FILE ROUTINES:
1169      * These functions are for file handles generated by the open*() methods.
1170      *  They are distinguished by taking a "fvoid" instead of a "dvoid" for
1171      *  the opaque handle.
1172      */
1173
1174         /*
1175          * Read more from the file.
1176          * Returns number of objects of (objSize) bytes read from file, -1
1177          *  if complete failure.
1178          * On failure, call __PHYSFS_setError().
1179          */
1180     PHYSFS_sint64 (*read)(fvoid *opaque, void *buffer,
1181                           PHYSFS_uint32 objSize, PHYSFS_uint32 objCount);
1182
1183         /*
1184          * Write more to the file. Archives don't have to implement this.
1185          *  (Set it to NULL if not implemented).
1186          * Returns number of objects of (objSize) bytes written to file, -1
1187          *  if complete failure.
1188          * On failure, call __PHYSFS_setError().
1189          */
1190     PHYSFS_sint64 (*write)(fvoid *opaque, const void *buffer,
1191                  PHYSFS_uint32 objSize, PHYSFS_uint32 objCount);
1192
1193         /*
1194          * Returns non-zero if at end of file.
1195          */
1196     int (*eof)(fvoid *opaque);
1197
1198         /*
1199          * Returns byte offset from start of file.
1200          */
1201     PHYSFS_sint64 (*tell)(fvoid *opaque);
1202
1203         /*
1204          * Move read/write pointer to byte offset from start of file.
1205          *  Returns non-zero on success, zero on error.
1206          * On failure, call __PHYSFS_setError().
1207          */
1208     int (*seek)(fvoid *opaque, PHYSFS_uint64 offset);
1209
1210         /*
1211          * Return number of bytes available in the file, or -1 if you
1212          *  aren't able to determine.
1213          * On failure, call __PHYSFS_setError().
1214          */
1215     PHYSFS_sint64 (*fileLength)(fvoid *opaque);
1216
1217         /*
1218          * Close the file, and free associated resources, including (opaque)
1219          *  if applicable. Returns non-zero on success, zero if can't close
1220          *  file. On failure, call __PHYSFS_setError().
1221          */
1222     int (*fileClose)(fvoid *opaque);
1223 } PHYSFS_Archiver;
1224
1225
1226 /*
1227  * Call this to set the message returned by PHYSFS_getLastError().
1228  *  Please only use the ERR_* constants above, or add new constants to the
1229  *  above group, but I want these all in one place.
1230  *
1231  * Calling this with a NULL argument is a safe no-op.
1232  */
1233 void __PHYSFS_setError(const char *err);
1234
1235
1236 /*
1237  * Convert (dirName) to platform-dependent notation, then prepend (prepend)
1238  *  and append (append) to the converted string.
1239  *
1240  *  So, on Win32, calling:
1241  *     __PHYSFS_convertToDependent("C:\", "my/files", NULL);
1242  *  ...will return the string "C:\my\files".
1243  *
1244  * This is a convenience function; you might want to hack something out that
1245  *  is less generic (and therefore more efficient).
1246  *
1247  * Be sure to free() the return value when done with it.
1248  */
1249 char *__PHYSFS_convertToDependent(const char *prepend,
1250                                   const char *dirName,
1251                                   const char *append);
1252
1253
1254 /* This byteorder stuff was lifted from SDL. http://www.libsdl.org/ */
1255 #define PHYSFS_LIL_ENDIAN  1234
1256 #define PHYSFS_BIG_ENDIAN  4321
1257
1258 #if  defined(__i386__) || defined(__ia64__) || defined(WIN32) || \
1259     (defined(__alpha__) || defined(__alpha)) || \
1260      defined(__arm__) || defined(ARM) || \
1261     (defined(__mips__) && defined(__MIPSEL__)) || \
1262      defined(__SYMBIAN32__) || \
1263      defined(__x86_64__) || \
1264      defined(__LITTLE_ENDIAN__)
1265 #define PHYSFS_BYTEORDER    PHYSFS_LIL_ENDIAN
1266 #else
1267 #define PHYSFS_BYTEORDER    PHYSFS_BIG_ENDIAN
1268 #endif
1269
1270
1271 /*
1272  * When sorting the entries in an archive, we use a modified QuickSort.
1273  *  When there are less then PHYSFS_QUICKSORT_THRESHOLD entries left to sort,
1274  *  we switch over to a BubbleSort for the remainder. Tweak to taste.
1275  *
1276  * You can override this setting by defining PHYSFS_QUICKSORT_THRESHOLD
1277  *  before #including "physfs_internal.h".
1278  */
1279 #ifndef PHYSFS_QUICKSORT_THRESHOLD
1280 #define PHYSFS_QUICKSORT_THRESHOLD 4
1281 #endif
1282
1283 /*
1284  * Sort an array (or whatever) of (max) elements. This uses a mixture of
1285  *  a QuickSort and BubbleSort internally.
1286  * (cmpfn) is used to determine ordering, and (swapfn) does the actual
1287  *  swapping of elements in the list.
1288  *
1289  *  See zip.c for an example.
1290  */
1291 void __PHYSFS_sort(void *entries, PHYSFS_uint32 max,
1292                    int (*cmpfn)(void *, PHYSFS_uint32, PHYSFS_uint32),
1293                    void (*swapfn)(void *, PHYSFS_uint32, PHYSFS_uint32));
1294
1295
1296 /* These get used all over for lessening code clutter. */
1297 #define BAIL_MACRO(e, r) { __PHYSFS_setError(e); return r; }
1298 #define BAIL_IF_MACRO(c, e, r) if (c) { __PHYSFS_setError(e); return r; }
1299 #define BAIL_MACRO_MUTEX(e, m, r) { __PHYSFS_setError(e); __PHYSFS_platformReleaseMutex(m); return r; }
1300 #define BAIL_IF_MACRO_MUTEX(c, e, m, r) if (c) { __PHYSFS_setError(e); __PHYSFS_platformReleaseMutex(m); return r; }
1301 #define GOTO_MACRO(e, g) { __PHYSFS_setError(e); goto g; }
1302 #define GOTO_IF_MACRO(c, e, g) if (c) { __PHYSFS_setError(e); goto g; }
1303 #define GOTO_MACRO_MUTEX(e, m, g) { __PHYSFS_setError(e); __PHYSFS_platformReleaseMutex(m); goto g; }
1304 #define GOTO_IF_MACRO_MUTEX(c, e, m, g) if (c) { __PHYSFS_setError(e); __PHYSFS_platformReleaseMutex(m); goto g; }
1305
1306 #define __PHYSFS_ARRAYLEN(x) ( (sizeof (x)) / (sizeof (x[0])) )
1307
1308 #if (defined __GNUC__)
1309 #define __PHYSFS_SI64(x) x##LL
1310 #define __PHYSFS_UI64(x) x##ULL
1311 #elif (defined _MSC_VER)
1312 #define __PHYSFS_SI64(x) x##i64
1313 #define __PHYSFS_UI64(x) x##ui64
1314 #else
1315 #define __PHYSFS_SI64(x) x
1316 #define __PHYSFS_UI64(x) x
1317 #endif
1318
1319 /*
1320  * Check if a ui64 will fit in the platform's address space.
1321  *  The initial sizeof check will optimize this macro out entirely on
1322  *  64-bit (and larger?!) platforms, and the other condition will
1323  *  return zero or non-zero if the variable will fit in the platform's
1324  *  size_t, suitable to pass to malloc. This is kinda messy, but effective.
1325  */
1326 #define __PHYSFS_ui64FitsAddressSpace(s) ( \
1327     (sizeof (PHYSFS_uint64) > sizeof (size_t)) && \
1328     ((s) > (__PHYSFS_UI64(0xFFFFFFFFFFFFFFFF) >> (64-(sizeof(size_t)*8)))) \
1329 )
1330
1331 /*
1332  * This is a strcasecmp() or stricmp() replacement that expects both strings
1333  *  to be in UTF-8 encoding. It will do "case folding" to decide if the
1334  *  Unicode codepoints in the strings match.
1335  *
1336  * It will report which string is "greater than" the other, but be aware that
1337  *  this doesn't necessarily mean anything: 'a' may be "less than" 'b', but
1338  *  a random Kanji codepoint has no meaningful alphabetically relationship to
1339  *  a Greek Lambda, but being able to assign a reliable "value" makes sorting
1340  *  algorithms possible, if not entirely sane. Most cases should treat the
1341  *  return value as "equal" or "not equal".
1342  */
1343 int __PHYSFS_utf8strcasecmp(const char *s1, const char *s2);
1344
1345 /*
1346  * This works like __PHYSFS_utf8strcasecmp(), but takes a character (NOT BYTE
1347  *  COUNT) argument, like strcasencmp().
1348  */
1349 int __PHYSFS_utf8strnicmp(const char *s1, const char *s2, PHYSFS_uint32 l);
1350
1351 /*
1352  * stricmp() that guarantees to only work with low ASCII. The C runtime
1353  *  stricmp() might try to apply a locale/codepage/etc, which we don't want.
1354  */
1355 int __PHYSFS_stricmpASCII(const char *s1, const char *s2);
1356
1357 /*
1358  * strnicmp() that guarantees to only work with low ASCII. The C runtime
1359  *  strnicmp() might try to apply a locale/codepage/etc, which we don't want.
1360  */
1361 int __PHYSFS_strnicmpASCII(const char *s1, const char *s2, PHYSFS_uint32 l);
1362
1363
1364 /*
1365  * The current allocator. Not valid before PHYSFS_init is called!
1366  */
1367 extern PHYSFS_Allocator __PHYSFS_AllocatorHooks;
1368
1369 /* convenience macro to make this less cumbersome internally... */
1370 #define allocator __PHYSFS_AllocatorHooks
1371
1372 /*--------------------------------------------------------------------------*/
1373 /*--------------------------------------------------------------------------*/
1374 /*------------                                              ----------------*/
1375 /*------------  You MUST implement the following functions  ----------------*/
1376 /*------------        if porting to a new platform.         ----------------*/
1377 /*------------     (see platform/unix.c for an example)     ----------------*/
1378 /*------------                                              ----------------*/
1379 /*--------------------------------------------------------------------------*/
1380 /*--------------------------------------------------------------------------*/
1381
1382
1383 /*
1384  * The dir separator; "/" on unix, "\\" on win32, ":" on MacOS, etc...
1385  *  Obviously, this isn't a function, but it IS a null-terminated string.
1386  */
1387 extern const char *__PHYSFS_platformDirSeparator;
1388
1389
1390 /*
1391  * Initialize the platform. This is called when PHYSFS_init() is called from
1392  *  the application. You can use this to (for example) determine what version
1393  *  of Windows you're running.
1394  *
1395  * Return zero if there was a catastrophic failure (which prevents you from
1396  *  functioning at all), and non-zero otherwise.
1397  */
1398 int __PHYSFS_platformInit(void);
1399
1400
1401 /*
1402  * Deinitialize the platform. This is called when PHYSFS_deinit() is called
1403  *  from the application. You can use this to clean up anything you've
1404  *  allocated in your platform driver.
1405  *
1406  * Return zero if there was a catastrophic failure (which prevents you from
1407  *  functioning at all), and non-zero otherwise.
1408  */
1409 int __PHYSFS_platformDeinit(void);
1410
1411
1412 /*
1413  * Open a file for reading. (filename) is in platform-dependent notation. The
1414  *  file pointer should be positioned on the first byte of the file.
1415  *
1416  * The return value will be some platform-specific datatype that is opaque to
1417  *  the caller; it could be a (FILE *) under Unix, or a (HANDLE *) under win32.
1418  *
1419  * The same file can be opened for read multiple times, and each should have
1420  *  a unique file handle; this is frequently employed to prevent race
1421  *  conditions in the archivers.
1422  *
1423  * Call __PHYSFS_setError() and return (NULL) if the file can't be opened.
1424  */
1425 void *__PHYSFS_platformOpenRead(const char *filename);
1426
1427
1428 /*
1429  * Open a file for writing. (filename) is in platform-dependent notation. If
1430  *  the file exists, it should be truncated to zero bytes, and if it doesn't
1431  *  exist, it should be created as a zero-byte file. The file pointer should
1432  *  be positioned on the first byte of the file.
1433  *
1434  * The return value will be some platform-specific datatype that is opaque to
1435  *  the caller; it could be a (FILE *) under Unix, or a (HANDLE *) under win32,
1436  *  etc.
1437  *
1438  * Opening a file for write multiple times has undefined results.
1439  *
1440  * Call __PHYSFS_setError() and return (NULL) if the file can't be opened.
1441  */
1442 void *__PHYSFS_platformOpenWrite(const char *filename);
1443
1444
1445 /*
1446  * Open a file for appending. (filename) is in platform-dependent notation. If
1447  *  the file exists, the file pointer should be place just past the end of the
1448  *  file, so that the first write will be one byte after the current end of
1449  *  the file. If the file doesn't exist, it should be created as a zero-byte
1450  *  file. The file pointer should be positioned on the first byte of the file.
1451  *
1452  * The return value will be some platform-specific datatype that is opaque to
1453  *  the caller; it could be a (FILE *) under Unix, or a (HANDLE *) under win32,
1454  *  etc.
1455  *
1456  * Opening a file for append multiple times has undefined results.
1457  *
1458  * Call __PHYSFS_setError() and return (NULL) if the file can't be opened.
1459  */
1460 void *__PHYSFS_platformOpenAppend(const char *filename);
1461
1462
1463 /*
1464  * Read more data from a platform-specific file handle. (opaque) should be
1465  *  cast to whatever data type your platform uses. Read a maximum of (count)
1466  *  objects of (size) 8-bit bytes to the area pointed to by (buffer). If there
1467  *  isn't enough data available, return the number of full objects read, and
1468  *  position the file pointer at the start of the first incomplete object.
1469  *  On success, return (count) and position the file pointer one byte past
1470  *  the end of the last read object. Return (-1) if there is a catastrophic
1471  *  error, and call __PHYSFS_setError() to describe the problem; the file
1472  *  pointer should not move in such a case.
1473  */
1474 PHYSFS_sint64 __PHYSFS_platformRead(void *opaque, void *buffer,
1475                                     PHYSFS_uint32 size, PHYSFS_uint32 count);
1476
1477 /*
1478  * Write more data to a platform-specific file handle. (opaque) should be
1479  *  cast to whatever data type your platform uses. Write a maximum of (count)
1480  *  objects of (size) 8-bit bytes from the area pointed to by (buffer). If
1481  *  there isn't enough data available, return the number of full objects
1482  *  written, and position the file pointer at the start of the first
1483  *  incomplete object. Return (-1) if there is a catastrophic error, and call
1484  *  __PHYSFS_setError() to describe the problem; the file pointer should not
1485  *  move in such a case.
1486  */
1487 PHYSFS_sint64 __PHYSFS_platformWrite(void *opaque, const void *buffer,
1488                                      PHYSFS_uint32 size, PHYSFS_uint32 count);
1489
1490 /*
1491  * Set the file pointer to a new position. (opaque) should be cast to
1492  *  whatever data type your platform uses. (pos) specifies the number
1493  *  of 8-bit bytes to seek to from the start of the file. Seeking past the
1494  *  end of the file is an error condition, and you should check for it.
1495  *
1496  * Not all file types can seek; this is to be expected by the caller.
1497  *
1498  * On error, call __PHYSFS_setError() and return zero. On success, return
1499  *  a non-zero value.
1500  */
1501 int __PHYSFS_platformSeek(void *opaque, PHYSFS_uint64 pos);
1502
1503
1504 /*
1505  * Get the file pointer's position, in an 8-bit byte offset from the start of
1506  *  the file. (opaque) should be cast to whatever data type your platform
1507  *  uses.
1508  *
1509  * Not all file types can "tell"; this is to be expected by the caller.
1510  *
1511  * On error, call __PHYSFS_setError() and return zero. On success, return
1512  *  a non-zero value.
1513  */
1514 PHYSFS_sint64 __PHYSFS_platformTell(void *opaque);
1515
1516
1517 /*
1518  * Determine the current size of a file, in 8-bit bytes, from an open file.
1519  *
1520  * The caller expects that this information may not be available for all
1521  *  file types on all platforms.
1522  *
1523  * Return -1 if you can't do it, and call __PHYSFS_setError(). Otherwise,
1524  *  return the file length in 8-bit bytes.
1525  */
1526 PHYSFS_sint64 __PHYSFS_platformFileLength(void *handle);
1527
1528 /*
1529  * Determine if a file is at EOF. (opaque) should be cast to whatever data
1530  *  type your platform uses.
1531  *
1532  * The caller expects that there was a short read before calling this.
1533  *
1534  * Return non-zero if EOF, zero if it is _not_ EOF.
1535  */
1536 int __PHYSFS_platformEOF(void *opaque);
1537
1538 /*
1539  * Flush any pending writes to disk. (opaque) should be cast to whatever data
1540  *  type your platform uses. Be sure to check for errors; the caller expects
1541  *  that this function can fail if there was a flushing error, etc.
1542  *
1543  *  Return zero on failure, non-zero on success.
1544  */
1545 int __PHYSFS_platformFlush(void *opaque);
1546
1547 /*
1548  * Flush and close a file. (opaque) should be cast to whatever data type
1549  *  your platform uses. Be sure to check for errors when closing; the
1550  *  caller expects that this function can fail if there was a flushing
1551  *  error, etc.
1552  *
1553  * You should clean up all resources associated with (opaque).
1554  *
1555  *  Return zero on failure, non-zero on success.
1556  */
1557 int __PHYSFS_platformClose(void *opaque);
1558
1559 /*
1560  * Platform implementation of PHYSFS_getCdRomDirsCallback()...
1561  *  CD directories are discovered and reported to the callback one at a time.
1562  *  Pointers passed to the callback are assumed to be invalid to the
1563  *  application after the callback returns, so you can free them or whatever.
1564  *  Callback does not assume results will be sorted in any meaningful way.
1565  */
1566 void __PHYSFS_platformDetectAvailableCDs(PHYSFS_StringCallback cb, void *data);
1567
1568 /*
1569  * Calculate the base dir, if your platform needs special consideration.
1570  *  Just return NULL if the standard routines will suffice. (see
1571  *  calculateBaseDir() in physfs.c ...)
1572  *  Caller will free() the retval if it's not NULL.
1573  */
1574 char *__PHYSFS_platformCalcBaseDir(const char *argv0);
1575
1576 /*
1577  * Get the platform-specific user name.
1578  *  Caller will free() the retval if it's not NULL. If it's NULL, the username
1579  *  will default to "default".
1580  */
1581 char *__PHYSFS_platformGetUserName(void);
1582
1583 /*
1584  * Get the platform-specific user dir.
1585  *  Caller will free() the retval if it's not NULL. If it's NULL, the userdir
1586  *  will default to basedir/username.
1587  */
1588 char *__PHYSFS_platformGetUserDir(void);
1589
1590 /*
1591  * Return a number that uniquely identifies the current thread.
1592  *  On a platform without threading, (1) will suffice. These numbers are
1593  *  arbitrary; the only requirement is that no two threads have the same
1594  *  number.
1595  */
1596 PHYSFS_uint64 __PHYSFS_platformGetThreadID(void);
1597
1598 /*
1599  * Return non-zero if filename (in platform-dependent notation) exists.
1600  *  Symlinks should NOT be followed; at this stage, we do not care what the
1601  *  symlink points to. Please call __PHYSFS_SetError() with the details of
1602  *  why the file does not exist, if it doesn't; you are in a better position
1603  *  to know (path not found, bogus filename, file itself is missing, etc).
1604  */
1605 int __PHYSFS_platformExists(const char *fname);
1606
1607 /*
1608  * Return the last modified time (in seconds since the epoch) of a file.
1609  *  Returns -1 on failure. (fname) is in platform-dependent notation.
1610  *  Symlinks should be followed; if what the symlink points to is missing,
1611  *  then the retval is -1.
1612  */
1613 PHYSFS_sint64 __PHYSFS_platformGetLastModTime(const char *fname);
1614
1615 /*
1616  * Return non-zero if filename (in platform-dependent notation) is a symlink.
1617  */
1618 int __PHYSFS_platformIsSymLink(const char *fname);
1619
1620
1621 /*
1622  * Return non-zero if filename (in platform-dependent notation) is a symlink.
1623  *  Symlinks should be followed; if what the symlink points to is missing,
1624  *  or isn't a directory, then the retval is false.
1625  */
1626 int __PHYSFS_platformIsDirectory(const char *fname);
1627
1628
1629 /*
1630  * Convert (dirName) to platform-dependent notation, then prepend (prepend)
1631  *  and append (append) to the converted string.
1632  *
1633  *  So, on Win32, calling:
1634  *     __PHYSFS_platformCvtToDependent("C:\", "my/files", NULL);
1635  *  ...will return the string "C:\my\files".
1636  *
1637  * This can be implemented in a platform-specific manner, so you can get
1638  *  get a speed boost that the default implementation can't, since
1639  *  you can make assumptions about the size of strings, etc..
1640  *
1641  * Platforms that choose not to implement this may just call
1642  *  __PHYSFS_convertToDependent() as a passthrough, which may fit the bill
1643  *  already.
1644  *
1645  * Be sure to free() the return value when done with it.
1646  */
1647 char *__PHYSFS_platformCvtToDependent(const char *prepend,
1648                                       const char *dirName,
1649                                       const char *append);
1650
1651
1652 /*
1653  * Enumerate a directory of files. This follows the rules for the
1654  *  PHYSFS_Archiver->enumerateFiles() method (see above), except that the
1655  *  (dirName) that is passed to this function is converted to
1656  *  platform-DEPENDENT notation by the caller. The PHYSFS_Archiver version
1657  *  uses platform-independent notation. Note that ".", "..", and other
1658  *  metaentries should always be ignored.
1659  */
1660 void __PHYSFS_platformEnumerateFiles(const char *dirname,
1661                                      int omitSymLinks,
1662                                      PHYSFS_EnumFilesCallback callback,
1663                                      const char *origdir,
1664                                      void *callbackdata);
1665
1666
1667 /*
1668  * Get the current working directory. The return value should be an
1669  *  absolute path in platform-dependent notation. The caller will deallocate
1670  *  the return value with the standard C runtime free() function when it
1671  *  is done with it.
1672  * On error, return NULL and set the error message.
1673  */
1674 char *__PHYSFS_platformCurrentDir(void);
1675
1676
1677 /*
1678  * Get the real physical path to a file. (path) is specified in
1679  *  platform-dependent notation, as should your return value be.
1680  *  All relative paths should be removed, leaving you with an absolute
1681  *  path. Symlinks should be resolved, too, so that the returned value is
1682  *  the most direct path to a file.
1683  * The return value will be deallocated with the standard C runtime free()
1684  *  function when the caller is done with it.
1685  * On error, return NULL and set the error message.
1686  */
1687 char *__PHYSFS_platformRealPath(const char *path);
1688
1689
1690 /*
1691  * Make a directory in the actual filesystem. (path) is specified in
1692  *  platform-dependent notation. On error, return zero and set the error
1693  *  message. Return non-zero on success.
1694  */
1695 int __PHYSFS_platformMkDir(const char *path);
1696
1697
1698 /*
1699  * Remove a file or directory entry in the actual filesystem. (path) is
1700  *  specified in platform-dependent notation. Note that this deletes files
1701  *  _and_ directories, so you might need to do some determination.
1702  *  Non-empty directories should report an error and not delete themselves
1703  *  or their contents.
1704  *
1705  * Deleting a symlink should remove the link, not what it points to.
1706  *
1707  * On error, return zero and set the error message. Return non-zero on success.
1708  */
1709 int __PHYSFS_platformDelete(const char *path);
1710
1711
1712 /*
1713  * Create a platform-specific mutex. This can be whatever datatype your
1714  *  platform uses for mutexes, but it is cast to a (void *) for abstractness.
1715  *
1716  * Return (NULL) if you couldn't create one. Systems without threads can
1717  *  return any arbitrary non-NULL value.
1718  */
1719 void *__PHYSFS_platformCreateMutex(void);
1720
1721 /*
1722  * Destroy a platform-specific mutex, and clean up any resources associated
1723  *  with it. (mutex) is a value previously returned by
1724  *  __PHYSFS_platformCreateMutex(). This can be a no-op on single-threaded
1725  *  platforms.
1726  */
1727 void __PHYSFS_platformDestroyMutex(void *mutex);
1728
1729 /*
1730  * Grab possession of a platform-specific mutex. Mutexes should be recursive;
1731  *  that is, the same thread should be able to call this function multiple
1732  *  times in a row without causing a deadlock. This function should block 
1733  *  until a thread can gain possession of the mutex.
1734  *
1735  * Return non-zero if the mutex was grabbed, zero if there was an 
1736  *  unrecoverable problem grabbing it (this should not be a matter of 
1737  *  timing out! We're talking major system errors; block until the mutex 
1738  *  is available otherwise.)
1739  *
1740  * _DO NOT_ call __PHYSFS_setError() in here! Since setError calls this
1741  *  function, you'll cause an infinite recursion. This means you can't
1742  *  use the BAIL_*MACRO* macros, either.
1743  */
1744 int __PHYSFS_platformGrabMutex(void *mutex);
1745
1746 /*
1747  * Relinquish possession of the mutex when this method has been called 
1748  *  once for each time that platformGrabMutex was called. Once possession has
1749  *  been released, the next thread in line to grab the mutex (if any) may
1750  *  proceed.
1751  *
1752  * _DO NOT_ call __PHYSFS_setError() in here! Since setError calls this
1753  *  function, you'll cause an infinite recursion. This means you can't
1754  *  use the BAIL_*MACRO* macros, either.
1755  */
1756 void __PHYSFS_platformReleaseMutex(void *mutex);
1757
1758 /*
1759  * Called at the start of PHYSFS_init() to prepare the allocator, if the user
1760  *  hasn't selected their own allocator via PHYSFS_setAllocator().
1761  *  If the platform has a custom allocator, it should fill in the fields of
1762  *  (a) with the proper function pointers and return non-zero.
1763  * If the platform just wants to use malloc()/free()/etc, return zero
1764  *  immediately and the higher level will handle it. The Init and Deinit
1765  *  fields of (a) are optional...set them to NULL if you don't need them.
1766  *  Everything else must be implemented. All rules follow those for
1767  *  PHYSFS_setAllocator(). If Init isn't NULL, it will be called shortly
1768  *  after this function returns non-zero.
1769  */
1770 int __PHYSFS_platformSetDefaultAllocator(PHYSFS_Allocator *a);
1771
1772 #ifdef __cplusplus
1773 }
1774 #endif
1775
1776 #endif
1777
1778 /* end of physfs_internal.h ... */
1779