Sascha Schumann
2d011afbfd
Don't do anything, if the input string has a length of 0.
...
PR: #7686
2000-12-17 02:09:07 +00:00
Stig Bakken
6e1e78d1c6
@Added iconv() function (using libc or libiconv) (Stig)
2000-12-15 01:01:14 +00:00
Sascha Schumann
c0daf14cb3
Don't define LC_MESSAGES, if LC_MESSAGES is not defined.
...
PR: #8259
2000-12-14 15:58:14 +00:00
Stanislav Malyshev
16987ca15f
Fix crash when first argument to strtr is empty
2000-12-13 10:22:36 +00:00
Zeev Suraski
6239ddfe6d
Fix Win32 build
2000-12-11 16:27:48 +00:00
foobar
8bb668b226
Added constants for locale categories.
2000-12-10 15:55:34 +00:00
Frank M. Kromann
f9e226fe4a
Fixing bug 8061. Position counter starts a 0 but was compared with length.
...
oops. the fix should be made twice.
2000-12-01 01:55:31 +00:00
Frank M. Kromann
518ab3c62f
Fixing bug 8061. Position counter starts a 0 but was compared with length.
2000-12-01 01:26:42 +00:00
Sascha Schumann
939b72c771
removing '{' was certainly not intended
2000-11-22 04:16:25 +00:00
Sascha Schumann
886fbabb0b
Don't access opt, if opt was not set.
2000-11-22 04:15:27 +00:00
Andrei Zmievski
65f37060db
Fix bug #7667 .
2000-11-06 19:41:30 +00:00
Sascha Schumann
3ee228371d
Let strtr() use smart_str to reduce complexity
2000-10-12 01:26:26 +00:00
Sascha Schumann
174253123e
Rewrite php_str_to_str using the smart_str API.
...
This removes much complexity from the function.
Speed is improved by pre-allocating memory instead of reallocating
the buffer each time the pattern is found.
2000-10-12 00:50:28 +00:00
Andi Gutmans
a1abfb7643
- Fix dirname()
2000-10-03 16:47:25 +00:00
Andi Gutmans
d37b140601
- Fix VC++ warning
2000-10-03 14:43:04 +00:00
Sascha Schumann
1cc3e6b5e6
Move php_memnstr to the header file, so that the function body is available
...
in all compilation units (note the static linkage).
2000-09-27 15:18:00 +00:00
Stanislav Malyshev
27fb7df0d2
Add empty string checks to add?slashes
2000-09-17 09:15:48 +00:00
Daniel Beckham
b852f3941f
reversed chomp alias addition as per Andi Gutmans' request
2000-09-12 19:00:21 +00:00
Daniel Beckham
5925071957
added chomp() alias for chop() for us Perl purists.
2000-09-12 15:54:10 +00:00
Stanislav Malyshev
44e04f7688
Make parse_str always register globals with 1 argument and never -
...
with 2 arguments
2000-09-12 10:56:25 +00:00
Stanislav Malyshev
e0a5a4813e
A quick attempt to make parse_str($str,$arr) not register globals.
2000-09-12 10:54:45 +00:00
Derick Rethans
71066c12dc
- Fix for bug #6673
...
- Added a "cut" option to wordwrap (as per feature request #6429 )
@ Added an optional parameter to wordwrap that cuts a string if the length
of a word is longer than the maximum allowed with (Derick)
2000-09-11 20:06:24 +00:00
Andrei Zmievski
6ac728e179
(PHP parse_str) ParameterPassedByReference() check is not necessary.
2000-09-11 14:54:12 +00:00
Stanislav Malyshev
1ccac6ed55
Add additional parameter to parse_str for saving result (thanks to
...
John Bafford <dshadow@zort.net>)
@ Added second parameter for parse_str to save result (John Bafford)
2000-09-11 14:50:26 +00:00
Andrei Zmievski
5abacc5413
(PHP pathinfo) Fixed more typos.
2000-09-11 13:54:59 +00:00
Andrei Zmievski
5ed3e24f47
(PHP pathinfo) Fixed leaks, saved some memory allocations, added
...
more error checking.
2000-09-11 13:52:22 +00:00
Sterling Hughes
0b9a78cb1e
@- Added the pathinfo() function. (Sterling)
2000-09-10 05:59:16 +00:00
Colin Viebrock
6f59f8b078
str_repeat() should be able to handle multipliers of 0 gracefully, IMHO ...
...
Hope no one disagrees. :)
2000-09-05 18:25:58 +00:00
Sterling Hughes
890ae1e244
#Its fixed this time, no really.
2000-08-18 13:43:22 +00:00
Sterling Hughes
1b8ee02fd6
Fix #6234
2000-08-18 13:22:09 +00:00
Stanislav Malyshev
56ecc78983
Fix chunk_split ( #6208 )
2000-08-17 08:47:42 +00:00
Egon Schmid
868e3b1db8
Changed some protos.
2000-08-06 14:36:10 +00:00
Rasmus Lerdorf
75bb019760
Fix bug in strip_tags function as per bug #5857
...
@ Fix bug in strip_tags function as per bug #5857 (Rasmus)
2000-07-30 05:04:06 +00:00
Egon Schmid
e4b7e9e916
Protos fixed.
2000-07-26 11:43:01 +00:00
David Croft
8dd1fdb1a0
wordwrap function from Chris Russel <russel@yorku.ca>
...
differences from his patch:
- wordwrap width and wrap-string now optional parameters
(default to 75 and "\n" respectively)
- wordwrap_byte is now just an automatic special case of wordwrap
- Zend API compliant
@- Added new function "wordwrap" to wordwrap long strings from Chris
@ Russel <russel@yorku.ca> (David Croft)
2000-07-22 01:12:24 +00:00
Andrei Zmievski
fbced1b9cc
(php_addslashes) Fixed stop condition - it should only take into account
...
the length of the string, not the characters.
2000-07-21 15:29:59 +00:00
Hartmut Holzgraefe
5390b6a291
fix for bug #5707
2000-07-20 23:08:26 +00:00
Zeev Suraski
327e33972b
Shutup a gcc warning
2000-07-18 20:40:23 +00:00
Stanislav Malyshev
7b9d2e33bf
Fix crash in stripcslashes("") ( #5628 )
2000-07-17 10:22:30 +00:00
Egon Schmid
1231a3e473
Fixed other protos.
2000-07-09 19:33:19 +00:00
Egon Schmid
ee513d6ed5
Eliminated a typo.
2000-07-08 22:55:40 +00:00
Andrei Zmievski
885e40db05
@- Updated str_pad() to be able to pad on left/right/both sides. (Andrei)
2000-07-08 20:38:23 +00:00
Thies C. Arntzen
5b1f7bc8ac
(implode), (strtr) no longer touch the internal array-pointer.
2000-06-18 10:37:01 +00:00
Zeev Suraski
da66298659
- Fix a couple of wranings in the FTP code and in parsedate.y
...
- Be safer with LC_MESSAGES
- Align with the latest Zend change in call_user_function_ex()
2000-06-17 16:49:03 +00:00
Andi Gutmans
1e5a405c5c
- Make Windows compile
...
- Windows doesn't support LC_MESSAGES
2000-06-17 14:48:03 +00:00
Hartmut Holzgraefe
34cc1de229
setlocale didn't recognize LC_MESSAGES (BUG ID#3957)
2000-06-17 06:25:47 +00:00
Andrei Zmievski
ab99eb59fb
(PHP str_pad) Terminate string with a null.
2000-06-12 16:06:27 +00:00
Andrei Zmievski
ef1d6987fd
@- Fixed stripcslashes() to remove to strip \ in unknown escapes instead of
...
@ leaving it. (Andrei)
2000-06-09 13:58:10 +00:00
Rasmus Lerdorf
ff843bacf4
Make trim strip \0 to match php 3
...
@ Make trim strip \0 to match php 3 (Rasmus)
2000-06-07 00:59:14 +00:00
Andrei Zmievski
b928bdceb8
@- Added str_pad() for padding a string with an arbitrary string on left or
...
@ right. (Andrei)
Added str_pad() for padding a string with an arbitrary string on left or right.
# With all those macros, the code is starting to eerily resemble Perl's guts.
2000-06-06 20:42:33 +00:00
Clayton Collie
0b7fd17c2b
Added sscanf() function.
2000-06-06 18:58:15 +00:00
Andi Gutmans
3701bc4207
- ARG_COUNT(ht) -> ZEND_NUM_ARGS() mega patch
2000-06-05 19:47:54 +00:00
Jouni Ahto
467c4314b8
(ucwords) Remove unnecessary code.
...
# Didn't keep my promise to stop...
2000-06-01 14:56:28 +00:00
Jouni Ahto
c106ab8ba0
(ucwords) Yet another fix for #4748 .
...
# Last one from me today, I must have a beer now.
2000-06-01 14:40:41 +00:00
Andrei Zmievski
48db9618b8
Some tweaks.
2000-06-01 14:18:45 +00:00
Jouni Ahto
30c5b53ad1
(ucwords) Fixed fix for fix for fix for #4748 .
...
# Today's most fixed bug.
2000-06-01 13:38:23 +00:00
Hartmut Holzgraefe
a35237795f
uh, off by one?!! this time it's regression-tested, fast and compact
2000-06-01 11:47:48 +00:00
Jouni Ahto
3c51a88d0c
(ucwords) Another try to fix #4748 .
2000-06-01 10:07:44 +00:00
Hartmut Holzgraefe
f27956eb19
ucwords will now test against isspace() instead of just ==" "
...
(see BUG #4748 )
2000-06-01 09:56:54 +00:00
Rasmus Lerdorf
7182e722ca
Need a PHPAPI version of basename for some stuff I am working on.
...
Also fixed a bug along the way in the basename function. If it
was fed something like "filename.ext/////" it would return the string
with all the slashes whereas if you fed it "/path/filename.ext////" it
would get it right.
@ Fixed basename() bug where "file.ext///" would not return the same
@ as "/path/file.ext///" (Rasmus)
2000-05-23 20:16:14 +00:00
Andrei Zmievski
03851ced5f
Clean up the patch by Hartmut.
2000-05-23 12:38:12 +00:00
Hartmut Holzgraefe
78cec9f33e
again (due to feature request in bug id #3251 )
...
added optional 3rd parameter 'limit' to explode() as in split()
2000-05-23 05:04:28 +00:00
Hartmut Holzgraefe
eb7979ab5b
patch to explode (bug id #3251 ) suspended till 4.0.1
2000-05-20 05:07:53 +00:00
Hartmut Holzgraefe
af77bc0583
added optional 3rd parameter 'limit' to explode() as in split()
...
(due to feature request in bug id #3251 )
2000-05-19 22:00:38 +00:00
Zeev Suraski
e043439ff6
Update the license with the new clause 6
2000-05-18 15:34:45 +00:00
Andrei Zmievski
3b77fd37a9
TODO update and fix for C++ comments.
2000-04-27 14:41:18 +00:00
Sterling Hughes
68e54e9922
Small proto fix.
2000-04-26 01:16:57 +00:00
Andrei Zmievski
5c5ec88292
@Added substr_count() from Peter Kovacs. (Andrei)
...
# also some todo stuff
2000-04-26 00:29:59 +00:00
Andrei Zmievski
c7100c4a1a
Added natural comparison/sorting routines using code from Martin Pool.
...
@- Added natural comparison/sorting routines strnatcmp(), strnatcasecmp(),
@ natsort(), and natcasesort(). These are useful for comparing and sorting
@ strings that contain numbers. Based on the code from Martin Pool
@ <mbp@humbug.org.au>. See http://www.linuxcare.com.au/projects/natsort/
@ for more info on natural sorting. (Andrei)
2000-04-12 19:39:02 +00:00
Andrei Zmievski
5cd7bf59b3
@- Fixed return of stristr() to no longer always be lowercased. (Andrei)
2000-03-30 14:34:46 +00:00
Zeev Suraski
b43f85d641
- Change new -> result. Using C++ keywords isn't too hot
2000-03-26 17:06:19 +00:00
Thies C. Arntzen
3e99a228df
@- stristr() no longer modifies it's arguments. (Thies)
...
fix #3890
2000-03-22 08:14:00 +00:00
Egon Schmid
0275e4f665
Will watch the diffs as much as I can.
2000-02-24 10:11:42 +00:00
Zeev Suraski
86fa2aade2
the pipe is breaking all the time
2000-02-19 23:41:32 +00:00
Andi Gutmans
bac7a5085e
- Not sure if len can be zero but it's better to check it once then
...
rechecking for it every loop and having an extra variable do nothing.
2000-02-13 15:59:32 +00:00
Andi Gutmans
7441ee5175
- Beautify a bit.
2000-02-13 15:56:07 +00:00
Zeev Suraski
6ae0902498
- Hopefully fix strip_tags bug
...
@- Fix overrun in strip_tags (Stas, Zend library)
2000-02-13 15:35:51 +00:00
Thies C. Arntzen
017a6353d1
@- Fixed crash in strip_tags() and related functions. (Thies)
2000-02-13 14:56:35 +00:00
Zeev Suraski
80bdd19e03
Fine tune Andi's patch
2000-02-11 15:59:30 +00:00
Andi Gutmans
29280bb9ec
- Get rid of some more evil MSVC5's and switch standard/ to use PHP_WIN32
2000-02-10 21:53:56 +00:00
Zeev Suraski
6d0ab6166c
SAPIfication, Episode VI: Return of the SAPI
...
Remove mostly all references to APACHE and CGI_BINARY from the code.
- Apache include files are no longer included by any PHP code, except for the Apache SAPI module.
- No server specific code is in any of the base PHP code.
Still left to be done:
- Eliminate any references to APACHE from the few remaining modules.
- Move request_info.c's logic to SAPI
- Modify the regex function names, and globals, so that we can always
include them, without having to fear any interference with Apache;
Always use the bundled regex library
2000-02-10 19:41:21 +00:00
Zeev Suraski
2460569ccb
Change string->str where possible; string is basic a C++ class, so gdb can't look
...
inside variables named 'string'.
2000-02-08 22:21:43 +00:00
Zeev Suraski
489b705d4b
@- Fixed memory corruption in fgetss(), strip_tags() and gzgetss() (Zeev)
2000-02-08 21:29:18 +00:00
Zeev Suraski
c12aa454ff
Compile fixes
2000-02-05 15:44:20 +00:00
Andrei Zmievski
1a4e39838f
(PHP wddx_deserialize) Fixed a problem with deserializing empty values.
...
(php_addslashes) Guard against NULL data.
2000-02-02 21:53:27 +00:00
Zeev Suraski
8a2f6c5e60
@- Fixed a crash bug in strtr() working on large input strings (Zeev)
2000-01-29 17:54:30 +00:00
Zeev Suraski
9ab35ae393
Tried to centralize global variable registration as much as possible:
...
- Added $HTTP_ENV_VARS[] and $HTTP_SERVER_VARS[] support, which similarly
to $HTTP_GET_VARS[], contain environment and server variables. Setting
register_globals to Off will now also prevent registration of the
environment and server variables into the global scope (Zeev)
- Renamed gpc_globals to register_globals (Zeev)
- Introduced variables_order that deprecates gpc_order, and allows control
over the server and environment variables, in addition to GET/POST/Cookies
(Zeev)
2000-01-28 17:24:53 +00:00
Zeev Suraski
fc678100cd
post.c really had nothing to do with POST anymore, and it belongs to the top level directory
2000-01-28 13:31:12 +00:00
Jouni Ahto
9a07df6c4a
(php_setlocale) Fixed memory leak (bug #3105 ).
...
# Must have been thinking something else when originally wrote this.
2000-01-05 12:26:41 +00:00
Thies C. Arntzen
402a9db2fe
@- str_repeat() now returns correct length. (Thies)
2000-01-04 09:45:28 +00:00
Sascha Schumann
43ae2bffbb
Happy Y2K patch! Happy new year (or the new millennium, depending on whether
...
you start counting at 0 or 1).
2000-01-01 01:32:05 +00:00
Sascha Schumann
09d2e3d159
Move include into source file
1999-12-28 18:47:59 +00:00
Andi Gutmans
d6f788f56a
- Get rid of two warnings
1999-12-25 09:06:55 +00:00
Thies C. Arntzen
63d0849403
pval->zval
1999-12-23 14:59:01 +00:00
Thies C. Arntzen
a94721fc4c
@- strrev() no longer modifies arg1. (Thies)
1999-12-23 14:55:50 +00:00
Andrei Zmievski
6e1dbe497c
Made quotemeta() binary-safe.
...
@ Made quotemeta() binary-safe. (Andrei)
1999-12-20 20:43:47 +00:00
Sascha Schumann
cb45c2ea55
Use zend_sprintf by default (which is defined to sprintf, if the system's
...
sprintf is useable).
1999-12-19 14:39:41 +00:00
Sascha Schumann
63d4411560
Use workaround function for sprintf, if the return value of sprintf is needed
1999-12-19 02:12:31 +00:00
Zeev Suraski
a1ad2872ee
- The tree compiles again
1999-12-18 22:40:35 +00:00
Zeev Suraski
3ee4e65c95
More php3_ annihilation
1999-12-18 04:01:20 +00:00