Commit Graph

185 Commits

Author SHA1 Message Date
Ryan C. Gordon 0e3233a205 Don't put comments in BAIL_* macros where we want an empty argument...
apparently it aggravates some compilers. Thanks to Chris Taylor for this one.
2007-03-29 05:39:16 +00:00
Ryan C. Gordon 49c576280d Man, I knew I would need getOSInfo() as soon as I deleted it!
Apparently Win9x has the Unicode entry points, they just don't work, so
 only do a real lookup on NT-based platforms, and just force the
 fallbacks on 95/98/ME systems.
2007-03-26 07:51:57 +00:00
Ryan C. Gordon aad1408594 Whoops, forgot to uncomment this from my testing... 2007-03-26 06:38:36 +00:00
Ryan C. Gordon d8845b0be5 Tons of Unicode work in windows.c ... should now use UCS-2 on NT/XP/Vista/etc
versions of the OS, and fallback to "ANSI" versions for 95/98/ME,
 tapdancing around the system codepage if it has to. Other minor Windows
 cleanups and corrections.
2007-03-26 06:36:39 +00:00
Ryan C. Gordon da2d3ede59 Reworked getExePath() to remove some FIXMEs and respect Unicode. 2007-03-25 06:26:53 +00:00
Ryan C. Gordon dc0d27228c Improved dynamic loader and initial Unicode work in windows.c ... 2007-03-25 05:17:08 +00:00
Ryan C. Gordon 75a4f4ffe1 Pushed a bunch of FIXMEs into the Windows platform layer. 2007-03-25 00:38:14 +00:00
Ryan C. Gordon 63f9a21c44 Replaced BeOS mutex implementation. Now all platforms have recursive mutexes. 2007-03-24 05:42:22 +00:00
Ryan C. Gordon 4396d7b3ba Added some FIXME comments. 2007-03-24 05:13:54 +00:00
Ryan C. Gordon 7386320811 Replaced some Malloc and all the alloca() calls with __PHYSFS_smallAlloc(),
which will stack allocate small (128 or less bytes) blocks and Malloc the
 rest...naturally these now have to be paired with __PHYSFS_smallFree() calls,
 so you can't be as lazy as a basic alloca() would let you be. The benefit is
 both less malloc pressure for those temporary allocations and better stack
 overflow safety (so if some jerk tries to push a 78 megabyte string through
 the library as a filename, we won't try to strcpy it to the stack).
2007-03-24 03:54:58 +00:00
Ryan C. Gordon 075e6769e2 Split out Mac OS X code from unix.c and added some Carbon-specific code...
moved some stuff around and implemented a few things in BeOS and POSIX bits
 to accomodate this.
2007-03-21 05:03:17 +00:00
Ryan C. Gordon 03fe5bb823 Replaced manual management of recursive pthread mutexes with
PTHREAD_MUTEX_RECURSIVE.
2007-03-21 04:31:13 +00:00
Ryan C. Gordon 857d9bc84d Since all the platform layers were using the same cut-and-paste of the
malloc/realloc/free allocator, I moved it into physfs.c as a default, which
 is used if the platform layer doesn't offer a platform-specific default
 allocator, which none do at this point, but will soon.
2007-03-20 18:33:56 +00:00
Ryan C. Gordon bb1d757244 Removed __PHYSFS_platformTimeslice()...we don't actually use this anymore. 2007-03-20 17:57:45 +00:00
Ryan C. Gordon 75e467576d Removed skeleton.c from the repository...it's out of date. 2007-03-20 11:11:36 +00:00
Ryan C. Gordon b68495e760 Try to use /proc/self/exe to determine the base dir. This lets systems with a
Linux-like /proc filesystem work with PHYSFS_init(NULL). Other cleanups in
 Unix basedir calculation.
2007-03-19 20:15:09 +00:00
Ryan C. Gordon 2ce4b64a73 Added a FIXME. 2007-03-19 20:12:54 +00:00
Ryan C. Gordon 6fe37fd840 Patched to compile with latest Platform SDK. 2007-03-19 07:44:04 +00:00
Ryan C. Gordon 733f59cd8c Removed the strict-ANSI crap. 2007-03-18 22:16:26 +00:00
Ryan C. Gordon 607d39a1d3 Bunch of work on Unicode...added case-folding stricmp, removed
platform-specific stricmp implementations, changed appropriate calls to an
ASCII-only stricmp that ignores locale. Fixed case on UTF-8 API entry points.
2007-03-15 08:16:23 +00:00
Ryan C. Gordon 0ed7bbc3cf Dropped classic Mac OS support. Mac OS X remains supported, though. 2007-03-14 07:20:59 +00:00
Ryan C. Gordon 31ff24a38f Mac Classic platform layer: don't strcmp() a NULL string. 2007-03-14 06:39:17 +00:00
Ryan C. Gordon 5908057d71 Minor comment removal. 2007-03-14 06:30:52 +00:00
Ryan C. Gordon a600edf8ab Patched to compile on Mac OS X. 2007-03-14 06:30:20 +00:00
Ryan C. Gordon 69598e49ab Now compiles everything whether we need it or not, removing whole files with
#ifdefs...this will make it easier to "embed" this library in other projects
 or use a different build system: just push everything through the compiler
 with preprocessor defines for the parts you want/need...platform modules are
 determined automatically without the build system needing to intervene, so
 you just have to #define the archivers, etc that you want.
2007-03-11 22:50:53 +00:00
Ryan C. Gordon e029cb54e5 Fixed some comments. 2007-03-11 10:12:39 +00:00
Ryan C. Gordon 53bbe35ddd Renamed LICENSE to LICENSE.txt 2007-03-11 10:10:28 +00:00
Ryan C. Gordon ca2489418e Removed config.h references from old autotools build system. 2007-03-11 09:44:21 +00:00
Ryan C. Gordon 6cdd5b5e57 Moved to CMake! 2007-03-10 06:32:52 +00:00
Ryan C. Gordon d5327897cb Updated PocketPC code to handle UTF-8 strings. 2007-03-09 08:15:47 +00:00
Ryan C. Gordon a41e32d112 Ryanized the formatting in pocketpc.c 2007-03-08 22:37:51 +00:00
Ryan C. Gordon f6790ee34e Renamed win32.c to windows.c (since it would be used for Win64, too.) 2007-03-08 22:22:24 +00:00
Ryan C. Gordon afd7163321 Apparently BeOS's BPath constructor doesn't actually _need_ leaf to be
manually split out.
2006-11-05 19:06:23 +00:00
Ryan C. Gordon 5a25658811 Silly comment typo. 2006-11-05 11:09:42 +00:00
Ryan C. Gordon a66c36b42a Cleaned up overflow checks in platform memory allocators (thanks to Nicolas
Lebedenco for pointing out the original issue with long long literals).
2006-01-01 12:19:44 +00:00
Ryan C. Gordon c28540fe89 Made unix mutexes recursive. 2005-09-20 04:01:36 +00:00
Ryan C. Gordon 6e7e45cdaf API BREAKAGE: Changed PHYSFS_enumerateFilesCallback() to pass the originally
requested directory back to the app.
2005-09-18 21:44:42 +00:00
Ryan C. Gordon 2362abe855 Some minor (albeit incomplete) MingW fixes. 2005-09-06 06:25:48 +00:00
Ryan C. Gordon 64599213f1 Don't use size_t in physfs.h, since it relies on C runtime headers. 2005-09-06 06:24:42 +00:00
Ryan C. Gordon 7b4181684e Patched to compile again on BeOS. 2005-07-25 01:38:07 +00:00
Ryan C. Gordon 49ebc305ac More minor OS/2 tweaks. 2005-07-23 22:01:03 +00:00
Ryan C. Gordon 507b099d5d Patched to compile on OS/2 again. 2005-07-21 18:10:17 +00:00
Ryan C. Gordon e9cf90feda Ehh...I lied. Reverting change. 2005-03-16 12:07:10 +00:00
Ryan C. Gordon 5c7308cdd3 Whoops, this goes here. 2005-03-16 12:06:18 +00:00
Ryan C. Gordon 12684647dc MacOS Classic fixes and MPW support (thanks, Chris!). 2005-03-16 11:42:54 +00:00
Ryan C. Gordon 3a0e6fa051 Builds on Mac Classic again. 2005-03-14 12:05:07 +00:00
Ryan C. Gordon d840403c1c All memory management now goes through allocation hooks instead of directly to
C runtime malloc/realloc/free...
2005-03-14 11:49:30 +00:00
Ryan C. Gordon 389a4d826a Cleaned up some minor bloat with my new evil GOTO_*_MACRO macros. 2005-03-13 03:33:11 +00:00
Ryan C. Gordon 9f9800928d Fixed unix.c to compile again on MacOS X. 2005-03-13 03:18:18 +00:00
Ryan C. Gordon ed5de27c73 Fixed incorrect comment. 2005-02-15 22:25:03 +00:00