Commit Graph

138 Commits

Author SHA1 Message Date
Wez Furlong
659a071e3d Streams are all tracked as resources now.
Add some logic that will help track down leaks
when debug is enabled.
2002-03-20 14:21:30 +00:00
Wez Furlong
7990d742e5 Improve behaviour of the stream casting operation.
Improve interaction with fopencookie.
2002-03-19 23:29:37 +00:00
Wez Furlong
14a3911866 fix for bug #16168 2002-03-19 17:49:02 +00:00
Wez Furlong
32a4f35580 register some constants for user streams 2002-03-19 14:35:55 +00:00
Wez Furlong
b808af8601 Make file_get_wrapper_data return the underlying PHP object for
user-space streams.
2002-03-19 13:42:25 +00:00
Wez Furlong
06712a508a Implement user-space streams.
There's probably room for improvement,
docs will following some time this week.
2002-03-19 03:51:01 +00:00
Zeev Suraski
16c9da0eed Fix build under Release_TS
Maybe separating TSRMLS away wasn't such a good idea (sorry Wez :)
2002-03-18 19:47:50 +00:00
Wez Furlong
c978602a0b fix non-TS build... 2002-03-18 19:13:11 +00:00
Wez Furlong
c9d5e13738 TSRMLS related work on streams, as discussed with Zeev.
# Should be the last "broad" commit for a while
# Don't forget to make clean ; make
2002-03-18 18:54:32 +00:00
Zeev Suraski
8cb649d06d Make Sebastian happy 2002-03-18 09:12:31 +00:00
Zeev Suraski
73e79322ba Fix the build and all of the outstanding VC++ warnings 2002-03-18 08:05:28 +00:00
Wez Furlong
d2d8762267 Streams now make more use of the memory manager, so tracking down
leaking streams should be easier.
# I hate these big commits
2002-03-17 22:50:59 +00:00
Wez Furlong
12a0092376 Fix for php_stream_gets when the implementation does not support it
natively (Thanks Marcus).

Implement php_stream_make_seekable() and add STREAM_MUST_SEEK as an
option to php_stream_open_wrapper().
See README.STREAMS for usage.
2002-03-17 14:21:01 +00:00
Marcus Boerger
34cb24fcf7 -fix bug with wrappers 2002-03-17 12:06:41 +00:00
Marcus Boerger
bfe7a9acaf -copy_stream_to_stream returns size if maxlen == PHP_STREAM_COPY_ALL
#had to commit myself to do the rest...
2002-03-16 20:05:08 +00:00
Wez Furlong
b28e19c004 fix ftell/fseek in stdio streams 2002-03-16 18:52:03 +00:00
Andi Gutmans
a18000f163 - Indentation fix.
Never do:
if (expr) {
}
else

It should be:
if (expr) {
} else {
2002-03-16 18:16:55 +00:00
Wez Furlong
0447327118 Implement get_file_contents() as discussed (briefly!) by myself, Derick
and Sterling on php-dev some months ago.
It returns the file contents as a string, and uses mmap if possible.
2002-03-16 16:06:18 +00:00
Wez Furlong
bed04279c3 Hopefully fix resource usage so that we have no leaks and don't segfault. 2002-03-16 14:39:51 +00:00
Wez Furlong
30647934a4 Tweak the API to be more consistent.
Update docs.
2002-03-16 13:48:57 +00:00
Wez Furlong
31ed1707a1 Hopefully fix probs with apache. 2002-03-16 11:24:12 +00:00
Wez Furlong
29cb19ad18 some minor docu-in-header changes 2002-03-16 03:50:17 +00:00
Yasuo Ohgaki
2d08c867c8 ZTS build fix 2002-03-16 03:33:48 +00:00
Yasuo Ohgaki
115a0be944 ZTS build fix 2002-03-16 03:30:19 +00:00
Wez Furlong
636829345e Allow php_stream_copy_to_stream to do nothing when used with code
that calculates a max length of zero. (Thanks again Marcus).
2002-03-16 02:48:35 +00:00
Wez Furlong
7da30fa08c some tweaks for seek/read used in image.c (thanks Marcus) 2002-03-16 02:39:39 +00:00
Wez Furlong
28d6981152 more *'s 2002-03-16 01:58:13 +00:00
Andi Gutmans
f1e0b83277 - Change one strncpy() to strlcpy().
- Big indentation patch. I don't have strength to do all of the changed
- files but here's a good example. Please try and keep to the coding
- standards even if you think they suck :)
- Things to keep in mind:
- void *foo and not void * foo;
- if() { and not if()<TAB>{
- } else { and not {\nelse
-
- The streams stuff looks very cool though! :)
2002-03-16 00:05:47 +00:00
Wez Furlong
0f65280cb5 New PHP streams... 2002-03-15 21:03:08 +00:00
Sebastian Bergmann
90613d2282 Maintain headers. 2002-02-28 08:29:35 +00:00
Sebastian Bergmann
38933514e1 Update headers. 2001-12-11 15:32:16 +00:00
Derick Rethans
78747bd2df - Don't wrap lines... this is annoying while coding. 2001-09-09 13:29:31 +00:00
Wez Furlong
08073a5c60 TSRMLS fix 2001-08-25 09:20:18 +00:00
Zeev Suraski
c43806f415 Zend compatibility patch 2001-07-30 08:24:42 +00:00
Rasmus Lerdorf
81e2cf03ac Fix folding and clean up some extensions 2001-06-06 13:06:12 +00:00
Rasmus Lerdorf
25c3a3a39d vim-6 does folding - clean up a bunch of missing folding tags plus
some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
2001-06-05 13:12:10 +00:00
Wez Furlong
3ffb8e3800 Nuke buffering from php_streams, move connect_nonb() from fsock.c to network.c
and rename to php_connect_nonb().
Use php_connect_nonb() instead of connect() in php_hostconnect() -> timeouts
should now work in php_hostconnect().
sock streams abstraction now uses php_sockbuf as the "abstract" pointer.
2001-05-05 18:36:22 +00:00
Wez Furlong
5dbb3a7708 Added files for PHP streams 2001-04-17 17:03:18 +00:00