Commit Graph

1232 Commits

Author SHA1 Message Date
Ryan C. Gordon e05d1acc76 Removed one more rude thing from the comments. :/ 2016-08-17 20:43:36 -04:00
Ryan C. Gordon 84f27f8fb5 extras/ignorecase.h: Fixed some typos. 2016-08-17 20:40:19 -04:00
Ryan C. Gordon 8363d15439 Fixed some documentation typos (thanks, Paul!). 2016-08-17 17:19:50 -04:00
Ryan C. Gordon b66b2d4563 Replace unsigned long cast with cast to size_t (thanks, David!).
When targeting MinGW-w64's x86_64 target, unsigned long is 4 bytes but void* is
8 bytes. This mismatch triggers the pointer-to-int-cast warning.

(This patch was originally David Yip's work, with uintptr_t instead of size_t).
2016-08-16 14:46:53 -04:00
David Yip 51f0807cb3 Remove unused functions and variables in platform_windows.
Under gcc 5.3.0, the presence of these functions and variables generate unused
function / unused variable warnings, which in combination with -Werror causes
a compile error.
2016-08-15 05:41:36 -05:00
David Yip 9293c3dc8d Remove unused variable in zip_hash_ancestors.
Under gcc 5.4.0, this generates unused variable warnings, which in combination
with -Werror causes a compile error.
2016-08-15 00:50:58 -05:00
Ryan C. Gordon c3cc732a70 Updated byte order tests to match what SDL does now.
That is: you're more likely to be on Linux or a little-endian machine,
so deal with the non-Linux bigendian as the exceptional case.
2016-02-25 02:55:11 -05:00
Ryan C. Gordon 32d4f4541e HTTPS all the things. 2016-02-25 02:51:28 -05:00
Ryan C. Gordon b479c57bcb zip: Reworked how we organize ZIP entries.
We now use a hashtable for lookups of specific paths, and organize the
entries into a directory tree. The end result is fast lookup and fast
enumeration without having to search a sorted array or tapdance with
substrings...which means the rare, mysterious bug where we failed
to find an existing file should be gone now, too.
2016-02-25 02:20:52 -05:00
Ryan C. Gordon acd00dda94 Fixed a comment. 2016-02-25 01:16:42 -05:00
Ryan C. Gordon e608c5c3de Move __PHYSFS_strdup() declaration up with other string helpers. 2016-02-25 00:40:17 -05:00
Ryan C. Gordon 0278c30776 zip: Don't allocate a 256k buffer on the stack for zip64 parsing. 2016-02-24 11:15:00 -05:00
Ryan C. Gordon ce85702893 Added a minor comment. 2016-02-24 11:14:10 -05:00
Ryan C. Gordon cec3dad0aa Replaced PhysFS.NET with a README pointing to more modern C# bindings. 2016-01-29 15:16:15 -05:00
Ryan C. Gordon 2b060f8127 Updated Copyright. 2016-01-01 12:53:26 -05:00
Ryan C. Gordon c4deb67883 Fixes to SDL_RWops bridge code.
- Correct return values (number of objects, not bytes), thanks Reto!
- Updated for SDL 2.0 RWops interface. Threw away SDL 1.3 support.
- 1.2 support remains. For now!
2015-07-28 15:13:35 -04:00
Ryan C. Gordon 57bbcc3eb3 Fixed compiler warning about unused variable because assert() is awful. 2015-07-02 23:36:33 -04:00
Ryan C. Gordon 1ab2afda15 Removed a few tabstops to test something on the Mercurial server. 2015-06-18 00:12:15 -04:00
Ryan C. Gordon fb31167e11 Fixed incorrect logic ("!x != 5" instead of "x != 5").
Thanks to Xian Nox for pointing this out!
2015-06-16 10:46:56 -04:00
Ryan C. Gordon 6cafcc4bc7 Added some FIXMEs. 2015-04-19 23:28:14 -04:00
Ryan C. Gordon 3d38708088 dos2unix'd platform_winrt.cpp 2015-04-19 23:26:02 -04:00
Ryan C. Gordon e13803c101 Removed some tabs and an extra semicolon. 2015-04-19 23:25:29 -04:00
Ryan C. Gordon 0c4d9ec68f Added Martin Ahrnbom to the credits. 2015-04-19 23:24:41 -04:00
Martin Ahrnbom 9d55f3f099 Added support for WinRT 8.1 Universal Apps.
Hopefully this will work on Win10 as well... Only time will tell!
Here's what's changed:
1. Added a platform_winrt.cpp file. It's based on platform_windows.c but has some WinRT-specific changes.
2. Changed physfs_platforms.h to define PHYSFS_PLATFORM_WINRT when running on WinRT. PHYSFS_PLATFORM_WINDOWS should also be defined, as WinRT behaves a lot like "normal" Windows and this flag is tested against in multiple parts of the PhysFS source code.
3. Changed platform_windows.c to not be used when PHYSFS_PLATFORM_WINRT is defined.
4. In order to work on Windows ARM devices, I had to change in physfs_internal.h, to include _M_ARM as a flag for running on ARM as "ARM" and "__arm__" aren't defined when running on a Windows ARM device.

What I've tested:
* Setting up a "sane folder configuration"
* Reading and writing files
* Mounting zip files
* Using seek & tell
* Checking file length

All of these work fine. I couldn't get the actual test software to run on WinRT, but it seems like eveyrthing's working. I've tested these things on my Windows 8.1 computer, as well as my Lumia 920 which is currently running Windows 8.1.
2015-03-29 07:03:30 +02:00
Ryan C. Gordon f6a62ecad1 Make sure read buffers get reinitialized before refilling (thanks, Michael!). 2014-09-11 00:07:23 -04:00
Ryan C. Gordon c9f40346bc Make static analysis happy. 2014-08-19 10:55:56 -04:00
Ryan C. Gordon 53ef674270 Fixed resource leak when failing to mount a file that isn't an archive. 2014-08-19 02:28:13 -04:00
Ryan C. Gordon 4b906c1e5f Short circuit case-insensitive compare of two equal Unicode codepoints. 2014-08-14 21:33:24 -04:00
Ryan C. Gordon 628b88f112 PHYSFS_enumerateFiles() actually promises sorting order, and always has. 2014-08-14 21:17:04 -04:00
Willi Schinmeyer 9df22f4bf5 Fix NULL flush() in PHYSFS_Io crash 2014-07-20 13:36:56 +02:00
Ryan C. Gordon 2091eccad3 This returns -1 on error, not zero. :/ 2014-02-07 16:23:12 -05:00
Ryan C. Gordon 016394067c PHYSFS_stat() returns zero on error, not -1. 2014-02-07 16:22:43 -05:00
Ryan C. Gordon 8e065c08f7 We always use miniz now. 2014-02-07 16:22:54 -05:00
Ryan C. Gordon 44fb6d5e2d Renamed a function to make Clang static analysis happy.
"Object leaked: allocated object is returned from a function whose
 name ('cfallocDesc') does not contain 'Copy' or 'Create'.  This violates
 the naming convention rules given in the Memory Management Guide for
 Core Foundation"

(it doesn't actually leak, but okay, it's a reasonable naming convention.)
2014-02-07 16:17:48 -05:00
Ryan C. Gordon 5aa0dae5e2 Added a FIXME. 2014-01-16 07:03:42 -08:00
Ryan C. Gordon 5dd2cfce35 Fixed a single-line comment. 2014-01-16 07:03:34 -08:00
Ryan C. Gordon 61d931fecc Updated installation notes. 2014-01-16 07:03:09 -08:00
Ryan C. Gordon 6d9923706d Added pkg-config support (thanks, Jonas!). 2013-11-13 00:38:35 -05:00
Ryan C. Gordon 4046759f61 Better basedir detection for various Unix platforms. 2013-08-23 23:41:35 -04:00
Ryan C. Gordon 09baf99aa4 Don't fsync() read-only filehandles (thanks, Andreas!).
This sounds harmless, but it actually forces a write of the inode's atime,
 which means a lot of painful and unnecessary disk i/o on some filesystems.

Should be a good speedup on games that read a lot of small files on Unix.
2013-08-21 23:30:33 -04:00
Ryan C. Gordon 26f5eb481e Fixed memory leak. 2013-08-20 13:36:34 -04:00
Ryan C. Gordon 7a42f7dd41 Fixed off-by-one error in findBinaryInPath() (thanks, Dmitry!).
This bug is new to the development branch, and doesn't exist in either the
 stable-1.0 or stable-2.0 branches.
2013-07-16 12:51:54 -04:00
Ryan C. Gordon 4eafb44817 Get rid of array of static archivers. 2012-11-30 14:37:37 -05:00
Ryan C. Gordon 2dd99ccbb2 Rearranged PHYSFS_Archiver struct. 2012-11-30 14:09:56 -05:00
Ryan C. Gordon f5c746967f Removed comments added by Captain Obvious. 2012-11-30 14:06:21 -05:00
Ryan C. Gordon 36b542ee7f Cleaned out "exists" nonsense in openRead() API. 2012-11-30 13:00:08 -05:00
Ryan C. Gordon 697c31e81b Remove __PHYSFS_setError(), use the new public API instead. 2012-11-30 12:49:25 -05:00
Ryan C. Gordon 7824a093fb Cleaned out the "exists" nonsense in the stat() API. 2012-11-30 12:43:56 -05:00
Ryan C. Gordon ada24e9c5d Moved supportsSymlinks into PHYSFS_ArchiveInfo. 2012-11-30 00:04:52 -05:00
Ryan C. Gordon 1ed8bc07c0 Comment tweaks (FIXME additions, typo corrections, etc). 2012-11-29 11:48:48 -05:00