Skip to content

Latest commit

 

History

History
659 lines (524 loc) · 18.4 KB

qpak.c

File metadata and controls

659 lines (524 loc) · 18.4 KB
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
* QPAK support routines for PhysicsFS.
*
* This archiver handles the archive format utilized by Quake 1 and 2.
* Quake3-based games use the PkZip/Info-Zip format (which our zip.c
* archiver handles).
*
* ========================================================================
*
* This format info (in more detail) comes from:
* http://debian.fmi.uni-sofia.bg/~sergei/cgsr/docs/pak.txt
*
* Quake PAK Format
*
* Header
* (4 bytes) signature = 'PACK'
* (4 bytes) directory offset
* (4 bytes) directory length
*
* Directory
* (56 bytes) file name
* (4 bytes) file position
* (4 bytes) file length
*
* ========================================================================
*
* Please see the file LICENSE in the source's root directory.
*
* This file written by Ryan C. Gordon.
*/
#if HAVE_CONFIG_H
# include <config.h>
#endif
#if (defined PHYSFS_SUPPORTS_QPAK)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "physfs.h"
#define __PHYSICSFS_INTERNAL__
#include "physfs_internal.h"
Nov 9, 2003
Nov 9, 2003
46
47
48
49
50
51
52
53
54
#if 1 /* Make this case insensitive? */
#define QPAK_strcmp(x, y) __PHYSFS_platformStricmp(x, y)
#define QPAK_strncmp(x, y, z) __PHYSFS_platformStrnicmp(x, y, z)
#else
#define QPAK_strcmp(x, y) strcmp(x, y)
#define QPAK_strncmp(x, y, z) strncmp(x, y, z)
#endif
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
typedef struct
{
char name[56];
PHYSFS_uint32 startPos;
PHYSFS_uint32 size;
} QPAKentry;
typedef struct
{
char *filename;
PHYSFS_sint64 last_mod_time;
PHYSFS_uint32 entryCount;
QPAKentry *entries;
} QPAKinfo;
typedef struct
{
void *handle;
QPAKentry *entry;
PHYSFS_uint32 curPos;
} QPAKfileinfo;
/* Magic numbers... */
#define QPAK_SIGNATURE 0x4b434150 /* "PACK" in ASCII. */
Sep 26, 2004
Sep 26, 2004
81
static void QPAK_dirClose(void *opaque);
82
83
84
85
86
87
88
89
90
91
static PHYSFS_sint64 QPAK_read(FileHandle *handle, void *buffer,
PHYSFS_uint32 objSize, PHYSFS_uint32 objCount);
static PHYSFS_sint64 QPAK_write(FileHandle *handle, const void *buffer,
PHYSFS_uint32 objSize, PHYSFS_uint32 objCount);
static int QPAK_eof(FileHandle *handle);
static PHYSFS_sint64 QPAK_tell(FileHandle *handle);
static int QPAK_seek(FileHandle *handle, PHYSFS_uint64 offset);
static PHYSFS_sint64 QPAK_fileLength(FileHandle *handle);
static int QPAK_fileClose(FileHandle *handle);
static int QPAK_isArchive(const char *filename, int forWriting);
Sep 26, 2004
Sep 26, 2004
92
93
static void *QPAK_openArchive(const char *name, int forWriting);
static LinkedStringList *QPAK_enumerateFiles(void *opaque,
94
95
const char *dirname,
int omitSymLinks);
Sep 26, 2004
Sep 26, 2004
96
97
98
99
100
101
102
103
104
static int QPAK_exists(void *opaque, const char *name);
static int QPAK_isDirectory(void *opaque, const char *name, int *fileExists);
static int QPAK_isSymLink(void *opaque, const char *name, int *fileExists);
static PHYSFS_sint64 QPAK_getLastModTime(void *opaque, const char *n, int *e);
static FileHandle *QPAK_openRead(void *opaque, const char *name, int *exist);
static FileHandle *QPAK_openWrite(void *opaque, const char *name);
static FileHandle *QPAK_openAppend(void *opaque, const char *name);
static int QPAK_remove(void *opaque, const char *name);
static int QPAK_mkdir(void *opaque, const char *name);
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
const PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_QPAK =
{
"PAK",
QPAK_ARCHIVE_DESCRIPTION,
"Ryan C. Gordon <icculus@clutteredmind.org>",
"http://icculus.org/physfs/",
};
static const FileFunctions __PHYSFS_FileFunctions_QPAK =
{
QPAK_read, /* read() method */
QPAK_write, /* write() method */
QPAK_eof, /* eof() method */
QPAK_tell, /* tell() method */
QPAK_seek, /* seek() method */
QPAK_fileLength, /* fileLength() method */
QPAK_fileClose /* fileClose() method */
};
const DirFunctions __PHYSFS_DirFunctions_QPAK =
{
&__PHYSFS_ArchiveInfo_QPAK,
QPAK_isArchive, /* isArchive() method */
QPAK_openArchive, /* openArchive() method */
QPAK_enumerateFiles, /* enumerateFiles() method */
QPAK_exists, /* exists() method */
QPAK_isDirectory, /* isDirectory() method */
QPAK_isSymLink, /* isSymLink() method */
QPAK_getLastModTime, /* getLastModTime() method */
QPAK_openRead, /* openRead() method */
QPAK_openWrite, /* openWrite() method */
QPAK_openAppend, /* openAppend() method */
QPAK_remove, /* remove() method */
QPAK_mkdir, /* mkdir() method */
QPAK_dirClose /* dirClose() method */
};
Sep 26, 2004
Sep 26, 2004
147
static void QPAK_dirClose(void *opaque)
148
{
Sep 26, 2004
Sep 26, 2004
149
QPAKinfo *info = ((QPAKinfo *) opaque);
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
free(info->filename);
free(info->entries);
free(info);
} /* QPAK_dirClose */
static PHYSFS_sint64 QPAK_read(FileHandle *handle, void *buffer,
PHYSFS_uint32 objSize, PHYSFS_uint32 objCount)
{
QPAKfileinfo *finfo = (QPAKfileinfo *) (handle->opaque);
QPAKentry *entry = finfo->entry;
PHYSFS_uint32 bytesLeft = entry->size - finfo->curPos;
PHYSFS_uint32 objsLeft = (bytesLeft / objSize);
PHYSFS_sint64 rc;
if (objsLeft < objCount)
objCount = objsLeft;
rc = __PHYSFS_platformRead(finfo->handle, buffer, objSize, objCount);
if (rc > 0)
finfo->curPos += (PHYSFS_uint32) (rc * objSize);
return(rc);
} /* QPAK_read */
static PHYSFS_sint64 QPAK_write(FileHandle *handle, const void *buffer,
PHYSFS_uint32 objSize, PHYSFS_uint32 objCount)
{
BAIL_MACRO(ERR_NOT_SUPPORTED, -1);
} /* QPAK_write */
static int QPAK_eof(FileHandle *handle)
{
QPAKfileinfo *finfo = (QPAKfileinfo *) (handle->opaque);
QPAKentry *entry = finfo->entry;
return(finfo->curPos >= entry->size);
} /* QPAK_eof */
static PHYSFS_sint64 QPAK_tell(FileHandle *handle)
{
return(((QPAKfileinfo *) (handle->opaque))->curPos);
} /* QPAK_tell */
static int QPAK_seek(FileHandle *handle, PHYSFS_uint64 offset)
{
QPAKfileinfo *finfo = (QPAKfileinfo *) (handle->opaque);
QPAKentry *entry = finfo->entry;
int rc;
BAIL_IF_MACRO(offset < 0, ERR_INVALID_ARGUMENT, 0);
BAIL_IF_MACRO(offset >= entry->size, ERR_PAST_EOF, 0);
rc = __PHYSFS_platformSeek(finfo->handle, entry->startPos + offset);
if (rc)
finfo->curPos = (PHYSFS_uint32) offset;
return(rc);
} /* QPAK_seek */
static PHYSFS_sint64 QPAK_fileLength(FileHandle *handle)
{
QPAKfileinfo *finfo = ((QPAKfileinfo *) handle->opaque);
return((PHYSFS_sint64) finfo->entry->size);
} /* QPAK_fileLength */
static int QPAK_fileClose(FileHandle *handle)
{
QPAKfileinfo *finfo = ((QPAKfileinfo *) handle->opaque);
BAIL_IF_MACRO(!__PHYSFS_platformClose(finfo->handle), NULL, 0);
free(finfo);
free(handle);
return(1);
} /* QPAK_fileClose */
static int qpak_open(const char *filename, int forWriting,
void **fh, PHYSFS_uint32 *count)
{
PHYSFS_uint32 buf;
*fh = NULL;
BAIL_IF_MACRO(forWriting, ERR_ARC_IS_READ_ONLY, 0);
*fh = __PHYSFS_platformOpenRead(filename);
BAIL_IF_MACRO(*fh == NULL, NULL, 0);
if (__PHYSFS_platformRead(*fh, &buf, sizeof (PHYSFS_uint32), 1) != 1)
goto openQpak_failed;
buf = PHYSFS_swapULE32(buf);
if (buf != QPAK_SIGNATURE)
{
__PHYSFS_setError(ERR_UNSUPPORTED_ARCHIVE);
goto openQpak_failed;
} /* if */
if (__PHYSFS_platformRead(*fh, &buf, sizeof (PHYSFS_uint32), 1) != 1)
goto openQpak_failed;
buf = PHYSFS_swapULE32(buf); /* directory table offset. */
if (__PHYSFS_platformRead(*fh, count, sizeof (PHYSFS_uint32), 1) != 1)
goto openQpak_failed;
*count = PHYSFS_swapULE32(*count);
if ((*count % 64) != 0) /* corrupted archive? */
{
__PHYSFS_setError(ERR_CORRUPTED);
goto openQpak_failed;
} /* if */
if (!__PHYSFS_platformSeek(*fh, buf))
goto openQpak_failed;
*count /= 64;
return(1);
openQpak_failed:
if (*fh != NULL)
__PHYSFS_platformClose(*fh);
*count = -1;
*fh = NULL;
return(0);
} /* qpak_open */
static int QPAK_isArchive(const char *filename, int forWriting)
{
void *fh;
PHYSFS_uint32 fileCount;
int retval = qpak_open(filename, forWriting, &fh, &fileCount);
if (fh != NULL)
__PHYSFS_platformClose(fh);
return(retval);
} /* QPAK_isArchive */
static int qpak_entry_cmp(void *_a, PHYSFS_uint32 one, PHYSFS_uint32 two)
{
QPAKentry *a = (QPAKentry *) _a;
Nov 9, 2003
Nov 9, 2003
299
return(QPAK_strcmp(a[one].name, a[two].name));
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
} /* qpak_entry_cmp */
static void qpak_entry_swap(void *_a, PHYSFS_uint32 one, PHYSFS_uint32 two)
{
QPAKentry tmp;
QPAKentry *first = &(((QPAKentry *) _a)[one]);
QPAKentry *second = &(((QPAKentry *) _a)[two]);
memcpy(&tmp, first, sizeof (QPAKentry));
memcpy(first, second, sizeof (QPAKentry));
memcpy(second, &tmp, sizeof (QPAKentry));
} /* qpak_entry_swap */
static int qpak_load_entries(const char *name, int forWriting, QPAKinfo *info)
{
void *fh = NULL;
PHYSFS_uint32 fileCount;
QPAKentry *entry;
BAIL_IF_MACRO(!qpak_open(name, forWriting, &fh, &fileCount), NULL, 0);
info->entryCount = fileCount;
info->entries = (QPAKentry *) malloc(sizeof (QPAKentry) * fileCount);
if (info->entries == NULL)
{
__PHYSFS_platformClose(fh);
BAIL_MACRO(ERR_OUT_OF_MEMORY, 0);
} /* if */
for (entry = info->entries; fileCount > 0; fileCount--, entry++)
{
PHYSFS_uint32 loc;
if (__PHYSFS_platformRead(fh,&entry->name,sizeof(entry->name),1) != 1)
{
__PHYSFS_platformClose(fh);
return(0);
} /* if */
if (__PHYSFS_platformRead(fh,&loc,sizeof(loc),1) != 1)
{
__PHYSFS_platformClose(fh);
return(0);
} /* if */
if (__PHYSFS_platformRead(fh,&entry->size,sizeof(entry->size),1) != 1)
{
__PHYSFS_platformClose(fh);
return(0);
} /* if */
entry->size = PHYSFS_swapULE32(entry->size);
entry->startPos = PHYSFS_swapULE32(loc);
} /* for */
__PHYSFS_platformClose(fh);
__PHYSFS_sort(info->entries, info->entryCount,
qpak_entry_cmp, qpak_entry_swap);
return(1);
} /* qpak_load_entries */
Sep 26, 2004
Sep 26, 2004
363
static void *QPAK_openArchive(const char *name, int forWriting)
364
{
Sep 26, 2004
Sep 26, 2004
365
QPAKinfo *info = malloc(sizeof (QPAKinfo));
366
367
PHYSFS_sint64 modtime = __PHYSFS_platformGetLastModTime(name);
Sep 26, 2004
Sep 26, 2004
368
BAIL_IF_MACRO(info == NULL, ERR_OUT_OF_MEMORY, NULL);
369
370
371
372
373
374
375
376
377
378
379
380
381
382
memset(info, '\0', sizeof (QPAKinfo));
info->filename = (char *) malloc(strlen(name) + 1);
if (info->filename == NULL)
{
__PHYSFS_setError(ERR_OUT_OF_MEMORY);
goto QPAK_openArchive_failed;
} /* if */
if (!qpak_load_entries(name, forWriting, info))
goto QPAK_openArchive_failed;
strcpy(info->filename, name);
info->last_mod_time = modtime;
Sep 26, 2004
Sep 26, 2004
383
return(info);
384
385
QPAK_openArchive_failed:
Sep 26, 2004
Sep 26, 2004
386
if (info != NULL)
387
{
Sep 26, 2004
Sep 26, 2004
388
389
390
391
392
if (info->filename != NULL)
free(info->filename);
if (info->entries != NULL)
free(info->entries);
free(info);
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
} /* if */
return(NULL);
} /* QPAK_openArchive */
static PHYSFS_sint32 qpak_find_start_of_dir(QPAKinfo *info, const char *path,
int stop_on_first_find)
{
PHYSFS_sint32 lo = 0;
PHYSFS_sint32 hi = (PHYSFS_sint32) (info->entryCount - 1);
PHYSFS_sint32 middle;
PHYSFS_uint32 dlen = strlen(path);
PHYSFS_sint32 retval = -1;
const char *name;
int rc;
if (*path == '\0') /* root dir? */
return(0);
if ((dlen > 0) && (path[dlen - 1] == '/')) /* ignore trailing slash. */
dlen--;
while (lo <= hi)
{
middle = lo + ((hi - lo) / 2);
name = info->entries[middle].name;
Nov 9, 2003
Nov 9, 2003
420
rc = QPAK_strncmp(path, name, dlen);
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
if (rc == 0)
{
char ch = name[dlen];
if (ch < '/') /* make sure this isn't just a substr match. */
rc = -1;
else if (ch > '/')
rc = 1;
else
{
if (stop_on_first_find) /* Just checking dir's existance? */
return(middle);
if (name[dlen + 1] == '\0') /* Skip initial dir entry. */
return(middle + 1);
/* there might be more entries earlier in the list. */
retval = middle;
hi = middle - 1;
} /* else */
} /* if */
if (rc > 0)
lo = middle + 1;
else
hi = middle - 1;
} /* while */
return(retval);
} /* qpak_find_start_of_dir */
Sep 26, 2004
Sep 26, 2004
452
static LinkedStringList *QPAK_enumerateFiles(void *opaque,
453
454
455
const char *dirname,
int omitSymLinks)
{
Sep 26, 2004
Sep 26, 2004
456
QPAKinfo *info = ((QPAKinfo *) opaque);
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
LinkedStringList *retval = NULL, *p = NULL;
PHYSFS_sint32 dlen, dlen_inc, max, i;
i = qpak_find_start_of_dir(info, dirname, 0);
BAIL_IF_MACRO(i == -1, ERR_NO_SUCH_FILE, NULL);
dlen = strlen(dirname);
if ((dlen > 0) && (dirname[dlen - 1] == '/')) /* ignore trailing slash. */
dlen--;
dlen_inc = ((dlen > 0) ? 1 : 0) + dlen;
max = (PHYSFS_sint32) info->entryCount;
while (i < max)
{
char *add;
char *ptr;
PHYSFS_sint32 ln;
char *e = info->entries[i].name;
Nov 9, 2003
Nov 9, 2003
475
if ((dlen) && ((QPAK_strncmp(e, dirname, dlen)) || (e[dlen] != '/')))
476
477
478
479
480
481
482
483
484
485
486
487
break; /* past end of this dir; we're done. */
add = e + dlen_inc;
ptr = strchr(add, '/');
ln = (PHYSFS_sint32) ((ptr) ? ptr-add : strlen(add));
retval = __PHYSFS_addToLinkedStringList(retval, &p, add, ln);
ln += dlen_inc; /* point past entry to children... */
/* increment counter and skip children of subdirs... */
while ((++i < max) && (ptr != NULL))
{
char *e_new = info->entries[i].name;
Nov 9, 2003
Nov 9, 2003
488
if ((QPAK_strncmp(e, e_new, ln) != 0) || (e_new[ln] != '/'))
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
break;
} /* while */
} /* while */
return(retval);
} /* QPAK_enumerateFiles */
/*
* This will find the QPAKentry associated with a path in platform-independent
* notation. Directories don't have QPAKentries associated with them, but
* (*isDir) will be set to non-zero if a dir was hit.
*/
static QPAKentry *qpak_find_entry(QPAKinfo *info, const char *path, int *isDir)
{
QPAKentry *a = info->entries;
PHYSFS_sint32 pathlen = strlen(path);
PHYSFS_sint32 lo = 0;
PHYSFS_sint32 hi = (PHYSFS_sint32) (info->entryCount - 1);
PHYSFS_sint32 middle;
const char *thispath = NULL;
int rc;
while (lo <= hi)
{
middle = lo + ((hi - lo) / 2);
thispath = a[middle].name;
Nov 9, 2003
Nov 9, 2003
516
rc = QPAK_strncmp(path, thispath, pathlen);
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
if (rc > 0)
lo = middle + 1;
else if (rc < 0)
hi = middle - 1;
else /* substring match...might be dir or entry or nothing. */
{
if (isDir != NULL)
{
*isDir = (thispath[pathlen] == '/');
if (*isDir)
return(NULL);
} /* if */
if (thispath[pathlen] == '\0') /* found entry? */
return(&a[middle]);
else
hi = middle - 1; /* adjust search params, try again. */
} /* if */
} /* while */
if (isDir != NULL)
*isDir = 0;
BAIL_MACRO(ERR_NO_SUCH_FILE, NULL);
} /* qpak_find_entry */
Sep 26, 2004
Sep 26, 2004
547
static int QPAK_exists(void *opaque, const char *name)
548
549
{
int isDir;
Sep 26, 2004
Sep 26, 2004
550
QPAKinfo *info = (QPAKinfo *) opaque;
551
552
553
554
555
QPAKentry *entry = qpak_find_entry(info, name, &isDir);
return((entry != NULL) || (isDir));
} /* QPAK_exists */
Sep 26, 2004
Sep 26, 2004
556
static int QPAK_isDirectory(void *opaque, const char *name, int *fileExists)
557
{
Sep 26, 2004
Sep 26, 2004
558
QPAKinfo *info = (QPAKinfo *) opaque;
559
560
561
562
563
564
565
566
567
568
569
int isDir;
QPAKentry *entry = qpak_find_entry(info, name, &isDir);
*fileExists = ((isDir) || (entry != NULL));
if (isDir)
return(1); /* definitely a dir. */
BAIL_MACRO(ERR_NO_SUCH_FILE, 0);
} /* QPAK_isDirectory */
Sep 26, 2004
Sep 26, 2004
570
static int QPAK_isSymLink(void *opaque, const char *name, int *fileExists)
571
{
Sep 26, 2004
Sep 26, 2004
572
*fileExists = QPAK_exists(opaque, name);
573
574
575
576
return(0); /* never symlinks in a quake pak. */
} /* QPAK_isSymLink */
Sep 26, 2004
Sep 26, 2004
577
static PHYSFS_sint64 QPAK_getLastModTime(void *opaque,
578
579
580
581
const char *name,
int *fileExists)
{
int isDir;
Sep 26, 2004
Sep 26, 2004
582
QPAKinfo *info = ((QPAKinfo *) opaque);
583
584
585
586
587
588
589
590
591
592
593
PHYSFS_sint64 retval = -1;
QPAKentry *entry = qpak_find_entry(info, name, &isDir);
*fileExists = ((isDir) || (entry != NULL));
if (*fileExists) /* use time of QPAK itself in the physical filesystem. */
retval = info->last_mod_time;
return(retval);
} /* QPAK_getLastModTime */
Sep 26, 2004
Sep 26, 2004
594
static FileHandle *QPAK_openRead(void *opaque, const char *fnm, int *fileExists)
595
{
Sep 26, 2004
Sep 26, 2004
596
QPAKinfo *info = ((QPAKinfo *) opaque);
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
FileHandle *retval;
QPAKfileinfo *finfo;
QPAKentry *entry;
int isDir;
entry = qpak_find_entry(info, fnm, &isDir);
*fileExists = ((entry != NULL) || (isDir));
BAIL_IF_MACRO(isDir, ERR_NOT_A_FILE, NULL);
BAIL_IF_MACRO(entry == NULL, ERR_NO_SUCH_FILE, NULL);
retval = (FileHandle *) malloc(sizeof (FileHandle));
BAIL_IF_MACRO(retval == NULL, ERR_OUT_OF_MEMORY, NULL);
finfo = (QPAKfileinfo *) malloc(sizeof (QPAKfileinfo));
if (finfo == NULL)
{
free(retval);
BAIL_MACRO(ERR_OUT_OF_MEMORY, NULL);
} /* if */
finfo->handle = __PHYSFS_platformOpenRead(info->filename);
if ( (finfo->handle == NULL) ||
(!__PHYSFS_platformSeek(finfo->handle, entry->startPos)) )
{
free(finfo);
free(retval);
return(NULL);
} /* if */
finfo->curPos = 0;
finfo->entry = entry;
retval->opaque = (void *) finfo;
retval->funcs = &__PHYSFS_FileFunctions_QPAK;
return(retval);
} /* QPAK_openRead */
Sep 26, 2004
Sep 26, 2004
633
static FileHandle *QPAK_openWrite(void *opaque, const char *name)
634
635
636
637
638
{
BAIL_MACRO(ERR_NOT_SUPPORTED, NULL);
} /* QPAK_openWrite */
Sep 26, 2004
Sep 26, 2004
639
static FileHandle *QPAK_openAppend(void *opaque, const char *name)
640
641
642
643
644
{
BAIL_MACRO(ERR_NOT_SUPPORTED, NULL);
} /* QPAK_openAppend */
Sep 26, 2004
Sep 26, 2004
645
static int QPAK_remove(void *opaque, const char *name)
646
647
648
649
650
{
BAIL_MACRO(ERR_NOT_SUPPORTED, 0);
} /* QPAK_remove */
Sep 26, 2004
Sep 26, 2004
651
static int QPAK_mkdir(void *opaque, const char *name)
652
653
654
655
656
657
658
{
BAIL_MACRO(ERR_NOT_SUPPORTED, 0);
} /* QPAK_mkdir */
#endif /* defined PHYSFS_SUPPORTS_QPAK */
/* end of qpak.c ... */