Commit Graph

70 Commits

Author SHA1 Message Date
Ryan C. Gordon d1f2637ca8 utf8: big improvements to case-insensitive UTF-8 string compare.
- Dramatically reduce RAM usage: uses between 8 and 11 kilobytes less static
memory for its internal case-folding tables.
- Actually works now. It would fail unconditionally if a codepoint folded
into multiple codepoints, even if the compared string contained those exact
codepoints.
- Now a public API!
- Removed __PHYSFS_utf8strnicmp(): nothing was using it, it was incorrect
anyhow, and what does 'n' represent when either string might case-fold to
something larger in-flight, anyhow?
2017-08-11 01:39:22 -04:00
Ryan C. Gordon f0eb5c0db9 Marked a bunch of things as "FIXME-3.0" that I want resolved before 3.0 ships. 2017-08-06 15:54:44 -04:00
Ryan C. Gordon 1d6c519c5e windows: Patched to compile! (...?) 2017-08-06 12:27:18 -04:00
Ryan C. Gordon befc894b1f More FIXME cleanups. 2017-08-04 22:35:49 -04:00
Ryan C. Gordon b6e139fc22 Make compile-time asserts more readable. 2017-08-04 22:32:57 -04:00
Ryan C. Gordon 9cec66be3e Removed SWIG ifdefs in physfs.h 2017-07-16 04:36:40 -04:00
Ryan C. Gordon 15c18b0c04 os2: added OS/2 support back in.
With the release of ArcaOS, this is a live platform again.

This code probably doesn't compile yet; I've just given it a first shot at
resolving the changes between the last OS/2-supported revision and now.

This still needs Unicode support added in any case.
2017-07-05 21:29:37 -04:00
Francesco Bertolaccini e4206408e5 Add support for VDF 2017-06-20 13:22:41 -04:00
Ryan C. Gordon 66b7767cec Added support for password-protected .zip files.
To use: mount a .zip file as usual, open a file as usual, but append '$' plus
the password to the end of the path, like so:

    PHYSFS_File *f = PHYSFS_openRead("/path/to/my/file.txt$MyPassword");

Note that this is the "traditional" PKWARE crypto, like you might get from
PkZip 2.04g or Info-ZIP. They have more advanced cryptography in the modern
.zip spec, but that's not implemented here. If you've ever tried to unzip
an archive and were prompted for a password, you probably saw the traditional
crypto at work.

Note that this is NOT a secure thing: if you ship an app that contains a
password, someone with a debugger can retrieve it. Note also that this
password could be available to any code registered as a PHYSFS_Archiver, and
that due to how archives combine into a single file tree, the wrong archiver
can get the password, at a minimum causing it to fail because passwords don't
match.

In short: make sure you know what you're doing before you use this!
2016-09-12 15:38:30 -04:00
Ryan C. Gordon 8363d15439 Fixed some documentation typos (thanks, Paul!). 2016-08-17 17:19:50 -04:00
Ryan C. Gordon 32d4f4541e HTTPS all the things. 2016-02-25 02:51:28 -05:00
Ryan C. Gordon 628b88f112 PHYSFS_enumerateFiles() actually promises sorting order, and always has. 2014-08-14 21:17:04 -04:00
Ryan C. Gordon 2dd99ccbb2 Rearranged PHYSFS_Archiver struct. 2012-11-30 14:09:56 -05:00
Ryan C. Gordon 36b542ee7f Cleaned out "exists" nonsense in openRead() API. 2012-11-30 13:00:08 -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
Ryan C. Gordon 16ee8355db Centralize responsibility for filtering symlinks during enumeration. 2012-11-29 11:47:16 -05:00
Ryan C. Gordon e40d80b00f Allow application-supplied archivers.
This lets an application supply its own archivers, where they will work like
 any built-in archiver. This allows abstract directory interfaces the same
 way that PHYSFS_Io allows stream implementations.

This is a work in progress still. The API is still changing, and will remain
 at version 0 until it is finalized (a theoretical future version 1 will be
 for when the final public interface changes, not when we evolve the initial
 API design).
2012-11-28 01:36:13 -05:00
Ryan C. Gordon e61ade0062 Perhaps the note about Quake 3 is getting a little dated. 2012-11-26 14:11:19 -05:00
Ryan C. Gordon 6222a4a92d Add binary compatibility to PHYSFS_Io. 2012-03-25 17:18:24 -04:00
Ryan C. Gordon 4cfd7277f3 Made archiver list dynamic, in preparation for external archivers. 2012-03-25 15:59:29 -04:00
Ryan C. Gordon 716ea0522f Fixed Doxygen typo. 2012-03-24 15:06:28 -04:00
Ryan C. Gordon de54065b31 Updated docs on PHYSFS_setSaneConfig(). 2012-03-24 15:02:18 -04:00
Ryan C. Gordon af4bf8419f Changed enum typedef to make this Doxygen-friendly. 2012-03-24 14:57:30 -04:00
Ryan C. Gordon d4a99cc204 Fixed comment. 2012-03-24 14:55:32 -04:00
Ryan C. Gordon 4aec77e618 Fixed a typo in the docs. 2012-03-22 03:00:16 -04:00
Ryan C. Gordon 24d6a925d1 Added PHYSFS_getPrefDir(). 2012-03-21 23:30:50 -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 7a8e3de103 Minor updates to the docs. 2012-03-11 03:09:07 -04:00
Ryan C. Gordon 25224b0e7a We never use calloc() internally. 2012-03-09 03:55:23 -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 28007c9bae Fixed a typo in the docs. 2011-09-22 04:45: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 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 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 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 51a22c576e Updated SWIG bindings. 2010-08-21 14:41:51 -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 c88d2c3746 Added UTF-16 support. 2010-08-20 02:38:32 -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