Commit Graph

1835 Commits

Author SHA1 Message Date
Sterling Hughes
8092460830 hopefully fix win32 compile warnings
# I really wish i had a box to compile php with win32 on
2001-09-18 05:48:49 +00:00
Sterling Hughes
bcb426a207 Merge in qsort changes 2001-09-17 21:02:53 +00:00
Sterling Hughes
97fea0931c Make rand thread safe when ZTS is defined. 2001-09-16 20:49:57 +00:00
Sterling Hughes
96763e8372 Hopefully fix compile warnings on win32 systems 2001-09-16 17:37:19 +00:00
Sterling Hughes
47f3851a00 for the daft folks that think 0 is a good seed. 2001-09-16 03:50:04 +00:00
Sterling Hughes
373fc12bb1 @ Make the seed options to srand() and mt_srand() optional, if the seed is
@ not specified, the generate the most random seed possible. (Sterling)

Please, if anyone has any comments on the way I generate this seed, speak up!
This seems to be the most "random" seed I could come up with...

This commit is 100% backwards compatible :)

Add myself to the authors list cause of recent work on the file
2001-09-16 03:46:59 +00:00
Rui Hirokawa
9c5580c7d4 Added support for japanese encoding to htmlentites() and htmlspecialchars(). @ Added support for japanese encoding to htmlentites() and htmlspecialchars(). (Rui) 2001-09-15 04:48:48 +00:00
Thies C. Arntzen
e929389eeb fix strtr() when called with two parameters. this has been broken for some time!
guys, when "optimizing" functions you _shoudl_ write a testcase for the
working function and make _sure_ that it works afterwards!
2001-09-13 10:48:41 +00:00
foobar
5275b60398 Enable chroot() only if SAPI is CGI. 2001-09-12 02:07:46 +00:00
Sascha Schumann
4c69a970d3 Remove some unused variables 2001-09-11 07:52:55 +00:00
Sascha Schumann
2bbbec107b A round of "d'ohs" for me, please.
We must not stop scanning after finding a "?", because we
need the information regarding the "#".
2001-09-10 11:22:43 +00:00
Zeev Suraski
517bd3018c Do some justice to the doc team 2001-09-09 23:37:55 +00:00
Sascha Schumann
de963ce9c6 Better fix for mark problem 2001-09-09 14:52:39 +00:00
Sascha Schumann
c86c9f52b4 Fix mark-handling 2001-09-09 14:38:12 +00:00
Derick Rethans
78747bd2df - Don't wrap lines... this is annoying while coding. 2001-09-09 13:29:31 +00:00
Derick Rethans
61d4f7fe65 - Really fix nl2br now... it's actaulyl faster now 2001-09-09 12:55:48 +00:00
Derick Rethans
176cd90bd7 - Fix for bug 11904
#- This is possibly not the best solution... feel free to improve
2001-09-09 11:42:36 +00:00
Sterling Hughes
ff2bc83c08 remove ARG_COUNT(ht)
# Is there any reason that the set_compare_func call is passed SORT_STRING
# instead of SORT_REGULAR??
2001-09-09 11:03:31 +00:00
Sterling Hughes
6963ac4050 export the mt rand functions... 2001-09-09 10:44:12 +00:00
Sterling Hughes
25d4500a86 I should really learn how to spell 2001-09-06 08:56:24 +00:00
Sterling Hughes
b7ba9e007d avoid lowercasing the string 2001-09-06 08:54:54 +00:00
Sterling Hughes
33fc6e2d5f add missing ) 2001-09-06 07:33:45 +00:00
Sterling Hughes
8a156d9a39 fix ms compile warnings 2001-09-06 06:41:16 +00:00
Sterling Hughes
903c831be5 spaces -> tabs work cont. 2001-09-06 00:40:02 +00:00
Sterling Hughes
a4c905ff16 ws fix 2001-09-06 00:18:13 +00:00
Sterling Hughes
a1b11f0755 Fix ts build
# I've gotta start compiling --enable-experimental-zts...  anyway we can make
# this the default when compiling from cvs?  It'll help a large portion of
# compile issues with patches
2001-09-05 21:46:44 +00:00
Sterling Hughes
e121eaaef5 Straight out da bronx, I be using zend_parse_parameters()
# Word out to my peeps on Connor st.
2001-09-05 21:38:49 +00:00
Sterling Hughes
5ec58914fe stray tabs and spaces 2001-09-05 21:04:30 +00:00
Sterling Hughes
f0c5631778 change range macro semantics
# Kinda torn between the two, thoughts?
2001-09-05 20:59:24 +00:00
Sterling Hughes
d930a72cd7 remove inline 2001-09-05 20:56:15 +00:00
Sterling Hughes
1b0f00d67f a bit of api cleanup... move range stuff into a macro (properly :) 2001-09-05 20:52:45 +00:00
foobar
42b5521af5 revert bad commit. 2001-09-05 19:47:55 +00:00
Sterling Hughes
b9edf7c17c API Update 2001-09-05 06:55:37 +00:00
Egon Schmid
03fbbb098c Fixed some protos. 2001-09-04 10:44:28 +00:00
Sterling Hughes
38cacba117 Thanks sebastian
# I really like this whole qa team thingy
2001-09-04 10:13:55 +00:00
Sterling Hughes
536c96969b update php_trim as well... 2001-09-04 09:35:53 +00:00
Sterling Hughes
c661449ebf fix crash bug 2001-09-04 09:33:30 +00:00
Sterling Hughes
0935217091 fix proto 2001-09-04 06:21:48 +00:00
Sterling Hughes
e55315a375 tabs -> spaces 2001-09-04 06:20:23 +00:00
Sterling Hughes
fe03f6f4c2 Begin cleanup, api wise... 2001-09-04 06:18:11 +00:00
Sterling Hughes
3151916113 pval -> zval 2001-09-04 06:08:42 +00:00
Daniel Beulshausen
9b8886410d fix zts+win32 build 2001-09-04 02:19:30 +00:00
Sterling Hughes
dda004bcfb - update to php4 api
- expand case statements, ie:

