[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/src/physfs CHANGELOG,1.1.1.1,1.1.1.1.6.1 INST
From: |
Alexander Pipelka <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/src/physfs CHANGELOG,1.1.1.1,1.1.1.1.6.1 INSTALL,1.1.1.1,1.1.1.1.6.1 Makefile.am,1.1.1.1.6.1,1.1.1.1.6.2 TODO,1.1.1.1,1.1.1.1.6.1 physfs.c,1.1.1.1.6.2,1.1.1.1.6.3 physfs.h,1.1.1.1.6.1,1.1.1.1.6.2 physfs_byteorder.c,1.1.2.1,1.1.2.2 physfs_internal.h,1.1.1.1.6.1,1.1.1.1.6.2 |
Date: |
Fri, 21 Jun 2002 16:07:55 -0400 |
Update of /cvsroot/paragui/paragui/src/physfs
In directory subversions:/tmp/cvs-serv22775
Modified Files:
Tag: devel-1-0
CHANGELOG INSTALL Makefile.am TODO physfs.c physfs.h
physfs_byteorder.c physfs_internal.h
Log Message:
updated phyfs part 1
Index: CHANGELOG
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/CHANGELOG,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.6.1
diff -C2 -r1.1.1.1 -r1.1.1.1.6.1
*** CHANGELOG 15 Apr 2002 13:22:11 -0000 1.1.1.1
--- CHANGELOG 21 Jun 2002 20:07:52 -0000 1.1.1.1.6.1
***************
*** 3,32 ****
*/
! 07282001 - Initial release.
! 08012001 - Added a safety memset in error setting, fixed URLs and email addr.
! 08062001 - Added CD-ROM detection code to the unix platform driver.
! 08072001 - Changed version to 0.1.1.
! 08232001 - Fixed a potential free()ing of a NULL pointer in
! __PHYSFS_platformEnumerateFiles() in platform/unix.c. Added
! platform/win32.c. Other cleanups to get this compiling with
! Visual C and CygWin. Added BAIL_MACRO for times when we were doing
! BAIL_IF_MACRO(1, ...). Abstracted mkdir() in the platform drivers.
! Added GRP setting output to showcfg in the Makefile. Updated
INSTALL
! with license info and Win32 build instructions. Dependency on the
! readline library in test_physfs.c is now optional.
! Changed version to 0.1.2.
! 08282001 - win32.c now checks HOMEDRIVE, HOMEPATH, and HOME when calculating
! the userdir. Added include files that make it a little closer to
! compiling under Cygwin. Added a TODO file. Fixed unix.c's
! __PHYSFS_platformCalcBaseDir() so that it actually works. Fixed
! Makefile so that it links the test program properly.
! Changed version to 0.1.3.
! 08292001 - win32.c calculates the base dir with GetModuleFileName() first,
now,
! and falls back to SearchPath() if there were problems. Changed an
! occurence of _MAX_PATH to MAX_PATH, so both CygWin and Visual C can
! handle it.
! 08312001 - Built PhysicsFS on Mandrake 8.0 for the PowerPC. Compiles clean,
! but there's at least one byte-ordering issue in zip.c that needs
! to be fixed.
09012001 - Happy September. Moved the Visual C project files and the zlib
source to a separate download. Look for it at
--- 3,155 ----
*/
! 06152002 - Autoconf build system will now generate shared libraries on BeOS,
! and (supposedly) Cygwin.
! 06142002 - Rewrote autoconf build system. It now works around the MacOS X bug
! that prevented shared libraries from building.
! 06112002 - Updated CodeWarrior projects and added them to CVS. _Finally_
! officially released 0.1.6.
! 06102002 - Major overhauls to platform/win32.c ... should work on all Windows
! platforms, including 95/98/ME and NT/2K/XP flavors. Someone should
! see if this builds on WinCE! :) You no longer need the latest
! platform SDK to build it, either; the questionable DLL is accessed
! with LoadLibrary() at runtime now, and handled if not present. This
! now builds correctly on a freshly installed Visual Studio 6.0, and
! the DLL it builds works everywhere. Plus, a bunch of other bugs
! and incorrect behaviours were squashed. Visual Studio 6.0 project
! file added to CVS.
! 06082002 - Fixes to __PHYSFS_platformEnumerateFiles() in win32.c: cleaned up
! memory leak, handles paths more robustly, and prevents possible
! skipped file entries. Removed AC_C_CONST and AC_TYPE_SIZE_T checks
! from configure.in (not needed, and they broke BeOS build). Clean
! out the docs/ directory when doing a "make dist". Fixed crashbug
! when calling PHYSFS_deinit() more than once in a row. Tried to get
! MacOS X to build a shared library, gave up; I'm doing something
! wrong in my Makefile.am, I think. On MacOS X, running ./configure
! --enable-static --disable-shared works, though. Hopefully someone
! will fix this soon. In unix.c, the Darwin version of
! __PHYSFS_platformDetectAvailableCDs() was free()ing a static
! buffer; fixed.
! 06072002 - Manpages! Finally installed Doxygen and scratched together a
! Doxyfile. After some revision to physfs.h, we've got a rather
! nice API reference.
! 06062002 - Fixed __PHYSFS_platformSeek() in archivers/posix.c. Implemented the
! getLastModTime method in archivers/zip.c (returns legitimate info)
! and archivers/grp.c (returns lastmodtime of GRPfile itself in the
! physical filesystem). Put a 64-bit _llseek() version of the seek()
! and tell() methods in platform/posix.c, but you need to hack (or
! rather, fix) configure.in to enable it. From Greg on win32.c: Fixed
! file enumerator function (needed a wildcard '*' specification), CD
! enumeration only reports CDs that have media, getLastModTime() has
! been implemented.
! 06012002 - Added -Wall to debug builds. Removed ANSI stdio calls from
! platform/posix.c, and replaced them with actual POSIX calls (that
! is, fopen() became open(), fseek() became lseek(), etc...)
! 05272002 - Added some explicit casts when calling malloc() in platform/posix.c
! 05252002 - Added John Hall's file modification time patch, and added a
! getlastmodtime command to test_physfs. Corrected error reporting
! for missing files a little bit. Changed build system to only try
! building beos.cpp if on a BeOS system (since we need a C++ compiler
! available to do so). Implemented getLastModTime in macclassic.c.
! 05242002 - Upped version to 0.1.6 (not officially released yet).
! 05232002 - Fixed the build system to always package the complete source, not
! just what we built for a given system, when doing a "make dist".
! Updated INSTALL. Wrote BeOS platform code (platform/beos.cpp).
! Split unix.c into unix.c and posix.c. Linux and BeOS both share
! posix.c, although I don't think it's completely POSIX compliant at
! this point (not that it matters much).
! 05212002 - Cleaned up some FIXMEs.
! 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
! use by win32, MacOS, and Unix systems that don't have it installed
! on the system. Autoconf support! Initial attempt at this. Lots of
! stuff may be very broken.
! 05082002 - From Greg: More win32 work. Library is now 95% functional on win32.
! Only known win32 problem is that the CD drives are reported whether
! they contain a disc or not).
! 05062002 - From Greg: Win32 boxes without the latest Platform SDK can now
! #define DISABLE_NT_SUPPORT. Other fixes.
! 04242002 - Updated win32 info in INSTALL to discuss Platform SDK issues.
! 04202002 - Added a (very) quick and (very) dirty http server to the
! 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
! cleanups in unzip.c. Mac work is more or less complete.
! 04042002 - Mac work continues. Almost complete, now. test_physfs now has
! tests for write, append, and filelength, and most of the
! commands can tolerate a quoted argument (although this is
! hacky, it's good enough for these purposes). Upped test_physfs
! version to 0.1.1. Added a malloc-failure check in the Unix
! CD-ROM detection code.
! 04032002 - PHYSFS_init always makes sure the calling thread initializes its
! error state. Win32 codebase is updated with mutex implementation
! (thanks, Greg!).
! 04022002 - Mac work continues. Found a bug where we put a double dir
! separator in if we had to resort to the fallback userdir (if
! __PHYSFS_platformGetUserDir() returned NULL to calculateUserDir().
! Made note of potential infinite recursion in platform driver docs.
! 04012002 - (_NOT_ an April Fool's Joke:) Started working on MacOS Classic
! port. Added skeleton.c to platform directory. Minor patches to
! get things compiling on Mac (notably, DirInfo conflicts with
! a type exposed by MacOS's namespace-polluting API, and some
! 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
! conditions should now be gone, but the new code will need some
! eyeballing before we install it on life support systems or
anything.
! The mutex abstraction is implemented in unix.c, win32.c will be
! updated shortly.
! 03292002 - Fixed a potential problem in ZIP_realpath() and some byte order
! issues in zip.c. Converted unzip.c to use physfs file i/o
! abstractions. Converted CHANGELOG to list latest entries first.
! 03242002 - Added __PHYSFS_platformInit() and __PHYSFS_platformDeinit(). Win32
! improvements by Gregory S. Read. Added PHYSFS_[us]int(8|16|32)
! types...this breaks binary compatibility with previous PhysicsFS
! releases! Added platform specific i/o functions, so we don't have
! to rely on stdio anymore. Updated TODO with my comments on the
! 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
! better. Patched makefile to link the test program. Changed all the
! "write" functions to get data from a "const" buffer. Added an
! "extras" dir, which currently contains PhysFS->SDL_RWops glue code.
! 03052002 - Made unix.c's timeslice implementation more portable, and added a
! Darwin-specific means to detect CDs (thanks to Patrick Stein).
! Minor cleanup in win32.c (changed "for (; condition ;)" into
! "while (condition)" ...)
! 11142001 - Removed a redundant error check in platform/win32.c
! 10092001 - Syntax fixes in dir.c, a FIXME in grp.c, and a "cat" command in
! the test program. Apparently I had accidentally removed a rather
! crucial line from dir.c a few revisions ago, and no one noticed. :(
! 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.
! Updated CREDITS.
! 09142001 - David Hedbor submitted a patch to handle a case where the
! current working directory has been deleted out from under the
! process (both in platform/unix.c and physfs.c itself). Thanks,
! David! Added a CREDITS file. Changed the format of the author field
! in PHYSFS_ArchiveInfo to put the email address between "<>" instead
! of "()" chars. Updated TODO. make install now deletes previous
! revisions of the library. Changed version to 0.1.4.
09012001 - Happy September. Moved the Visual C project files and the zlib
source to a separate download. Look for it at
***************
*** 44,56 ****
I still can't link the library. Dunno what the hell I'm supposed
to do there. Isn't Unix supposed to be hard compared to this?
! 09142001 - David Hedbor submitted a patch to handle a case where the
! current working directory has been deleted out from under the
! process (both in platform/unix.c and physfs.c itself). Thanks,
! David! Added a CREDITS file. Changed the format of the author field
! in PHYSFS_ArchiveInfo to put the email address between "<>" instead
! of "()" chars. Updated TODO. make install now deletes previous
! revisions of the library. Changed version to 0.1.4.
! 09252001 - Changed API: PHYSFS_setSaneConfig() takes an organization name, and
! sets up less directories. Be warned.
--ryan. (address@hidden)
--- 167,196 ----
I still can't link the library. Dunno what the hell I'm supposed
to do there. Isn't Unix supposed to be hard compared to this?
! 08312001 - Built PhysicsFS on Mandrake 8.0 for the PowerPC. Compiles clean,
! but there's at least one byte-ordering issue in zip.c that needs
! to be fixed.
! 08292001 - win32.c calculates the base dir with GetModuleFileName() first,
now,
! and falls back to SearchPath() if there were problems. Changed an
! occurence of _MAX_PATH to MAX_PATH, so both CygWin and Visual C can
! handle it.
! 08282001 - win32.c now checks HOMEDRIVE, HOMEPATH, and HOME when calculating
! the userdir. Added include files that make it a little closer to
! compiling under Cygwin. Added a TODO file. Fixed unix.c's
! __PHYSFS_platformCalcBaseDir() so that it actually works. Fixed
! Makefile so that it links the test program properly.
! Changed version to 0.1.3.
! 08232001 - Fixed a potential free()ing of a NULL pointer in
! __PHYSFS_platformEnumerateFiles() in platform/unix.c. Added
! platform/win32.c. Other cleanups to get this compiling with
! Visual C and CygWin. Added BAIL_MACRO for times when we were doing
! BAIL_IF_MACRO(1, ...). Abstracted mkdir() in the platform drivers.
! Added GRP setting output to showcfg in the Makefile. Updated
INSTALL
! with license info and Win32 build instructions. Dependency on the
! readline library in test_physfs.c is now optional.
! Changed version to 0.1.2.
! 08072001 - Changed version to 0.1.1.
! 08062001 - Added CD-ROM detection code to the unix platform driver.
! 08012001 - Added a safety memset in error setting, fixed URLs and email addr.
! 07282001 - Initial release.
--ryan. (address@hidden)
Index: INSTALL
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/INSTALL,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.6.1
diff -C2 -r1.1.1.1 -r1.1.1.1.6.1
*** INSTALL 15 Apr 2002 13:22:14 -0000 1.1.1.1
--- INSTALL 21 Jun 2002 20:07:52 -0000 1.1.1.1.6.1
***************
*** 1,3 ****
! Building is very easy.
--- 1,7 ----
!
! The latest PhysicsFS information and releases can be found at:
! http://icculus.org/physfs/
!
! Building is (ahem) very easy.
***************
*** 7,43 ****
of the source tree. If you can't abide by it, delete this source tree now.
! The best documentation for the PhysicsFS API is physfs.h. It is VERY heavily
! commented, and makes an excellent, in-depth reference to all the functions.
! UNIX:
! Edit "Makefile", and follow the instructions. The defaults are probably okay
! for general purposes, but give it a once over to make sure. If you don't have
! zLib on your system, you'll need to disable ZIP support.
! run "make"
! That's it. The library will be sitting in a new directory called "bin".
- Run "make install" to install the library for use on your system.
WIN32:
! Download http://icculus.org/physfs/downloads/physfs-win32-support.zip, and
! unpack in the root of the source directory, preserving directory names. If you
! did it correctly, there should be a directory named "zlibwin32" in the same
! directory as "physfs.h". This archive has Visual C project/workspace files and
! the code needed for zipfile support in PhysicsFS, since most Windows boxes
! don't have zlib preinstalled.
!
! After that, if building with CygWin, follow the Unix instructions, above. If
! you're using Visual C, point the IDE at physfs.dsw, and build. If you're using
! any other compiler, send me a patch when you get it working. :)
If someone is willing to maintain prebuilt PhysicsFS DLLs, I'd like to hear
from you; send an email to address@hidden
- --ryan. (address@hidden)
--- 11,105 ----
of the source tree. If you can't abide by it, delete this source tree now.
! If you've got Doxygen (http://www.doxygen.org/) installed, you can run it
! without any command line arguments in the root of the source tree to generate
! the API reference. This is optional. You can browse the API docs online
! here: http://icculus.org/physfs/docs/
!
! UNIX and BeOS:
! (If you got this code from CVS, run "./bootstrap" first.)
! Run ./configure --help and see what features can be optionally enabled or
! disabled. "./configure" does its best to pick optimal defaults for your
! platform.
! Run "make".
! As root, run "make install".
! If you get sick of the library, run "make uninstall" as root and it will
! 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:
! If building with CygWin, mingw32 or something else that uses the GNU
! 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. :)
!
! No one's tried building this for a WinCE (PocketPC) platform, but it may or
! may not work. Patches are welcome.
If someone is willing to maintain prebuilt PhysicsFS DLLs, I'd like to hear
from you; send an email to address@hidden
+
+ MACOS 8/9:
+ Double-click on "CWProjects.sit" in the root of the source tree. This will
+ unpack into a folder called "Mac Classic Support", which has CodeWarrior 6
+ project files.
+
+ Point CodeWarrior at "physfs.mcp" in that new folder, and build. This will
+ produce a "PhysicsFS" or "PhysicsFS Debug" shared library, depending on what
+ configuration you chose to build. After building the lib, you can make sure
+ it works by building the "test_physfs.mcp" project file, which will create
+ "test_physfs" or "test_physfs Debug". These binaries are linked against the
+ DLLs you built previously.
+
+ If someone is willing to maintain prebuilt PhysicsFS Shared Libraries for
+ the Mac, I'd like to hear from you; send an email to address@hidden
+
+
+
+ MACOS X:
+ You (currently) need to use the freeware Apple Developer Tools, which are
+ based on the GNU toolchain. Fire up a terminal and run "cc"...if this reports
+ "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
+ MacOS X, 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. 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: Makefile.am
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/Makefile.am,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
*** Makefile.am 3 May 2002 10:15:33 -0000 1.1.1.1.6.1
--- Makefile.am 21 Jun 2002 20:07:52 -0000 1.1.1.1.6.2
***************
*** 1,26 ****
! SUBDIRS = archivers platform
! noinst_LTLIBRARIES = libphysfs.la
! platform.c: $(srcdir)/$(PHYSFS_PLATFORMFILE)
! cp -f $(srcdir)/$(PHYSFS_PLATFORMFILE) platform.c
! libphysfs_la_SOURCES = \
physfs.c \
! physfs_byteorder.c \
! platform.c
! libphysfs_la_LIBADD = ./archivers/libarchivers.la
EXTRA_DIST = \
! physfs.h \
! physfs_internal.h \
CHANGELOG \
INSTALL \
! LICENSE \
! TODO
!
! INCLUDES = -DPHYSFS_SUPPORTS_ZIP
!
! clean:
! rm -f platform.c
--- 1,45 ----
! lib_LTLIBRARIES = libphysfs.la
! if BUILD_ZLIB
! ZLIB_DIR = zlib114
! ZLIB_LIB = zlib114/libz.la
! endif
! if BUILD_TEST_PHYSFS
! TEST_DIR = . test
! endif
! SUBDIRS = archivers platform $(ZLIB_DIR) $(TEST_DIR)
!
! DIST_SUBDIRS = $(SUBDIRS) extras zlib114 test
!
! libphysfsincludedir = $(includedir)
! libphysfsinclude_HEADERS = \
! physfs.h
!
! libphysfs_la_SOURCES = \
physfs.c \
! physfs_internal.h \
! physfs_byteorder.c
! libphysfs_la_LIBADD = \
! archivers/libarchivers.la \
! platform/libplatform.la \
! $(ZLIB_LIB)
!
! libphysfs_la_INCLUDES = $(ZLIB_INC)
!
! libphysfs_la_LDFLAGS = \
! -release $(LT_RELEASE) \
! -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
EXTRA_DIST = \
! CREDITS \
! LICENSE \
CHANGELOG \
INSTALL \
! TODO \
! Doxyfile \
! CWProjects.sit \
! physfs.dsp \
! test_physfs.dsp
Index: TODO
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/TODO,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.6.1
diff -C2 -r1.1.1.1 -r1.1.1.1.6.1
*** TODO 15 Apr 2002 13:22:11 -0000 1.1.1.1
--- TODO 21 Jun 2002 20:07:52 -0000 1.1.1.1.6.1
***************
*** 1,13 ****
! - update the Makefile so that Cygwin can generate a DLL. The entire codebase
! compiles under Cygwin otherwise.
! - Hmm...we can determine the actual CD-ROM drives under Win32, but how do you
! decide that there's no disc in the drive?
! - MacOS support.
! - Move the integer types to something abstract. uint32, etc.
! - Ditch the "standard" i/o routines (fopen() and friends) and move this into
! the platform drivers.
! // end of TODO ...
--- 1,25 ----
+ Stuff that needs to be done and wishlist:
! These are in no particular order. A 1.0 release is reliant on doing most of
! this stuff. Some might be dupes, some might be done already.
! - Include the Visual Studio.NET project file in CVS directly.
! - A PHYSFS_readUint32(), _readSint32(), etc API.
! - Improve ZIP_seek() (archivers/zip.c)
! - Make the zipfile parse symlinks with relative paths. See the function
! expand_symlink_path() in archivers/zip.c ...
! - Actually, the zipfile driver could use a lot of tweaking. Please look
! through it.
! - Other archivers: perhaps tar(.gz|.bz2), RPM, etc. These are less
! important, since streaming archives aren't of much value to games (which
! is why zipfiles are king: random access), but it could have uses for, say,
! an installer/updater. I thought it might be neat to have MBOX and Maildir
! support so that both "archives" look identical to an application; might be
! nice for an email program. That's blue sky, unless someone wants to tackle
! it.
! - Look for FIXMEs (many marked with "!!!" in comments).
! - Probably other stuff. Requests and recommendations are welcome.
! - Use __cdecl in physfs.h?
+ // end of TODO ...
Index: physfs.c
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/physfs.c,v
retrieving revision 1.1.1.1.6.2
retrieving revision 1.1.1.1.6.3
diff -C2 -r1.1.1.1.6.2 -r1.1.1.1.6.3
*** physfs.c 29 May 2002 15:34:09 -0000 1.1.1.1.6.2
--- physfs.c 21 Jun 2002 20:07:52 -0000 1.1.1.1.6.3
***************
*** 9,12 ****
--- 9,16 ----
*/
+ #if HAVE_CONFIG_H
+ # include <config.h>
+ #endif
+
#include <stdio.h>
#include <stdlib.h>
***************
*** 108,112 ****
PHYSFS_uint64 tid;
! if (initialized)
__PHYSFS_platformGrabMutex(errorLock);
--- 112,116 ----
PHYSFS_uint64 tid;
! if (errorLock != NULL)
__PHYSFS_platformGrabMutex(errorLock);
***************
*** 119,123 ****
if (i->tid == tid)
{
! __PHYSFS_platformReleaseMutex(errorLock);
return(i);
} /* if */
--- 123,128 ----
if (i->tid == tid)
{
! if (errorLock != NULL)
! __PHYSFS_platformReleaseMutex(errorLock);
return(i);
} /* if */
***************
*** 125,129 ****
} /* if */
! if (initialized)
__PHYSFS_platformReleaseMutex(errorLock);
--- 130,134 ----
} /* if */
! if (errorLock != NULL)
__PHYSFS_platformReleaseMutex(errorLock);
***************
*** 150,157 ****
err->tid = __PHYSFS_platformGetThreadID();
! __PHYSFS_platformGrabMutex(errorLock);
err->next = errorMessages;
errorMessages = err;
! __PHYSFS_platformReleaseMutex(errorLock);
} /* if */
--- 155,166 ----
err->tid = __PHYSFS_platformGetThreadID();
! if (errorLock != NULL)
! __PHYSFS_platformGrabMutex(errorLock);
!
err->next = errorMessages;
errorMessages = err;
!
! if (errorLock != NULL)
! __PHYSFS_platformReleaseMutex(errorLock);
} /* if */
***************
*** 185,188 ****
--- 194,199 ----
free(i);
} /* for */
+
+ errorMessages = NULL;
} /* freeErrorMessages */
***************
*** 307,311 ****
return(1);
! ptr = (char*)realloc(*dir, strlen(*dir) + strlen(dirsep) + 1);
if (!ptr)
{
--- 318,322 ----
return(1);
! ptr = realloc(*dir, strlen(*dir) + strlen(dirsep) + 1);
if (!ptr)
{
***************
*** 347,351 ****
} /* while */
! size = (size_t) (ptr - argv0); /* !!! is this portable? */
retval = (char *) malloc(size + 1);
BAIL_IF_MACRO(retval == NULL, ERR_OUT_OF_MEMORY, NULL);
--- 358,362 ----
} /* while */
! size = (size_t) (ptr - argv0);
retval = (char *) malloc(size + 1);
BAIL_IF_MACRO(retval == NULL, ERR_OUT_OF_MEMORY, NULL);
***************
*** 421,425 ****
{
ptr = __PHYSFS_platformRealPath(userDir);
! //free(userDir);
userDir = ptr;
} /* if */
--- 432,436 ----
{
ptr = __PHYSFS_platformRealPath(userDir);
! free(userDir);
userDir = ptr;
} /* if */
***************
*** 717,721 ****
/* set write dir... */
! str = (char*)malloc(strlen(userdir) + (strlen(organization) * 2) +
(strlen(appName) * 2) + (strlen(dirsep) * 3) + 2);
BAIL_IF_MACRO(str == NULL, ERR_OUT_OF_MEMORY, 0);
--- 728,732 ----
/* set write dir... */
! str = malloc(strlen(userdir) + (strlen(organization) * 2) +
(strlen(appName) * 2) + (strlen(dirsep) * 3) + 2);
BAIL_IF_MACRO(str == NULL, ERR_OUT_OF_MEMORY, 0);
***************
*** 781,785 ****
{
const char *d = PHYSFS_getRealDir(*i);
! str = (char*)malloc(strlen(d) + strlen(dirsep) + l + 1);
if (str != NULL)
{
--- 792,796 ----
{
const char *d = PHYSFS_getRealDir(*i);
! str = malloc(strlen(d) + strlen(dirsep) + l + 1);
if (str != NULL)
{
***************
*** 883,887 ****
char *str;
! start = str = (char*)malloc(strlen(fname) + 1);
BAIL_IF_MACRO(str == NULL, ERR_OUT_OF_MEMORY, 0);
strcpy(str, fname);
--- 894,898 ----
char *str;
! start = str = malloc(strlen(fname) + 1);
BAIL_IF_MACRO(str == NULL, ERR_OUT_OF_MEMORY, 0);
strcpy(str, fname);
***************
*** 939,943 ****
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 = (char*)malloc(strlen(dname) + 1);
BAIL_IF_MACRO_MUTEX(str == NULL, ERR_OUT_OF_MEMORY, stateLock, 0);
strcpy(str, dname);
--- 950,954 ----
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);
BAIL_IF_MACRO_MUTEX(str == NULL, ERR_OUT_OF_MEMORY, stateLock, 0);
strcpy(str, dname);
***************
*** 1002,1010 ****
if (__PHYSFS_verifySecurity(h, filename))
{
! if (h->funcs->exists(h, filename))
{
__PHYSFS_platformReleaseMutex(stateLock);
return(i->dirName);
! } /* if */
} /* if */
} /* for */
--- 1013,1023 ----
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 */
***************
*** 1143,1146 ****
--- 1156,1197 ----
+ PHYSFS_sint64 PHYSFS_getLastModTime(const char *fname)
+ {
+ PhysDirInfo *i;
+
+ BAIL_IF_MACRO(fname == NULL, ERR_INVALID_ARGUMENT, 0);
+ while (*fname == '/')
+ fname++;
+
+ if (*fname == '\0') /* eh...punt if it's the root dir. */
+ 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))
+ __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 */
+
+
int PHYSFS_isDirectory(const char *fname)
{
***************
*** 1160,1169 ****
if (__PHYSFS_verifySecurity(h, fname))
{
! if (h->funcs->exists(h, fname))
{
int retval = h->funcs->isDirectory(h, fname);
__PHYSFS_platformReleaseMutex(stateLock);
return(retval);
! } /* if */
} /* if */
} /* for */
--- 1211,1222 ----
if (__PHYSFS_verifySecurity(h, fname))
{
! if (!h->funcs->exists(h, fname))
! __PHYSFS_setError(ERR_NO_SUCH_FILE);
! else
{
int retval = h->funcs->isDirectory(h, fname);
__PHYSFS_platformReleaseMutex(stateLock);
return(retval);
! } /* else */
} /* if */
} /* for */
***************
*** 1191,1204 ****
if (__PHYSFS_verifySecurity(h, fname))
{
! if (h->funcs->exists(h, fname))
{
int retval = h->funcs->isSymLink(h, fname);
__PHYSFS_platformReleaseMutex(stateLock);
return(retval);
! } /* if */
} /* if */
} /* for */
-
- /* !!! FIXME: setError ERR_FILE_NOT_FOUND? */
__PHYSFS_platformReleaseMutex(stateLock);
--- 1244,1257 ----
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);
***************
*** 1404,1407 ****
--- 1457,1461 ----
assert(h->funcs != NULL);
BAIL_IF_MACRO(h->funcs->fileLength == NULL, ERR_NOT_SUPPORTED, 0);
+
return(h->funcs->fileLength(h));
} /* PHYSFS_filelength */
Index: physfs.h
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/physfs.h,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
*** physfs.h 3 May 2002 10:15:33 -0000 1.1.1.1.6.1
--- physfs.h 21 Jun 2002 20:07:52 -0000 1.1.1.1.6.2
***************
*** 1,3 ****
--- 1,10 ----
+ /** \file physfs.h */
+
/**
+ * \mainpage PhysicsFS
+ *
+ * The latest version of PhysicsFS can be found at:
+ * http://icculus.org/physfs/
+ *
* PhysicsFS; a portable, flexible file i/o abstraction.
[...1751 lines suppressed...]
#ifdef __cplusplus
--- 1325,1341 ----
/**
+ * \fn PHYSFS_uint64 PHYSFS_swapUBE64(PHYSFS_uint64 val)
+ * \brief Swap bigendian unsigned 64 to platform's native byte order.
+ *
* Take a 64-bit unsigned value in bigendian format and convert it to
* the platform's native byte order.
*
! * \param val value to convert
! * \return converted value.
! *
! * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without
! * any sort of 64-bit support.
*/
__EXPORT__ PHYSFS_uint64 PHYSFS_swapUBE64(PHYSFS_uint64 val);
#ifdef __cplusplus
Index: physfs_byteorder.c
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/physfs_byteorder.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -r1.1.2.1 -r1.1.2.2
*** physfs_byteorder.c 3 May 2002 10:15:33 -0000 1.1.2.1
--- physfs_byteorder.c 21 Jun 2002 20:07:52 -0000 1.1.2.2
***************
*** 9,12 ****
--- 9,16 ----
*/
+ #if HAVE_CONFIG_H
+ # include <config.h>
+ #endif
+
#include <stdio.h>
#include <stdlib.h>
***************
*** 41,51 ****
#endif
#endif /* linux */
!
! #if (defined _MSC_VER)
! #define inline __inline
! #endif
!
#ifndef PHYSFS_Swap16
! static inline PHYSFS_uint16 PHYSFS_Swap16(PHYSFS_uint16 D)
{
return((D<<8)|(D>>8));
--- 45,55 ----
#endif
#endif /* linux */
!
! #if (defined _MSC_VER)
! #define __inline__ __inline
! #endif
!
#ifndef PHYSFS_Swap16
! static __inline__ PHYSFS_uint16 PHYSFS_Swap16(PHYSFS_uint16 D)
{
return((D<<8)|(D>>8));
***************
*** 53,57 ****
#endif
#ifndef PHYSFS_Swap32
! static inline PHYSFS_uint32 PHYSFS_Swap32(PHYSFS_uint32 D)
{
return((D<<24)|((D<<8)&0x00FF0000)|((D>>8)&0x0000FF00)|(D>>24));
--- 57,61 ----
#endif
#ifndef PHYSFS_Swap32
! static __inline__ PHYSFS_uint32 PHYSFS_Swap32(PHYSFS_uint32 D)
{
return((D<<24)|((D<<8)&0x00FF0000)|((D>>8)&0x0000FF00)|(D>>24));
***************
*** 60,64 ****
#ifndef PHYSFS_NO_64BIT_SUPPORT
#ifndef PHYSFS_Swap64
! static inline PHYSFS_uint64 PHYSFS_Swap64(PHYSFS_uint64 val) {
PHYSFS_uint32 hi, lo;
--- 64,68 ----
#ifndef PHYSFS_NO_64BIT_SUPPORT
#ifndef PHYSFS_Swap64
! static __inline__ PHYSFS_uint64 PHYSFS_Swap64(PHYSFS_uint64 val) {
PHYSFS_uint32 hi, lo;
Index: physfs_internal.h
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/physfs_internal.h,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
*** physfs_internal.h 3 May 2002 10:15:33 -0000 1.1.1.1.6.1
--- physfs_internal.h 21 Jun 2002 20:07:52 -0000 1.1.1.1.6.2
***************
*** 177,180 ****
--- 177,188 ----
/*
+ * Retrieve the last modification time (mtime) of a file.
+ * Returns -1 on failure, or the file's mtime in seconds since
+ * the epoch (Jan 1, 1970) on success.
+ * This filename is in platform-independent notation.
+ */
+ PHYSFS_sint64 (*getLastModTime)(DirHandle *r, const char *filename);
+
+ /*
* Open file for reading, and return a FileHandle.
* This filename is in platform-independent notation.
***************
*** 268,271 ****
--- 276,280 ----
#define ERR_FILE_NOT_FOUND "File not found"
+
/*
* Call this to set the message returned by PHYSFS_getLastError().
***************
*** 344,347 ****
--- 353,357 ----
int __PHYSFS_platformInit(void);
+
/*
* Deinitialize the platform. This is called when PHYSFS_deinit() is called
***************
*** 354,357 ****
--- 364,368 ----
int __PHYSFS_platformDeinit(void);
+
/*
* Open a file for reading. (filename) is in platform-dependent notation. The
***************
*** 369,372 ****
--- 380,384 ----
void *__PHYSFS_platformOpenRead(const char *filename);
+
/*
* Open a file for writing. (filename) is in platform-dependent notation. If
***************
*** 385,388 ****
--- 397,401 ----
void *__PHYSFS_platformOpenWrite(const char *filename);
+
/*
* Open a file for appending. (filename) is in platform-dependent notation. If
***************
*** 402,405 ****
--- 415,419 ----
void *__PHYSFS_platformOpenAppend(const char *filename);
+
/*
* Read more data from a platform-specific file handle. (opaque) should be
***************
*** 442,445 ****
--- 456,460 ----
int __PHYSFS_platformSeek(void *opaque, PHYSFS_uint64 pos);
+
/*
* Get the file pointer's position, in an 8-bit byte offset from the start of
***************
*** 454,457 ****
--- 469,473 ----
PHYSFS_sint64 __PHYSFS_platformTell(void *opaque);
+
/*
* Determine the current size of a file, in 8-bit bytes, from an open file.
***************
*** 545,552 ****
--- 561,578 ----
/*
+ * Return the last modified time (in seconds since the epoch) of a file.
+ * Returns -1 on failure. (fname) is in platform-dependent notation.
+ * Symlinks should be followed; if what the symlink points to is missing,
+ * then the retval is -1.
+ */
+ PHYSFS_sint64 __PHYSFS_platformGetLastModTime(const char *fname);
+
+
+ /*
* Return non-zero if filename (in platform-dependent notation) is a symlink.
*/
int __PHYSFS_platformIsSymLink(const char *fname);
+
/*
* Return non-zero if filename (in platform-dependent notation) is a symlink.
***************
*** 556,559 ****
--- 582,586 ----
int __PHYSFS_platformIsDirectory(const char *fname);
+
/*
* Convert (dirName) to platform-dependent notation, then prepend (prepend)
***************
*** 578,581 ****
--- 605,609 ----
const char *append);
+
/*
* Make the current thread give up a timeslice. This is called in a loop
***************
*** 626,629 ****
--- 654,658 ----
*/
int __PHYSFS_platformMkDir(const char *path);
+
/*
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/src/physfs CHANGELOG,1.1.1.1,1.1.1.1.6.1 INSTALL,1.1.1.1,1.1.1.1.6.1 Makefile.am,1.1.1.1.6.1,1.1.1.1.6.2 TODO,1.1.1.1,1.1.1.1.6.1 physfs.c,1.1.1.1.6.2,1.1.1.1.6.3 physfs.h,1.1.1.1.6.1,1.1.1.1.6.2 physfs_byteorder.c,1.1.2.1,1.1.2.2 physfs_internal.h,1.1.1.1.6.1,1.1.1.1.6.2,
Alexander Pipelka <address@hidden> <=
- Prev by Date:
[paragui-cvs] CVS: paragui/src/physfs/archivers Makefile.am,1.1.1.1.6.1,1.1.1.1.6.2 dir.c,1.1.1.1.6.1,1.1.1.1.6.2 grp.c,1.1.1.1.6.1,1.1.1.1.6.2 unzip.c,1.1.1.1.6.1,1.1.1.1.6.2 zip.c,1.1.1.1.6.1,1.1.1.1.6.2
- Next by Date:
[paragui-cvs] CVS: paragui/src/physfs/platform Makefile.am,1.1.1.1.6.1,1.1.1.1.6.2 macclassic.c,1.1.2.1,1.1.2.2 skeleton.c,1.1.2.1,1.1.2.2 unix.c,1.1.1.1.6.1,1.1.1.1.6.2 win32.c,1.1.1.1.6.8,1.1.1.1.6.9
- Previous by thread:
[paragui-cvs] CVS: paragui/src/physfs/archivers Makefile.am,1.1.1.1.6.1,1.1.1.1.6.2 dir.c,1.1.1.1.6.1,1.1.1.1.6.2 grp.c,1.1.1.1.6.1,1.1.1.1.6.2 unzip.c,1.1.1.1.6.1,1.1.1.1.6.2 zip.c,1.1.1.1.6.1,1.1.1.1.6.2
- Next by thread:
[paragui-cvs] CVS: paragui/src/physfs/platform Makefile.am,1.1.1.1.6.1,1.1.1.1.6.2 macclassic.c,1.1.2.1,1.1.2.2 skeleton.c,1.1.2.1,1.1.2.2 unix.c,1.1.1.1.6.1,1.1.1.1.6.2 win32.c,1.1.1.1.6.8,1.1.1.1.6.9
- Index(es):