Commit Graph

177 Commits

Author SHA1 Message Date
Marcus Boerger
2490f087b4 - Fix typo and change to sizeof usage 2006-01-06 17:32:34 +00:00
Marcus Boerger
685fa28235 - Rewind stream when transferring ownership
- Add Phar::loadPhar + test
2006-01-06 17:23:42 +00:00
Marcus Boerger
e267d2c2d0 - And another test 2006-01-06 16:27:15 +00:00
Marcus Boerger
a4d469836d - Add new tests 2006-01-06 16:11:54 +00:00
Marcus Boerger
fbdb432847 - Typo 2006-01-06 15:31:42 +00:00
Marcus Boerger
abd2aeb1cd - Use temp streams internally instead of memory to reduce memory usage
# Internally we try to use only one temp stream if possible by stoing
# the temp stream in the manifest entry and transferring ownership upon
# usage/close. If a particular file gets opened twice in parallel we open
# a second temp stream nonetheless.
2006-01-05 22:24:41 +00:00
Marcus Boerger
f3275b2080 - Made HashTable manifest a direct member rather than a pointer
- Need to find a working detection for compressed phars
2006-01-05 11:32:05 +00:00
Marcus Boerger
f65ab3c1e0 - If no compression was specified and we detect compression than simply set
compression mode.
2006-01-05 00:55:55 +00:00
Marcus Boerger
9b3ea9bb59 - Allow simple .phar too (in that case we guess no compression) 2006-01-05 00:53:41 +00:00
Marcus Boerger
d4a400726d - Cleanup/simplify/let configure determine whetehr we are big/little-endian 2006-01-05 00:39:31 +00:00
Greg Beaver
cd6161c9c9 add Marcus as lead 2006-01-04 17:19:04 +00:00
Marcus Boerger
8f27248fbf - Update tests 2006-01-04 16:43:42 +00:00
Marcus Boerger
7ed3be8240 - Fix TSRM builds 2006-01-04 16:18:31 +00:00
Marcus Boerger
b72e1143d2 - More clean up (no need to export enything because one may either access
the stream handler tables through the streams api or use the streams
  which is prefered anyway).