case 1: case 2: case 3:

to

case 1:
case 2:
case 3:

- Remove un-necessary brackets and parentheses (only when it takes away from
readability, I know this is quite arbitrary, but I did my best :)
2001-09-03 23:30:33 +00:00
Andi Gutmans
1ecd31b66c - Fix thread safe mode.
- Please don't use Java style function braces.
2001-09-03 20:21:00 +00:00
Derick Rethans
383691eec2 - Fix broken build
#- Please test before commit!
2001-09-03 17:38:10 +00:00
Stanislav Malyshev
0a143cf655 Add _php_math_zvaltobase and _php_math_basetozval
This allows to use bindec, etc. functions to convert numbers longer
than fits in long, using floats instead.
Note: the functions like decbin still don't use the zval-ed functions,
so they work only on longs yet.
2001-09-03 16:26:31 +00:00
Jeroen van Wolffelaar
dc8386e30d Removed outdated comment until I've got a better one 2001-09-03 12:01:50 +00:00
Jeroen van Wolffelaar
efb83df9f9 Kill some warnings/errors (reported by Sebastian, more to come, but
could take some time. Update of ZTS-builderrors is welcome)
2001-09-03 11:57:15 +00:00
Sterling Hughes
79c27f0cd2 should be this 2001-09-03 08:47:45 +00:00
Sterling Hughes
b417b96fb8 - Update to the PHP4 API (newer macros)
- Improve error reporting from split()
- Some minor speed improvements
2001-09-03 08:44:02 +00:00
Sterling Hughes
f6d73d73fb stray tabs 2001-09-03 06:10:45 +00:00
Sterling Hughes
f14ada19ac cleanup sscanf() just a tiny bit, just so it looks like the rest of the code
in the string.c file.
2001-09-03 04:49:36 +00:00
Jeroen van Wolffelaar
0cb6a31906 Fix array_rand and array_suffle to use php_rand correctly 2001-09-03 01:54:04 +00:00
Jeroen van Wolffelaar
b0300e26df Fix prototype 2001-09-03 01:46:03 +00:00
Jeroen van Wolffelaar
72c7ae080b Fix SIGSEGV because HAS_SRAND didn't check wether the entry existed at
all
2001-09-03 01:25:24 +00:00
Jeroen van Wolffelaar
1a68fe49cb Add forgotten files to MAIN 2001-09-03 01:10:29 +00:00
Jeroen van Wolffelaar
92f1248a49 Update credits 2001-09-03 01:09:35 +00:00
Jeroen van Wolffelaar
f7306ce010 Merge RAND_REDESIGN into MAIN 2001-09-03 01:06:23 +00:00
Andrei Zmievski
392e1edee8 @- Made in_array() and search_array() allow the needle to be an array in
@  itself. (Andrei)
2001-08-31 04:52:10 +00:00
foobar
d340c5b2bf @- Added ini_get_all() function which returns all registered ini entries
or the entries for the specified extension. (Jani)
2001-08-30 17:47:04 +00:00
foobar
5dd2b6e2fd According to Zeev this code is just for showing how to create overloaded classes. 2001-08-29 23:53:22 +00:00
foobar
08a521572f WS fixes and indenting. 2001-08-29 16:00:30 +00:00
Rasmus Lerdorf
563ffb8984 Kill a warning 2001-08-28 21:50:37 +00:00
Zeev Suraski
b781720b36 More fixes and refinements 2001-08-27 00:23:55 +00:00
Zeev Suraski
d697a558ac Fix my session updates.
trans_sid handling will no longer slow down performance unless a session
is actually in use.
2001-08-26 11:49:43 +00:00
Zeev Suraski
7b73aee40f Make the session module more independent 2001-08-26 01:09:20 +00:00
Zeev Suraski
b8763a6f8c Get rid of TRANS_SID - it's always possible to use it now. 2001-08-25 16:09:23 +00:00
Zeev Suraski
13ff183225 Move the trans-sid mechanism to use the output buffering mechanism.
Advantages:
- Would work with the output buffering mechanism in general, and with
  output compression in particular
