Ryan C. Gordon
2392ca1aa3
Favor /proc/self/exe over argv[0] on Linux, to match other platforms.
...
We don't favor searching the $PATH, though, since that relies on argv[0] too.
2012-03-23 04:54:20 -04:00
Ryan C. Gordon
9d01a645ed
Make sure base dir always has a dirsep at the end of it.
...
Now the higher level doesn't have to check for this and realloc the string.
2012-03-23 04:14:01 -04:00
Ryan C. Gordon
c306437ece
test_physfs's "stat" command now respects unknown file times (-1).
2012-03-23 03:30:16 -04:00
Ryan C. Gordon
a6ff95c6aa
Updated TODO.txt
2012-03-23 03:29:48 -04:00
Ryan C. Gordon
0360899357
Moved QPAK support into archiver_unpacked.c
...
More dupe code removal, and more functional generic backend code!
2012-03-23 02:45:38 -04:00
Ryan C. Gordon
a688d5c686
Minor tweak.
2012-03-23 02:43:22 -04:00
Ryan C. Gordon
320b154a11
Removed archive description macros, moved those strings inline.
2012-03-23 00:55:56 -04:00
Ryan C. Gordon
0584117f85
Changed so that this builds a reasonable default with no command line #defines.
...
That is, it now builds .zip and native dir support, and that's it.
2012-03-23 00:52:32 -04:00
Ryan C. Gordon
cd5362cc57
Removed a bogus FIXME.
2012-03-22 03:15:50 -04:00
Ryan C. Gordon
66fbf41bc0
Allow Windows to read/write more than 4 gigs to a file in one shot.
...
Removes a FIXME, but the fix probably won't ever get used. :)
2012-03-22 03:11:54 -04:00
Ryan C. Gordon
53fe6d360a
Renamed __PHYSFS_utf8strcasecmp() to __PHYSFS_utf8stricmp().
...
This matches style of other function names we use.
2012-03-22 03:02:50 -04:00
Ryan C. Gordon
4aec77e618
Fixed a typo in the docs.
2012-03-22 03:00:16 -04:00
Ryan C. Gordon
76fdd9cab6
Removed a FIXME: actually, the code DOES set an error, as far as I can tell.
2012-03-22 02:58:45 -04:00
Ryan C. Gordon
b7f3e5bd1e
Removed a FIXME.
...
I assume that Win95 didn't allow large files, so this concern probably wasn't
ever valid in any case. Still, Win95 support has been dropped, so it doesn't
matter.
2012-03-22 02:38:10 -04:00
Ryan C. Gordon
46125c95b3
Removed a FIXME.
2012-03-22 02:57:29 -04:00
Ryan C. Gordon
0d8bf3a129
Windows: Use cross-thread Critical Sections instead of cross-process Mutexes.
2012-03-22 00:41:39 -04:00
Ryan C. Gordon
a0af6bbb71
Removed fallback for systems that have no userdir.
...
This would try to build something under the basedir for Windows 95, OS/2, etc,
but those targets are gone now. Modern systems provide this. If a given
system can't in the future, they can pull this code out of revision control
and use it in their implementation of __PHYSFS_platformCalcUserDir().
This change let me remove __PHYSFS_platformGetUserName(), too.
2012-03-22 00:27:46 -04:00
Ryan C. Gordon
b1d4afcbd3
Cleaned up some FIXMEs.
2012-03-22 00:21:28 -04:00
Ryan C. Gordon
59c6310e92
Removed a FIXME: use correct error code for writing to read-only archives.
2012-03-22 00:05:10 -04:00
Ryan C. Gordon
60aa0e460c
Make sure the prefdir has a final dirsep on it.
...
This matches the behaviour of PHYSFS_getBaseDir() and PHYSFS_getUserDir().
2012-03-21 23:59:43 -04:00
Ryan C. Gordon
43367c0c29
Fixed some brainfarts in the Windows version of PHYSFS_getPrefDir().
2012-03-21 23:52:44 -04:00
Ryan C. Gordon
629614838a
Patched to compile on Windows.
2012-03-21 23:51:11 -04:00
Ryan C. Gordon
3a5a780988
PHYSFS_setSaneConfig() now uses PHYSFS_getPrefDir().
2012-03-21 23:31:21 -04:00
Ryan C. Gordon
24d6a925d1
Added PHYSFS_getPrefDir().
2012-03-21 23:30:50 -04:00
Ryan C. Gordon
584119a4a0
Removed a FIXME.
2012-03-20 15:44:10 -04:00
Ryan C. Gordon
ba676b23e5
Reworked the error reporting API. Now we use error codes instead of strings.
...
This is based on work originally done by Christoph Nelles.
2012-03-20 15:38:12 -04:00
Ryan C. Gordon
8d7cf56651
Fixed mutex misuse.
2012-03-20 15:28:19 -04:00
Ryan C. Gordon
f5923f5cea
Check for mutex bugs.
2012-03-20 15:24:50 -04:00
Ryan C. Gordon
e34e67ff68
Use UTF-16 on Windows, not UCS-2.
2012-03-19 21:01:51 -04:00
Ryan C. Gordon
803730884a
Try to make a sane default for CD detection path by platform.
...
This is so this can work even when dropping PhysicsFS into another project
without CMake doing header tests and filling in the defines.
2012-03-19 20:42:41 -04:00
Ryan C. Gordon
2486105f4f
Make physfs_platforms.h define with a 1, so "#if X" works.
...
Added a few other pertinent platforms.
2012-03-19 20:41:14 -04:00
Ryan C. Gordon
d67e2c9207
Use our platform test macro for Solaris.
2012-03-19 20:40:22 -04:00
Ryan C. Gordon
f49c122784
Added Linux and Solaris tests.
2012-03-19 20:31:50 -04:00
Ryan C. Gordon
bb6c5e468c
Let's gamble that everything has assert.h.
...
(and we'll mask out specific platforms if we find one that doesn't.)
2012-03-19 20:27:28 -04:00
Ryan C. Gordon
e5fa9ab9fc
Minor code style cleanup in platform_beos.cpp ...
2012-03-19 02:58:41 -04:00
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
abd2624c59
Added Evgeny Podjachev to the credits.
2012-03-14 05:47:42 -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
16ff5c8aca
PhysicsFS works on Win64 now.
2012-03-12 03:48:34 -04:00