Commit Graph

34 Commits

Author SHA1 Message Date
Ryan C. Gordon b7694abe3c More patched to compile. 2011-10-06 03:26:51 -04:00
Ryan C. Gordon f0cb6de676 Fixed some __PHYSFS_platformTell() things in stable-2.0 branch. 2011-08-01 17:52:51 -04:00
Ryan C. Gordon c710fb637a Backported fixes for bogus homedir bug to stable-2.0 branch.
Fixes http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=553174
2010-03-21 12:29:49 -04:00
Ryan C. Gordon 61749966b9 Fixed PHYSFS_openAppend() on Unix.
Apparently O_APPEND doesn't behave like I thought it did...all these years.  :/
2008-04-03 05:05:48 +00:00
Ryan C. Gordon 7386320811 Replaced some Malloc and all the alloca() calls with __PHYSFS_smallAlloc(),
which will stack allocate small (128 or less bytes) blocks and Malloc the
 rest...naturally these now have to be paired with __PHYSFS_smallFree() calls,
 so you can't be as lazy as a basic alloca() would let you be. The benefit is
 both less malloc pressure for those temporary allocations and better stack
 overflow safety (so if some jerk tries to push a 78 megabyte string through
 the library as a filename, we won't try to strcpy it to the stack).
2007-03-24 03:54:58 +00:00
Ryan C. Gordon 075e6769e2 Split out Mac OS X code from unix.c and added some Carbon-specific code...
moved some stuff around and implemented a few things in BeOS and POSIX bits
 to accomodate this.
2007-03-21 05:03:17 +00:00
Ryan C. Gordon 857d9bc84d Since all the platform layers were using the same cut-and-paste of the
malloc/realloc/free allocator, I moved it into physfs.c as a default, which
 is used if the platform layer doesn't offer a platform-specific default
 allocator, which none do at this point, but will soon.
2007-03-20 18:33:56 +00:00
Ryan C. Gordon 733f59cd8c Removed the strict-ANSI crap. 2007-03-18 22:16:26 +00:00
Ryan C. Gordon 607d39a1d3 Bunch of work on Unicode...added case-folding stricmp, removed
platform-specific stricmp implementations, changed appropriate calls to an
ASCII-only stricmp that ignores locale. Fixed case on UTF-8 API entry points.
2007-03-15 08:16:23 +00:00
Ryan C. Gordon 69598e49ab Now compiles everything whether we need it or not, removing whole files with
#ifdefs...this will make it easier to "embed" this library in other projects
 or use a different build system: just push everything through the compiler
 with preprocessor defines for the parts you want/need...platform modules are
 determined automatically without the build system needing to intervene, so
 you just have to #define the archivers, etc that you want.
2007-03-11 22:50:53 +00:00
Ryan C. Gordon 53bbe35ddd Renamed LICENSE to LICENSE.txt 2007-03-11 10:10:28 +00:00
Ryan C. Gordon ca2489418e Removed config.h references from old autotools build system. 2007-03-11 09:44:21 +00:00
Ryan C. Gordon a66c36b42a Cleaned up overflow checks in platform memory allocators (thanks to Nicolas
Lebedenco for pointing out the original issue with long long literals).
2006-01-01 12:19:44 +00:00
Ryan C. Gordon 6e7e45cdaf API BREAKAGE: Changed PHYSFS_enumerateFilesCallback() to pass the originally
requested directory back to the app.
2005-09-18 21:44:42 +00:00
Ryan C. Gordon 64599213f1 Don't use size_t in physfs.h, since it relies on C runtime headers. 2005-09-06 06:24:42 +00:00
Ryan C. Gordon 49ebc305ac More minor OS/2 tweaks. 2005-07-23 22:01:03 +00:00
Ryan C. Gordon d840403c1c All memory management now goes through allocation hooks instead of directly to
C runtime malloc/realloc/free...
2005-03-14 11:49:30 +00:00
Ryan C. Gordon c2765f8571 Added callback APIs and ripped up the internals everywhere to use them. 2004-09-29 06:09:29 +00:00
Ryan C. Gordon 94759513d9 Cleaned up archiver interface to not deal with DirHandles anymore,
which simplifies things, removes some responsibility and code
duplication from the archivers, and trims some malloc pressure.
Also ripped up the allocation hook code a little. We'll try to screw
with memory locking later, since it makes everything ugly and
complex. Oh well.
2004-09-26 00:25:04 +00:00
Ryan C. Gordon c0acfc0118 Initial structure for replacable allocator work. 2004-09-23 06:45:36 +00:00
Ryan C. Gordon 09ef260209 Added internal function __PHYSFS_platformStrnicmp(). 2003-11-09 20:59:07 +00:00
Ryan C. Gordon fbbaf19a4f Minor strcasecmp optimization. 2003-03-30 20:46:45 +00:00
Ryan C. Gordon 9d82110b57 Some cleanups for PocketPC port. 2002-11-22 06:24:10 +00:00
Ryan C. Gordon 1f5b571be7 Bunch of tedious corrections, optimizations, and cleanups. 2002-08-21 02:59:15 +00:00
Ryan C. Gordon d701627335 Patched memory leaks (thanks, Valgrind!) 2002-07-29 06:18:58 +00:00
Ryan C. Gordon 5b55a52af7 Changed enumeration code to use __PHYSFS_addToLinkedStringList(). 2002-07-23 07:46:36 +00:00
Ryan C. Gordon 3b0f1c896f Patched to compile on Cygwin. 2002-06-29 10:23:17 +00:00
Ryan C. Gordon 0a0b14f0e4 Patched a bug where doOpen() reported success when the file couldn't be
opened (doh!).
2002-06-23 09:17:59 +00:00
Ryan C. Gordon 81a9df44bc 64-bit _llseek() support for the future. 2002-06-06 06:09:19 +00:00
Ryan C. Gordon 2f15add38f Fixed __PHYSFS_platformSeek(). 2002-06-06 05:39:06 +00:00
Ryan C. Gordon 22412b925b Actual POSIX calls to replace ANSI stdio routines. 2002-06-02 03:48:56 +00:00
Ryan C. Gordon 5be59c1592 Added a bunch of explicit casts when using malloc(). 2002-05-27 19:10:45 +00:00
Ryan C. Gordon 5386a5c6a2 Added PHYSFS_getLastModTime() API. (Thanks, John Hall!) 2002-05-25 09:41:14 +00:00
Ryan C. Gordon 62e36b61f7 Initial add. 2002-05-24 09:46:43 +00:00