- Should yield better performance (untested as of yet)
2001-08-25 15:57:42 +00:00
Wez Furlong
9e7da02d3b Fix htmlspecialchars problem. 2001-08-24 08:58:10 +00:00
Andrei Zmievski
cae9763d0a @- Fixed a crash bug in array_map() if the input arrays had string or
@  non-sequential keys. Also modified it so that if a single array is passed,
@  its keys are preserved in the resulting array. (Andrei)
2001-08-24 02:58:23 +00:00
John Donagher
faa5031f25 Don't try and search a 0-length string. This allows parse_url() to correctly
parse a non-pathed URI, i.e. 'scheme://'
2001-08-24 02:21:16 +00:00
Wez Furlong
f20e9fa298 - Add support for chinese encodings to htmlentities/htmlspecialchars
(patch from Alan Knowles <alan_k@hklc.com>)
2001-08-23 10:43:15 +00:00
Jeroen van Wolffelaar
3e62bd0867 Reverted the patch to main branch - should have branched whole
ext/standard...
2001-08-22 22:14:08 +00:00
Jeroen van Wolffelaar
43c2bc364f Commit forgotten fix in crypt.c, oversight of a BC-problem 2001-08-22 22:11:57 +00:00
Gavin Sherry
bd4150ed80 Fixed buffer overflow issue. 2001-08-22 05:47:11 +00:00
Gavin Sherry
ff7a694e0f Changed php_strip_tags() to check if <? was XML code. 2001-08-22 02:03:14 +00:00
Joey Smith
1c10503029 Hmmm...not sure what this was trying to do. stat() was acting like filesize(). 2001-08-21 23:58:19 +00:00
Zeev Suraski
e140b35b04 API update 2001-08-21 12:57:53 +00:00
Sascha Schumann
01672af8f0 Improved fix 2001-08-20 15:27:45 +00:00
Stanislav Malyshev
902100a692 Fix long printing in smart_str_print_long 2001-08-20 15:26:10 +00:00
Stanislav Malyshev
8fd65b9f16 test big numbers too 2001-08-20 14:15:05 +00:00
foobar
d3aff0f6ee make this test work. 2001-08-18 16:47:02 +00:00
Sterling Hughes
807b49aa2f K&R format changes 2001-08-18 08:43:47 +00:00
Sterling Hughes
03724a70e9 Z_*_P{0,2} macro work. 2001-08-17 09:10:49 +00:00
Sterling Hughes
c53f80fb23 1) update to the ZEND_NUM_ARGS() and Z_*_P{0,2} macros
2) minor ws improvements, removing unecessary error checking logic, and
making the error messages a bit nicer looking
2001-08-17 09:08:03 +00:00
Sterling Hughes
06aa7a4d19 Cleanup of var_dump() with correct macro's, k&r indent, and removal of a
pair of unnecessary { }
2001-08-17 07:50:15 +00:00
Sterling Hughes
844788a4b8 pval -> zval
Z_*_P{0,2} macros
easier way of doing urldecode(), from rawurldecode() (a tad faster too).
2001-08-17 07:41:20 +00:00
Sterling Hughes
591aba3c89 ws fix. 2001-08-17 07:07:34 +00:00
Sterling Hughes
6bc04c0858 Clean up the function for the Zend API (php3, early php4 relics removed).
Use PF_INET, instead of AF_INET, if present.
remove some code enclosed in #if 0 ... #endif that made no sense
2001-08-17 06:53:26 +00:00
Zeev Suraski
2d8ca548e2 Fix build 2001-08-15 22:49:15 +00:00
foobar
3cc6655f3a Add the build time too. Bug: #12774 2001-08-15 22:37:31 +00:00
Jeroen van Wolffelaar
2b6bafb269 Remove cbrt also, and mark logm1 and exp1p as expermintal 2001-08-15 19:08:59 +00:00
Jeroen van Wolffelaar
d62fbbd5a8 MF407 2001-08-15 19:01:32 +00:00
Sterling Hughes
8300abe367 Removed select(), fd_set(), etc. (wasn't present in the first place, and
these are implemented in the sockwasn't present in the first place, and
 these are implemented in the sockets extension))
