Added qpak.c to build systems.
--- a/Makefile.am.newautomake Fri Aug 09 19:47:06 2002 +0000
+++ b/Makefile.am.newautomake Fri Aug 09 19:47:35 2002 +0000
@@ -49,6 +49,7 @@
archivers/dir.c \
archivers/grp.c \
archivers/zip.c \
+ archivers/qpak.c \
platform/unix.c \
platform/posix.c \
$(ZLIB_SRC)
--- a/archivers/Makefile.am Fri Aug 09 19:47:06 2002 +0000
+++ b/archivers/Makefile.am Fri Aug 09 19:47:35 2002 +0000
@@ -9,5 +9,6 @@
libarchivers_la_SOURCES = \
dir.c \
grp.c \
- zip.c
+ zip.c \
+ qpak.c
--- a/configure.in Fri Aug 09 19:47:06 2002 +0000
+++ b/configure.in Fri Aug 09 19:47:35 2002 +0000
@@ -108,7 +108,7 @@
fi
-dnl Check for zip archiver inclusion...
+dnl Check for grp archiver inclusion...
AC_ARG_ENABLE(grp,
[ --enable-grp enable Build Engine GRP support [default=yes]],
, enable_grp=yes)
@@ -117,6 +117,15 @@
fi
+dnl Check for qpak archiver inclusion...
+AC_ARG_ENABLE(qpak,
+[ --enable-qpak enable Quake PAK support [default=yes]],
+ , enable_qpak=yes)
+if test x$enable_qpak = xyes; then
+ AC_DEFINE([PHYSFS_SUPPORTS_QPAK], 1, [define if qpak support is enabled])
+fi
+
+
AC_ARG_ENABLE(internal-zlib,
[ --enable-internal-zlib use included zlib [default=only if needed]],
, enable_internal_zlib=maybe)
@@ -415,6 +424,8 @@
AC_FUNC_MEMCMP
AC_CHECK_FUNCS([memset strrchr])
+AC_CHECK_SIZEOF(int, 4)
+
CFLAGS="$CFLAGS -D_REENTRANT -D_THREAD_SAFE"
LDFLAGS="$LDFLAGS -no-undefined"
--- a/makeos2.cmd Fri Aug 09 19:47:06 2002 +0000
+++ b/makeos2.cmd Fri Aug 09 19:47:35 2002 +0000
@@ -7,7 +7,7 @@
set PHYSFSLANG=PHYSFS_LANG_ENGLISH
set DEBUGFLAGS=-D_NDEBUG -O2 -s
-set CFLAGS=%DEBUGFLAGS% -Wall -Werror -Zomf -Zmt -Zmtd -I. -Izlib114 -c -D__ST_MT_ERRNO__ -DOS2 -DPHYSFS_SUPPORTS_ZIP -DPHYSFS_SUPPORTS_GRP -DPHYSFS_LANG=%PHYSFSLANG%
+set CFLAGS=%DEBUGFLAGS% -Wall -Werror -Zomf -Zmt -Zmtd -I. -Izlib114 -c -D__ST_MT_ERRNO__ -DOS2 -DPHYSFS_SUPPORTS_ZIP -DPHYSFS_SUPPORTS_GRP -DPHYSFS_SUPPORTS_QPAK -DPHYSFS_LANG=%PHYSFSLANG%
@echo on
mkdir bin
@@ -107,6 +107,7 @@
gcc %CFLAGS% -o bin/dir.obj archivers/dir.c
gcc %CFLAGS% -o bin/grp.obj archivers/grp.c
gcc %CFLAGS% -o bin/zip.obj archivers/zip.c
+gcc %CFLAGS% -o bin/zip.obj archivers/qpak.c
gcc %CFLAGS% -o bin/adler32.obj zlib114/adler32.c
gcc %CFLAGS% -o bin/compress.obj zlib114/compress.c
--- a/physfs.c Fri Aug 09 19:47:06 2002 +0000
+++ b/physfs.c Fri Aug 09 19:47:35 2002 +0000
@@ -57,8 +57,15 @@
extern const DirFunctions __PHYSFS_DirFunctions_GRP;
#endif
+#if (defined PHYSFS_SUPPORTS_QPAK)
+extern const PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_QPAK;
+extern const DirFunctions __PHYSFS_DirFunctions_QPAK;
+#endif
+
extern const DirFunctions __PHYSFS_DirFunctions_DIR;
+
+// !!! FIXME: This is stored with dirFunctions now, too.
static const PHYSFS_ArchiveInfo *supported_types[] =
{
#if (defined PHYSFS_SUPPORTS_ZIP)
@@ -69,6 +76,10 @@
&__PHYSFS_ArchiveInfo_GRP,
#endif
+#if (defined PHYSFS_SUPPORTS_QPAK)
+ &__PHYSFS_ArchiveInfo_QPAK,
+#endif
+
NULL
};
@@ -82,6 +93,10 @@
&__PHYSFS_DirFunctions_GRP,
#endif
+#if (defined PHYSFS_SUPPORTS_QPAK)
+ &__PHYSFS_DirFunctions_QPAK,
+#endif
+
&__PHYSFS_DirFunctions_DIR,
NULL
};