Skip to content

Latest commit

 

History

History
124 lines (87 loc) · 2.71 KB

zip.c

File metadata and controls

124 lines (87 loc) · 2.71 KB
 
Jul 7, 2001
Jul 7, 2001
1
2
3
4
5
6
7
8
9
10
/*
* ZIP support routines for PhysicsFS.
*
* Please see the file LICENSE in the source's root directory.
*
* This file written by Ryan C. Gordon.
*/
#include <stdio.h>
#include <stdlib.h>
Jul 8, 2001
Jul 8, 2001
11
#include "physfs.h"
Jul 7, 2001
Jul 7, 2001
12
13
14
15
16
17
18
19
#define __PHYSICSFS_INTERNAL__
#include "physfs_internal.h"
#if (!defined PHYSFS_SUPPORTS_ZIP)
#error PHYSFS_SUPPORTS_ZIP must be defined.
#endif
Jul 8, 2001
Jul 8, 2001
20
extern const DirFunctions __PHYSFS_DirFunctions_ZIP;
Jul 8, 2001
Jul 8, 2001
21
static const FileFunctions __PHYSFS_FileFunctions_ZIP;
Jul 8, 2001
Jul 8, 2001
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
static int ZIP_read(FileHandle *handle, void *buffer,
unsigned int objSize, unsigned int objCount)
{
} /* ZIP_read */
static int ZIP_eof(FileHandle *handle)
{
} /* ZIP_eof */
static int ZIP_tell(FileHandle *handle)
{
} /* ZIP_tell */
static int ZIP_seek(FileHandle *handle, int offset)
{
} /* ZIP_seek */
static int ZIP_fileClose(FileHandle *handle)
{
} /* ZIP_fileClose */
static int ZIP_isArchive(const char *filename, int forWriting)
{
} /* ZIP_isArchive */
static DirHandle *ZIP_openArchive(const char *name, int forWriting)
{
} /* ZIP_openArchive */
Jul 8, 2001
Jul 8, 2001
60
static LinkedStringList *ZIP_enumerateFiles(DirHandle *h, const char *dirname)
Jul 8, 2001
Jul 8, 2001
61
62
63
64
{
} /* ZIP_enumerateFiles */
Jul 8, 2001
Jul 8, 2001
65
static int ZIP_exists(DirHandle *h, const char *name)
Jul 8, 2001
Jul 8, 2001
66
67
68
69
{
} /* ZIP_exists */
Jul 8, 2001
Jul 8, 2001
70
static int ZIP_isDirectory(DirHandle *h, const char *name)
Jul 8, 2001
Jul 8, 2001
71
72
73
74
{
} /* ZIP_isDirectory */
Jul 8, 2001
Jul 8, 2001
75
static int ZIP_isSymLink(DirHandle *h, const char *name)
Jul 8, 2001
Jul 8, 2001
76
77
78
79
{
} /* ZIP_isSymLink */
Jul 8, 2001
Jul 8, 2001
80
static FileHandle *ZIP_openRead(DirHandle *h, const char *filename)
Jul 8, 2001
Jul 8, 2001
81
82
83
84
{
} /* ZIP_openRead */
Jul 8, 2001
Jul 8, 2001
85
static void ZIP_dirClose(DirHandle *h)
Jul 8, 2001
Jul 8, 2001
86
87
88
{
} /* ZIP_dirClose */
Jul 7, 2001
Jul 7, 2001
89
Jul 8, 2001
Jul 8, 2001
90
static const FileFunctions __PHYSFS_FileFunctions_ZIP =
Jul 7, 2001
Jul 7, 2001
91
{
Jul 8, 2001
Jul 8, 2001
92
93
94
95
96
ZIP_read, /* read() method */
NULL, /* write() method */
ZIP_eof, /* eof() method */
ZIP_tell, /* tell() method */
ZIP_seek, /* seek() method */
Jul 8, 2001
Jul 8, 2001
97
ZIP_fileClose /* fileClose() method */
Jul 7, 2001
Jul 7, 2001
98
99
100
101
102
};
const DirFunctions __PHYSFS_DirFunctions_ZIP =
{
Jul 8, 2001
Jul 8, 2001
103
104
105
106
107
108
109
110
111
112
113
ZIP_isArchive, /* isArchive() method */
ZIP_openArchive, /* openArchive() method */
ZIP_enumerateFiles, /* enumerateFiles() method */
ZIP_exists, /* exists() method */
ZIP_isDirectory, /* isDirectory() method */
ZIP_isSymLink, /* isSymLink() method */
ZIP_openRead, /* openRead() method */
NULL, /* openWrite() method */
NULL, /* openAppend() method */
NULL, /* remove() method */
NULL, /* mkdir() method */
Jul 8, 2001
Jul 8, 2001
114
ZIP_dirClose /* dirClose() method */
Jul 7, 2001
Jul 7, 2001
115
116
};
Jul 8, 2001
Jul 8, 2001
117
const PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_ZIP =
Jul 7, 2001
Jul 7, 2001
118
119
120
121
122
123
{
"ZIP",
"PkZip/WinZip/Info-Zip compatible"
};
/* end of zip.c ... */