2001-08-15 05:21:43 +00:00
Andi Gutmans
4580df1080 - This code looks OK so remove FIXME comment 2001-08-14 17:43:39 +00:00
Zeev Suraski
0116a7b911 Fix crashes in parse_parameters calls
HEADS UP:  Make sure you supply TSRMLS_CC for this function!
I'll try to think of a way that'd allow us to find this issue using
the compiler.
2001-08-13 19:31:18 +00:00
Rasmus Lerdorf
4d11d90880 Track down a few more functions that don't check for 0 args and use
faster mechanism
2001-08-13 07:55:39 +00:00
Rasmus Lerdorf
5b2227ea80 Oops, a little too much simplification there.. ;) 2001-08-13 07:28:57 +00:00
Rasmus Lerdorf
8c497f05c4 We don't consistently check for args passed to functions that don't
take any args.  In some cases we probably want to skip the check for
performance reasons, but in other cases where performance is unlikely
to be a factor, not throwing a warning on the wrong number of args passed
to a function is at best inconsistent, and at worst it could hide a bug.
So, add a few such checks.  There are still lots of cases out there.
2001-08-13 06:43:47 +00:00
Zeev Suraski
49e45baf9b - Fix API
- Update NEWS
2001-08-13 00:32:04 +00:00
Zeev Suraski
35de326b0e Compile fix for oldie Linux systems (possibly others too) 2001-08-12 21:23:15 +00:00
Zeev Suraski
c0404f4631 Whitespace 2001-08-11 17:03:37 +00:00
Wez Furlong
831f05b0fb Fix some build probs on *bsd 2001-08-10 18:02:59 +00:00
foobar
52e3b4a44f Cleanup. Also make gethostnamel() to return FALSE on error and not just empty array. 2001-08-10 02:19:05 +00:00
Zeev Suraski
f47962c7c0 Implement import_request_variables() 2001-08-08 20:05:37 +00:00
Wez Furlong
b00809a322 Fix probs on OpenBSD-current and RedHat 6.1 2001-08-08 20:00:09 +00:00
Zeev Suraski
5eb9495b1b - Implement $_FORM
- Update phpinfo()
- Update NEWS
2001-08-08 17:16:20 +00:00
foobar
001df0d028 Yet another TSRM fix. 2001-08-07 20:13:54 +00:00
Andrei Zmievski
c4555f9f55 @- Added vprintf() and vsprintf() functions that allow passing all arguments
@  after format as an array. (Andrei)
2001-08-07 19:44:45 +00:00
foobar
ac28ca9d85 killed a compile warning. 2001-08-07 19:21:19 +00:00
Andrei Zmievski
32440e3051 Fix a couple of leaks. 2001-08-07 16:41:33 +00:00
Thies C. Arntzen
a35df189b8 we can no longer register internal-classes once the script is started.
therefore the "incomplete class" is now registered at MINIT time.
2001-08-06 13:36:08 +00:00
Sascha Schumann
23b9300fd1 more tsrm cleanup 2001-08-06 03:50:52 +00:00
Jeroen van Wolffelaar
dce78d75d6 Removed some duplicate code out of addclashes
# Not TSRM-safe, I am afraid...
@- addcslashes now warns when charlist is invalid. The returned string
@  remained the same (Jeroen)
2001-08-05 23:08:19 +00:00
Jeroen van Wolffelaar
b3a7b945fa Fix test 2001-08-05 20:27:24 +00:00
Jeroen van Wolffelaar
ec140f4f67 Bugfix in abs(), abs(LONG_MIN) was bogus 2001-08-05 20:27:03 +00:00
Sebastian Bergmann
b4f31ecef5 Fix ZTS build. 2001-08-05 20:25:40 +00:00
Jeroen van Wolffelaar
2e6850a91d Added proto for php_charmask in the .h 2001-08-05 20:02:22 +00:00
Jeroen van Wolffelaar
4a01a15fd2 Error-handling for the second parameter of [l|r]trim 2001-08-05 19:38:49 +00:00
Jeroen van Wolffelaar
71a6c03bef Didn't commit the correct trim.phpt, it now passes 2001-08-05 19:06:34 +00:00
Jeroen van Wolffelaar
860be31cae More tests 2001-08-05 18:38:48 +00:00
Sascha Schumann
a19563c8dc more tsrm cleanup 2001-08-05 16:52:29 +00:00
Sascha Schumann
480ffb3d75 more tsrm cleanup 2001-08-05 16:43:57 +00:00
Sascha Schumann
b349df6364 some more eliminate-fetches-or-escalate-them-at-least 2001-08-05 16:21:33 +00:00
Sascha Schumann
373b3e101e more tsrm cleanup -- output.c is not doing any fetches anymore 2001-08-05 15:55:43 +00:00
Stanislav Malyshev
c7d7834a43 Check that _php_math_basetolong result fits long (by request from Troels Arvin) 2001-08-05 14:40:14 +00:00
Zeev Suraski
1159c84ab7 - TSRMLS_FETCH work
- whitespace fixes
2001-08-05 01:43:02 +00:00
foobar
d800a2e16a - Fixed bug: #10822
- CRYPT_SALT_LENGTH is now set to the maximum length the system
  supports, like it has been in the documentation for ages.
