[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/src/physfs Makefile.am.newautomake,NONE,1.1.4
From: |
Alexander Pipelka <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/src/physfs Makefile.am.newautomake,NONE,1.1.4.1 Makefile.am.oldautomake,NONE,1.1.4.1 makeos2.cmd,NONE,1.1.4.1 CHANGELOG,1.1.1.1.6.7,1.1.1.1.6.8 CREDITS,1.1.2.3,1.1.2.4 INSTALL,1.1.1.1.6.1,1.1.1.1.6.2 TODO,1.1.1.1.6.5,1.1.1.1.6.6 bootstrap,1.1.2.2,1.1.2.3 configure.in,1.1.2.9,1.1.2.10 physfs.c,1.1.1.1.6.6,1.1.1.1.6.7 physfs.dsp,1.1.2.2,1.1.2.3 physfs_byteorder.c,1.1.2.3,1.1.2.4 physfs_internal.h,1.1.1.1.6.6,1.1.1.1.6.7 Makefile.am,1.1.1.1.6.8,NONE |
Date: |
Fri, 01 Nov 2002 05:43:40 -0500 |
Update of /cvsroot/paragui/paragui/src/physfs
In directory subversions:/tmp/cvs-serv8719/src/physfs
Modified Files:
Tag: devel-1-0
CHANGELOG CREDITS INSTALL TODO bootstrap configure.in physfs.c
physfs.dsp physfs_byteorder.c physfs_internal.h
Added Files:
Tag: devel-1-0
Makefile.am.newautomake Makefile.am.oldautomake makeos2.cmd
Removed Files:
Tag: devel-1-0
Makefile.am
Log Message:
- Borland C++ Builder 6 fixes. Thanks Martin Bickel <address@hidden>
- updated physfs
--- NEW FILE ---
noinst_LTLIBRARIES = libphysfs.la
libphysfsincludedir = $(includedir)
libphysfsinclude_HEADERS = \
physfs.h
if BUILD_MACOSX
ZLIB_FILES = zlib114/adler32.c \
zlib114/compress.c \
zlib114/crc32.c \
zlib114/deflate.c \
zlib114/deflate.h \
zlib114/infblock.c \
zlib114/infblock.h \
zlib114/infcodes.c \
zlib114/infcodes.h \
zlib114/inffast.c \
zlib114/inffast.h \
zlib114/inffixed.h \
zlib114/inflate.c \
zlib114/inftrees.c \
zlib114/inftrees.h \
zlib114/infutil.c \
zlib114/infutil.h \
zlib114/trees.c \
zlib114/trees.h \
zlib114/uncompr.c \
zlib114/zconf.h \
zlib114/zlib.h \
zlib114/zutil.c \
zlib114/zutil.h
if BUILD_ZLIB
ZLIB_SRC = $(ZLIB_FILES)
ZLIB_INC = -I$(top_srcdir)/zlib114
ZLIB_EXTRADIST =
else
ZLIB_SRC =
ZLIB_INC =
ZLIB_EXTRADIST = $(ZLIB_FILES)
endif
libphysfs_la_SOURCES = \
physfs.c \
physfs_internal.h \
physfs_byteorder.c \
archivers/dir.c \
archivers/grp.c \
archivers/zip.c \
archivers/qpak.c \
platform/unix.c \
platform/posix.c \
$(ZLIB_SRC)
libphysfs_la_INCLUDES = $(ZLIB_INC)
libphysfs_la_LDFLAGS = \
-release $(LT_RELEASE) \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
if BUILD_TEST_PHYSFS
bin_PROGRAMS = test_physfs
test_physfs_INCLUDES = -I$(top_srcdir)
test_physfs_LDADD = $(top_srcdir)/libphysfs.la
test_physfs_SOURCES = test/test_physfs.c
TEST_EXTRADIST =
else
TEST_EXTRADIST = test/test_physfs.c
endif
EXTRA_DIST = \
CREDITS \
LICENSE \
CHANGELOG \
INSTALL \
TODO \
Doxyfile \
CWProjects.sit \
physfs.spec \
physfs.dsp \
test_physfs.dsp \
platform/skeleton.c \
platform/macclassic.c \
platform/win32.c \
platform/beos.cpp \
platform/os2.c \
extras/physfsrwops.h \
extras/physfsrwops.c \
extras/physfshttpd.c \
Makefile.am.oldautomake \
Makefile.am.newautomake \
makeos2.cmd \
$(ZLIB_EXTRADIST) $(BEOS_EXTRADIST) $(TEST_EXTRADIST)
else
SUBDIRS = platform archivers zlib114 . test extras
libphysfs_la_SOURCES = \
physfs.c \
physfs_internal.h \
physfs_byteorder.c
if BUILD_ZLIB
ZLIB_LIB = zlib114/libz.la
else
ZLIB_LIB =
endif
libphysfs_la_LDFLAGS = \
-release $(LT_RELEASE) \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
libphysfs_la_LIBADD = \
archivers/libarchivers.la \
platform/libplatform.la \
$(ZLIB_LIB)
EXTRA_DIST = \
CREDITS \
LICENSE \
CHANGELOG \
INSTALL \
TODO \
Doxyfile \
CWProjects.sit \
physfs.spec.in \
physfs.spec \
physfs.dsp \
test_physfs.dsp \
makeos2.cmd
endif
dist-hook:
mkdir $(distdir)/docs
echo "Docs are generated with the program "Doxygen"
(http://www.doxygen.org/)," >> $(distdir)/docs/README
echo " or can be read online at http://icculus.org/physfs/docs/" >>
$(distdir)/docs/README
echo >> $(distdir)/docs/README
--- NEW FILE ---
noinst_LTLIBRARIES = libphysfs.la
SUBDIRS = platform archivers zlib114 . test extras
libphysfsincludedir = $(includedir)
libphysfsinclude_HEADERS = \
physfs.h
libphysfs_la_SOURCES = \
physfs.c \
physfs_internal.h \
physfs_byteorder.c
if BUILD_ZLIB
ZLIB_LIB = zlib114/libz.la
else
ZLIB_LIB =
endif
libphysfs_la_LDFLAGS = \
-release $(LT_RELEASE) \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
libphysfs_la_LIBADD = \
archivers/libarchivers.la \
platform/libplatform.la \
$(ZLIB_LIB)
EXTRA_DIST = \
CREDITS \
LICENSE \
CHANGELOG \
INSTALL \
TODO \
Doxyfile \
CWProjects.sit \
physfs.spec.in \
physfs.spec \
physfs.dsp \
test_physfs.dsp \
makeos2.cmd
dist-hook:
mkdir $(distdir)/docs
echo "Docs are generated with the program "Doxygen"
(http://www.doxygen.org/)," >> $(distdir)/docs/README
echo " or can be read online at http://icculus.org/physfs/docs/" >>
$(distdir)/docs/README
echo >> $(distdir)/docs/README
--- NEW FILE ---
@echo off
rem this is a simple batch file to build PhysicsFS on OS/2. You need to have
rem the EMX development tools installed for this to work.
rem
rem This script (and, indeed, our OS/2 support) could use some tweaking.
rem Patches go to address@hidden ...
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_SUPPORTS_QPAK -DPHYSFS_LANG=%PHYSFSLANG%
@echo on
mkdir bin
erase /N bin\*.*
@echo ;don't edit this directly! It is rewritten by makeos2.cmd! >
bin\test_physfs.def
@echo NAME TESTPHYSFS WINDOWCOMPAT >> bin\test_physfs.def
@echo DESCRIPTION 'PhysicsFS: http://icculus.org/physfs/' >> bin\test_physfs.def
@echo STACKSIZE 0x10000 >> bin\test_physfs.def
@echo BASE=0x10000 >> bin\test_physfs.def
@echo PROTMODE >> bin\test_physfs.def
@echo ;don't edit this directly! It is rewritten by makeos2.cmd! >
bin\physfs.def
@echo LIBRARY 'physfs' INITINSTANCE TERMINSTANCE >> bin\physfs.def
@echo STACKSIZE 0x10000 >> bin\physfs.def
@echo CODE LOADONCALL >> bin\physfs.def
@echo DATA LOADONCALL NONSHARED MULTIPLE >> bin\physfs.def
@echo DESCRIPTION 'PhysicsFS: http://icculus.org/physfs/' >> bin\physfs.def
@echo EXPORTS >> bin\physfs.def
@echo "PHYSFS_getLinkedVersion" >> bin\physfs.def
@echo "PHYSFS_init" >> bin\physfs.def
@echo "PHYSFS_deinit" >> bin\physfs.def
@echo "PHYSFS_supportedArchiveTypes" >> bin\physfs.def
@echo "PHYSFS_freeList" >> bin\physfs.def
@echo "PHYSFS_getLastError" >> bin\physfs.def
@echo "PHYSFS_getDirSeparator" >> bin\physfs.def
@echo "PHYSFS_permitSymbolicLinks" >> bin\physfs.def
@echo "PHYSFS_getCdRomDirs" >> bin\physfs.def
@echo "PHYSFS_getBaseDir" >> bin\physfs.def
@echo "PHYSFS_getUserDir" >> bin\physfs.def
@echo "PHYSFS_getWriteDir" >> bin\physfs.def
@echo "PHYSFS_setWriteDir" >> bin\physfs.def
@echo "PHYSFS_addToSearchPath" >> bin\physfs.def
@echo "PHYSFS_removeFromSearchPath" >> bin\physfs.def
@echo "PHYSFS_getSearchPath" >> bin\physfs.def
@echo "PHYSFS_setSaneConfig" >> bin\physfs.def
@echo "PHYSFS_mkdir" >> bin\physfs.def
@echo "PHYSFS_delete" >> bin\physfs.def
@echo "PHYSFS_getRealDir" >> bin\physfs.def
@echo "PHYSFS_enumerateFiles" >> bin\physfs.def
@echo "PHYSFS_exists" >> bin\physfs.def
@echo "PHYSFS_isDirectory" >> bin\physfs.def
@echo "PHYSFS_isSymbolicLink" >> bin\physfs.def
@echo "PHYSFS_openWrite" >> bin\physfs.def
@echo "PHYSFS_openAppend" >> bin\physfs.def
@echo "PHYSFS_openRead" >> bin\physfs.def
@echo "PHYSFS_close" >> bin\physfs.def
@echo "PHYSFS_read" >> bin\physfs.def
@echo "PHYSFS_write" >> bin\physfs.def
@echo "PHYSFS_eof" >> bin\physfs.def
@echo "PHYSFS_tell" >> bin\physfs.def
@echo "PHYSFS_seek" >> bin\physfs.def
@echo "PHYSFS_fileLength" >> bin\physfs.def
@echo "PHYSFS_swapSLE16" >> bin\physfs.def
@echo "PHYSFS_swapULE16" >> bin\physfs.def
@echo "PHYSFS_swapSLE32" >> bin\physfs.def
@echo "PHYSFS_swapULE32" >> bin\physfs.def
@echo "PHYSFS_swapSLE64" >> bin\physfs.def
@echo "PHYSFS_swapULE64" >> bin\physfs.def
@echo "PHYSFS_swapSBE16" >> bin\physfs.def
@echo "PHYSFS_swapUBE16" >> bin\physfs.def
@echo "PHYSFS_swapSBE32" >> bin\physfs.def
@echo "PHYSFS_swapUBE32" >> bin\physfs.def
@echo "PHYSFS_swapSBE64" >> bin\physfs.def
@echo "PHYSFS_swapUBE64" >> bin\physfs.def
@echo "PHYSFS_getLastModTime" >> bin\physfs.def
@echo "PHYSFS_readSLE16" >> bin\physfs.def
@echo "PHYSFS_readULE16" >> bin\physfs.def
@echo "PHYSFS_readSLE32" >> bin\physfs.def
@echo "PHYSFS_readULE32" >> bin\physfs.def
@echo "PHYSFS_readSLE64" >> bin\physfs.def
@echo "PHYSFS_readULE64" >> bin\physfs.def
@echo "PHYSFS_readSBE16" >> bin\physfs.def
@echo "PHYSFS_readUBE16" >> bin\physfs.def
@echo "PHYSFS_readSBE32" >> bin\physfs.def
@echo "PHYSFS_readUBE32" >> bin\physfs.def
@echo "PHYSFS_readSBE64" >> bin\physfs.def
@echo "PHYSFS_readUBE64" >> bin\physfs.def
@echo "PHYSFS_writeSLE16" >> bin\physfs.def
@echo "PHYSFS_writeULE16" >> bin\physfs.def
@echo "PHYSFS_writeSLE32" >> bin\physfs.def
@echo "PHYSFS_writeULE32" >> bin\physfs.def
@echo "PHYSFS_writeSLE64" >> bin\physfs.def
@echo "PHYSFS_writeULE64" >> bin\physfs.def
@echo "PHYSFS_writeSBE16" >> bin\physfs.def
@echo "PHYSFS_writeUBE16" >> bin\physfs.def
@echo "PHYSFS_writeSBE32" >> bin\physfs.def
@echo "PHYSFS_writeUBE32" >> bin\physfs.def
@echo "PHYSFS_writeSBE64" >> bin\physfs.def
@echo "PHYSFS_writeUBE64" >> bin\physfs.def
emximp -o bin/physfs.lib bin/physfs.def
gcc %CFLAGS% -o bin/physfs.obj physfs.c
gcc %CFLAGS% -o bin/physfs_byteorder.obj physfs_byteorder.c
gcc %CFLAGS% -o bin/os2.obj platform/os2.c
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/qpak.obj archivers/qpak.c
gcc %CFLAGS% -o bin/adler32.obj zlib114/adler32.c
gcc %CFLAGS% -o bin/compress.obj zlib114/compress.c
gcc %CFLAGS% -o bin/crc32.obj zlib114/crc32.c
gcc %CFLAGS% -o bin/deflate.obj zlib114/deflate.c
gcc %CFLAGS% -o bin/infblock.obj zlib114/infblock.c
gcc %CFLAGS% -o bin/infcodes.obj zlib114/infcodes.c
gcc %CFLAGS% -o bin/inffast.obj zlib114/inffast.c
gcc %CFLAGS% -o bin/inflate.obj zlib114/inflate.c
gcc %CFLAGS% -o bin/inftrees.obj zlib114/inftrees.c
gcc %CFLAGS% -o bin/infutil.obj zlib114/infutil.c
gcc %CFLAGS% -o bin/trees.obj zlib114/trees.c
gcc %CFLAGS% -o bin/uncompr.obj zlib114/uncompr.c
gcc %CFLAGS% -o bin/zutil.obj zlib114/zutil.c
gcc %DEBUGFLAGS% -Zdll -Zcrtdll -Zomf -Zmt -Zmtd -o bin/physfs.dll bin/*.obj
bin/physfs.def
gcc %CFLAGS% -o bin/test_physfs.obj test/test_physfs.c
gcc %DEBUGFLAGS% -Zomf -Zcrtdll -Zmt -Zmtd -o bin/test_physfs.exe
bin/test_physfs.obj bin/physfs.lib bin/test_physfs.def
Index: CHANGELOG
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/CHANGELOG,v
retrieving revision 1.1.1.1.6.7
retrieving revision 1.1.1.1.6.8
diff -C2 -r1.1.1.1.6.7 -r1.1.1.1.6.8
*** CHANGELOG 30 Jul 2002 20:50:27 -0000 1.1.1.1.6.7
--- CHANGELOG 1 Nov 2002 10:43:36 -0000 1.1.1.1.6.8
***************
*** 3,6 ****
--- 3,46 ----
*/
+ 10222002 - Fixed segfault in test_physfs.c when user hits CTRL-D (and
+ readline() thus returns NULL)...now gracefully exits, as it should.
+ 10142002 - Added check for AMD's x86-64 ("Hammer") architecture when
+ determining platform byte order.
+ 10112002 - Fixed "setsaneconfig" command in test_physfs.c ...
+ 09232002 - Happy September. Updated VC++6 project files, fixed some
+ VC++ compile nags (more work to be done in zip.c).
+ 08302002 - Cleaned tab stops out of zip.c, and fixed a possible infinite loop
+ in zip_find_entry().
+ 08292002 - Fixed a mistake in makeos2.cmd, and updated the INSTALL docs.
+ Added physfs.spec.in to EXTRA_DIST in Makefile.am*
+ 08292002 - Added a physfs/stdio wrapper header to the "extras" dir,
+ compliments of Adam D. Moss (file is "abs-file.h").
+ 08282002 - Cleanups in grp.c so that Visual C++ doesn't complain anymore.
+ zip.c now works correctly when PhysicsFS is disallowing symlinks.
+ A few minor optimizations in zip.c, with a few more to come later.
+ Added VS.NET project files to CVS.
+ 08222002 - Fixed ZIP_exists() to work with directories. Now breaks out of
+ __PHYSFS_verifySecurity() early if a path element is missing
+ (since all the others will be, too)...this check is only done
+ if symlinks are disabled, but we might as well save easy cycles
+ where we can.
+ 08212002 - Did a couple tedious-for-small-rewards cleanups, optimizations,
+ corrections and streamlinings I've been meaning to do. Touched a
+ lot of code. One of the side results is that ZIP_isDirectory()
+ got fixed.
+ 08192002 - Generalized sorting routines, moved them into physfs.c and removed
+ the multiple copies from the various archivers. Adding profiling
+ code (currently only for sort routines)...enable it with
+ --enable-profiling in the configure script. Fixed incorrect
+ behaviours in configure.in.
+ 08172002 - Patched configure.in to work around buggy autoconfs.
+ 08162002 - Fixed QPAK archiver, since I broke it (sorry!). Also fixed a
+ qpak memory leak.
+ 08092002 - Added Quake PAK archiver (qpak.c) by Ed Sinjiashvili. Thanks!
+ Made (successful?) attempt to fix pthread-to-ui64 cast problem.
+ Check for OS/2 in configure.in, in case anyone gets autoconf and
+ such to work right on their OS/2 box.
+ 08012002 - Patched win32.c to compile.
+ 07302002 - Minor error handling fix (thanks, Alexander!)
07292002 - Found some memory leaks, thanks to Valgrind (which rules, btw).
Added Russian translations (koi8-r, cp1251, cp866, and iso-8859-5)
***************
*** 146,153 ****
05202002 - Added .cvsignore files.
05162002 - Edward Rudd also caught an embarrassing screwup by me in
! unix.c: the open-for-append call was using "wb+" instead of
! "ab" when calling fopen(). Doh!
! 05152002 - configure script now deals with systems that have a readline
! lib, but require it to be linked with curses. Thanks to Edward
Rudd for the patch.
05102002 - A trimmed-down zlib 1.1.4 is now included in the source distro, for
--- 186,193 ----
05202002 - Added .cvsignore files.
05162002 - Edward Rudd also caught an embarrassing screwup by me in
! unix.c: the open-for-append call was using "wb+" instead of
! "ab" when calling fopen(). Doh!
! 05152002 - configure script now deals with systems that have a readline
! lib, but require it to be linked with curses. Thanks to Edward
Rudd for the patch.
05102002 - A trimmed-down zlib 1.1.4 is now included in the source distro, for
***************
*** 164,173 ****
extras directory (public domain), as another example of using
the library.
! 04192002 - Corrected some win32 info in INSTALL. Changed Makefile to
package releases as .tar.gz instead of .tar.bz2.
! 04122002 - Some win32 cleanups and fixes across several files. Upped
version to 0.1.5.
04082002 - Fixed problem when calling __PHYSFS_setError before PHYSFS_init.
! 04062002 - Added MacOS info, etc to INSTALL. Patched unix.c and
test_physfs.c to compile on Darwin again.
04052002 - Added byte ordering API. Byte ordering fixes in grp.c, and some
--- 204,213 ----
extras directory (public domain), as another example of using
the library.
! 04192002 - Corrected some win32 info in INSTALL. Changed Makefile to
package releases as .tar.gz instead of .tar.bz2.
! 04122002 - Some win32 cleanups and fixes across several files. Upped
version to 0.1.5.
04082002 - Fixed problem when calling __PHYSFS_setError before PHYSFS_init.
! 04062002 - Added MacOS info, etc to INSTALL. Patched unix.c and
test_physfs.c to compile on Darwin again.
04052002 - Added byte ordering API. Byte ordering fixes in grp.c, and some
***************
*** 192,196 ****
typecasting issues). Found a call to ferror() I had missed in
unzip.c.
! 03302002 - Mutexes! PhysicsFS should be thread safe now, so long as you
don't try to do something like close a file at the same time as
you are reading from it in another thread. All reasonable race
--- 232,236 ----
typecasting issues). Found a call to ferror() I had missed in
unzip.c.
! 03302002 - Mutexes! PhysicsFS should be thread safe now, so long as you
don't try to do something like close a file at the same time as
you are reading from it in another thread. All reasonable race
***************
*** 209,213 ****
physfs mailing list. 1.0, here we come! Removed race condition from
grp.c and converted to file i/o abstraction layer calls from stdio.
! Tons of other fixes and enhancements.
03202002 - Patched platform/win32.c to compile.
03152002 - PHYSFS_setSaneConfig() now handles failure to set the write dir
--- 249,253 ----
physfs mailing list. 1.0, here we come! Removed race condition from
grp.c and converted to file i/o abstraction layer calls from stdio.
! Tons of other fixes and enhancements.
03202002 - Patched platform/win32.c to compile.
03152002 - PHYSFS_setSaneConfig() now handles failure to set the write dir
***************
*** 225,230 ****
Fixed. The win32 userdir will default to the base dir, now.
09252001 - Changed API: PHYSFS_setSaneConfig() takes an organization name, and
! sets up less directories. Be warned. Fixes from David Hedbor:
! make setSaneConfig() set write directory correctly if it had to
create the directory, and make sure that the writing functions
get used in dir.c when a file is opened for writing/appending.
--- 265,270 ----
Fixed. The win32 userdir will default to the base dir, now.
09252001 - Changed API: PHYSFS_setSaneConfig() takes an organization name, and
! sets up less directories. Be warned. Fixes from David Hedbor:
! make setSaneConfig() set write directory correctly if it had to
create the directory, and make sure that the writing functions
get used in dir.c when a file is opened for writing/appending.
Index: CREDITS
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/CREDITS,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -C2 -r1.1.2.3 -r1.1.2.4
*** CREDITS 30 Jul 2002 20:50:27 -0000 1.1.2.3
--- CREDITS 1 Nov 2002 10:43:36 -0000 1.1.2.4
***************
*** 19,40 ****
Fixes for missing current working directories,
PHYSFS_setSaneConfig() improvements,
! other bugfixes,
David Hedbor
! Darwin support,
Patrick Stein
configure fixes,
! RPM specfile,
Edward Rudd
GetLastModTime API,
! other stuff,
John R. Hall
! Various support, fixes and suggestions,
Alexander Pipelka
! Russian translation:
Ed Sinjiashvili
--- 19,41 ----
Fixes for missing current working directories,
PHYSFS_setSaneConfig() improvements,
! other bugfixes:
David Hedbor
! Darwin support:
Patrick Stein
configure fixes,
! RPM specfile:
Edward Rudd
GetLastModTime API,
! other stuff:
John R. Hall
! Various support, fixes and suggestions:
Alexander Pipelka
! Russian translation,
! QPAK archiver:
Ed Sinjiashvili
***************
*** 47,50 ****
--- 48,54 ----
Debian package support:
Colin Bayer
+
+ "abs-file.h" in "extras" dir:
+ Adam D. Moss
Other stuff:
Index: INSTALL
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/INSTALL,v
retrieving revision 1.1.1.1.6.1
retrieving revision 1.1.1.1.6.2
diff -C2 -r1.1.1.1.6.1 -r1.1.1.1.6.2
*** INSTALL 21 Jun 2002 20:07:52 -0000 1.1.1.1.6.1
--- INSTALL 1 Nov 2002 10:43:36 -0000 1.1.1.1.6.2
***************
*** 18,22 ****
! UNIX and BeOS:
(If you got this code from CVS, run "./bootstrap" first.)
--- 18,22 ----
! UNIX:
(If you got this code from CVS, run "./bootstrap" first.)
***************
*** 30,38 ****
remove all traces of the library from the system paths.
! BeOS doesn't seem to be building shared libraries with the version of
! autoconf/automake I used (even though it swears it did). If anyone has some
! insight into this, I'd like to hear from you.
WIN32:
--- 30,45 ----
remove all traces of the library from the system paths.
! Primary Unix development is done with GNU/Linux, but PhysicsFS is known to
! work out of the box with several flavors of Unix. It it doesn't work, patches
! to get it running can be sent to address@hidden
+ BeOS:
+ Use the "Unix" instructions, above.
+
+
+ AtheOS:
+ Use the "Unix" instructions, above.
+
WIN32:
***************
*** 40,53 ****
toolchain, follow the Unix instructions, above.
! Point Visual Studio 6.0 at "physfs.dsp" in the root of the source tree, and
! build. This will produce a "physfs.dll" and "physfs.lib" (shared library and
! import lib, respectively) in either a "Debug" or "Release" directory,
! depending on what configuration you chose to build. After building the lib,
! you can make sure it works by building the "test_physfs.dsp" project file,
! which will create "test_physfs.exe" in "Debug" or "Release". This EXE is
! linked against the DLL you built previously.
! Visual Studio.NET probably handles these files, but we'll have honest-to-god
! .vcproj files in the next official release.
If you're using another compiler, send me a patch when you get it working. :)
--- 47,61 ----
toolchain, follow the Unix instructions, above.
! If you're using Visual C++ 6, point it at "physfs.dsp" in the root of the
! source tree, and build. This will produce a "physfs.dll" and "physfs.lib"
! (shared library and import lib, respectively) in either a "Debug" or
! "Release" directory, depending on what configuration you chose to build.
! After building the lib, you can make sure it works by building the
! "test_physfs.dsp" project file, which will create "test_physfs.exe" in
! "Debug" or "Release". This EXE is linked against the DLL you built
! previously.
! Visual Studio.NET users should do the same thing, but use the "physfs.vcproj"
! and "test_physfs.vcproj" project files instead.
If you're using another compiler, send me a patch when you get it working. :)
***************
*** 83,92 ****
"no input files" then you've got the tools installed.
! From a terminal, run "./configure --disable-shared --enable-static". Run
! "make". This will get you a static library and a "test_physfs" binary.
!
! I would love for someone to fix this so it will build shared libraries (since
! static libraries make it awkward to deal with the license terms), or send me
! Project Builder libraries.
If someone is willing to maintain prebuilt PhysicsFS Shared Libraries for
--- 91,95 ----
"no input files" then you've got the tools installed.
! Follow the Unix directions, above (configure, make, make install).
If someone is willing to maintain prebuilt PhysicsFS Shared Libraries for
***************
*** 94,104 ****
OTHER PLATFORMS:
Many Unix-like platforms might "just work" with the GNU autoconf tools. Some
of these platforms are known to have worked at one time, but have not been
! heavily tested, if tested at all. To implement a new platform or archiver,
! please read the heavily-commented physfs_internal.h and look in the platform/
! and archiver/ directories for examples.
--ryan. (address@hidden)
--- 97,122 ----
+ OS/2:
+ You need EMX installed. I tried this on a stock Warp 4 install, no fixpaks.
+ I used the latest EMX and patches (which are several years old now). You need
+ to install link386.exe (Selective Install, "link object modules" option). Once
+ EMX is installed correctly, unpack the source to PhysicsFS and run the script
+ file "makeos2.cmd". I know this isn't ideal, but I wanted to have this build
+ without users having to hunt down a "make" program (While several exist, EMX
+ doesn't come with one). If someone wants to hack some REXX to make this a bit
+ more piccky about recompiling, I'll accept the patch.
+
+ If someone is willing to maintain prebuilt PhysicsFS Shared Libraries for
+ OS/2, I'd like to hear from you; send an email to address@hidden
+
OTHER PLATFORMS:
Many Unix-like platforms might "just work" with the GNU autoconf tools. Some
of these platforms are known to have worked at one time, but have not been
! heavily tested, if tested at all. PhysicsFS is, as far as we know, 64-bit and
! byteorder clean, and is known to compile on several compilers across many
! platforms. To implement a new platform or archiver, please read the
! heavily-commented physfs_internal.h and look in the platform/ and archiver/
! directories for examples.
--ryan. (address@hidden)
Index: TODO
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/TODO,v
retrieving revision 1.1.1.1.6.5
retrieving revision 1.1.1.1.6.6
diff -C2 -r1.1.1.1.6.5 -r1.1.1.1.6.6
*** TODO 30 Jul 2002 20:50:27 -0000 1.1.1.1.6.5
--- TODO 1 Nov 2002 10:43:36 -0000 1.1.1.1.6.6
***************
*** 4,8 ****
this stuff. Some might be dupes, some might be done already.
- - Include the Visual Studio.NET project file in CVS directly.
- Other archivers: perhaps tar(.gz|.bz2), RPM, ARJ, etc. These are less
important, since streaming archives aren't of much value to games (which
--- 4,7 ----
***************
*** 12,17 ****
nice for an email program. That's blue sky, unless someone wants to tackle
it.
! - Need PHYSFS_LANG_FRENCH, PHYSFS_LANG_SPANISH, and PHYSFS_LANG_GERMAN.
! - Figure out that pesky pthread casting problem.
- macclassic.c :
"/* (Hmm. Default behaviour is broken in the base library. :) ) */"
--- 11,17 ----
nice for an email program. That's blue sky, unless someone wants to tackle
it.
! - Need PHYSFS_LANG_GERMAN.
! - I'm a little nervous about the use of linked lists in qpak.c.
! - Add qpak.c and PHYSFS_SUPPORTS_QPAK to mac classic projects.
- macclassic.c :
"/* (Hmm. Default behaviour is broken in the base library. :) ) */"
***************
*** 19,25 ****
MacOS 8.1
- Platforms to port to: PocketPC (Maybe can just use win32.c?),
! Amiga (needs platform driver).
- Use __cdecl in physfs.h?
- Look for FIXMEs (many marked with "!!!" in comments).
- Probably other stuff. Requests and recommendations are welcome.
--- 19,31 ----
MacOS 8.1
- Platforms to port to: PocketPC (Maybe can just use win32.c?),
! Amiga (needs platform driver), DOS4GW (platform driver).
! - profile string list interpolation.
! - We have two different ways to find dir entries in zip.c.
! - Do symlinks in zip archiver work when they point to dirs?
! - Is building internal zlib broken?
! - Enable more warnings?
- Use __cdecl in physfs.h?
- Look for FIXMEs (many marked with "!!!" in comments).
+ - Check for tab chars in the source.
- Probably other stuff. Requests and recommendations are welcome.
Index: bootstrap
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/bootstrap,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -r1.1.2.2 -r1.1.2.3
*** bootstrap 21 Jun 2002 22:10:02 -0000 1.1.2.2
--- bootstrap 1 Nov 2002 10:43:36 -0000 1.1.2.3
***************
*** 5,10 ****
set -e
echo "Initial preparation...this can take awhile, so sit tight..."
! libtoolize --automake --copy --force
aclocal
autoheader
automake --foreign --add-missing --copy
--- 5,11 ----
set -e
echo "Initial preparation...this can take awhile, so sit tight..."
! perl -w -e 'use File::Copy; exit 0 if (-f "Makefile.am"); my $x = `automake
--version |head -n 1`; chomp($x); $x = 0.0 if ($x !~
s/\A.*?(\d+\.\d+).*\Z/$1/); if ($x < 1.5) { copy("./Makefile.am.oldautomake",
"./Makefile.am"); } else { copy("./Makefile.am.newautomake", "./Makefile.am");
}'
aclocal
+ libtoolize --automake --copy --force
autoheader
automake --foreign --add-missing --copy
Index: configure.in
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/configure.in,v
retrieving revision 1.1.2.9
retrieving revision 1.1.2.10
diff -C2 -r1.1.2.9 -r1.1.2.10
*** configure.in 30 Jul 2002 20:50:27 -0000 1.1.2.9
--- configure.in 1 Nov 2002 10:43:36 -0000 1.1.2.10
***************
*** 68,83 ****
AC_ARG_ENABLE(debug,
[ --enable-debug enable debug mode [default=yes]],
! , enable_debug=yes)
if test x$enable_debug = xyes; then
if test x$ac_cv_prog_cc_g = xyes; then
! CFLAGS="-g -O0"
else
! CFLAGS="-O0"
fi
! CFLAGS="$CFLAGS -Werror -Wall"
AC_DEFINE([DEBUG], 1, [define if debug build is enabled])
AC_DEFINE([DEBUG_CHATTER], 1, [define if debug chatter is enabled])
else
! CFLAGS="-O2"
AC_DEFINE([NDEBUG], 1, [define if debug build is disabled])
fi
--- 68,83 ----
AC_ARG_ENABLE(debug,
[ --enable-debug enable debug mode [default=yes]],
! , enable_debug=no)
if test x$enable_debug = xyes; then
if test x$ac_cv_prog_cc_g = xyes; then
! PHYSFSCFLAGS="-g -O0"
else
! PHYSFSCFLAGS="-O0"
fi
! PHYSFSCFLAGS="$PHYSFSCFLAGS -Werror -Wall"
AC_DEFINE([DEBUG], 1, [define if debug build is enabled])
AC_DEFINE([DEBUG_CHATTER], 1, [define if debug chatter is enabled])
else
! PHYSFSCFLAGS="-O2"
AC_DEFINE([NDEBUG], 1, [define if debug build is disabled])
fi
***************
*** 85,88 ****
--- 85,100 ----
dnl ---------------------------------------------------------------------
+ dnl Profile sorts, etc?
+ dnl ---------------------------------------------------------------------
+
+ AC_ARG_ENABLE(profiling,
+ [ --enable-profiling do algorithm profiling [default=no]],
+ , enable_profiling=no)
+ if test x$enable_profiling = xyes; then
+ AC_DEFINE([PHYSFS_PROFILING], 1, [define to profile sorting, etc
algorithms])
+ fi
+
+
+ dnl ---------------------------------------------------------------------
dnl Build test program?
dnl ---------------------------------------------------------------------
***************
*** 90,95 ****
AC_ARG_ENABLE(testprog,
[ --enable-testprog build test program [default=yes]],
! , enable_testprog=yes)
!
dnl ---------------------------------------------------------------------
--- 102,106 ----
AC_ARG_ENABLE(testprog,
[ --enable-testprog build test program [default=yes]],
! , enable_testprog=yes)
dnl ---------------------------------------------------------------------
***************
*** 102,106 ****
AC_ARG_ENABLE(zip,
[ --enable-zip enable ZIP support [default=yes]],
! , enable_zip=yes)
if test x$enable_zip = xyes; then
AC_DEFINE([PHYSFS_SUPPORTS_ZIP], 1, [define if zip support is enabled])
--- 113,117 ----
AC_ARG_ENABLE(zip,
[ --enable-zip enable ZIP support [default=yes]],
! , enable_zip=yes)
if test x$enable_zip = xyes; then
AC_DEFINE([PHYSFS_SUPPORTS_ZIP], 1, [define if zip support is enabled])
***************
*** 109,116 ****
! dnl Check for zip archiver inclusion...
AC_ARG_ENABLE(grp,
[ --enable-grp enable Build Engine GRP support [default=yes]],
! , enable_grp=yes)
if test x$enable_grp = xyes; then
AC_DEFINE([PHYSFS_SUPPORTS_GRP], 1, [define if grp support is enabled])
--- 120,127 ----
! dnl Check for grp archiver inclusion...
AC_ARG_ENABLE(grp,
[ --enable-grp enable Build Engine GRP support [default=yes]],
! , enable_grp=yes)
if test x$enable_grp = xyes; then
AC_DEFINE([PHYSFS_SUPPORTS_GRP], 1, [define if grp support is enabled])
***************
*** 118,121 ****
--- 129,141 ----
+ 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
+
+ dnl Check if we should statically link the included zlib...
AC_ARG_ENABLE(internal-zlib,
[ --enable-internal-zlib use included zlib [default=only if needed]],
***************
*** 174,178 ****
AC_ARG_ENABLE(readline,
[ --enable-readline use GNU readline in test program [default=yes]],
! , enable_readline=yes)
if test x$enable_readline = xyes; then
AC_CHECK_HEADER(readline/readline.h, have_readline_hdr=yes)
--- 194,199 ----
AC_ARG_ENABLE(readline,
[ --enable-readline use GNU readline in test program [default=yes]],
! , enable_readline=yes)
!
if test x$enable_readline = xyes; then
AC_CHECK_HEADER(readline/readline.h, have_readline_hdr=yes)
***************
*** 199,203 ****
AC_ARG_ENABLE(pthreads,
[ --enable-pthreads include POSIX threads support [default=yes]],
! , enable_pthreads=yes)
if test x$enable_pthreads = xyes; then
AC_CHECK_HEADER(pthread.h, have_pthread_hdr=yes)
--- 220,224 ----
AC_ARG_ENABLE(pthreads,
[ --enable-pthreads include POSIX threads support [default=yes]],
! , enable_pthreads=yes)
if test x$enable_pthreads = xyes; then
AC_CHECK_HEADER(pthread.h, have_pthread_hdr=yes)
***************
*** 210,214 ****
AC_ARG_ENABLE(cdrom,
[ --enable-cdrom include CD-ROM support [default=yes]],
! , enable_cdrom=yes)
if test x$enable_cdrom = xyes; then
dnl reset this and let header detection reenable...
--- 231,236 ----
AC_ARG_ENABLE(cdrom,
[ --enable-cdrom include CD-ROM support [default=yes]],
! , enable_cdrom=yes)
!
if test x$enable_cdrom = xyes; then
dnl reset this and let header detection reenable...
***************
*** 231,238 ****
dnl determine language.
- physfslang=english
AC_ARG_ENABLE(language,
[ --enable-language=lang Select natural language. [default=english]],
! physfslang=`echo $enable_language |tr A-Z a-z`)
AC_MSG_CHECKING([if language choice is supported])
--- 253,259 ----
dnl determine language.
AC_ARG_ENABLE(language,
[ --enable-language=lang Select natural language. [default=english]],
! physfslang=`echo $enable_language |tr A-Z a-z`, physfslang=english)
AC_MSG_CHECKING([if language choice is supported])
***************
*** 317,321 ****
if test x$build_os = xcygwin; then
this_is_cygwin=yes
! CFLAGS="$CFLAGS -DWIN32"
enable_pthreads=no
have_non_posix_threads=yes
--- 338,342 ----
if test x$build_os = xcygwin; then
this_is_cygwin=yes
! PHYSFSCFLAGS="$PHYSFSCFLAGS -DWIN32"
enable_pthreads=no
have_non_posix_threads=yes
***************
*** 343,347 ****
if test x$x = xfreebsd; then
this_is_freebsd=yes
! LDFLAGS="$LDFLAGS -pthread"
fi
--- 364,368 ----
if test x$x = xfreebsd; then
this_is_freebsd=yes
! PHYSFSLDFLAGS="$PHYSFSLDFLAGS -pthread"
fi
***************
*** 355,359 ****
if test x$x = xopenbsd; then
this_is_openbsd=yes
! LDFLAGS="$LDFLAGS -pthread"
fi
--- 376,380 ----
if test x$x = xopenbsd; then
this_is_openbsd=yes
! PHYSFSLDFLAGS="$PHYSFSLDFLAGS -pthread"
fi
***************
*** 374,377 ****
--- 395,412 ----
fi
+ this_is_os2=no
+ if test x$we_have_sed = xyes; then
+ AC_MSG_CHECKING([if this is OS/2])
+ x=`echo $build_os |tr A-Z a-z |sed "s/.*os2.*/os2/"`
+ if test x$x = xos2; then
+ this_is_os2=yes
+ PHYSFSCFLAGS="$PHYSFSCFLAGS -DOS2"
+ fi
+
+ AC_MSG_RESULT([$this_is_os2])
+ fi
+
+
+
dnl Some platform might disable this, so check this down here...
if test x$enable_cdrom != xyes; then
***************
*** 416,421 ****
AC_CHECK_FUNCS([memset strrchr])
! CFLAGS="$CFLAGS -D_REENTRANT -D_THREAD_SAFE"
! LDFLAGS="$LDFLAGS -no-undefined"
dnl Add Makefile conditionals
--- 451,458 ----
AC_CHECK_FUNCS([memset strrchr])
! AC_CHECK_SIZEOF(int, 4)
!
! CFLAGS="$CFLAGS $PHYSFSCFLAGS -D_REENTRANT -D_THREAD_SAFE"
! LDFLAGS="$LDFLAGS $PHYSFSLDFLAGS -no-undefined"
dnl Add Makefile conditionals
Index: physfs.c
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/physfs.c,v
retrieving revision 1.1.1.1.6.6
retrieving revision 1.1.1.1.6.7
diff -C2 -r1.1.1.1.6.6 -r1.1.1.1.6.7
*** physfs.c 30 Jul 2002 20:50:27 -0000 1.1.1.1.6.6
--- physfs.c 1 Nov 2002 10:43:36 -0000 1.1.1.1.6.7
***************
*** 13,16 ****
--- 13,21 ----
#endif
+ #if (defined PHYSFS_PROFILING)
+ #include <sys/time.h>
+ #include <unistd.h>
+ #endif
+
#include <stdio.h>
#include <stdlib.h>
***************
*** 18,22 ****
#include <fcntl.h>
#include <errno.h>
- #include <assert.h>
#include "physfs.h"
--- 23,26 ----
***************
*** 58,63 ****
--- 62,73 ----
#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;
+
static const PHYSFS_ArchiveInfo *supported_types[] =
{
***************
*** 70,73 ****
--- 80,87 ----
#endif
+ #if (defined PHYSFS_SUPPORTS_QPAK)
+ &__PHYSFS_ArchiveInfo_QPAK,
+ #endif
+
NULL
};
***************
*** 83,86 ****
--- 97,104 ----
#endif
+ #if (defined PHYSFS_SUPPORTS_QPAK)
+ &__PHYSFS_DirFunctions_QPAK,
+ #endif
+
&__PHYSFS_DirFunctions_DIR,
NULL
***************
*** 107,110 ****
--- 125,357 ----
/* functions ... */
+ void __PHYSFS_bubble_sort(void *a, PHYSFS_uint32 lo, PHYSFS_uint32 hi,
+ int (*cmpfn)(void *, PHYSFS_uint32, PHYSFS_uint32),
+ void (*swapfn)(void *, PHYSFS_uint32, PHYSFS_uint32))
+ {
+ PHYSFS_uint32 i;
+ int sorted;
+
+ do
+ {
+ sorted = 1;
+ for (i = lo; i < hi; i++)
+ {
+ if (cmpfn(a, i, i + 1) > 0)
+ {
+ swapfn(a, i, i + 1);
+ sorted = 0;
+ } /* if */
+ } /* for */
+ } while (!sorted);
+ } /* __PHYSFS_bubble_sort */
+
+
+ void __PHYSFS_quick_sort(void *a, PHYSFS_uint32 lo, PHYSFS_uint32 hi,
+ int (*cmpfn)(void *, PHYSFS_uint32, PHYSFS_uint32),
+ void (*swapfn)(void *, PHYSFS_uint32, PHYSFS_uint32))
+ {
+ PHYSFS_uint32 i;
+ PHYSFS_uint32 j;
+ PHYSFS_uint32 v;
+
+ if ((hi - lo) <= PHYSFS_QUICKSORT_THRESHOLD)
+ __PHYSFS_bubble_sort(a, lo, hi, cmpfn, swapfn);
+ else
+ {
+ i = (hi + lo) / 2;
+
+ if (cmpfn(a, lo, i) > 0) swapfn(a, lo, i);
+ if (cmpfn(a, lo, hi) > 0) swapfn(a, lo, hi);
+ if (cmpfn(a, i, hi) > 0) swapfn(a, i, hi);
+
+ j = hi - 1;
+ swapfn(a, i, j);
+ i = lo;
+ v = j;
+ while (1)
+ {
+ while(cmpfn(a, ++i, v) < 0) { /* do nothing */ }
+ while(cmpfn(a, --j, v) > 0) { /* do nothing */ }
+ if (j < i)
+ break;
+ swapfn(a, i, j);
+ } /* while */
+ swapfn(a, i, hi-1);
+ __PHYSFS_quick_sort(a, lo, j, cmpfn, swapfn);
+ __PHYSFS_quick_sort(a, i+1, hi, cmpfn, swapfn);
+ } /* else */
+ } /* __PHYSFS_quick_sort */
+
+
+ void __PHYSFS_sort(void *entries, PHYSFS_uint32 max,
+ int (*cmpfn)(void *, PHYSFS_uint32, PHYSFS_uint32),
+ void (*swapfn)(void *, PHYSFS_uint32, PHYSFS_uint32))
+ {
+ /*
+ * Quicksort w/ Bubblesort fallback algorithm inspired by code from here:
+ * http://www.cs.ubc.ca/spider/harrison/Java/sorting-demo.html
+ */
+ __PHYSFS_quick_sort(entries, 0, max - 1, cmpfn, swapfn);
+ } /* __PHYSFS_sort */
+
+
+
+ #if (defined PHYSFS_PROFILING)
+
+ #define PHYSFS_TEST_SORT_ITERATIONS 150
+ #define PHYSFS_TEST_SORT_ELEMENTS (64 * 1024)
+
+ static int __PHYSFS_test_sort_cmp(void *_a, PHYSFS_uint32 x, PHYSFS_uint32 y)
+ {
+ PHYSFS_sint32 *a = (PHYSFS_sint32 *) _a;
+ PHYSFS_sint32 one = a[x];
+ PHYSFS_sint32 two = a[y];
+
+ if (one < two)
+ return(-1);
+ else if (one > two)
+ return(1);
+
+ return(0);
+ } /* __PHYSFS_test_sort_cmp */
+
+
+ static void __PHYSFS_test_sort_swap(void *_a, PHYSFS_uint32 x, PHYSFS_uint32
y)
+ {
+ PHYSFS_sint32 *a = (PHYSFS_sint32 *) _a;
+ PHYSFS_sint32 tmp;
+ tmp = a[x];
+ a[x] = a[y];
+ a[y] = tmp;
+ } /* __PHYSFS_test_sort_swap */
+
+
+ static int __PHYSFS_test_sort_do(PHYSFS_uint32 *timer,
+ PHYSFS_sint32 *a, PHYSFS_uint32 max,
+ int (*cmpfn)(void *, PHYSFS_uint32, PHYSFS_uint32),
+ void (*swapfn)(void *, PHYSFS_uint32, PHYSFS_uint32))
+ {
+ PHYSFS_uint32 i;
+ struct timeval starttime, endtime;
+
+ gettimeofday(&starttime, NULL);
+ __PHYSFS_sort(a, max, cmpfn, swapfn);
+ gettimeofday(&endtime, NULL);
+
+ for (i = 1; i < max; i++)
+ {
+ if (a[i] < a[i - 1])
+ return(0);
+ } /* for */
+
+ if (timer != NULL)
+ {
+ *timer = ( ((endtime.tv_sec - starttime.tv_sec) * 1000) +
+ ((endtime.tv_usec - starttime.tv_usec) / 1000) );
+ } /* if */
+
+ return(1);
+ } /* __PHYSFS_test_sort_time */
+
+
+ static void __PHYSFS_test_sort(void)
+ {
+ PHYSFS_uint32 elasped[PHYSFS_TEST_SORT_ITERATIONS];
+ PHYSFS_sint32 iter;
+ PHYSFS_sint32 a[PHYSFS_TEST_SORT_ELEMENTS];
+ PHYSFS_sint32 i, x;
+ int success;
+
+ printf("Testing __PHYSFS_sort (linear presorted) ... ");
+ for (iter = 0; iter < PHYSFS_TEST_SORT_ITERATIONS; iter++)
+ {
+ /* set up array to sort. */
+ for (i = 0; i < PHYSFS_TEST_SORT_ELEMENTS; i++)
+ a[i] = i;
+
+ /* sort it. */
+ success = __PHYSFS_test_sort_do(&elasped[iter],
+ a, PHYSFS_TEST_SORT_ELEMENTS,
+ __PHYSFS_test_sort_cmp,
+ __PHYSFS_test_sort_swap);
+ if (!success)
+ break;
+ } /* for */
+
+ if (!success)
+ printf("Failed!\n");
+ else
+ {
+ for (x = 0, iter = 0; iter < PHYSFS_TEST_SORT_ITERATIONS; iter++)
+ x += elasped[iter];
+
+ x /= PHYSFS_TEST_SORT_ITERATIONS;
+ printf("Average run (%lu) ms.\n", (unsigned long) x);
+ } /* else */
+
+ printf("Testing __PHYSFS_sort (linear presorted reverse) ... ");
+ for (iter = 0; iter < PHYSFS_TEST_SORT_ITERATIONS; iter++)
+ {
+ /* set up array to sort. */
+ for (i = 0, x = PHYSFS_TEST_SORT_ELEMENTS;
+ i < PHYSFS_TEST_SORT_ELEMENTS;
+ i++, x--)
+ {
+ a[i] = x;
+ } /* for */
+
+ /* sort it. */
+ success = __PHYSFS_test_sort_do(&elasped[iter],
+ a, PHYSFS_TEST_SORT_ELEMENTS,
+ __PHYSFS_test_sort_cmp,
+ __PHYSFS_test_sort_swap);
+ if (!success)
+ break;
+ } /* for */
+
+ if (!success)
+ printf("Failed!\n");
+ else
+ {
+ for (x = 0, iter = 0; iter < PHYSFS_TEST_SORT_ITERATIONS; iter++)
+ x += elasped[iter];
+
+ x /= PHYSFS_TEST_SORT_ITERATIONS;
+ printf("Average run (%lu) ms.\n", (unsigned long) x);
+ } /* else */
+
+
+ printf("Testing __PHYSFS_sort (randomized) ... ");
+ for (iter = 0; iter < PHYSFS_TEST_SORT_ITERATIONS; iter++)
+ {
+ /* set up array to sort. */
+ for (i = 0; i < PHYSFS_TEST_SORT_ELEMENTS; i++)
+ a[i] = (PHYSFS_uint32) rand();
+
+ /* sort it. */
+ success = __PHYSFS_test_sort_do(&elasped[iter],
+ a, PHYSFS_TEST_SORT_ELEMENTS,
+ __PHYSFS_test_sort_cmp,
+ __PHYSFS_test_sort_swap);
+ if (!success)
+ break;
+ } /* for */
+
+ if (!success)
+ printf("Failed!\n");
+ else
+ {
+ for (x = 0, iter = 0; iter < PHYSFS_TEST_SORT_ITERATIONS; iter++)
+ x += elasped[iter];
+
+ x /= PHYSFS_TEST_SORT_ITERATIONS;
+ printf("Average run (%lu) ms.\n", (unsigned long) x);
+ } /* else */
+
+ printf("__PHYSFS_test_sort() complete.\n\n");
+ } /* __PHYSFS_test_sort */
+ #endif
+
+
static ErrMsg *findErrorForCurrentThread(void)
{
***************
*** 494,497 ****
--- 741,757 ----
/* This makes sure that the error subsystem is initialized. */
__PHYSFS_setError(PHYSFS_getLastError());
+
+ #if (defined PHYSFS_PROFILING)
+ srand(time(NULL));
+ setbuf(stdout, NULL);
+ printf("\n");
+ printf("********************************************************\n");
+ printf("Warning! Profiling is built into this copy of PhysicsFS!\n");
+ printf("********************************************************\n");
+ printf("\n");
+ printf("\n");
+ __PHYSFS_test_sort();
+ #endif
+
return(1);
} /* PHYSFS_init */
***************
*** 941,944 ****
--- 1201,1208 ----
char *str;
+ if (*fname == '\0') /* quick rejection. */
+ return(1);
+
+ /* !!! FIXME: Can we ditch this malloc()? */
start = str = malloc(strlen(fname) + 1);
BAIL_IF_MACRO(str == NULL, ERR_OUT_OF_MEMORY, 0);
***************
*** 961,969 ****
} /* if */
! if ((!allowSymLinks) && (h->funcs->isSymLink(h, str)))
{
! __PHYSFS_setError(ERR_SYMLINK_DISALLOWED);
! retval = 0;
! break;
} /* if */
--- 1225,1239 ----
} /* if */
! if (!allowSymLinks)
{
! if (h->funcs->isSymLink(h, str, &retval))
! {
! __PHYSFS_setError(ERR_SYMLINK_DISALLOWED);
! retval = 0;
! } /* if */
!
! /* break out early if path element is missing or it's a symlink.
*/
! if (!retval)
! break;
} /* if */
***************
*** 995,999 ****
BAIL_IF_MACRO_MUTEX(writeDir == NULL, ERR_NO_WRITE_DIR, stateLock, 0);
h = writeDir->dirHandle;
- BAIL_IF_MACRO_MUTEX(!h->funcs->mkdir, ERR_NOT_SUPPORTED, stateLock, 0);
BAIL_IF_MACRO_MUTEX(!__PHYSFS_verifySecurity(h, dname), NULL, stateLock,
0);
start = str = malloc(strlen(dname) + 1);
--- 1265,1268 ----
***************
*** 1038,1042 ****
BAIL_IF_MACRO_MUTEX(writeDir == NULL, ERR_NO_WRITE_DIR, stateLock, 0);
h = writeDir->dirHandle;
- BAIL_IF_MACRO_MUTEX(!h->funcs->remove, ERR_NOT_SUPPORTED, stateLock, 0);
BAIL_IF_MACRO_MUTEX(!__PHYSFS_verifySecurity(h, fname), NULL, stateLock,
0);
retval = h->funcs->remove(h, fname);
--- 1307,1310 ----
***************
*** 1050,1053 ****
--- 1318,1322 ----
{
PhysDirInfo *i;
+ const char *retval = NULL;
while (*filename == '/')
***************
*** 1055,1075 ****
__PHYSFS_platformGrabMutex(stateLock);
! for (i = searchPath; i != NULL; i = i->next)
{
DirHandle *h = i->dirHandle;
if (__PHYSFS_verifySecurity(h, filename))
{
! if (!h->funcs->exists(h, filename))
! __PHYSFS_setError(ERR_NO_SUCH_FILE);
! else
! {
! __PHYSFS_platformReleaseMutex(stateLock);
! return(i->dirName);
! } /* else */
} /* if */
} /* for */
__PHYSFS_platformReleaseMutex(stateLock);
! return(NULL);
} /* PHYSFS_getRealDir */
--- 1324,1339 ----
__PHYSFS_platformGrabMutex(stateLock);
! for (i = searchPath; ((i != NULL) && (retval == NULL)); i = i->next)
{
DirHandle *h = i->dirHandle;
if (__PHYSFS_verifySecurity(h, filename))
{
! if (h->funcs->exists(h, filename))
! retval = i->dirName;
} /* if */
} /* for */
__PHYSFS_platformReleaseMutex(stateLock);
! return(retval);
} /* PHYSFS_getRealDir */
***************
*** 1206,1209 ****
--- 1470,1475 ----
{
PhysDirInfo *i;
+ PHYSFS_sint64 retval = -1;
+ int fileExists = 0;
BAIL_IF_MACRO(fname == NULL, ERR_INVALID_ARGUMENT, 0);
***************
*** 1215,1241 ****
__PHYSFS_platformGrabMutex(stateLock);
! for (i = searchPath; i != NULL; i = i->next)
{
DirHandle *h = i->dirHandle;
if (__PHYSFS_verifySecurity(h, fname))
! {
! if (!h->funcs->exists(h, fname))
! __PHYSFS_setError(ERR_NO_SUCH_FILE);
! else
! {
! PHYSFS_sint64 retval = -1;
! if (h->funcs->getLastModTime == NULL)
! __PHYSFS_setError(ERR_NOT_SUPPORTED);
! else
! retval = h->funcs->getLastModTime(h, fname);
!
! __PHYSFS_platformReleaseMutex(stateLock);
! return(retval);
! } /* else */
! } /* if */
} /* for */
__PHYSFS_platformReleaseMutex(stateLock);
! return(-1); /* error set in verifysecurity/exists */
} /* PHYSFS_getLastModTime */
--- 1481,1493 ----
__PHYSFS_platformGrabMutex(stateLock);
! for (i = searchPath; ((i != NULL) && (!fileExists)); i = i->next)
{
DirHandle *h = i->dirHandle;
if (__PHYSFS_verifySecurity(h, fname))
! retval = h->funcs->getLastModTime(h, fname, &fileExists);
} /* for */
__PHYSFS_platformReleaseMutex(stateLock);
! return(retval);
} /* PHYSFS_getLastModTime */
***************
*** 1244,1247 ****
--- 1496,1501 ----
{
PhysDirInfo *i;
+ int retval = 0;
+ int fileExists = 0;
BAIL_IF_MACRO(fname == NULL, ERR_INVALID_ARGUMENT, 0);
***************
*** 1249,1274 ****
fname++;
! if (*fname == '\0')
! return(1);
__PHYSFS_platformGrabMutex(stateLock);
! for (i = searchPath; i != NULL; i = i->next)
{
DirHandle *h = i->dirHandle;
if (__PHYSFS_verifySecurity(h, fname))
! {
! if (!h->funcs->exists(h, fname)) /* !!! FIXME: Let archivers
figure this out. */
! __PHYSFS_setError(ERR_NO_SUCH_FILE);
! else
! {
! int retval = h->funcs->isDirectory(h, fname);
! __PHYSFS_platformReleaseMutex(stateLock);
! return(retval);
! } /* else */
! } /* if */
} /* for */
__PHYSFS_platformReleaseMutex(stateLock);
! return(0);
} /* PHYSFS_isDirectory */
--- 1503,1518 ----
fname++;
! BAIL_IF_MACRO(*fname == '\0', NULL, 1); /* Root is always a dir. :) */
__PHYSFS_platformGrabMutex(stateLock);
! for (i = searchPath; ((i != NULL) && (!fileExists)); i = i->next)
{
DirHandle *h = i->dirHandle;
if (__PHYSFS_verifySecurity(h, fname))
! retval = h->funcs->isDirectory(h, fname, &fileExists);
} /* for */
__PHYSFS_platformReleaseMutex(stateLock);
! return(retval);
} /* PHYSFS_isDirectory */
***************
*** 1277,1283 ****
{
PhysDirInfo *i;
! if (!allowSymLinks)
! return(0);
BAIL_IF_MACRO(fname == NULL, ERR_INVALID_ARGUMENT, 0);
--- 1521,1528 ----
{
PhysDirInfo *i;
+ int retval = 0;
+ int fileExists = 0;
! BAIL_IF_MACRO(!allowSymLinks, ERR_SYMLINK_DISALLOWED, 0);
BAIL_IF_MACRO(fname == NULL, ERR_INVALID_ARGUMENT, 0);
***************
*** 1285,1307 ****
fname++;
__PHYSFS_platformGrabMutex(stateLock);
! for (i = searchPath; i != NULL; i = i->next)
{
DirHandle *h = i->dirHandle;
if (__PHYSFS_verifySecurity(h, fname))
! {
! if (!h->funcs->exists(h, fname))
! __PHYSFS_setError(ERR_NO_SUCH_FILE);
! else
! {
! int retval = h->funcs->isSymLink(h, fname);
! __PHYSFS_platformReleaseMutex(stateLock);
! return(retval);
! } /* else */
! } /* if */
} /* for */
__PHYSFS_platformReleaseMutex(stateLock);
! return(0);
} /* PHYSFS_isSymbolicLink */
--- 1530,1545 ----
fname++;
+ BAIL_IF_MACRO(*fname == '\0', NULL, 0); /* Root is never a symlink */
+
__PHYSFS_platformGrabMutex(stateLock);
! for (i = searchPath; ((i != NULL) && (!fileExists)); i = i->next)
{
DirHandle *h = i->dirHandle;
if (__PHYSFS_verifySecurity(h, fname))
! retval = h->funcs->isSymLink(h, fname, &fileExists);
} /* for */
__PHYSFS_platformReleaseMutex(stateLock);
! return(retval);
} /* PHYSFS_isSymbolicLink */
***************
*** 1359,1365 ****
PHYSFS_file *PHYSFS_openRead(const char *fname)
{
! PHYSFS_file *retval;
FileHandle *rc = NULL;
FileHandleList *list;
PhysDirInfo *i;
--- 1597,1604 ----
PHYSFS_file *PHYSFS_openRead(const char *fname)
{
! PHYSFS_file *retval = NULL;
FileHandle *rc = NULL;
FileHandleList *list;
+ int fileExists = 0;
PhysDirInfo *i;
***************
*** 1370,1384 ****
__PHYSFS_platformGrabMutex(stateLock);
BAIL_IF_MACRO_MUTEX(!searchPath, ERR_NOT_IN_SEARCH_PATH, stateLock, NULL);
! for (i = searchPath; i != NULL; i = i->next)
{
DirHandle *h = i->dirHandle;
if (__PHYSFS_verifySecurity(h, fname))
! {
! rc = h->funcs->openRead(h, fname);
! if (rc != NULL)
! break;
! } /* if */
} /* for */
-
BAIL_IF_MACRO_MUTEX(rc == NULL, NULL, stateLock, NULL);
--- 1609,1618 ----
__PHYSFS_platformGrabMutex(stateLock);
BAIL_IF_MACRO_MUTEX(!searchPath, ERR_NOT_IN_SEARCH_PATH, stateLock, NULL);
! for (i = searchPath; ((i != NULL) && (!fileExists)); i = i->next)
{
DirHandle *h = i->dirHandle;
if (__PHYSFS_verifySecurity(h, fname))
! rc = h->funcs->openRead(h, fname, &fileExists);
} /* for */
BAIL_IF_MACRO_MUTEX(rc == NULL, NULL, stateLock, NULL);
***************
*** 1450,1456 ****
{
FileHandle *h = (FileHandle *) handle->opaque;
- assert(h != NULL);
- assert(h->funcs != NULL);
- BAIL_IF_MACRO(h->funcs->read == NULL, ERR_NOT_SUPPORTED, -1);
return(h->funcs->read(h, buffer, objSize, objCount));
} /* PHYSFS_read */
--- 1684,1687 ----
***************
*** 1461,1467 ****
{
FileHandle *h = (FileHandle *) handle->opaque;
- assert(h != NULL);
- assert(h->funcs != NULL);
- BAIL_IF_MACRO(h->funcs->write == NULL, ERR_NOT_SUPPORTED, -1);
return(h->funcs->write(h, buffer, objSize, objCount));
} /* PHYSFS_write */
--- 1692,1695 ----
***************
*** 1471,1477 ****
{
FileHandle *h = (FileHandle *) handle->opaque;
- assert(h != NULL);
- assert(h->funcs != NULL);
- BAIL_IF_MACRO(h->funcs->eof == NULL, ERR_NOT_SUPPORTED, -1);
return(h->funcs->eof(h));
} /* PHYSFS_eof */
--- 1699,1702 ----
***************
*** 1481,1487 ****
{
FileHandle *h = (FileHandle *) handle->opaque;
- assert(h != NULL);
- assert(h->funcs != NULL);
- BAIL_IF_MACRO(h->funcs->tell == NULL, ERR_NOT_SUPPORTED, -1);
return(h->funcs->tell(h));
} /* PHYSFS_tell */
--- 1706,1709 ----
***************
*** 1491,1498 ****
{
FileHandle *h = (FileHandle *) handle->opaque;
- assert(h != NULL);
- assert(h->funcs != NULL);
- BAIL_IF_MACRO(h->funcs->seek == NULL, ERR_NOT_SUPPORTED, 0);
- BAIL_IF_MACRO(pos < 0, ERR_INVALID_ARGUMENT, 0);
return(h->funcs->seek(h, pos));
} /* PHYSFS_seek */
--- 1713,1716 ----
***************
*** 1502,1509 ****
{
FileHandle *h = (FileHandle *) handle->opaque;
- assert(h != NULL);
- assert(h->funcs != NULL);
- BAIL_IF_MACRO(h->funcs->fileLength == NULL, ERR_NOT_SUPPORTED, 0);
-
return(h->funcs->fileLength(h));
} /* PHYSFS_filelength */
--- 1720,1723 ----
***************
*** 1542,1547 ****
return(retval);
} /* __PHYSFS_addToLinkedStringList */
-
-
/* end of physfs.c ... */
--- 1756,1759 ----
Index: physfs.dsp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/physfs.dsp,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -r1.1.2.2 -r1.1.2.3
*** physfs.dsp 17 Jul 2002 14:48:29 -0000 1.1.2.2
--- physfs.dsp 1 Nov 2002 10:43:36 -0000 1.1.2.3
***************
*** 45,49 ****
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /WX /Gm /ZI /Od /I "." /I "zlibwin32" /D
"_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHYSFS_EXPORTS"
/D "PHYSFS_SUPPORTS_GRP" /D "PHYSFS_SUPPORTS_ZIP" /YX /FD /GZ /c
! # ADD CPP /nologo /MDd /Ze /W3 /WX /Gm /ZI /Od /I "." /I "zlib114" /D
"_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHYSFS_EXPORTS"
/D "PHYSFS_SUPPORTS_GRP" /D "PHYSFS_SUPPORTS_ZIP" /YX /FD /GZ /c
# SUBTRACT CPP /X
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
--- 45,49 ----
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /WX /Gm /ZI /Od /I "." /I "zlibwin32" /D
"_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHYSFS_EXPORTS"
/D "PHYSFS_SUPPORTS_GRP" /D "PHYSFS_SUPPORTS_ZIP" /YX /FD /GZ /c
! # ADD CPP /nologo /MDd /W3 /WX /Gm /ZI /Od /I "." /I "zlib114" /D "_DEBUG" /D
"WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHYSFS_EXPORTS" /D
"PHYSFS_SUPPORTS_GRP" /D "PHYSFS_SUPPORTS_ZIP" /D "PHYSFS_SUPPORTS_QPAK" /YX
/FD /GZ /c
# SUBTRACT CPP /X
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
***************
*** 75,79 ****
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /WX /O2 /I "." /I "zlibwin32" /D "NDEBUG" /D
"WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHYSFS_EXPORTS" /D
"PHYSFS_SUPPORTS_GRP" /D "PHYSFS_SUPPORTS_ZIP" /YX /FD /c
! # ADD CPP /nologo /MD /Ze /W3 /WX /O2 /I "." /I "zlib114" /D "NDEBUG" /D
"WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHYSFS_EXPORTS" /D
"PHYSFS_SUPPORTS_GRP" /D "PHYSFS_SUPPORTS_ZIP" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
--- 75,79 ----
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /WX /O2 /I "." /I "zlibwin32" /D "NDEBUG" /D
"WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHYSFS_EXPORTS" /D
"PHYSFS_SUPPORTS_GRP" /D "PHYSFS_SUPPORTS_ZIP" /YX /FD /c
! # ADD CPP /nologo /MD /W3 /WX /O2 /I "." /I "zlib114" /D "NDEBUG" /D "WIN32"
/D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHYSFS_EXPORTS" /D
"PHYSFS_SUPPORTS_GRP" /D "PHYSFS_SUPPORTS_ZIP" /D "PHYSFS_SUPPORTS_QPAK" /YX
/FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
***************
*** 151,154 ****
--- 151,158 ----
SOURCE=.\physfs_byteorder.c
+ # End Source File
+ # Begin Source File
+
+ SOURCE=.\archivers\qpak.c
# End Source File
# Begin Source File
Index: physfs_byteorder.c
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/physfs_byteorder.c,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -C2 -r1.1.2.3 -r1.1.2.4
*** physfs_byteorder.c 11 Jul 2002 08:59:29 -0000 1.1.2.3
--- physfs_byteorder.c 1 Nov 2002 10:43:36 -0000 1.1.2.4
***************
*** 29,32 ****
--- 29,33 ----
(defined(__mips__) && defined(__MIPSEL__)) || \
defined(__SYMBIAN32__) || \
+ defined(__x86_64__) || \
defined(__LITTLE_ENDIAN__)
#define PHYSFS_BYTEORDER PHYSFS_LIL_ENDIAN
Index: physfs_internal.h
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/physfs_internal.h,v
retrieving revision 1.1.1.1.6.6
retrieving revision 1.1.1.1.6.7
diff -C2 -r1.1.1.1.6.6 -r1.1.1.1.6.7
*** physfs_internal.h 30 Jul 2002 20:50:27 -0000 1.1.1.1.6.6
--- physfs_internal.h 1 Nov 2002 10:43:36 -0000 1.1.1.1.6.7
***************
*** 701,705 ****
/* end LANG section. */
-
struct __PHYSFS_DIRHANDLE__;
struct __PHYSFS_FILEFUNCTIONS__;
--- 701,704 ----
***************
*** 844,847 ****
--- 843,847 ----
* Returns non-zero if filename can be opened for reading.
* This filename is in platform-independent notation.
+ * You should not follow symlinks.
*/
int (*exists)(DirHandle *r, const char *name);
***************
*** 852,863 ****
* Symlinks should be followed; if what the symlink points
* to is missing, or isn't a directory, then the retval is zero.
*/
! int (*isDirectory)(DirHandle *r, const char *name);
/*
* Returns non-zero if filename is really a symlink.
* This filename is in platform-independent notation.
*/
! int (*isSymLink)(DirHandle *r, const char *name);
/*
--- 852,871 ----
* Symlinks should be followed; if what the symlink points
* to is missing, or isn't a directory, then the retval is zero.
+ *
+ * Regardless of success or failure, please set *fileExists to
+ * non-zero if the file existed (even if it's a broken symlink!),
+ * zero if it did not.
*/
! int (*isDirectory)(DirHandle *r, const char *name, int *fileExists);
/*
* Returns non-zero if filename is really a symlink.
* This filename is in platform-independent notation.
+ *
+ * Regardless of success or failure, please set *fileExists to
+ * non-zero if the file existed (even if it's a broken symlink!),
+ * zero if it did not.
*/
! int (*isSymLink)(DirHandle *r, const char *name, int *fileExists);
/*
***************
*** 866,871 ****
* the epoch (Jan 1, 1970) on success.
* This filename is in platform-independent notation.
*/
! PHYSFS_sint64 (*getLastModTime)(DirHandle *r, const char *filename);
/*
--- 874,883 ----
* the epoch (Jan 1, 1970) on success.
* This filename is in platform-independent notation.
+ *
+ * Regardless of success or failure, please set *exists to
+ * non-zero if the file existed (even if it's a broken symlink!),
+ * zero if it did not.
*/
! PHYSFS_sint64 (*getLastModTime)(DirHandle *r, const char *fnm, int
*exist);
/*
***************
*** 876,881 ****
* Fail if the file does not exist.
* Returns NULL on failure, and calls __PHYSFS_setError().
*/
! FileHandle *(*openRead)(DirHandle *r, const char *filename);
/*
--- 888,897 ----
* Fail if the file does not exist.
* Returns NULL on failure, and calls __PHYSFS_setError().
+ *
+ * Regardless of success or failure, please set *fileExists to
+ * non-zero if the file existed (even if it's a broken symlink!),
+ * zero if it did not.
*/
! FileHandle *(*openRead)(DirHandle *r, const char *fname, int *fileExists);
/*
***************
*** 983,986 ****
--- 999,1026 ----
+ /*
+ * When sorting the entries in an archive, we use a modified QuickSort.
+ * When there are less then PHYSFS_QUICKSORT_THRESHOLD entries left to sort,
+ * we switch over to a BubbleSort for the remainder. Tweak to taste.
+ *
+ * You can override this setting by defining PHYSFS_QUICKSORT_THRESHOLD
+ * before #including "physfs_internal.h".
+ */
+ #ifndef PHYSFS_QUICKSORT_THRESHOLD
+ #define PHYSFS_QUICKSORT_THRESHOLD 4
+ #endif
+
+ /*
+ * Sort an array (or whatever) of (max) elements. This uses a mixture of
+ * a QuickSort and BubbleSort internally.
+ * (cmpfn) is used to determine ordering, and (swapfn) does the actual
+ * swapping of elements in the list.
+ *
+ * See zip.c for an example.
+ */
+ void __PHYSFS_sort(void *entries, PHYSFS_uint32 max,
+ int (*cmpfn)(void *, PHYSFS_uint32, PHYSFS_uint32),
+ void (*swapfn)(void *, PHYSFS_uint32, PHYSFS_uint32));
+
/* These get used all over for lessening code clutter. */
***************
*** 1223,1228 ****
/*
* Return non-zero if filename (in platform-dependent notation) exists.
! * Symlinks should be followed; if what the symlink points to is missing,
! * then the retval is false.
*/
int __PHYSFS_platformExists(const char *fname);
--- 1263,1270 ----
/*
* Return non-zero if filename (in platform-dependent notation) exists.
! * Symlinks should NOT be followed; at this stage, we do not care what the
! * symlink points to. Please call __PHYSFS_SetError() with the details of
! * why the file does not exist, if it doesn't; you are in a better position
! * to know (path not found, bogus filename, file itself is missing, etc).
*/
int __PHYSFS_platformExists(const char *fname);
***************
*** 1235,1239 ****
*/
PHYSFS_sint64 __PHYSFS_platformGetLastModTime(const char *fname);
-
/*
--- 1277,1280 ----
--- Makefile.am DELETED ---
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/src/physfs Makefile.am.newautomake,NONE,1.1.4.1 Makefile.am.oldautomake,NONE,1.1.4.1 makeos2.cmd,NONE,1.1.4.1 CHANGELOG,1.1.1.1.6.7,1.1.1.1.6.8 CREDITS,1.1.2.3,1.1.2.4 INSTALL,1.1.1.1.6.1,1.1.1.1.6.2 TODO,1.1.1.1.6.5,1.1.1.1.6.6 bootstrap,1.1.2.2,1.1.2.3 configure.in,1.1.2.9,1.1.2.10 physfs.c,1.1.1.1.6.6,1.1.1.1.6.7 physfs.dsp,1.1.2.2,1.1.2.3 physfs_byteorder.c,1.1.2.3,1.1.2.4 physfs_internal.h,1.1.1.1.6.6,1.1.1.1.6.7 Makefile.am,1.1.1.1.6.8,NONE,
Alexander Pipelka <address@hidden> <=
- Prev by Date:
[paragui-cvs] CVS: paragui/src/physfs/archivers qpak.c,NONE,1.1.4.1 Makefile.am,1.1.1.1.6.5,1.1.1.1.6.6 dir.c,1.1.1.1.6.4,1.1.1.1.6.5 grp.c,1.1.1.1.6.5,1.1.1.1.6.6 zip.c,1.1.1.1.6.7,1.1.1.1.6.8
- Next by Date:
[paragui-cvs] CVS: paragui/src Makefile.am,1.2.6.3,1.2.6.4
- Previous by thread:
[paragui-cvs] CVS: paragui/src/physfs/archivers qpak.c,NONE,1.1.4.1 Makefile.am,1.1.1.1.6.5,1.1.1.1.6.6 dir.c,1.1.1.1.6.4,1.1.1.1.6.5 grp.c,1.1.1.1.6.5,1.1.1.1.6.6 zip.c,1.1.1.1.6.7,1.1.1.1.6.8
- Next by thread:
[paragui-cvs] CVS: paragui/src Makefile.am,1.2.6.3,1.2.6.4
- Index(es):