Commit Graph

18 Commits

Author SHA1 Message Date
Ryan C. Gordon 0310835418 Merged 1018:23aee7da04e0 from default branch: fixed C++-style comments. 2010-01-28 02:45:10 -05:00
Ryan C. Gordon 8978c7dddc Merge from 2.1 branch: lzma re-open workaround. 2009-06-21 17:42:20 -04:00
Ryan C. Gordon ac277daac4 Date: Sat, 2 Feb 2008 14:28:02 +1300
From: eH
To: physfs@icculus.org
Subject: [physfs] lzma.c msvc, etc. patch

I came across a few bugs compiling PhysFS with msvc9 - I've created a patch which seems to fix them:
SzFileReadImp / SzFileSeekImp:
Problem: Can't preform arithmatic on 'void *'
Fix:        Cast 'object' to unsigned long

LZMA_enumerateFiles:
Problem: There is no error handling if the directory 'dname' doesn't exist
Fix:         Check the return value of 'lzma_find_file()' before using it

LZMA_isDirectory:
Problem: return (file->item->IsDirectory) is illegal if 'file' doesn't exist
Fix:         Make sure 'file' isn't null before returning
2008-02-02 02:32:48 +00:00
Ryan C. Gordon 66631578f8 Many improvements to lzma.c (thanks, Dennis!). 2008-01-23 04:57:47 +00:00
Ryan C. Gordon d1d0ea025f FIXME removal: Replaced a strncpy() with a memcpy(). 2007-05-27 14:34:28 +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 6fe37fd840 Patched to compile with latest Platform SDK. 2007-03-19 07:44:04 +00:00
Ryan C. Gordon 1a6f1787fa Fixes for BeOS and gcc2. 2007-03-12 03:41:20 +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 6cdd5b5e57 Moved to CMake! 2007-03-10 06:32:52 +00:00
Ryan C. Gordon 7fc64a99cc Patched to compile. 2007-03-10 06:26:11 +00:00
Ryan C. Gordon d8f69c0e93 Changed PHYSFS_SUPPORTS_LZMA to PHYSFS_SUPPORTS_7Z. 2007-03-09 08:17:56 +00:00
Ryan C. Gordon a9d65e6d59 More 7zip work (thanks, Dennis!) 2006-11-05 10:06:02 +00:00
Ryan C. Gordon 64cb8c260e More corrections to lzma support from Dennis. 2006-09-27 09:21:56 +00:00
Ryan C. Gordon ab32c0313d Rewritten 7zip/lzma support (thanks, Dennis!) 2006-09-27 07:05:03 +00:00
Ryan C. Gordon 1c3d7dcc7c Some minor fixes and cleanups. 2006-04-11 15:01:15 +00:00
Ryan C. Gordon c527092aed 7zip support, written by Dennis Schridde, and heavily Ryanified by me. 2006-04-11 14:33:48 +00:00