- The automatic salt is now also working like it should.
2001-08-04 23:58:56 +00:00
Jeroen van Wolffelaar
c105f7142f Better abs() testing 2001-08-04 21:40:34 +00:00
Jeroen van Wolffelaar
fcf57d371d Layout: revert accidentel joining of lines 2001-08-04 21:37:43 +00:00
Jeroen van Wolffelaar
2b17cd1982 Named some constants in filestat to improve readability 2001-08-04 21:34:11 +00:00
Jeroen van Wolffelaar
68df8ea465 Another bugfix in pow. Special cases, with 10 times the same thing are
_so_ error_prone... :(
2001-08-04 20:58:47 +00:00
Rasmus Lerdorf
7d5999fb4d Kill a warning 2001-08-04 20:52:35 +00:00
Jeroen van Wolffelaar
b245789bdb Bugfix. All tests pass now on my system 2001-08-04 18:29:37 +00:00
Jeroen van Wolffelaar
58ee4e47a4 Fix bug in the tests :-(
There seems to be one real bug in pow(), I'm trying to fix it...
2001-08-04 18:03:29 +00:00
Thies C. Arntzen
dca5f8dce4 fix serialize:
- keys no longer have a trailing \0
- no leak on calling __wakeup (also saved 2* malloc & free)
- serializing objects that implement __sleep() works again
- make test works again:-)
2001-08-04 17:29:54 +00:00
Andrei Zmievski
bffbe675f9 @- Fixed a crash bug in array_map() when NULL callback was passed in. (Andrei) 2001-08-04 16:54:20 +00:00
Thies C. Arntzen
3884b15b95 fix possible crash - we should never keep the zval** as they might point
somewhere into the Engine. (there's still a new bug in strtok - hunting;-)
2001-08-04 16:53:57 +00:00
Sean Bright
d789d45a2e WS Pollution 2001-08-04 13:47:44 +00:00
Jeroen van Wolffelaar
0cf60d749e Added tests for pow()
#The tests near LONG_MAX/MIN fail, I know that
2001-08-04 13:20:31 +00:00
Jeroen van Wolffelaar
8803bbaa80 - A little bit cleaning of pow(), and 12 bytes less memory (wow) 2001-08-04 13:11:17 +00:00
Sean Bright
fff883689e Don't allocated quoted strings unless we are in a META tag. 2001-08-04 12:36:51 +00:00
Sebastian Bergmann
724b4d409c Eliminate TSRMLS_FETCH() call. 2001-08-04 05:37:11 +00:00
Sebastian Bergmann
ea79632b29 Fix Win32 (and maybe other ZTS) builds. 2001-08-04 05:22:55 +00:00
Sascha Schumann
c947a0739e Clean up the serializer by modularizing some of its code. That also
enables us to serialize hash indices without creating zvals for them.
Due to its nature, this patch also includes some whitespace changes.
2001-08-04 03:30:38 +00:00
Jeroen van Wolffelaar
dc4adaa231 #- HTML-safe error for pow() 2001-08-03 23:27:23 +00:00
Jeroen van Wolffelaar
b32f1ab299 #- Fix silly bug that caused segfault 2001-08-03 23:10:04 +00:00
Jeroen van Wolffelaar
f0bcaf3901 Un-revert patch 2001-08-03 23:09:05 +00:00
Jeroen van Wolffelaar
f6979a7d2b Reverting last patch, segfaults. 2001-08-03 22:42:02 +00:00
Jeroen van Wolffelaar
7733d95770 - New pow() function. It now gives warnings on wrong input, and
returns integer result when possible
@- New pow() implementation, which returns an integer when possible,
@  and warnings on wrong input (jeroen)
2001-08-03 22:19:11 +00:00