Commit Graph

52 Commits

Author SHA1 Message Date
Wez Furlong
b0ed189159 Remove debug code that should not have been committed.
# I must apologize for the quality of my commits tonight...
2002-04-30 00:22:44 +00:00
Wez Furlong
37411dd674 Implement context option setting API.
Add/amend debugging code for sockets.
Add a flag that will help the http wrapper optimize itself when
it is not being used for include/require.
2002-04-30 00:16:00 +00:00
Wez Furlong
928bae9cf8 Make scheme part decoding rfc2396 compliant.
Change zlib:// and bzip2:// to compress.zlib:// and compress.bzip2://
Tidy up old socket/network code/comments.
2002-04-19 10:06:41 +00:00
Wez Furlong
b10b24d50c Always initialize wrappers, regardless of PG(allow_url_fopen).
Add is_url field to wrapper structure; the stream wrapper openers
will disallow opening is is_url && !PG(allow_url_fopen).
Add infrastructure for stat($url) and opendir($url).
Tidy up/centralize code that locates and instantiates wrappers for the
various operations.
Implement opendir for plain files.
Make the PHP opendir and dir functions use the streams implementations.
Add modelines for syntax highlighting the pear scripts in vim
2002-04-16 22:14:27 +00:00
Frank M. Kromann
643fb6dcdf Adding PHPAPI needed for exif on Win32 2002-04-15 22:22:53 +00:00
Wez Furlong
e1d0a14790 Implement stream context and status notification system.
Bump the BC for zlib notice to a warning
# See my RFC to php-dev a few days ago
2002-04-10 22:42:32 +00:00
Wez Furlong
62538caa86 Added BC support for old style zlib: wrapper.
Added notice when a requested wrapper is not found.
# This BC thing was giving me nightmares.
# It took me 10 minutes to realize I hadn't compiled in zlib support also.
2002-04-06 17:29:39 +00:00
Wez Furlong
a0f165a5cb main/streams.c 2002-04-02 16:46:33 +00:00
Wez Furlong
2539cbc74c Phase 3 of OO wrapper cleanup
# What was phase 2?
2002-03-28 00:49:00 +00:00
Wez Furlong
5ee65bd8f5 Phase 1 of wrapper OO cleanup.
# Collecting underpants
2002-03-24 18:05:49 +00:00
Marcus Boerger
4df6833a79 -defined php_stream_temp_new() for standard temp streams 2002-03-23 17:51:20 +00:00
Markus Fischer
1d75089d8b *** empty log message *** 2002-03-21 22:35:02 +00:00
Wez Furlong
06f6e47e4c Require that wrappers use <protocol>://<path> to avoid
ambiguities when filenames have ':' characters.
This slightly breaks BC with the old style zlib: wrapper.
2002-03-21 17:02:50 +00:00
Wez Furlong
a662f012bb Convert the gzfile related functions into aliases for their equivalents
in ext/standard/file.c, so a gzopen()ed file pointer can be used in
fread, fseek etc.
Improved behaviour of zlib stream.
Moved passthru code into streams.c
# I'm not happy about BG(mmap_file)
Nuked gzgetss_state as no longer needed.
2002-03-21 01:11:52 +00:00
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