Commit Graph

115 Commits

Author SHA1 Message Date
Ryan C. Gordon 4046759f61 Better basedir detection for various Unix platforms. 2013-08-23 23:41:35 -04: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 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
Aleksi Nurmi fd137cba42 SLB archiver 2012-11-12 23:40:29 +02:00
Ryan C. Gordon a865b14bec Added Zip64 support to the .zip archiver.
Now we can handle .zip files > 4 gigabytes, etc.
2012-06-01 05:44:50 -04:00
Ryan C. Gordon 758e5beedb Moved PHYSFS_ArchiveInfo into PHYSFS_Archiver. 2012-03-25 17:17:56 -04:00
Ryan C. Gordon 6222a4a92d Add binary compatibility to PHYSFS_Io. 2012-03-25 17:18:24 -04:00
Ryan C. Gordon b3fbba7af0 Removed "dvoid" typedef. 2012-03-25 14:52:24 -04:00
Ryan C. Gordon 0de337eb75 Renamed PHYSFS_Archiver::dirClose() to PHYSFS_Archiver::closeArchive(). 2012-03-24 10:36:11 -04:00
Ryan C. Gordon dda627412c More FIXME cleanup. 2012-03-24 00:26:04 -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 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 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 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 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 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 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 d67e2c9207 Use our platform test macro for Solaris. 2012-03-19 20:40:22 -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 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 c57bd94f84 Apparently, __PHYSFS_platformCurrentDir() is dead code. 2012-03-13 04:25:05 -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 6e4279e76a Bump the smallAlloc threshold up to 256 bytes. 2012-03-09 22:27:36 -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 9e2acfd8a6 Removed OS/2 support. 2012-03-09 01:24:40 -05: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 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 82b8546bc9 More Windows tests in the byteorder detection code. 2011-01-21 03:07:14 -05: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 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 bb9f5e5049 Added PHYSFS_mountMemory(). 2010-08-30 02:39:11 -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 b58e5f348c Removed __PHYSFS_platformGetLastModTime(). 2010-08-25 01:28:28 -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 f99f0ef9e7 Fixed details of PHYSFS_Archiver's stat method. 2010-08-22 00:37:25 -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 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 1fe05388ad Patched to compile on Solaris. 2010-04-08 09:56:51 -04:00
Ryan C. Gordon f1cd4d8f0d THIS is Christoph's PHYSFS_stat() work.
I've merged some basic ideas from the other patch, which was Indy Sam's work,
 and cleaned up a few things.
2010-02-15 14:02:36 -05:00
Ryan C. Gordon 8e78e4719d Backed out changeset f87b0b7cca8e ... This wasn't Christoph's patch. Sorry! 2010-02-15 09:19:38 -05:00
Ryan C. Gordon 7cc80bebc5 Added first work on PHYSFS_stat() API (thanks, Christoph!). 2010-02-14 23:07:19 -05:00
Ryan C. Gordon cef8847a06 Attempt to clean up the thread ID mess in platform_unix ... 2009-09-06 01:05:27 -04:00
Ryan C. Gordon 3f0cffcc50 Fixes for compiling on Solaris. 2009-04-13 03:27:53 -04:00
Ryan C. Gordon 2a65060cde Moved directory structure around. 2009-03-27 15:10:42 -04:00