Ryan C. Gordon
52267fe380
Removed some unused code.
2012-03-19 02:46:38 -04:00
Ryan C. Gordon
82a6ce0abf
Use physfs_platforms.h in physfs_internal.h, to avoid repeated macro tests.
2012-03-19 02:04:27 -04:00
Ryan C. Gordon
1030e5d5ec
Removed llseek().
...
Use Linux's off64_t support instead.
2012-03-18 12:31:29 -04:00
Ryan C. Gordon
391f94681c
Fixed a comment. Cut and paste error, I guess?
2012-03-18 12:23:30 -04:00
Ryan C. Gordon
be4ae4d401
Removed __PHYSFS_platformCvtToDependent().
...
It's only used by archive_dir.c, and it's trivial to make it into
platform-independent code for that one module.
Bonus: less malloc() pressure...now every access to the native filesystem
doesn't require a temporary heap allocation.
2012-03-15 01:58:39 -04:00
Ryan C. Gordon
03dbc3f758
Make __PHYSFS_platformDirSeparator into a single char.
...
This multichar thing was always stupid. Pull it out of revision control if
you ever need it.
2012-03-15 01:54:57 -04:00
Ryan C. Gordon
aaf8868c8d
Removed __PHYSFS_convertToDependent(), as dead code.
2012-03-15 00:40:00 -04:00
Ryan C. Gordon
466f538926
Reworked BeOS CD detection code.
...
Cleaned up, removed a malloc(), removed unnecessary BAIL macros.
2012-03-14 21:24:32 -04:00
Ryan C. Gordon
624d7f3a42
Fixed PHYSFS_read() and PHYSFS_write() in the dev branch.
...
PHYSFS_read() and PHYSFS_write() should return number of objects written,
not object size.
Thanks to Evgeny Podjachev for the fix!
2012-03-14 05:47:15 -04:00
Ryan C. Gordon
519046db72
Removed check that .zip files are less than 4 gigabytes.
...
This would become a bogus check with zip64 support anyhow, but even here, if
you have a .zip that's close to 4 gigabytes, and a self-extracting program
prepended to it that pushes it over that limit, this test fails
incorrectly.
2012-03-13 08:21:02 -04:00
Ryan C. Gordon
a42ada1380
Fixed dereference of free()'d memory.
...
Thanks to Evgeny Podjachev for the fix!
2012-03-13 07:49:59 -04:00
Ryan C. Gordon
c57bd94f84
Apparently, __PHYSFS_platformCurrentDir() is dead code.
2012-03-13 04:25:05 -04:00
Ryan C. Gordon
0ae446d970
Move Windows CD-ROM detection to another thread that uses device notifications.
...
Fixes blocking when a disc is spinning up, except on initial call.
2012-03-12 04:05:31 -04:00
Ryan C. Gordon
5ad70036b2
Fixed stack smashing in newly-aligned __PHYSFS_smallAlloc().
2012-03-12 01:33:16 -04:00
Ryan C. Gordon
1d41608a64
More doc tweaks.
2012-03-11 05:05:02 -04:00
Ryan C. Gordon
611aeec61b
Removed __PHYSFS_platformRealPath().
...
It was an ugly piece of code, didn't work on The Hurd (apparently), likely
dangerous in its incomplete understanding of Windows paths, and only
used in places that should have given us normalized, absolute
paths in the first place anyhow.
2012-03-11 04:19:36 -04:00
Ryan C. Gordon
2aa0c5a278
Replace C++/C99 single-line comments in miniz with C98 /* comments */ ...
2012-03-11 03:56:24 -04:00
Ryan C. Gordon
c94d70ec0a
Moved __PHYSFS_platformCurrentDir() from Unix to POSIX sources.
...
getcwd() is part of POSIX, after all.
2012-03-11 03:43:07 -04:00
Ryan C. Gordon
b7e0ec7391
Change how Unix version of __PHYSFS_platformCurrentDir() allocates memory.
2012-03-11 03:39:57 -04:00
Ryan C. Gordon
7a8e3de103
Minor updates to the docs.
2012-03-11 03:09:07 -04:00
Ryan C. Gordon
df3c281014
Fixed some compiler warnings.
2012-03-10 03:18:33 -05:00
Ryan C. Gordon
700d94e577
Replaced zlib with a hacked up copy of miniz: http://code.google.com/p/miniz/
2012-03-10 02:31:58 -05:00
Ryan C. Gordon
c8fc8cf957
Merge with pocketpc removal.
2012-03-10 01:13:03 -05:00
Ryan C. Gordon
6e4279e76a
Bump the smallAlloc threshold up to 256 bytes.
2012-03-09 22:27:36 -05:00
Ryan C. Gordon
9dceda3d9f
Align smallAllocs to the native pointer size.
2012-03-09 22:27:51 -05:00
Ryan C. Gordon
a0b21c9ae9
Cleaned up all the readAll() cut and paste.
2012-03-09 04:50:27 -05:00
Ryan C. Gordon
25224b0e7a
We never use calloc() internally.
2012-03-09 03:55:23 -05:00
Ryan C. Gordon
54cc53349d
Cleaned up some __PHYSFS_platformStat() details.
2012-03-09 03:32:26 -05:00
Ryan C. Gordon
de27c2a422
Removed the non-Unicode fallbacks from platform_windows.c, other cleanups.
...
This brings the minimum required OS up to Windows XP, which is around 11
years old at this point.
2012-03-10 03:07:30 -05:00
Ryan C. Gordon
9e2acfd8a6
Removed OS/2 support.
2012-03-09 01:24:40 -05:00
Ryan C. Gordon
4d46d42f73
Removed PocketPC support. It was old and crusty and targeted a dead platform.
2012-03-09 00:44:59 -05:00
Ryan C. Gordon
9d11b991bc
Fixed up some bugs that clang's static analysis reported.
2011-10-18 15:55:29 -04:00
Ryan C. Gordon
bbd356a27b
Patched to compile.
2011-10-06 03:24:53 -04:00
Ryan C. Gordon
6d4d91414a
Check _M_X64 (Visual Studio, Windows/x86-64) in littleendian test.
...
Thanks to Norfanin for the tip!
2011-10-05 03:58:52 -04:00
Ryan C. Gordon
28007c9bae
Fixed a typo in the docs.
2011-09-22 04:45:04 -04:00
Ryan C. Gordon
025a02f4c0
Corrected __PHYSFS_platformTell()'s return value to be correct.
2011-08-01 17:56:30 -04:00
Ryan C. Gordon
8258274a90
Removed __PHYSFS_platformEOF(). It's not used anymore.
2011-08-01 17:32:56 -04:00
Ryan C. Gordon
65497160f7
Removed deprecated Mac OS X APIs.
2011-07-25 11:29:44 -07:00
Ryan C. Gordon
f94d227945
Fixed basedir calculation on Mac OS X.
2011-07-09 23:11:17 -07:00
Ryan C. Gordon
b8c4942413
POSIX version of __PHYSFS_platformStat() forgot to set *exists properly.
...
Thanks to Frank Becker for the fix.
2011-06-22 15:56:10 -04:00
Ryan C. Gordon
6a1aca5db5
Make sure utf8codepoint() advances the pointer even on bogus input.
...
This patch was from Francois Gouget, who found this bug in MojoSetup's copy
of this function.
2011-06-01 03:10:08 -04:00
Ryan C. Gordon
c6ca60eb20
Fixed infinite loop in zip_expand_symlink_path().
...
This patch was from Francois Gouget, who found this bug in MojoSetup's copy
of the zip archiver code.
2011-06-01 03:08:53 -04:00
Ryan C. Gordon
4446cfa613
Fixed compiler warning on gcc-4.6.
2011-03-31 11:24:46 -04:00
Ryan C. Gordon
660c7f9823
Fixed bug in directory search for zip and qpak archivers (thanks, Michal!)
2011-02-18 12:38:05 -05:00
Ryan C. Gordon
706f50be0a
Fixed logic error in QPAK archiver.
...
Should haved tested for a failed seek, but was testing for success instead.
2011-02-10 16:54:09 -05:00
Ryan C. Gordon
82b8546bc9
More Windows tests in the byteorder detection code.
2011-01-21 03:07:14 -05:00
Ryan C. Gordon
f5e0dbe78b
Patched to compile on Windows.
2011-01-21 02:50:20 -05:00
Ryan C. Gordon
5f5775c1ec
Haiku fixes, merged from stable-2.0 branch.
2010-12-30 19:50:58 -05:00
Ryan C. Gordon
7d253b13ed
Fixed leaking file handle on BeOS during CD-ROM detection.
2010-11-14 00:43:47 -05:00
Ryan C. Gordon
4d567a0d2f
Fixed cut-and-paste error in malloc() failure test (thanks, Tolga!).
2010-10-04 01:48:34 -04:00
Ryan C. Gordon
f871802f51
Cleaned up some #includes.
2010-09-06 19:35:01 -04:00
Ryan C. Gordon
3f02ce767f
Moved most the cut-and-paste between simple archivers to one file.
2010-09-06 02:50:29 -04:00
Ryan C. Gordon
9d900f8814
Added a FIXME.
2010-09-05 02:43:43 -04:00
Ryan C. Gordon
125c170f7d
Use lstat() instead of stat() for POSIX __PHYSFS_platformStat().
2010-09-05 02:42:04 -04:00
Ryan C. Gordon
7f0e7105a7
Removed isDirectory, isSymLink and exists methods from internal code.
...
Use the PhysFS stat() interface instead.
2010-09-05 02:41:13 -04:00
Ryan C. Gordon
2219123cc5
SWIG bindings update.
2010-08-30 03:09:00 -04:00
Ryan C. Gordon
84c6e2242e
Added PHYSFS_mountHandle(). Now you can do archives-in-archives!
2010-08-30 03:02:32 -04:00
Ryan C. Gordon
d9e98704f7
PHYSFS_getRealDir() can't report a path for things that aren't real files.
2010-08-29 21:36:38 -04:00
Ryan C. Gordon
5ff1a2a12e
Make PHYSFS_addToSearchPath() use doMount(), too.
2010-08-30 02:39:28 -04:00
Ryan C. Gordon
bb9f5e5049
Added PHYSFS_mountMemory().
2010-08-30 02:39:11 -04:00
Ryan C. Gordon
8cd320b858
Added PHYSFS_mountIo().
2010-08-29 20:56:35 -04:00
Ryan C. Gordon
4bc5ed1725
Abstracted file i/o into PHYSFS_Io interface.
...
This touched a lot of code, and involved cleaning up a lot of stuff.
2010-08-30 03:01:57 -04:00
Ryan C. Gordon
c2e77d7e35
Constification.
2010-08-29 01:55:30 -04:00
Ryan C. Gordon
74f8cb4f91
Fixed incorrect #ifdef.
2010-08-27 14:27:15 -04:00
Ryan C. Gordon
b58e5f348c
Removed __PHYSFS_platformGetLastModTime().
2010-08-25 01:28:28 -04:00
Ryan C. Gordon
8def2f8aaf
Fixed some single-line comments.
2010-08-24 14:17:07 -04:00
Ryan C. Gordon
fc680aa468
Removed PHYSFS_Archiver's isArchive() method.
...
It was redundant with openArchive().
2010-08-24 10:05:58 -04:00
Ryan C. Gordon
c92f3035f9
Made __PHYSFS_ui64FitsAddressSpace's behaviour match its name.
2010-08-24 10:03:25 -04:00
Ryan C. Gordon
2beafa790d
Removed getLastModTime() interface from the archivers; it's not used anymore.
2010-08-22 20:20:04 -04:00
Ryan C. Gordon
c1969d0595
Added PHYSFS_unmount(), deprecated addToSearchPath and removeFromSearchPath.
2010-08-22 03:43:22 -04:00
Ryan C. Gordon
c306d73fdc
Patched to compile.
2010-08-22 03:35:55 -04:00
Ryan C. Gordon
f99f0ef9e7
Fixed details of PHYSFS_Archiver's stat method.
2010-08-22 00:37:25 -04:00
Ryan C. Gordon
024784efbd
Actually, that's FOUR gigabytes.
2010-08-21 20:05:22 -04:00
Ryan C. Gordon
f7a8d9292c
Fixed PHYSFS_stat()'s return value to match rest of PhysicsFS API.
2010-08-21 19:10:42 -04:00
Ryan C. Gordon
b69dfedaf0
Deprecated PHYSFS_getLastModTime()...use PHYSFS_stat() instead, now.
2010-08-21 17:34:00 -04:00
Ryan C. Gordon
8b0988a038
Some minor FIXME tweaks.
2010-08-21 15:07:13 -04:00
Ryan C. Gordon
51a22c576e
Updated SWIG bindings.
2010-08-21 14:41:51 -04:00
Ryan C. Gordon
8546c9a202
Replaced cut-and-paste byteswap i/o codepile with macros.
2010-08-21 14:30:52 -04:00
Ryan C. Gordon
3dc77f8a54
Get rid of __inline__, just make sure "inline" is defined sanely instead.
2010-08-21 14:29:40 -04:00
Ryan C. Gordon
d797ea7cd8
Added PHYSFS_DEPRECATED.
2010-08-21 14:05:39 -04:00
Ryan C. Gordon
4000b234c0
Moved all the file i/o from stdio-style to POSIX-style.
...
Instead of trying to deal with a count of objects, just give 'em a stream of
bytes. This is WAY simpler to work with at the implementation level, and
removes confusion about what to do with a partial read.
This will be very useful when we expose the i/o interface to applications.
2010-08-21 02:47:58 -04:00
Ryan C. Gordon
68632d3c57
Wrap BAIL_* and GOTO_* macros in do { } while (0) ...
2010-08-21 02:42:23 -04:00
Ryan C. Gordon
11e2306c1c
Added a FIXME.
2010-08-21 02:41:23 -04:00
Ryan C. Gordon
c88d2c3746
Added UTF-16 support.
2010-08-20 02:38:32 -04:00
Ryan C. Gordon
acdfcfca04
Fixed incorrect comments.
2010-08-20 02:49:11 -04:00
Ryan C. Gordon
77d16c2bed
Zero-sized destination buffers when converting to UTF-8 shouldn't overflow.
2010-08-20 02:35:01 -04:00
Ryan C. Gordon
9d979b21d0
Added a see-also to the docs.
2010-08-20 01:25:32 -04:00
Ryan C. Gordon
f329f4ed0b
Added a FIXME.
2010-08-20 01:25:20 -04:00
Ryan C. Gordon
1fe05388ad
Patched to compile on Solaris.
2010-04-08 09:56:51 -04:00
Ryan C. Gordon
80713fb40e
Fixed documentation issue.
2010-04-05 15:50:02 -04:00
Ryan C. Gordon
a9855949f0
Merged changeset 1084:ee3d2e6e1161 from stable-2.0: unitialized array fix.
2010-03-25 16:00:21 -04:00
Ryan C. Gordon
a44e9669c1
Forgot to apply build-time thread fix to default branch (thanks, Patrice!).
2010-03-22 16:03:17 -04:00
Ryan C. Gordon
e6f331f32d
Add some more filesystem types that might be CDs or DVDs.
2010-03-22 11:12:45 -04:00
Ryan C. Gordon
ddd82040f4
Back out Doxygen escaping stuff...doesn't actually work.
2010-03-22 11:11:09 -04:00
Ryan C. Gordon
efa498fd5d
See if $HOME is bogus, and if so, use getpwuid() instead.
...
Should fully fix http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=553174
2010-03-21 12:20:44 -04:00
Ryan C. Gordon
72b232d4f5
If $HOME is invalid, scratch together a different userdir.
...
Partially fixes http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=553174
2010-03-21 12:11:39 -04:00
Ryan C. Gordon
4c7d25aebe
Doxygen fixes (thanks, Patrick!)
2010-03-17 21:51:22 -04:00
Ryan C. Gordon
ed989aa171
Added some missing file types to the documentation.
2010-03-17 21:37:06 -04:00
Ryan C. Gordon
47c3e8875c
Windows: open files for read+write sharing, to match Unix.
2010-03-17 17:04:01 -04:00
Ryan C. Gordon
cd3587bbf3
Make ISO9660 archiver optional.
2010-03-17 15:35:29 -04:00