Moriyoshi Koizumi
991da29849
Set fgetss() free from the length parameter
2003-02-25 20:12:18 +00:00
Ilia Alshanetsky
862634ffa5
Added locking to streams.
...
Allow PHP to automatically release locks on files when terminating the
stream.
Fixed bugs in the handling of the 3rd optional parameter to flock().
2003-02-25 01:39:06 +00:00
Moriyoshi Koizumi
b44b0b80e0
Made fgetss() binary safe too
2003-02-24 22:39:47 +00:00
Wez Furlong
088e2692c3
MFB: Bunch of streams related fixes.
2003-02-24 21:40:23 +00:00
Ilia Alshanetsky
a3cb589b71
Fixed bug #22382 (fgetcsv did not handle \" correctly).
2003-02-24 03:13:25 +00:00
Ilia Alshanetsky
8908faa47f
Revent previous patch, adding of file_write_content() was premature.
2003-02-22 20:35:22 +00:00
Ilia Alshanetsky
d2e2fbcc5b
int/long change.
2003-02-22 20:33:11 +00:00
Moriyoshi Koizumi
d4e9d48b18
Fixed bug #21689 (fgetcsv suppresses some characters before a separator)
...
The fix is suggested by Masahiro Nakayama <masa@sfc.wide.ad.jp>
# is* functions expect their argument to be an integer in range of 0-255
2003-02-18 15:15:22 +00:00
Sara Golemon
6fe4ab41f0
Fix stream_filter_(ap|pre)pend to allow attaching on the read and/or write chains. Automagically decide what to do if noone tells us.
2003-02-18 02:53:24 +00:00
Wez Furlong
32165a5546
Implement new filter API, stage 1.
...
This breaks user-space filters (for the time being), and those
weird convert.* filters in ext/standard/filters.c
The filters stack has been separated into one chain for read and one chain
for write.
The user-space stream_filter_append() type functions currently only operate
on the read chain. They need extending to work with the write chain too.
2003-02-18 01:22:21 +00:00
Zeev Suraski
4934744b93
Win32 build improvements
2003-02-17 13:29:59 +00:00
Wez Furlong
63c95db648
Remove unused vars
2003-02-16 22:33:29 +00:00
Wez Furlong
0a18a9d744
A add much more useful select(2) implementation than is provided by
...
windows sockets. The winsock implementation will only work with sockets;
our implementation works with sockets and file descriptors.
By association, stream_select() will now operate correctly with files, pipes and sockets.
This change required linking against the winsock2 library. In terms of
compatibility, only older versions of windows 95 do not have winsock2
installed by default. It is available as a redistributable file, and is most likely installed by any OS patches (eg: Internet Explorer) applied by the user.
Also, add a win32 compatible pipe test when opening a stream from a pipe. This test will only work on NT, win2k and XP platforms. Without this test, interleaved fread() and select() calls would cause the read buffer to be clobbered. I will be working on a fix for this issue for win9x.
2003-02-16 03:48:49 +00:00
Ilia Alshanetsky
53b7b0eb8c
Merged the flags for the file() function into a single flag.
2003-02-10 22:26:53 +00:00
Wez Furlong
eefe0f1bb0
ZTS fix
2003-02-09 23:11:23 +00:00
Ilia Alshanetsky
f98ea4c46d
Added feature request #9173 (added stream_get_line(), this function will
...
read either the specified number of bytes or until the ending string is
found).
2003-02-09 20:43:05 +00:00
Ilia Alshanetsky
8b5bc3ecd3
Added feature request #17983 (optional parameter to mkdir() that makes
...
directory creation recursive).
Fixed prototype for file() function.
2003-02-09 20:35:54 +00:00
Ilia Alshanetsky
4eae41915f
Added feature request #14097 (option allowing file() command not to include
...
line endings in it's output. As well as another option, which allows blank
lines to be excluded from the output).
2003-02-09 20:05:13 +00:00
Ilia Alshanetsky
8a9e09a44a
ARG_COUNT(ht) -> ZEND_NUM_ARGS().
2003-01-21 14:56:40 +00:00
Ilia Alshanetsky
71e9f8cdd5
Removed pointless memory allocation checks.
2003-01-18 20:01:46 +00:00
Wez Furlong
7002a39f97
Fix potential problem for 64-bit architectures.
2003-01-18 14:10:22 +00:00
Derick Rethans
39aa3a5d98
- Fixed memleak in fscanf().
2003-01-18 13:55:58 +00:00
Moriyoshi Koizumi
7fa0970567
Reverted because correct decision has not been made yet.
2003-01-11 23:05:19 +00:00
Moriyoshi Koizumi
dd2ad168e1
Reduced compiler warnings in ZE2 build
2003-01-11 22:17:37 +00:00
Ilia Alshanetsky
5413a66cbb
CS fixes
2003-01-09 23:23:32 +00:00
Ilia Alshanetsky
3e5bbba351
Fixed a memory corruption that occurs when an unterminated " is encountered
...
this bug maybe be related to #21556 .
2003-01-09 22:49:18 +00:00
Sara Golemon
7dae400063
Fixes to stream_get_wrappers() and stream_get_filters() handle hash table layouts better, plus some picune whitespace fixes
2003-01-05 22:24:49 +00:00
Ilia Alshanetsky
f99fa7170e
Fixed a bug that would cause flock() to never set the 3rd argument.
...
CS fixes & switched to new parameter parsing API.
2003-01-03 18:33:28 +00:00
Anantha Kesari H Y
830298beb8
Modified for NetWare.
2003-01-03 14:37:42 +00:00
Sara Golemon
7b37272381
Added stream_get_wrappers()
2003-01-03 08:02:36 +00:00
Sebastian Bergmann
b506f5c8f8
Bump year.
2002-12-31 16:08:15 +00:00
Wez Furlong
bb640840c3
Remove cruft that opened a stream that was never closed in get_meta_tags().
...
(probably my fault).
Noticed by Philip Olson
2002-12-26 22:35:00 +00:00
Ilia Alshanetsky
7364e3b771
Fixed bug #12556 , updated the test for this bug.
2002-12-05 20:01:19 +00:00
Ilia Alshanetsky
cc13af6a07
Fixed bug #20716 .
2002-11-30 19:12:48 +00:00
Sterling Hughes
5c96f91123
don't use stupid constants, be smart, just read the line
2002-11-27 20:05:20 +00:00
Ilia Alshanetsky
78e2e69b23
Instead of checking whether realpath exists based on OS. Use the
...
HAVE_REALPATH define, which is set if realpath() is avaliable. This patch
also resolves bug #18868 .
2002-11-06 18:07:23 +00:00
Marcus Boerger
c4e3bbb5d7
no C++ comments
...
#args sorry on that & thx jani
2002-10-29 13:26:44 +00:00
Marcus Boerger
083fc401fe
fix overrun
2002-10-29 12:53:58 +00:00
Marcus Boerger
e1508efb45
fix compiler warning?: implement default mentioned by manual
2002-10-24 19:17:08 +00:00
Ilia Alshanetsky
30abd18322
Fixed a possible segmentation fault in file() function.
2002-10-22 18:07:11 +00:00
Wez Furlong
dabf1053cd
Refine stream_select() to work with streams that have data in their read
...
buffers.
When selecting for read, the streams are examined; if any of them have
pending read data, no actual select(2) call is performed; instead the
streams with buffered data are returned; just like a regular select
call.
Prevent erroneous warning in stream_select when obtaining the fd.
2002-10-21 22:54:37 +00:00
Wez Furlong
829f1855fd
made fgets() binary safe.
...
php_stream_gets is now a macro which calls php_stream_get_line. The latter
has an option argument to return the number of bytes in the line.
Functions like fgetcsv(), fgetss() can be made binary safe by calling
php_stream_get_line directly.
# HEADS UP: You will need to make clean after updating your CVS, as the
# binary signature has changed.
2002-10-19 13:11:48 +00:00
Ilia Alshanetsky
4b83b189fe
Fixed bug #19971 (optimized the file() function).
...
The file() function is now also binary safe.
2002-10-18 20:39:49 +00:00
Wez Furlong
9b87199e2a
Improve file().
...
Patch by Tal Peer <tal@php.net>
2002-10-18 16:55:47 +00:00
Wez Furlong
2f6952c936
Nope, that last one wasn't a leak in main/streams.c, it was
...
file_get_contents misinterpreting the result...
2002-10-15 16:45:26 +00:00
Wez Furlong
86e60a2d7a
@- fgets($fp) (with no length parameter) now uses a buffer as long as the
...
@ the next line available from the $fp. Previously, there was a 1KB limit.
@ (Wez)
2002-10-14 02:28:35 +00:00
Wez Furlong
9d5bab5a0d
EOF related fixes.
2002-10-05 10:59:35 +00:00
David Reid
9b10843481
Add more BeOS support...
2002-10-02 23:52:08 +00:00
Wez Furlong
7694770304
Rename streams functions to fit with naming conventions, adding aliases
...
for old functions where required.
Make use of recent changes to chunk size and timeout setting code.
2002-09-28 22:14:21 +00:00
Wez Furlong
8aae36aecb
Add missing folding marker.
2002-09-28 13:04:47 +00:00