|
@@ -217,14 +217,6 @@ static void *SZIP_openArchive(PHYSFS_Io *io, const char *name, int forWriting)
|
|
|
SZIPinfo *info = NULL;
|
|
SZIPinfo *info = NULL;
|
|
|
SRes rc;
|
|
SRes rc;
|
|
|
|
|
|
|
|
- /* !!! FIXME-3.0: this is a race condition; we need a global init method that gets called when registering new archivers. */
|
|
|
|
|
- static int generatedTable = 0;
|
|
|
|
|
- if (!generatedTable)
|
|
|
|
|
- {
|
|
|
|
|
- generatedTable = 1;
|
|
|
|
|
- CrcGenerateTable();
|
|
|
|
|
- } /* if */
|
|
|
|
|
-
|
|
|
|
|
BAIL_IF(forWriting, PHYSFS_ERR_READ_ONLY, NULL);
|
|
BAIL_IF(forWriting, PHYSFS_ERR_READ_ONLY, NULL);
|
|
|
|
|
|
|
|
info = (SZIPinfo *) allocator.Malloc(sizeof (SZIPinfo));
|
|
info = (SZIPinfo *) allocator.Malloc(sizeof (SZIPinfo));
|
|
@@ -387,6 +379,19 @@ static int SZIP_stat(void *opaque, const char *path, PHYSFS_Stat *stat)
|
|
|
} /* SZIP_stat */
|
|
} /* SZIP_stat */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+void SZIP_global_init(void)
|
|
|
|
|
+{
|
|
|
|
|
+ /* this just needs to calculate some things, so it only ever
|
|
|
|
|
+ has to run once, even after a deinit. */
|
|
|
|
|
+ static int generatedTable = 0;
|
|
|
|
|
+ if (!generatedTable)
|
|
|
|
|
+ {
|
|
|
|
|
+ generatedTable = 1;
|
|
|
|
|
+ CrcGenerateTable();
|
|
|
|
|
+ } /* if */
|
|
|
|
|
+} /* SZIP_global_init */
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
const PHYSFS_Archiver __PHYSFS_Archiver_7Z =
|
|
const PHYSFS_Archiver __PHYSFS_Archiver_7Z =
|
|
|
{
|
|
{
|
|
|
CURRENT_PHYSFS_ARCHIVER_API_VERSION,
|
|
CURRENT_PHYSFS_ARCHIVER_API_VERSION,
|