2006-01-04 15:50:45 +00:00
Marcus Boerger
5a45646d8b - Clearify names
- Fix several memleaks
- Cache files
2006-01-04 15:27:18 +00:00
Marcus Boerger
2e6c551c5d - Simple unlink is enough 2006-01-04 15:22:35 +00:00
Marcus Boerger
04fc3b48a2 - Fix test 2006-01-04 15:18:07 +00:00
Marcus Boerger
cb9f1be8aa - Add myself as author 2006-01-04 13:18:31 +00:00
Sebastian Bergmann
42736d6d70 ZTS fixes. 2006-01-04 09:26:32 +00:00
Marcus Boerger
be1177259e - Imlement normal stream handling, use .phar.php anf .phar.gz to detect
where the filename part ends and whether it is compressed or not
# This already allows: php ext/spl/examples/directorytree.php phar:///...
2006-01-04 02:26:15 +00:00
Marcus Boerger
971ef71874 - Add test (fails right now (why ever)) 2006-01-04 02:21:22 +00:00
Marcus Boerger
32ab7543b1 - Add new test 2006-01-03 21:34:11 +00:00
Marcus Boerger
cc860105fe - Fix two crashes in case of error 2006-01-03 16:22:23 +00:00
Marcus Boerger
e829ba3a9d - Provide parameter info
- Add missing editor blocks
2006-01-03 15:59:07 +00:00
Marcus Boerger
d01c016cbd - Change to new extension layout (drops unneccessary foward decls)
- Privide proto's
2006-01-03 15:50:46 +00:00
Marcus Boerger
6d079c9c82 - Class was renamed (change test names, too) 2006-01-01 23:05:42 +00:00
Marcus Boerger
1c9da67d89 - Class was renamed 2006-01-01 22:58:12 +00:00
Greg Beaver
33925b3627 PHP_Archive -> Phar to match coding standards and pecl traditions 2006-01-01 22:49:10 +00:00
Greg Beaver
98e7933f8b fix 018/019.phpt - we need to compare the whole key, not just all but 1 char, otherwise 1-byte files/dirs are not compared 2006-01-01 22:20:26 +00:00
Marcus Boerger
f21708f0a4 - Small tweaks/cleanup/left-overs 2006-01-01 22:19:51 +00:00
Greg Beaver
4b70d45fc9 remove a host of small problems found by testing 016.phpt 2006-01-01 22:11:03 +00:00
Greg Beaver
1481746e13 test needed tweaking to pass now 2006-01-01 22:10:21 +00:00
Greg Beaver
a0f0f6c36a update tests to new API (16, 18, 19 still fail) 2006-01-01 21:43:14 +00:00
Marcus Boerger
e80363ae49 - Simplify and change to --enable-phar since zlib is optional 2006-01-01 21:42:55 +00:00
Greg Beaver
90df1e7f87 on second thought, signing can be done externally without a performance hit, and only needs to be done on initial download, i.e. is best implemented with external tools 2006-01-01 20:57:43 +00:00
Marcus Boerger
77232928a5 - No revert the automatically inserted /*..*/ where wrong 2006-01-01 20:40:43 +00:00
Marcus Boerger
570e38fde8 - Fix comments 2006-01-01 20:34:22 +00:00
Greg Beaver
4de87a68e8 update package.xml 2006-01-01 20:30:16 +00:00
Greg Beaver
edb6e4c9d5 add sorting to opendir() so that it matches PHP_Archive exactly 2006-01-01 20:16:09 +00:00
Greg Beaver
75bac89418 fix eof, fix segfault in stat, add unique dev/inode to allow caching via opcode caches like APC, comply with API 0.7.1, add todo items to EXPERIMENTAL 2006-01-01 07:40:36 +00:00
Greg Beaver
4479bebb13 streamline, add more phpinfo output
switch parameter order for PHP_Archive::mapPhar, will be better in the long run
2005-12-14 03:42:43 +00:00
Greg Beaver
d2339c11e2 add package.xml 2005-12-13 23:40:25 +00:00
Greg Beaver
b4cc79277a complete unit tests (woohoo!)
add stream seek (mistakenly never enabled)
2005-12-12 06:17:16 +00:00
Greg Beaver
e0b54bcdd3 slightly clearer error message 2005-12-11 21:44:44 +00:00
Edin Kadribasic
48f4c97b8c Use php5 built-in zlib. Unfortunatelly we don't export zError() there
so I habe generic "compression error" will suffice.
2005-12-11 21:23:35 +00:00
Greg Beaver
dd8e3dd4df fix opendir, add test for subdirectory, revert stupid addition to 018.phpt 2005-12-11 08:14:44 +00:00
Greg Beaver
d4ac5bf120 make sure it doesn't pick up non-entries 2005-12-11 07:26:46 +00:00
Greg Beaver
7187bdc0d3 add opendir/readdir test for root dir, fix dir stat 2005-12-11 07:25:30 +00:00
Greg Beaver
ca86d4fa92 switch to php_stream_wrapper_log_error from php_error_docref (should be documented somewhere...), add test for failing stream open 2005-12-11 00:00:31 +00:00
Greg Beaver
285b5a934e fix minor leak on zlib error, new test for gzipped internal file 2005-12-10 23:19:32 +00:00
Greg Beaver
bbbd9ba1f1 add missing tests 2005-12-10 02:33:35 +00:00
Greg Beaver
0552791eca crc32 mismatch test 2005-12-10 02:33:09 +00:00
Greg Beaver
fb5cff819d add crc checked flag, for slight speedup on multiple access to the same file 2005-12-10 00:00:00 +00:00
Greg Beaver
e1d98926ba new test, better naming of tests 2005-12-09 23:55:52 +00:00
Greg Beaver
0285ef3952 fix leaks, mem corruption, and add test for successful phar 2005-12-09 23:37:03 +00:00
Greg Beaver
48050ca09d add constraint check for number of manifest entries, and test 2005-12-09 19:55:29 +00:00
Greg Beaver
755e9c3172 improve error messages to state overrun when it exists. Also, catch overrun before we attempt to write beyond the buffer's end 2005-12-08 07:59:18 +00:00
Greg Beaver
f86df41ff4 new test for truncated manifest 2005-12-08 07:49:47 +00:00
Greg Beaver
68a5fdea12 CS // -> /* */ 2005-12-08 07:38:44 +00:00
Greg Beaver
eb3c055e21 rework errors slightly. Add buffer overflow check for manifest, so we don't create a memory monster by accident 2005-12-08 07:34:16 +00:00
Greg Beaver
919b0736c5 add next truncation test, tweak error messages 2005-12-08 07:08:49 +00:00
Greg Beaver
16bd8c6ac7 add error if seeking fails on self, add test 1 for truncated phar 2005-12-08 06:46:02 +00:00
Greg Beaver
6ff5c1f974 add error if __HALT_COMPILER(); is not declared and new test 2005-12-08 06:38:26 +00:00
Greg Beaver
dc26e611e4 test for no zlib error message 2005-12-08 06:23:21 +00:00
Greg Beaver
eea900316b add PHP_Archive::canCompress() which determines whether zlib decompression is available
clean up code slightly
add lots of error notification
add .cvsignore for tests/
update 002 to handle new testing behavior
2005-12-07 06:39:03 +00:00
Greg Beaver
9c9dcd7d88 parameter count test 2005-12-07 01:47:49 +00:00
Greg Beaver
0a786a87b0 first simple test 2005-12-07 01:44:24 +00:00
Frank M. Kromann
b6f3fc1acf Fix ZTS and Win32 builds 2005-12-07 01:18:54 +00:00
Greg Beaver
ebc087c72a apparently no email here 2005-12-07 00:49:46 +00:00
Greg Beaver
f9e209f048 fix segfault in opendir/readdir. fix possible duplicate dirs. is_dir() doesn't yet work, so url_stat is not working fully 2005-12-05 08:31:05 +00:00
Greg Beaver
7944a489fd switch to streams, respect safe_mode, open_basedir 2005-12-05 04:47:29 +00:00
Greg Beaver
92846c03d4 kill memory leaks 2005-12-05 04:21:36 +00:00
Greg Beaver
852eec498f add ability to detect zlib library when zlib ext is disabled 2005-12-05 01:07:02 +00:00
Greg Beaver
141aecfcdd attempt to locate zlib even if --with-zlib is disabled, so we can add library support in phar 2005-12-04 23:23:04 +00:00
Greg Beaver
96d6465999 add license text 2005-12-04 22:51:33 +00:00
Greg Beaver
6e0c451133 update header, use PHP 3.01 license 2005-12-04 22:50:54 +00:00
Greg Beaver
9d4036ea7c initial import
# file handling needs to use streams, handle safe_mode/open_basedir
2005-12-04 20:35:38 +00:00