Compare commits

...
Author SHA1 Message Date
SVN Migration dd54e13688 This commit was manufactured by cvs2svn to create tag 'php_4_0_2'. 2000-08-29 18:21:08 +00:00
Andi Gutmans 56498d48b4 - To configure with ingres should be --with-ingres and not --with-ii
- Changing it for 4.0.2 so that we don't have backwards compatibility
- problems later on
2000-08-29 18:21:07 +00:00
Andi Gutmans a15887434d - Close NEWS file for release. 2000-08-29 15:49:47 +00:00
Zeev Suraski 3a10285392 Go 4.0.2 2000-08-29 15:49:44 +00:00
Andi Gutmans e7f10a41f2 - Update Zend version. 2000-08-29 15:48:55 +00:00
Sascha Schumann e97c8ff013 Set SG(request_info).path_translated to the path of the main script. 2000-08-29 15:09:44 +00:00
Thies C. Arntzen b1d4fcb33c fix var_dump()s "}"-indention 2000-08-29 11:09:20 +00:00
Stig Bakken 1b4d8c0fb6 @Added PHP API for Zend's ticks
Added PHP API for registering tick functions.  Ticks is a per-instruction
callback in Zend that allows us to implement cooperative multitasking
within PHP.  Example:

In extension code:

php_add_tick_function(my_tick_func);

void my_tick_func(int count) {
    php_printf("[tick %d]", count);
}

In PHP code:
<?php

declare(ticks = 1) {
    print "there should be two ticks here.\n";
}

?>
2000-08-29 09:18:48 +00:00
Stig Bakken fad9bab629 * Added "test" make target so you can do "make test" in any directory.
* Added copyright header to run-test.php
2000-08-29 09:12:44 +00:00
Stig Bakken 83ba61245c All (three) current DB tests pass. 2000-08-29 09:10:44 +00:00
Sam Ruby 4a915571f5 Add reflect.java to the list of java classes to be compiled 2000-08-29 01:42:58 +00:00
9aabb6c08d ChangeLog update 2000-08-29 01:09:05 +00:00
Stig Bakken 54e911aa4f * renamed toString method to __string_value 2000-08-28 23:09:36 +00:00
Andi Gutmans 69e2d48738 - Change spaces to tab 2000-08-28 19:31:56 +00:00
Uwe Steinmann ed50eba46d - updated on new zend_api 2000-08-28 15:19:23 +00:00
Uwe Steinmann 32f6eeb3bd - fixed prototyp 2000-08-28 13:04:40 +00:00
Rasmus Lerdorf 8a36eb220e Missed a couple of center attributes 2000-08-28 09:01:54 +00:00
Stig Bakken 5b2719d9b3 I said I had not _tested_ this on windows, didn't I? :-) 2000-08-28 07:03:51 +00:00
4c06a45dc5 ChangeLog update 2000-08-28 01:09:08 +00:00
b75610a9f3 NEWS update 2000-08-28 01:09:05 +00:00
Sterling Hughes 6e10dc5456 Fix up the implementation.
# it was getting hacky already.
2000-08-27 22:53:33 +00:00
Rasmus Lerdorf fc3acfc4d5 Some minor cleanup to make W3C's tidy validator happy 2000-08-27 22:46:40 +00:00
Sascha Schumann 0b719aa462 Compute absolute path to script 2000-08-27 20:53:10 +00:00
Sascha Schumann e783d75ed3 sizeof(old_cwd) evaluated to sizeof(char *) after last commit, so old_cwd
was not set correctly.
2000-08-27 20:51:30 +00:00
Andi Gutmans ecbc0255d9 - Use do_alloca()/free_alloca() for old_cwd. This will ensure speed in
- non-ISAPI environments but in ISAPI will use emalloc()/efree() to save
- stack space. MS only gives us 10KB those bastards.
2000-08-27 19:56:22 +00:00
Andi Gutmans 827672cd78 - Reverting Sascha's patch although I don't like doing these kind of things
- but as it is Sascha who has reverted a zillion patches I don't feel that
- bad about it :)
- The patch is morally incorrect and it actually also has a crash bug which
- I won't point out because it shouldn't be there.
- SG(path_translated) should be set by the SAPI module correctly and if it
- isn't the SAPI module should be fixed and not add code to PHP. There is
- enough special case code in PHP and I would like to clean it up and not
- add more.
- Last but not least, old_cwd takes 4KB of stack space. We should probably
- malloc() it because in ISAPI we only have 10KB of stack space.
2000-08-27 19:51:50 +00:00
Stig Bakken 490de54fb5 undid the undoing of Sascha's last commit 2000-08-27 19:49:15 +00:00
Stig Bakken 315f4f5658 @PHP 3 regression testing framework re-born (Stig)
Took the old PHP 3 regression testing framework and rewrote it in PHP.
Should work on both Windows and UNIX, however I have not tested it on
Windows.  See tests/README for how to write tests.  Added the PHP 3
tests and converted most of them.
2000-08-27 19:46:06 +00:00
Stig Bakken 7eeda99a05 @Added php_uname() function (Stig)
Added php_uname() function.
2000-08-27 19:42:45 +00:00
Sascha Schumann 390d1cd1b7 Initializing new_path once is enough 2000-08-27 19:40:21 +00:00
Sascha Schumann 3f969d0b84 If a SAPI module does not pass an absolute path as primary_file to
php_execute_script(), we will now change the filename to point to
the absolute path.
2000-08-27 19:38:18 +00:00
Sascha Schumann 626fc9a773 Export IS_ABSOLUTE_PATH to the outside world. 2000-08-27 19:36:35 +00:00
Sascha Schumann ab458219ec Real fix for this rule. 2000-08-27 19:32:28 +00:00
Andi Gutmans eea3a56973 - This should be more efficient.
- Post 4.0.2 it's time to move the whole opened_path and virtual stuff
- to emalloc() and friends including some alloca() improvements where
- possible but I don't want to break anything before
2000-08-27 19:20:53 +00:00
Sascha Schumann 58abfc5426 Fix internal_functions.c rule. This should also work better with BSD make's
VPATH support.
2000-08-27 18:54:28 +00:00
Andi Gutmans 0b8ca80e57 - Remove some unused stuff. 2000-08-27 18:27:37 +00:00
Andi Gutmans 989203cf9c - Test commit msg. This is Andi and it seems to come from Zeev. 2000-08-27 18:18:34 +00:00
Zeev Suraski 1f7b735290 - Forgot to fix non-ZTS CHDIR_FILE macro 2000-08-27 18:06:12 +00:00
Andi Gutmans 39770d99ea - Try and fix problem with opening wrong file. 2000-08-27 18:01:17 +00:00
Chuck Hagenbuch 66dfb8aac1 Taking responsibility for the IMAP and MCAL extensions, so there's at least
a point of contact.
2000-08-27 17:08:06 +00:00
Chuck Hagenbuch 40404d7337 fixing the license header and updating some prototypes/variable names in the
mcal extension.
2000-08-27 17:05:53 +00:00
Sascha Schumann bf94671c3c Fix install-local-data target in VPATH mode. PEAR.php is generated and
stored in builddir.
2000-08-27 11:10:38 +00:00
Sascha Schumann c66bc46bb1 Remove obsolete note about Makefile.am 2000-08-27 10:05:23 +00:00
Sascha Schumann 35a9a1878e Fix strlcpy use at this place. 2000-08-27 09:48:03 +00:00
Sascha Schumann 2eb8688f29 Refine PHP_STRLCPY comment 2000-08-27 09:38:33 +00:00
Sascha Schumann b2cecd9d8b newtype has a length of newlen+1, 'len' refers to the length of *mimetype
here.
2000-08-27 09:32:23 +00:00
Sascha Schumann 365edaddd4 Add PHP_STRLCPY macro. This macro should be used in new code instead of
strlcpy/strlcat which are intended for fixing broken code.
2000-08-27 09:30:15 +00:00
Andi Gutmans b79db079a6 - Fix possible overflow in fsockopen(). 2000-08-27 04:14:47 +00:00
9d39ada3d0 ChangeLog update 2000-08-27 01:09:07 +00:00
Daniel Beulshausen f872296aaf updated with cybercash and dotnet 2000-08-26 20:40:11 +00:00
Daniel Beulshausen 280a79a319 added sam's readme and played with the directory's 2000-08-26 20:27:06 +00:00
Daniel Beulshausen 70ef0577a3 dsp for cybercash 2000-08-26 20:11:31 +00:00
Stig Venaas d584491ddf News about ldap.c change to allow building with OpenLDAP 2.0 2000-08-26 17:02:24 +00:00
Stig Venaas 0435c2e306 Makes it work with OpenLDAP 2.0 and reduces number of ifdefs 2000-08-26 16:20:37 +00:00
Andi Gutmans 1192fe545f - Don't define this function in non-debug mode 2000-08-26 14:45:29 +00:00
Zeev Suraski 6a8440fb70 Advise people to use error logging instead of error displaying on production web sites 2000-08-26 14:25:47 +00:00
Andi Gutmans 82d7c4294c - Also change constants. Note: PHP tries to make names intuitive.
- PHP extensions don't necessarily need to use the exact C counter part, it
- should be easy to read and not be short names such as II_*
2000-08-26 14:24:33 +00:00
Andi Gutmans 0e6db7dc82 - Asked the author a long time already to change the function names to
- something which won't take up all of the ii_* names (not verbose enough).
- I'm doing it myself now so it really has to be checked as I can't compile.
- Changed both the function names and INI parameter names.
2000-08-26 14:21:26 +00:00
Sascha Schumann 483c99ad73 mkdep.perl was replaced by mkdep.awk 2000-08-26 14:08:03 +00:00
Sam Ruby a0b745a053 Add ***EXPERIMENTAL*** Zend OO Extension support for Microsoft.Net 2000-08-26 12:53:14 +00:00
64b8ea5963 ChangeLog update 2000-08-26 01:09:10 +00:00
4f343428d1 NEWS update 2000-08-26 01:09:07 +00:00
Daniel Beulshausen 9893e9316e added the ifx (informix) extension 2000-08-25 21:46:01 +00:00
Daniel Beulshausen c9b4568f3e updated dsp to build with custom build step 2000-08-25 21:43:01 +00:00
Daniel Beulshausen 4a474b8120 lets keep it in one dsp 2000-08-25 21:42:15 +00:00
Hénot David 83d4cbf15e Copyright modification. 2000-08-25 15:56:41 +00:00
Andrei Zmievski 4df36948c8 @- Fixed a bug in preg_replace() that would truncate subject string if the
@  first argument was en empty array. (Andrei)
This fixes bug #6346, that would truncate subject string if the
first argument was en empty array.
2000-08-25 13:51:07 +00:00
Sascha Schumann c6cd319cd4 Use request_uri as PHP_SELF. decodedurl also includes the query string. 2000-08-25 10:00:48 +00:00
Sascha Schumann 5905971122 Use SAPI' register_server_variables hook.
Defines PHP_SELF now.
2000-08-25 09:59:38 +00:00
Sascha Schumann ad04898e05 php_register_variables(.. ELS_CC ..) 2000-08-25 09:15:00 +00:00
Sascha Schumann c1894bbf96 Add dummy depend: target 2000-08-25 09:04:51 +00:00
Sascha Schumann 8a1db559b6 Make proper use of SAPI's register_environment functionality. 2000-08-25 08:46:32 +00:00
c708eefcd4 ChangeLog update 2000-08-25 08:15:41 +00:00
Sascha Schumann e0818297f1 Add autoconf check for awk and use proper macro $(AWK) 2000-08-25 08:15:10 +00:00
f6e38a2e95 NEWS update 2000-08-25 08:15:05 +00:00
Sascha Schumann f1ec9035fc Add new depend rule to rules_pear.mk and install mkdep.awk. 2000-08-25 07:22:05 +00:00
Sascha Schumann 681f50bf4e Remove old .cvsignore file 2000-08-25 07:21:44 +00:00
Stig Bakken 03471b21ee @Added ob_get_length function (Stig)
Added ob_get_length() function (returns size of buffer)
2000-08-25 03:10:42 +00:00
Stig Bakken 6cbdaf985f compile fix (RedHat 6.2) 2000-08-25 03:08:37 +00:00
Dan Kalowsky b853731aaf prefer -gt to -lt, and dropped the version number to 2 instead of 3 2000-08-24 19:27:21 +00:00
Sascha Schumann b224dd96bd Don't distribute buildmk.stamp to the end user. Otherwise, buildcheck.sh
won't be run on the user's system, when they try to use buildconf.
2000-08-24 19:23:11 +00:00
Andi Gutmans fbbc249f2b - Revert patch from 9/7/2000 which seems to have broken unset().
- I hope what made me do this patch doesn't appear again.
2000-08-24 19:03:35 +00:00
Zeev Suraski 51856230d3 Update .dsp 2000-08-24 18:58:50 +00:00
Zeev Suraski c542f9a3f4 - Fix IMAP build problem
- Allow external DLLs to use warn_not_available
2000-08-24 18:49:49 +00:00
Sterling Hughes 3f97600862 Remove bogus commit that made DB::DB() an alias for DB::connect() 2000-08-24 18:18:49 +00:00
Daniel Beulshausen b2c2220971 updated dsw with fdf and gd 2000-08-24 18:18:05 +00:00
Daniel Beulshausen 04855ca11c added the gd extension - see the comment!
# configuring the gd extesion is currently a mess.
# currently its configured with jpg, wbmp, png and ttf
# maybe we should think about moving that stuff to the
# config.w32.h or to a seperate gdwin32 header
2000-08-24 18:14:42 +00:00
Daniel Beulshausen f08b599821 dsp for the win32 fdf extension 2000-08-24 17:56:38 +00:00
Daniel Beulshausen b6f0d041f9 deleted a few unnecceasary defines and added the Release_TS_Inline path to the libpath 2000-08-24 17:48:30 +00:00
Andrei Zmievski 681f6d53bb Andi's suggestion. 2000-08-24 17:09:26 +00:00
Thies C. Arntzen d33f42d53f beautify 2000-08-24 15:29:50 +00:00
Stanislav Malyshev 7248d68d49 Fix segfault on readline without parameters 2000-08-24 14:41:12 +00:00
Sascha Schumann c9dfdd38a7 More complete set of (C) notes 2000-08-24 14:29:29 +00:00
Sascha Schumann d4dd261436 Script for replacing the copyright messages 2000-08-24 14:18:36 +00:00
Sascha Schumann 9c86c11abf These scripts are not in use anymore. RIP. 2000-08-24 13:26:58 +00:00
Andrei Zmievski d7c43de3ce @- Fixed a bug that did not respect limit parameter in preg_replace() when
@  using /e modifier. (Andrei)
2000-08-24 13:23:13 +00:00
Sascha Schumann 876bac4823 builddir is used by the Unix build framework.
Rename builddir to phpbuilddir
2000-08-24 12:02:05 +00:00
Sascha Schumann 693180c1a2 Small speedup 2000-08-24 11:56:54 +00:00
Sascha Schumann a8be2cf641 Speed it up by moving the two sub's into the main loop.
Also print out dependencies immediately instead of buffering them.
2000-08-24 11:28:41 +00:00
Sascha Schumann ba4ddf32b4 Create dependencies using an awk script. Works much nicer in vpath
environments.
2000-08-24 11:02:03 +00:00
Sascha Schumann 7ca4354c22 Typo 2000-08-24 09:02:56 +00:00
Sascha Schumann 0181cae318 Some crappy makes don't handle the .PHONY target correctly.
So we force a rebuild of generated_lists
2000-08-24 05:55:19 +00:00
Sterling Hughes 4850e34bf3 -Add getCode() method to PEAR_Error
-Correct license versions + My Address for DB/* mods
-Correct ibase module
-Javadocize File_Find
-Add a optional constructor to DB that passes it on to DB::connect()
2000-08-24 01:34:16 +00:00
5875af9372 ChangeLog update 2000-08-24 01:09:16 +00:00
Andrei Zmievski 39671d8915 ext/icap is obsolete. 2000-08-23 18:31:01 +00:00
Daniel Beulshausen 9d4081896c added curl, dbase and gettext to the project 2000-08-23 16:21:58 +00:00
Daniel Beulshausen 2ec7ccdf4c win32 projectfile for the curl extension 2000-08-23 16:18:28 +00:00
Sascha Schumann 4694c419cf Add note about --with-kerberos 2000-08-23 16:15:08 +00:00
Daniel Beulshausen d076f5f2d9 win32 projectfile for the dbase extension 2000-08-23 16:11:44 +00:00
Daniel Beulshausen 8a5ceac253 win32 projectfile fot the gettext extension 2000-08-23 16:00:38 +00:00
Daniel Beulshausen c8eb56cc59 changed the output directorys from the windowsbuilds 2000-08-23 15:43:36 +00:00
Daniel Beulshausen a4cf34619d changed the intermediate output dir, to make it a bit cleaner 2000-08-23 15:32:09 +00:00
Sascha Schumann 4e7ab5ec7b phpextdist is located in $(srcdir), so don't try to install it from
$(builddir).
2000-08-23 14:07:24 +00:00
Egon Schmid 0508a61421 Changed long to int. 2000-08-23 13:47:00 +00:00
Andrei Zmievski 25b9ee5a74 formatting. 2000-08-23 13:07:51 +00:00
Sascha Schumann 96b221755a -lt is preferred over \> 2000-08-23 12:59:50 +00:00
Sascha Schumann 3cb026db73 Fix library order for -lpng -lz.
PR: #3978
2000-08-23 12:28:48 +00:00
Stanislav Malyshev b28f6eba38 Make parsedate build again
# I do not really know what's the problem with const, but I do know
# it doesn't compile when declaration and definition don't match
2000-08-23 10:54:13 +00:00
Sterling Hughes 2604cb987a A little condensing,
Add an additional check to make sure port is specified with
  AF_INET in connect().
2000-08-23 08:29:16 +00:00
Chris Vandomelen 91944be3f7 Corrected bugs in php_if_connect() to make it work properly -- needed to
run htons() on the port number provided, and needed to perform DNS lookups
properly and store the results as expected.
2000-08-23 06:41:51 +00:00
636c4e81e2 ChangeLog update 2000-08-23 01:09:19 +00:00
4ee0040869 NEWS update 2000-08-23 01:09:16 +00:00
Dan Kalowsky bee5b60a22 cleaned up the PHP/SOLID integration code, and corrected some minor assumptions on my part for the 3.5 EE systems. also removed a series of warnings on builds within the ODBC functions, and corrected header order. include of the SS_LINUX and SS_FBX defines, needed to make solid headers completely happy with the wchar.h situation.
THIS DOES NOT FIX BUG ID #4615
2000-08-22 21:27:49 +00:00
Zeev Suraski ae49ebf198 'const' is problematic in code in the final section of a Bison file (Bison defines
it away)
2000-08-22 20:59:26 +00:00
Frank M. Kromann adfbf4a92f Adding ..\..\..\bindlib_w32 to include path 2000-08-22 20:46:01 +00:00
Andrei Zmievski 1955412c3d @- Added ability for each xml_set_*_handler() function to take the
@  array($obj, 'method') syntax for the handler argument as well
@  as the normal function name. (Andrei)
2000-08-22 19:32:07 +00:00
Andrei Zmievski d89c5b231c @- Updated array_walk() to be able to accept array($obj, 'method')
@  syntax for the walk function. (Andrei)
2000-08-22 18:39:29 +00:00
Andi Gutmans 207814916d - Fix bug report by Andrei when using a method as a sort user function
- parameter in usort() like functions
2000-08-22 18:35:42 +00:00
Daniel Beulshausen 5d09d7d811 some fixes 2000-08-22 18:13:53 +00:00
Daniel Beulshausen 69b914e2dd added cpdf and domxml 2000-08-22 18:04:31 +00:00
Daniel Beulshausen 3af4ba7e01 projectfile for the domxml extension 2000-08-22 18:01:50 +00:00
Andi Gutmans 8ba5d5ef9c - Remove new libmysql files 2000-08-22 18:01:28 +00:00
Andi Gutmans 0222b7ab41 - Try and revert libmysql for 4.0.2 2000-08-22 17:59:35 +00:00
Daniel Beulshausen 60676f19a5 projectfile for the clibpdf extension 2000-08-22 17:55:17 +00:00
Daniel Beulshausen d5e9318210 added interbase, pdf and sybase_ct 2000-08-22 15:22:59 +00:00
Daniel Beulshausen 381d04e197 minor fixes 2000-08-22 15:21:01 +00:00
Frank M. Kromann 3c2ec3e5f3 Removing php_realpath.c from win32 project 2000-08-22 15:18:26 +00:00
Daniel Beulshausen b422c552d7 projectfile to build the sybase_ct extension 2000-08-22 15:15:10 +00:00
Daniel Beulshausen d22ebb3cb6 projectfile to build the pdf extension 2000-08-22 15:06:55 +00:00
Daniel Beulshausen 000773e7b9 little fixes 2000-08-22 15:03:38 +00:00
MySQL Team 3c049ddcdd Interface for 'raid' files (ont in use by PHP) 2000-08-22 12:10:53 +00:00
MySQL Team 4b1380e31c New files for MySQL 3.23.23 client library. New files are for qouting
using different character sets.
2000-08-22 09:02:46 +00:00
Sascha Schumann bac08af4cb Disable php_value and add note about reliability 2000-08-22 07:33:27 +00:00
Sascha Schumann 03049aa8ac Add note about need to fix INI system 2000-08-22 07:23:24 +00:00
Sascha Schumann 2011db174b AOLserver CVS uses PREFIX. 2000-08-22 06:11:01 +00:00
Sascha Schumann 479a96ed89 Set file_handle.opened_path to NULL 2000-08-22 05:43:31 +00:00
Sascha Schumann 732f891f3c Add note about installing PHP on web servers other than Apache. 2000-08-22 05:34:22 +00:00
Andi Gutmans d0e48e92b6 - Cleanup imagetransparent in the GD library 2000-08-22 04:11:57 +00:00
Chuck Hagenbuch 3a1b4fda7e Fix a crash in imap_fetchheader(). FT_PREFETCHTEXT isn't the only flag that
you can pass to mail_fetchheader_full().
2000-08-22 02:35:30 +00:00
10247c67fa ChangeLog update 2000-08-22 01:09:15 +00:00
Rasmus Lerdorf cb3ffd56eb Slight Darwin tweak from Fred 2000-08-22 00:27:17 +00:00
Daniel Beulshausen 7632bca956 updated project to work with readdir.h rev.1.5 from apache cvs 2000-08-21 21:21:18 +00:00
Daniel Beulshausen 542d2d623c updated the projectfile to build the aolserver and nsapi modules 2000-08-21 21:01:57 +00:00
Daniel Beulshausen 0b686eaa2a added the vs6 projectfile for the aolserver 2000-08-21 20:55:10 +00:00
Sascha Schumann e4b2f8351e thttpd/PHP verified to run IMP 2.2.0 without any hitches. 2000-08-21 20:23:02 +00:00
Torben Wilson c8443dc1b9 NEWS update for file-function segfault fix. 2000-08-21 19:45:26 +00:00
Torben Wilson 410ac013e8 Fixed segfault with fgets(), fgetcsv(), fgetss(), and fread() when
called with negative length argument.
2000-08-21 19:24:44 +00:00
Sam Ruby b43df683ee Keep servlet working... 2000-08-21 17:01:51 +00:00
Sascha Schumann 18ded31f4c Remove extra tab 2000-08-21 15:05:45 +00:00
Chuck Hagenbuch dc2362069e Make the DB classes work with call-time pass-by-reference disabled. 2000-08-21 14:37:47 +00:00
Stanislav Malyshev 4bed072f11 Fix crash in one-argument imagecolortransparent 2000-08-21 14:11:19 +00:00
Stanislav Malyshev 02feba6c05 Fix win32 build 2000-08-21 12:56:51 +00:00
Sascha Schumann 6ce467dc13 Get rid of php_global.h and the associated data types UINT4/_POINTER.
We use php_uint32 now globally.

Also removed K&R support from md5.[ch].
2000-08-21 10:10:31 +00:00
Sascha Schumann 19741cc37a The macro CONVERT_TO_WIN_FS is not used anywhere. 2000-08-21 09:57:13 +00:00
Sascha Schumann 8e0ae5d152 Cleaning up some mess 2000-08-21 09:50:53 +00:00
Uwe Steinmann 1bbea8d0eb - added function fdf_set_javascript_action() 2000-08-21 09:23:37 +00:00
Derick Rethans 82115ea039 - Reversed last 'fix'
# Sascha suggested that it must be corrected in wuth mcal
2000-08-21 07:24:55 +00:00
Andi Gutmans 99d3b9bfe8 - Remove old/deprecated version of expand_filepath 2000-08-21 04:30:25 +00:00
Rasmus Lerdorf 6d7cc46e38 Delete this suggestion as it was leading newbie users to use this file
without understanding what they were doing.  Experienced users will find
and use this file on their own.
2000-08-21 04:09:13 +00:00
Sascha Schumann 251b83076e Move thttpd_php_init() call to httpd_initialize().
Otherwise, some init stuff was done twice (like resetting the
known_post_content_types hash table which caused post requests
to fail).
2000-08-21 03:04:35 +00:00
849fe880ea ChangeLog update 2000-08-21 01:09:19 +00:00
5ab6783471 NEWS update 2000-08-21 01:09:16 +00:00
Zeev Suraski 1d0f45ea6b Fix Win32 build 2000-08-20 22:19:58 +00:00
Zeev Suraski 30ccec36b9 Fix build 2000-08-20 22:18:19 +00:00
Andi Gutmans c799959568 - Change PHP_SEPARATOR to PHP_DIR_SEPARATOR 2000-08-20 19:56:24 +00:00
Andi Gutmans 892e949196 - Checking for ".." isn't enough. include_once() could mess up even if both
- names didn't include ".." but were referenced different directories which
- were symlinked to each other.
2000-08-20 19:49:10 +00:00
Chris Vandomelen 8ef1279f2b Added another bug fix to detect for negative values being passed into the
fd_*() functions, as passing negative values would cause PHP to segfault.
2000-08-20 19:48:42 +00:00
Stig Venaas 4d6f3b40a7 Added Oracle LDAP SDK SSL support 2000-08-20 18:47:14 +00:00
Andi Gutmans 80d878279b - Sascha's patch should make PHP in VIRTUAL_DIR mode also change to the
- right directory so this shouldn't be needed anymore.
2000-08-20 18:12:16 +00:00
Derick Rethans 45e9e3a9fe - Fix for bug #6263 2000-08-20 17:39:44 +00:00
Stanislav Malyshev 5a7409ee1a Fix by-reference passing for scanf's
@- Fix by-reference parameters passing for xml_ functions and for scanf functions (Stas)
2000-08-20 16:09:06 +00:00
Stanislav Malyshev 50161c9ee8 Fix XML by-reference passing 2000-08-20 15:59:54 +00:00
Sascha Schumann b6978fe1af Fix numerus of SAPI Modules title 2000-08-20 14:43:56 +00:00
Sascha Schumann 1d68a02df3 The status quo in PHP is that the current directory is initialized
to the directory where the executing script is located.

Since this needs to be implemented for all SAPI modules anyway, this
change moves the functionality to php_execute_script() and gets rid
of the per-module code.
2000-08-20 14:29:00 +00:00
Sascha Schumann 320105bcd8 Use size_t as parameter type in the getenv member of struct sapi_module 2000-08-20 14:20:21 +00:00
Sascha Schumann 6358dad0e1 const'ify virtual-cwd API 2000-08-20 14:11:50 +00:00
Sascha Schumann c8b8a908ca Provide PHP_SEPARATOR which expands to the default directory separator
on the target platform.
2000-08-20 14:02:57 +00:00
Stanislav Malyshev ce0c4a7991 Fix fgetc (#6259) and ftell error condition returns 2000-08-20 13:24:14 +00:00
Sascha Schumann d3aeebdd1f Fix prototype of virtual_real_chdir_file. 2000-08-20 13:09:57 +00:00
Sascha Schumann c86ec8b1a9 Add virtual_real_chdir_file. Silly name for a useful function. 2000-08-20 12:49:56 +00:00
Sterling Hughes f75db1e3cb A Whole buncha stuff, mostly bug fixing...
- Make constants case-sensitive, conforming with the rest of PHP &
	the C API.
	- Make module compatible with thread safety features.
	- open_listen_sok() -> open_listen_sock()
	- Remove ext_skel comments
	- Get rid of the ZVAL macro and replace with the correct Z_*_*
	macros
	- declare all functions local to the file as static.
	- Remove empty PHP_MSHUTDOWN() function.
	- Removed confirm_sockets_compiled()
	- Changed RETVAL_* macro's to RETURN_* macro's eliminating errors
	with incorrect return values and a potential leak/crash or two.
	- functions that return void, actually return void
	- Replaced 'long' in the prototypes with 'int'
	- Fixed fd_zero() function, it gave a WRONG_PARAM_COUNT when you
	gave it the proper parameter count.
	- Changed the way an arbitrary number of parameters were accessed
	from build_iovec() to use the Zend API.
	- Added socketpair() and shutdown() functions.
2000-08-20 10:31:27 +00:00
Sascha Schumann 67daa655f6 Execute PHP scripts everywhere (not only in the top-level directory) 2000-08-20 09:37:15 +00:00
Sascha Schumann 42eeda50d4 Remove -DHAVE_CONFIG_H. It ain't used anywhere. 2000-08-20 08:58:19 +00:00
Sascha Schumann 9b9f9fa4dd _isnan seems to be supported on Win32, add an appropiate macro. 2000-08-20 08:31:34 +00:00
Sterling Hughes cd599d17c0 Bunch o' changes..
- Add the ability to return the web page into a variable
	by setting the CURLOPT_RETURNTRANSFER constant to 1.
	- Make everything conform to the naming guidelines.
	- Delete the resource id from the file_id table when a
	resource is closed.
2000-08-20 08:28:00 +00:00
Sascha Schumann 9e6e64955f If available, use fpclassify for substituting zend_finite. 2000-08-20 07:12:48 +00:00
Sascha Schumann 6aada077a0 Including math.h before using macros defined there will work better :) 2000-08-20 06:09:07 +00:00
Sascha Schumann 4ba16a1169 Make use of zend_isinf and zend_isnan. 2000-08-20 06:08:14 +00:00
Sascha Schumann 1f84023b05 Add zend_isinf and zend_isnan. 2000-08-20 06:07:42 +00:00
Sascha Schumann e325e06693 Add/update license 2000-08-20 05:39:37 +00:00
Sascha Schumann 97c698a178 Relicense build-related files under the PHP License
Move common make rules to rules_common.mk. This gets rid of the duplicated
stuff in rules.mk/rules_pear.mk.
2000-08-20 05:36:07 +00:00
Sascha Schumann fbdf502307 Remove php_realpath from build.
It was broken and should not be used in any way.
2000-08-20 05:27:59 +00:00
cf8d95b922 ChangeLog update 2000-08-20 01:09:16 +00:00
Jesus M. Castagnetto e103155d92 Added some more predefined constants 2000-08-19 22:01:37 +00:00
Frank M. Kromann 61df257c0f We only need winsock.h one time 2000-08-19 21:15:43 +00:00
Frank M. Kromann 705e6f2ec6 Adding ignore file for Win32 2000-08-19 19:08:32 +00:00
Frank M. Kromann c2357ccc26 Fixing paths to Zend and libmysql 2000-08-19 19:05:22 +00:00
Frank M. Kromann cba39bcd9c Fixing include path for compiling non thread safe php.exe 2000-08-19 18:50:03 +00:00
Andrei Zmievski 0691afb08c One more fix to C compile. 2000-08-19 18:13:52 +00:00
Stig Venaas 48b5c6d900 Note about Oracle LDAP SDK support. Should I not say experimental? 2000-08-19 18:09:21 +00:00
Zeev Suraski 595ca6b588 Fix C build 2000-08-19 18:05:15 +00:00
Zeev Suraski 7a45e3cb89 - Update NEWS
- Fix non ZTS Windows build
2000-08-19 18:01:04 +00:00
Zeev Suraski f8d74acd93 Fix eval() leakage in ZTS mode 2000-08-19 17:58:04 +00:00
Zeev Suraski c34f41b7c5 Eliminate run-time leak with eval()'s 2000-08-19 17:50:42 +00:00
Zeev Suraski 79b0a56c51 Fix build with no memory_limit 2000-08-19 16:51:30 +00:00
Zeev Suraski 3f4c8e665a Update NEWS 2000-08-19 16:40:23 +00:00
Zeev Suraski f112b68668 Avoid an endless loop situation in case of an error situation while sending headers 2000-08-19 16:38:19 +00:00
Zeev Suraski 07b5d74022 Fix memory_limit 2000-08-19 16:35:02 +00:00
Andi Gutmans c698e14635 - Beautify 2000-08-19 15:16:53 +00:00
Stig Venaas 90eac6a390 Adding Oracle LDAP SDK support 2000-08-19 14:10:11 +00:00
0959b16f87 ChangeLog update 2000-08-19 01:09:15 +00:00
Andi Gutmans 0c57780b11 - Centralize more fopen-wrappers functionality. 2000-08-18 23:03:49 +00:00
Frank M. Kromann 53a3f074ab Adding howto file for MS SQL 2000-08-18 22:24:27 +00:00
Chuck Hagenbuch c4b2498bae use estrndup and efree to hopefully avoid both munging of arguments and
leaking memory.
2000-08-18 16:02:27 +00:00
Ben Mansell ea98567404 REQUEST_URI is a handy server variable, lets pass it onto ISAPI/PHP 2000-08-18 14:18:57 +00:00
Sascha Schumann 382dd4a394 Add necessary *_FETCH() macros 2000-08-18 13:50:04 +00:00
Sterling Hughes 890ae1e244 #Its fixed this time, no really. 2000-08-18 13:43:22 +00:00
Sterling Hughes c80f2bcba2 Purely cosmetic. 2000-08-18 13:24:00 +00:00
Sterling Hughes 1b8ee02fd6 Fix #6234 2000-08-18 13:22:09 +00:00
Hartmut Holzgraefe c1ceeaf830 typo fix in array_diff error message, fixes bug #6236 2000-08-18 12:45:01 +00:00
Hartmut Holzgraefe 867160a751 minor typo fix in proto 2000-08-18 12:28:28 +00:00
d484ad1d6c ChangeLog update 2000-08-18 01:09:07 +00:00
Sam Ruby 3aad950735 Reorder call to ELS_FETCH to be after declarations 2000-08-17 19:19:54 +00:00
Andrei Zmievski 4f96d15f33 Reverting the pemalloc -> malloc change until we figure out why it breaks. 2000-08-17 19:01:28 +00:00
Andrei Zmievski ba0e3f2145 No need to have persistent allocation. 2000-08-17 16:09:00 +00:00
Chuck Hagenbuch b436f97a53 prevent mail_criteria from munging the variable passed in containing the
query - just had to add a cpystr(). if this isn't the right fix, let me
know, but it does work.
2000-08-17 16:01:14 +00:00
Ben Mansell 8751bcb8eb (send_headers) Removed code freeing http_status_line, this is performed
in sapi_send_headers()
# Looks like a similar problem in sapi/pi3web/pi3web_sapi.c as well.
# I can't test this though, so I'm being paranoid and not changing that code.
# Could someone please check this?
2000-08-17 13:40:40 +00:00
Hartmut Holzgraefe 7c7e5a9081 additional include should fix bug #6086 2000-08-17 13:17:14 +00:00
Sascha Schumann c28eac2f6c Fix dependency. PEAR.php needs to be created before it can be installed. 2000-08-17 11:02:10 +00:00
Sam Ruby d93732179b Better error reporting when dll/shared library is not able to be loaded.
Submitted by: Bård Farstad <bf@ez.no>
2000-08-17 10:14:50 +00:00
Stanislav Malyshev 1f793fd06c Fix EMPTY_STRING macros 2000-08-17 08:48:16 +00:00
Stanislav Malyshev 56ecc78983 Fix chunk_split (#6208) 2000-08-17 08:47:42 +00:00
Andi Gutmans 056401fa6c - It should be #ifdef PHP_WIN32 2000-08-17 04:05:57 +00:00
Sterling Hughes 8a8b5dacc6 ts issues. 2000-08-17 02:14:41 +00:00
80612a97eb ChangeLog update 2000-08-17 01:09:13 +00:00
Andi Gutmans c675a39b73 - The beginning of an attempt to cleanup fopen-wrappers.
- I started with trying to localize the V_FOPEN's so that we can have a
- version which won't really open the file for include_once/require_once to
- work faster and have less chance of a race which would cause a fd leak.
- What I did will, therefore, change but I want to do this step by step
- because the code is extremley messy so first of all I want to make sure
- that the isolating of the V_FOPEN code doesn't break anything.
- How about moving URL stuff out of this file?
- php_fopen_url_wrapper() copy and pasted the second part of
- php_fopen_wrapper() (incorrectly). Please try not to copy&paste code but
- centralize functionality. Need to think of a nice way to nuke one of the
- copies and have both functions use the same one.
2000-08-16 19:26:21 +00:00
Thies C. Arntzen ffad41019e compile fix 2000-08-16 15:23:05 +00:00
Hartmut Holzgraefe 41360c24b6 proto fixed 2000-08-16 12:47:09 +00:00
9148b4d16b ChangeLog update 2000-08-16 01:09:18 +00:00
9608acbe19 NEWS update 2000-08-16 01:09:15 +00:00
Jouni Ahto e85ba0901a - Return NULL type when column is NULL, now that we have it in PHP4.
- Fixed a bug in handling NULL columns, PQgetvalue() doesn't return a NULL
  pointer in this case, but a pointer to a string of 0 length...
2000-08-16 01:03:20 +00:00
Sascha Schumann 81b8e08b13 Change the C++ extension to .cpp 2000-08-15 23:16:47 +00:00
Uwe Steinmann fdd374fddb - Inserted constants for fdf flags 2000-08-15 18:46:59 +00:00
Sterling Hughes 15902929e8 @ Fix stdout support with the swf extension. (Sterling) 2000-08-15 17:30:41 +00:00
Sascha Schumann ce635bdb3c Fix varargs handling. The assignments are not necessary at all and
cause problems on various platforms, so we get rid of them.
2000-08-15 17:05:37 +00:00
Sterling Hughes 185f6e95d8 Leftovers... 2000-08-15 17:03:48 +00:00
Sterling Hughes d06c2d9eb1 Add Win32 support for cURL.
#  Switch this commit message with the last one and you get the
#  right commit order.
2000-08-15 16:54:48 +00:00
Sterling Hughes d06c4b2e3f This fixes to problems:
- Apache not having the output go to stdout in some cases.
- Output being displayed before the header is displayed.

And causes the following:

- *Slightly* slower cURL transfers.
2000-08-15 16:50:14 +00:00
Zeev Suraski c9dca64075 Sync with Zend 2000-08-15 16:46:43 +00:00
Zeev Suraski 7795aca4ca Fix warning issue (compile errors inside require()'d files were incorrectly supressed) 2000-08-15 16:44:40 +00:00
Derick Rethans 28273dfaa2 - Clearified which version of libmcrypt is enabled
# Request by Olivier Cahagne
2000-08-15 14:58:21 +00:00
Stanislav Malyshev 65bb194d65 Fix byteorder for il2long and long2ip (#6159)
@- Fix byte order for ip2long and long2ip (Stas)
2000-08-15 10:32:55 +00:00
David Croft 08c6773691 renamed ini section, quoted default host and tabulated.
# it doesn't make sense to have the tab-width set to 4 when we're
# using tabs for alignment in this case, it just makes it look screwy
# in everything but emacs
2000-08-15 09:47:35 +00:00
David Croft 05edda2222 display ini file entries on phpinfo(), unregister them on shutdown
numeric ini file entries stored as ints
removed unnecessary casts from PFPROG()
pval -> zval
2000-08-15 09:37:39 +00:00
92c21585f2 ChangeLog update 2000-08-15 01:09:15 +00:00
Brendan W. McAdams f1ed420604 # Added TODO so I can track things that need doing with this module - (brendan) 2000-08-14 21:10:25 +00:00
Zeev Suraski 636d126e16 - Fix leak and some logic 2000-08-14 20:16:27 +00:00
Sascha Schumann 78dfa91e1f Move MCLS_FETCH() inside #if HAVE_LIBMCRYPT24. Fixes build against
libmcrypt 2.2.
2000-08-14 19:38:23 +00:00
Sascha Schumann 61a058f538 Remove unnecessary precompiler macros. The failure condition is catched
at configure time.
2000-08-14 19:29:53 +00:00
Sascha Schumann 744dce0da0 Restrict INI entries when compiling against libmcrypt 2.4. 2000-08-14 19:26:09 +00:00
Andi Gutmans e46ea8864c - This patch should hopefully fix situations where a constructor uses
- the $this pointer as a reference.
2000-08-14 19:17:26 +00:00
Sascha Schumann 51fe68fd51 Fix check for libmcrypt in non-system library paths.
Fix case where neither libmcrypt 2.4.x and 2.2.x were found.
Fix library order (scope limited to static libraries)
2000-08-14 19:17:16 +00:00
Stanislav Malyshev 159abaa900 Fix print length - again
# I hope _this_ is the right fix...
2000-08-14 15:54:57 +00:00
Stanislav Malyshev 821042278e Fix another crash with long formats (#6145)
# From strncpy manual:
# In the case where the length of src is less than  that  of
# n, the remainder of dest will be padded with nulls.
2000-08-14 11:07:28 +00:00
Stanislav Malyshev 97c200b170 Fix non-numbers printing (#6142)
# Please, somebody knowing about floats - check if there's more non-numbers
# seems we should check for all of them
2000-08-14 10:02:14 +00:00
Stanislav Malyshev 9e750e64b9 Fix crash 2000-08-14 09:06:56 +00:00
David Croft 1a5d90c4ea presumably this was wrong 2000-08-14 08:37:28 +00:00
Andi Gutmans e1a3604103 - Unused results should be marked with EXT_TYPE_UNUSED and not IS_UNUSED 2000-08-14 04:10:02 +00:00
e871d2f036 ChangeLog update 2000-08-14 01:09:16 +00:00
468b509759 NEWS update 2000-08-14 01:09:13 +00:00
Sterling Hughes bba7086ac3 - Fix spacing.
- Add error constants.
2000-08-13 19:32:09 +00:00
Stanislav Malyshev 6f8f6c521c Fix opened_path init
# forgot to commit
2000-08-13 18:08:01 +00:00
Stanislav Malyshev 5090b1e8d5 Fix zend_fiel_handle handling. Should fix URL include
and various opened_path inconsistencies.
2000-08-13 18:00:50 +00:00
Sterling Hughes 93acbedce8 @ Fixed dbase_add_record. (Sterling) 2000-08-13 17:41:20 +00:00
Derick Rethans 20c007b229 - Now using the better way of using INI directives
- Changed some warning/error messages to be more clear
2000-08-13 11:53:04 +00:00
Andi Gutmans 4992408771 *** empty log message *** 2000-08-13 04:20:15 +00:00
Andi Gutmans caa3b6c9b6 - Revert foreach() change which only allowed variables and array(...) 2000-08-13 04:19:44 +00:00
4f4e553b6a ChangeLog update 2000-08-13 01:09:21 +00:00
Egon Schmid 3f158be18a Some protos corrected. 2000-08-12 20:45:48 +00:00
Danny Heijl 2acc8630fe - The destructor for a connection resource closed the current
connection if the connection had been closed before (danny)
2000-08-12 12:03:41 +00:00
85a5e901e8 ChangeLog update 2000-08-12 01:09:18 +00:00
fcb595e4d2 NEWS update 2000-08-12 01:09:15 +00:00
Derick Rethans 04720d3b3b - Fixed warning under VC6 2000-08-11 23:24:54 +00:00
Derick Rethans bab5db79f6 @ Added support for libmcrypt 2.4.4 2000-08-11 18:45:17 +00:00
David Croft 45ab04fa40 Added news item for Andi's strncasecmp commit
# Zend commits prefixed by @ don't seem to be linked to the PHP news file
2000-08-11 18:23:31 +00:00
Danny Heijl b78c48f7bc - restore ifx_close() to PHP3 behaviour for non-persistent connections
by silently reconnecting the existing link if closed earlier (danny)
2000-08-11 16:37:47 +00:00
Zeev Suraski a120608807 Make COM work in a multithreaded environment 2000-08-11 13:30:37 +00:00
Hartmut Holzgraefe 66f9f8bf38 return type in proto for OCIError fixed 2000-08-11 13:13:11 +00:00
Adam Dickmeiss 17797f951c Added support for username, group and password for function yaz_connect. 2000-08-11 12:11:51 +00:00
Andi Gutmans 25c8009825 *** empty log message *** 2000-08-11 09:58:04 +00:00
Andi Gutmans 2336c0148e - Only support variables and array(...) in foreach loops 2000-08-11 09:56:28 +00:00
490de4de57 ChangeLog update 2000-08-11 01:09:16 +00:00
3000566259 NEWS update 2000-08-11 01:09:13 +00:00
Andi Gutmans b47bb87004 - The commit messages didn't seem to update the news file 2000-08-10 22:16:15 +00:00
Andi Gutmans e5015ed581 @ Fix problem with nested foreach()'s (Andi, Zend Engine) 2000-08-10 22:08:02 +00:00
foobar d6f2f2c396 @- Fixed FTP module to accept multiline server replies (Jani)
# This fixed bug #4546.
2000-08-10 21:13:08 +00:00
Brendan W. McAdams b283eec42a - changed all pvals to zvals (like they were before)
# Turns out zval *is* the proper call for a variable.
2000-08-10 21:03:02 +00:00
Vlad Krupin 23df217463 Added capability to create and manipulate a config object that can be
used later to create an instance of the spellchecker based on that
config.
2000-08-10 20:57:40 +00:00
Andi Gutmans a1adc81f30 @ Fix switch which only has a default rule (Andi, Zend Engine)
@ Change require_once() to use the same file list as include_once().
@ Patch includes making require() & include() to behave the same when it
@ comes to scoping. require() is now an include() which isn't allowed to fail.
@ require() caused too many memory reallocations which ended up being quite
@ slow for sites that required lots of files. (Andi & Zeev, Zend Engine)
- Fix switch() which only has default rule (bug #5879,
2000-08-10 20:42:57 +00:00
Brendan W. McAdams 25240885a5 - Homogonized CCVS with the rest of the modules in the ext/ tree:
- All ZEND_* macro calls changed to PHP_* macros.
    - All zval's converted to pval's.
# Per discussion with Hartmut Holzgraefe on [PHP-DEV] list.
2000-08-10 20:23:33 +00:00
Andi Gutmans 26300a8ebf - Move compat macros to php3_compat.h 2000-08-10 19:38:29 +00:00
Sascha Schumann 34bee836b1 Remove bogus "by" 2000-08-10 19:27:30 +00:00
Joey Smith a2cb77aa82 Cut and paste error? :) 2000-08-10 17:38:14 +00:00
Andrei Zmievski 5779f26561 Formatting. 2000-08-10 13:22:07 +00:00
Hartmut Holzgraefe e67defffbe last patch reverted, i didn't get the whole picture here 2000-08-10 08:31:40 +00:00
Hartmut Holzgraefe e59bcdbfb8 duplicate alias entry removed 2000-08-10 08:13:15 +00:00
David Croft a7e8750446 #fixed typos 2000-08-10 07:00:12 +00:00
Sam Ruby 5c8fca1757 Correct bug in headers only logic. 2000-08-10 06:09:05 +00:00
5e8db7f495 ChangeLog update 2000-08-10 01:09:21 +00:00
0fac6f738f NEWS update 2000-08-10 01:09:13 +00:00
Zeev Suraski 9c555fe96a Update NEWS, including some stuff that somehow got forgotten on my home machine 2000-08-09 20:50:54 +00:00
Zeev Suraski 7dcf456dd6 that too 2000-08-09 19:25:01 +00:00
Zeev Suraski a6c6f6a5c3 Update to be consistent with the new Zend API 2000-08-09 19:23:53 +00:00
Zeev Suraski 0855453e83 Update API number 2000-08-09 19:23:38 +00:00
Zeev Suraski c06692e9ec The patch we promised - redesigned the compilation/execution API:
Advantages:
- Smaller memory footprint for the op arrays
- Slightly faster compilation times (due to saved erealloc() calls and faster zend_op
  initialization)
- include_once() & require_once() share the same file list
- Consistency between include() and require() - this mostly means that return()
  works inside require()'d files just as it does in include() files (it used to
  be meaningless in require()'d files, most of the time (see below))
- Made require() consistent with itself.  Before, if the argument was not a constant
  string, require() took the include() behavior (with return()).
- Removed lots of duplicate code.
Bottom line - require() and include() are very similar now;  require() is simply an include()
which isn't allowed to fail.  Due to the erealloc() calls for large op arrays, require()
didn't end up being any faster than include() in the Zend engine.
2000-08-09 19:22:35 +00:00
Brendan W. McAdams 609577d882 Updated Supported CCVS Versions based on Conversation with Doug. All versions of CCVS 3.0 and greater should work without problems.
@ The CCVS module is now stable and compiling. It compiles as a CGI and into apache cleanly without warnings. (Brendan W. McAdams)
2000-08-09 18:38:04 +00:00
Thies C. Arntzen f0203f6288 @- Fix mSQL_close(). (nick@loman.net)
# i haven't tried it (don't have msql) , but this patch seems really needed!
2000-08-09 17:56:42 +00:00
Brendan W. McAdams 01a83f8cb0 Added Dougs name to the PHPINFO "Support By" call.
Added a "Release Supports CCVS Versions..." line in PHPINFO
2000-08-09 17:53:55 +00:00
Thies C. Arntzen 57faf76605 fix #6061 2000-08-09 17:52:30 +00:00
Brendan W. McAdams 9a2d9b993d Looks like I found my problem.
I was predeclaring my functions in ccvs.h (stupid of me), so PHP was seeing the predec from internal_functions.h, the predec again, and then the actual functions and barfing.  Compiles into apache now.  Will test further.
2000-08-09 17:43:04 +00:00
Brendan W. McAdams 1030d7a7d8 Tracked the stray -libccvs call to a bad config directive in the config.m4 file. 2000-08-09 16:45:49 +00:00
Zeev Suraski 4d692049b2 Fix a couple of bugs in the ISAPI module:
- I think NTLM should work now
- Fix the DOCUMENT_ROOT code
2000-08-09 16:45:40 +00:00
Brendan W. McAdams 14e86fcf0a Trying to resolve the build issue. This module is currently broken. PHP compiles it fine but I'm having linking issues when it gets to the apache level.
Any help would be greatly appreciated.
2000-08-09 14:31:12 +00:00
Brendan W. McAdams 048717c09c Looks like my editor barfed sometime today and saved the source files as
PC Format. Fixed that.  Seeing some compiletime issues that I'm working on resolving.
2000-08-09 01:18:28 +00:00
7999f6ddf6 ChangeLog update 2000-08-09 01:09:09 +00:00
Brendan W. McAdams 8a4f3d3973 Had some issues with apache build. PHP Was passing a -llibccvs inadvertantly. Seemed to be an issue with the autoconf file. Fixed. I'll get back to cleaning up that AutoConf later. 2000-08-08 23:15:56 +00:00
Brendan W. McAdams f3b757eead First commit of these files. We have had them working for about 3 weeks, very well, as a DL. The straight compile-into PHP support should work fine; I've got it compiling on my Slackware 7 i386 box with Apache 1.3.12 + mod_ssl. Documentation, module info and example code are forthcoming. 2000-08-08 22:36:56 +00:00
foobar 472c727186 Added missing 'subject'-key in envelope.
# I'm starting to think imap_mail_compose() should be rewritten from scratch..
2000-08-08 21:16:09 +00:00
Egon Schmid 3bc8b9dc9c Beautified some protos. 2000-08-08 20:28:19 +00:00
Vlad Krupin 831e15d0d1 Added instructions on how to use personalized dictionaries 2000-08-08 19:23:35 +00:00
Vlad Krupin a2cdb7726f added support for personalized dictionaries.
new functions: pspell_new_personal(), pspell_save_wordlist().

pspell_save_wordlist() needs to be changed to return error-codes
once pspell library gets fixed
2000-08-08 18:46:41 +00:00
Stanislav Malyshev 40fd4fb21b Standartize full path handling - everything now goes via expand_filepath
Add errno to open_basedir checking function
2000-08-08 16:36:25 +00:00
Stanislav Malyshev b5f74d44e9 fix return code for virtual_file_ex 2000-08-08 16:30:42 +00:00
Stanislav Malyshev ea3a3a1a2d Fix possible crash when stat information is not available 2000-08-08 15:50:28 +00:00
Sascha Schumann bfcd9c4f28 Remove manually committed change description 2000-08-08 11:23:28 +00:00
Martin Kraemer 46b8f7e38b urlencode() fix (Bug #6016) 2000-08-08 09:13:27 +00:00
Martin Kraemer 8bf2339870 Bug #6016: Fix EBCDIC logic error in urlencode()
(a strchr() test was used backwards)
Reported by: dumbunny@tivo.com
2000-08-08 09:06:51 +00:00
e31a7fcdfc ChangeLog update 2000-08-08 01:09:18 +00:00
6f7eaa5531 NEWS update 2000-08-08 01:09:15 +00:00
Danny Heijl d8790d9e2c - fix for # 5980 (using ifx_connect/ifx_close multiple times for the
same database connection) (danny)
2000-08-07 20:45:57 +00:00
Sascha Schumann 5d02c74b6b Add support for <binary> WDDX element. 2000-08-07 17:25:57 +00:00
Sascha Schumann d9960867fd . 2000-08-07 13:57:49 +00:00
Sascha Schumann 5c62b32823 Remove some crud from diff output (Only in..). 2000-08-07 13:56:52 +00:00
Sascha Schumann 4b8823d427 Fix building thttpd SAPI module.
This works now with thttpd 2.19.

Thanks to Andrzej Borsuk <andrzej.borsuk@alfaelektro.com.pl> for
pointing me into the right direction.
2000-08-07 13:54:35 +00:00
Sascha Schumann 55801d5330 Set abs_srcdir before SAPI modules' configure stuff is run. 2000-08-07 13:24:06 +00:00
Uwe Steinmann 54e168ce42 - updated those entries I feel responsible for 2000-08-07 13:11:23 +00:00
Thies C. Arntzen e05fbd00c2 fixed binary mode for Win32 2000-08-07 12:01:52 +00:00
Uwe Steinmann edcbd1862e - got rid of php_ prefix in Modulename and some structs 2000-08-07 11:55:48 +00:00
Zeev Suraski 83341c39da Add DOCUMENT_ROOT 2000-08-07 11:51:21 +00:00
Uwe Steinmann 6de4e2e382 - made compilation as dynamic lib possible 2000-08-07 11:40:54 +00:00
Uwe Steinmann b5d39b4820 - added functions fdf_set_flags(), fdf_set_opt(), fdf_set_submit_form_action()
as proposed by <gweisz@l-speed.com>
2000-08-07 11:37:42 +00:00
Thies C. Arntzen 8289c85438 @- Fixed CLOB handling in OCI8 driver when using variable-width
@  character sets. (Thies)
2000-08-07 11:34:48 +00:00
Rui Hirokawa 635532053e fixed for openldap 2.0beta. 2000-08-07 03:18:00 +00:00
6ebea7d35e ChangeLog update 2000-08-07 01:09:12 +00:00
8bd88acada NEWS update 2000-08-07 01:09:09 +00:00
Rasmus Lerdorf 1fd0a0eeed Add 4th optional parameter to sybase_[p]connect to specify the charset
for the connection
@- Add 4th optional parameter to sybase_[p]connect to specify the charset
@  for the connection (alf@alpha.ulatina.ac.cr)
2000-08-07 00:15:39 +00:00
Zeev Suraski 97893e6a19 Reverse this patch - it really shouldn't be in the error handler, but in the place
that generates the error...
2000-08-06 21:42:54 +00:00
Zeev Suraski 97cb10bc9e Fix warning 2000-08-06 21:42:10 +00:00
Zeev Suraski f59cbb9ed1 Fix & optimize 2000-08-06 21:38:41 +00:00
Egon Schmid c6569921d7 Added a parameter type. 2000-08-06 19:53:56 +00:00
Egon Schmid 05684f2d86 Fixed some protos. 2000-08-06 18:56:14 +00:00
344 changed files with 30260 additions and 4698 deletions

No files matched your search

+1801
View File
File diff suppressed because it is too large. Load diff
+22 -13
View File
@@ -65,8 +65,9 @@ MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: servlet
MAINTENANCE: Unknown
STATUS: Unknown
PRIMARY MAINTAINER: Sam Ruby <rubys@us.ibm.com>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: thttpd
MAINTENANCE: Unknown
@@ -94,7 +95,7 @@ STATUS: Unknown
EXTENSION: hyperwave
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Maintained
STATUS: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: informix
PRIMARY MAINTAINER: Danny Heijl <Danny.Heijl@cevi.be>
@@ -179,9 +180,9 @@ MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: cpdf
PRIMARY MAINTAINER: Uwe Steinmann <Uwe.Steinmann@fernuni-hagen.de>
MAINTENANCE: Unknown
STATUS: Unknown
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: CURL
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
@@ -195,8 +196,14 @@ MAINTENANCE: Maintained
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: domxml
MAINTENANCE: Unknown
STATUS: Unknown
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: dotnet
PRIMARY MAINTAINER: Sam Ruby <rubys@us.ibm.com>
MAINTENANCE: Maintained
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: exif
MAINTENANCE: Unknown
@@ -223,16 +230,17 @@ STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: icap
MAINTENANCE: Unknown
STATUS: Unknown
STATUS: Obsolete
-------------------------------------------------------------------------------
EXTENSION: imap
MAINTENANCE: Unknown
PRIMARY MAINTAINER: Chuck Hagenbuch <chuck@horde.org>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: java
PRIMARY MAINTAINER: Sam Ruby <rubys@us.ibm.com>
MAINTENANCE: Maintained
STATUS: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: ldap
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
@@ -240,7 +248,8 @@ MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mcal
MAINTENANCE: Unknown
PRIMARY MAINTAINER: Chuck Hagenbuch <chuck@horde.org>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mcrypt
@@ -262,7 +271,7 @@ STATUS: Working
EXTENSION: pdf
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Maintained
STATUS: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: pfpro
PRIMARY MAINTAINER: David Croft <david@infotrek.co.uk>
+9
View File
@@ -5,6 +5,15 @@ For the impatient here is a quick set of steps that will build PHP as
first a dynamic Apache module (DSO) for Apache 1.3.x with MySQL support
and then a static module. A more verbose explanation follows.
For installing PHP on other web servers, refer to one of the following
files:
sapi/aolserver/README
sapi/pi3web/README
sapi/servlet/README
sapi/thttpd/README
README.Zeus
Note! Only install either the static module or the dynamic one. Do not
install both.
+65 -14
View File
@@ -1,20 +1,70 @@
PHP 4.0 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2000, Version 4.0.2
29 Aug 2000, Version 4.0.2
- PHP 3 regression testing framework re-born (Stig)
- Added php_uname() function (Stig)
- Made a minor change to allow building with OpenLDAP 2.0 (Stig Venaas)
- Fixed a bug in preg_replace() that would truncate subject string if the
first argument was en empty array. (Andrei)
- Added ob_get_length function (Stig)
- Fixed a bug that did not respect limit parameter in preg_replace() when
using /e modifier. (Andrei)
- Added ability for each xml_set_*_handler() function to take the
array($obj, 'method') syntax for the handler argument as well
as the normal function name. (Andrei)
- Updated array_walk() to be able to accept array($obj, 'method')
syntax for the walk function. (Andrei)
- Fixed segfault with fgets(), fgetcsv(), fgetss(), and fread() when
called with negative length argument. (Torben)
- Fix by-reference parameters passing for xml_ functions and for scanf functions (Stas)
- Added experimental Oracle LDAP SDK support. 8.1.6 or later needed. Configure
with something like --with-ldap=/usr/local/oracle/product/8.1.6 (Stig Venaas)
- Fixed memory leaks in eval(); A script that used eval() extensively, could
end up consuming very large amounts of memory during execution (Zeev, Zend
Engine)
- Fixed memory_limit feature, which did not work properly in previous versions
(Zeev, Zend Engine)
- Fixed stdout support with the swf extension. (Sterling)
- Fixed byte order for ip2long and long2ip (Stas)
- Fixed dbase_add_record. (Sterling)
- Added support for libmcrypt 2.4.4 (Derick)
- Added strncasecmp function (Andi, Zend Engine)
- Fixed FTP module to accept multiline server replies (Jani)
- Fixed switch which only has a single default rule. (Andi, Zend Engine)
- Fixed problem with nested foreach()'s. (Andi, Zend Engine)
- The CCVS module is now stable and compiling. It compiles as a CGI and into
Apache cleanly without warnings. (Brendan W. McAdams)
- Fixed mSQL_close(). (nick@loman.net)
- Made return() in a require()'d file work like return() in an include()'d
file (Andi & Zeev, Zend Engine)
- Changed require_once() to work using the same table as include_once()
(Andi & Zeev, Zend Engine)
- Fixed PostgreSQL module to work when the link handle is omitted (Zeev)
- Fixed the Sybase modules to work properly with PHP 4.0 (Zeev)
- Fixed CLOB handling in OCI8 driver when using variable-width
character sets. (Thies)
- Added 4th optional parameter to sybase_[p]connect to specify the charset
for the connection (alf@alpha.ulatina.ac.cr)
- Fixed support for current thttpd releases. (Sascha)
- Added support for kerberized IMAP library using --with-kerberos
(Rasmus, Sascha)
- Virtualize realpath, chmod, chown and utime (Stas)
- Support content-encoding headers in file upload MIME parts
(Ragnar Kjørstad)
- Fixed warning when shutting down OCINLogon() connections. (Thies)
- Fixed \n in session variables bug on Win32 (Stas)
- OCIError() would sometimes not report failed connections. (Thies)
- Fix HEAD request bug on an Apache ErrorDocument redirect and preserve
- Fixed HEAD request bug on an Apache ErrorDocument redirect and preserve
the status code across the redirect as well. (Rasmus)
- Add Olympus-specific tags to read_exif_data() (Rasmus)
- Added Olympus-specific tags to read_exif_data() (Rasmus)
- Fixed bug in imap_fetchheader() where using FT_PREFETCHTEXT didn't return
the body. Bug #4447. (Jani)
- Fixed exec() returning "\0" when output is empty
- Added XML_Parser class in PEAR (Stig)
- Added "make test" target in pear/ and added some regression tests (Stig)
- Fix bug in strip_tags function as per bug #5857 (Rasmus)
- Fix reading of IPTC via GetImageInfo() for certain JPEG files. (Thies)
- Fixed bug in strip_tags function as per bug #5857 (Rasmus)
- Fixed reading of IPTC via GetImageInfo() for certain JPEG files. (Thies)
- Improved the output-buffering functions to be re-entrant (Zeev)
- Made ldap_add(), ldap_modify(), ldap_mod_add(), ldap_mod_replace()
binary-safe. Original patch: Terrence Miao <terrence_miao@email.com> (Jani)
@@ -24,9 +74,10 @@ PHP 4.0 NEWS
- Bug-report and fix submitted by Michel Alexeline <alexel@dr15.cnrs.fr>
- Make ext_skel create a Makefile.in set up to handle shared extension
support automatically (Rasmus)
- Fix php_realpath not to die on non-existing files (needed for touch()) (Stas and china@thewrittenword.com)
- Fix get_browser() function (Stas)
- Fix symbol clash which caused a DSO problem on OpenBSD (Rob Black and
- Fixed php_realpath not to die on non-existing files (needed for touch())
(Stas and china@thewrittenword.com)
- Fixed get_browser() function (Stas)
- Fixed symbol clash which caused a DSO problem on OpenBSD (Rob Black and
anil@recoil.org)
- Added new function: ldap_compare(). (Jani)
- Fixed a bug in ldap_get_entries() and ldap_get_attributes(). (Jani)
@@ -57,9 +108,9 @@ PHP 4.0 NEWS
- You can now call Ora_Error() without prameters to get the reason
for a failed connection attempt. (Kirill Maximov)
- New extension "pfpro" for interface with Verisign Payflow Pro (David Croft)
- Add IMG_GIF, IMG_JPG, IMG_JPEG, IMG_PNG and IMG_WBMP constants for
- Added IMG_GIF, IMG_JPG, IMG_JPEG, IMG_PNG and IMG_WBMP constants for
imagetypes() function (Rasmus)
- Add ImageTypes() function which returns a bitfield with the supported
- Added ImageTypes() function which returns a bitfield with the supported
image formats. 1=gif, 2=jpeg, 4=png and 8=wbmp (Rasmus)
- Make it possible to specify an empty string as a thousands-seperator
in number_format() (Rasmus)
@@ -206,7 +257,7 @@ PHP 4.0 NEWS
- Added fflush() function. (Eric Huss)
- Fixed a problem with static variables, default function arguments and class
member variables, that contained array values. (Andi & Zeev, Zend Engine)
- Fix virtual() when used with output buffering (Marc Pohl)
- Fixed virtual() when used with output buffering (Marc Pohl)
- Clean up constants in flock() function and add optional 3rd arg which
is set to true on EWOULDBLOCK (Rasmus)
- Added functions pg_loimport(), pg_loexport(). (Jouni)
@@ -226,7 +277,7 @@ PHP 4.0 NEWS
instead of the built-in error handling code (Zeev, Zend Engine)
- Renamed user_error() to trigger_error(); user_error() remains
defined for compatibility (Zeev, Zend Engine)
- Fix the global/static statements to require a trailing terminating
- Fixed the global/static statements to require a trailing terminating
semi-colon ';'. (Andi, Zend Engine)
- Cleaned up PCRE extension and made it binary-safe. (Andrei)
- Added third argument to in_array(). If it's true, then in_array()
@@ -301,7 +352,7 @@ PHP 4.0 NEWS
(Marc Pohl)
- Added configure time checking for bcmath package. (Joey, Sascha)
- Added get_declared_classes(). (Andrei, Zend Engine)
- Add initial NSAPI module from Jayakumar Muthukumarasamy. (Rasmus)
- Added initial NSAPI module from Jayakumar Muthukumarasamy. (Rasmus)
- Added the SWF module which allows you to create Macromedia Flash files via
libswf. (Sterling)
- Improved UNIX build system to support more vendor make tools (Sascha)
@@ -310,7 +361,7 @@ PHP 4.0 NEWS
- Fixed a crash in array_multisort() that happened when empty arrays
were passed to it. (Andrei)
- Added substr_count() from Peter Kovacs. (Andrei)
- Add an optional third argument to fseek to indicate where to seek from.
- Added an optional third argument to fseek to indicate where to seek from.
(Andrei)
- OCIBindByName() will no longer complain about bindlength beeing zero. (Thies)
- Converted the IMAP module to the high performance API (Zeev)
+2
View File
@@ -6,6 +6,7 @@ Zend
* allow foreach ($array as $k => &$val) syntax. right now we cannot
traverse an array without copying each element.
* look at replacing c-lib call tolower().
* make hash API functions work with HASH_OF() to save time.
global
------
@@ -15,6 +16,7 @@ global
* make sure all source files have the "right" copyright.
* the following modules still use PHP3_TLS_*() macros (and thereby don't
work in ZTS mode): ext/dav/dav.c, ext/db/db.c, ext/gd/gd.c, ext/ldap/ldap.c
* INI system causes segfaults in ZTS mode (operates on static HashTable)
* make sure that all ZTS globals get destructed. Most ts_allocate_id()
calls should have a dtor entry.
* activate all extensions by default that don't rely on external
+2
View File
@@ -2,3 +2,5 @@
AUTOMAKE_OPTIONS=foreign
noinst_LTLIBRARIES=libtsrm.la
libtsrm_la_SOURCES = TSRM.c
depend:
+23 -8
View File
@@ -35,18 +35,33 @@ int zend_sprintf(char *buffer, const char *format, ...);
# define zend_sprintf sprintf
#endif
#include <math.h>
#ifdef HAVE_ISNAN
#define zend_isnan(a) isnan(a)
#elif defined(NAN)
#define zend_isnan(a) (((a)==NAN)?1:0)
#else
#define zend_isnan(a) 0
#endif
#ifdef HAVE_ISINF
#define zend_isinf(a) isinf(a)
#elif defined(INFINITY)
/* Might not work, but is required by ISO C99 */
#define zend_isinf(a) (((a)==INFINITY)?1:0)
#else
#define zend_isinf(a) 0
#endif
#ifdef HAVE_FINITE
#define zend_finite(a) finite(a)
#elif defined(HAVE_ISFINITE)
#elif defined(HAVE_ISFINITE) || defined(isfinite)
#define zend_finite(a) isfinite(a)
#elif defined(HAVE_ISNAN) && defined(HAVE_ISINF)
#define zend_finite(a) (isnan(a) ? 0 : isinf(a) ? 0 : 1)
#elif defined(HAVE_ISNAN)
#define zend_finite(a) (isnan(a) ? 0 : 1)
#elif defined(HAVE_ISINF)
#define zend_finite(a) (isinf(a) ? 0 : 1)
#elif defined(fpclassify)
#define zend_finite(a) ((fpclassify((a))!=FP_INFINITE&&fpclassify((a))!=FP_NAN)?1:0)
#else
#define zend_finite(a) (1)
#define zend_finite(a) (zend_isnan(a) ? 0 : zend_isinf(a) ? 0 : 1)
#endif
/*
+6 -8
View File
@@ -47,7 +47,7 @@
%pure_parser
%expect 4
%left T_INCLUDE T_INCLUDE_ONCE T_EVAL
%left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE
%left ','
%left T_LOGICAL_OR
%left T_LOGICAL_XOR
@@ -105,8 +105,6 @@
%token T_FUNCTION
%token T_CONST
%token T_RETURN
%token T_REQUIRE
%token T_REQUIRE_ONCE
%token T_USE
%token T_GLOBAL
%token T_STATIC
@@ -197,11 +195,10 @@ unticked_statement:
| T_ECHO echo_expr_list ';'
| T_INLINE_HTML { do_echo(&$1 CLS_CC); }
| expr ';' { do_free(&$1 CLS_CC); }
| T_REQUIRE expr ';' { do_require(&$2, 0 CLS_CC); }
| T_REQUIRE_ONCE use_filename ';' { do_require(&$2, 1 CLS_CC); }
| T_USE use_filename ';' { use_filename($2.u.constant.value.str.val, $2.u.constant.value.str.len CLS_CC); zval_dtor(&$2.u.constant); }
| T_USE use_filename ';' { zend_error(E_COMPILE_ERROR,"use: Not yet supported. Please use include_once() or require_once()"); zval_dtor(&$2.u.constant); }
| T_UNSET '(' unset_variables ')' ';'
| T_FOREACH '(' expr T_AS { do_foreach_begin(&$1, &$3, &$2, &$4 CLS_CC); } w_cvar foreach_optional_arg ')' { do_foreach_cont(&$6, &$7, &$4 CLS_CC); } foreach_statement { do_foreach_end(&$1, &$2 CLS_CC); }
| T_FOREACH '(' w_cvar T_AS { do_foreach_begin(&$1, &$3, &$2, &$4, 1 CLS_CC); } w_cvar foreach_optional_arg ')' { do_foreach_cont(&$6, &$7, &$4 CLS_CC); } foreach_statement { do_foreach_end(&$1, &$2 CLS_CC); }
| T_FOREACH '(' expr_without_variable T_AS { do_foreach_begin(&$1, &$3, &$2, &$4, 0 CLS_CC); } w_cvar foreach_optional_arg ')' { do_foreach_cont(&$6, &$7, &$4 CLS_CC); } foreach_statement { do_foreach_end(&$1, &$2 CLS_CC); }
| T_DECLARE { do_declare_begin(CLS_C); } '(' declare_list ')' declare_statement { do_declare_end(CLS_C); }
| ';' /* empty statement */
;
@@ -487,7 +484,6 @@ expr_without_variable:
| T_PRINT expr { do_print(&$$, &$2 CLS_CC); }
;
function_call:
T_STRING '(' { $2.u.opline_num = do_begin_function_call(&$1 CLS_CC); }
function_call_parameter_list
@@ -720,6 +716,8 @@ internal_functions_in_yacc:
| T_INCLUDE expr { do_include_or_eval(ZEND_INCLUDE, &$$, &$2 CLS_CC); }
| T_INCLUDE_ONCE expr { do_include_or_eval(ZEND_INCLUDE_ONCE, &$$, &$2 CLS_CC); }
| T_EVAL '(' expr ')' { do_include_or_eval(ZEND_EVAL, &$$, &$3 CLS_CC); }
| T_REQUIRE expr { do_include_or_eval(ZEND_REQUIRE, &$$, &$2 CLS_CC); }
| T_REQUIRE_ONCE use_filename { do_include_or_eval(ZEND_REQUIRE_ONCE, &$$, &$2 CLS_CC); }
;
+66 -168
View File
@@ -183,7 +183,7 @@ inline void restore_lexical_state(zend_lex_state *lex_state CLS_DC)
BEGIN_EXTERN_C()
ZEND_API void zend_open_file_dtor(zend_file_handle *fh)
ZEND_API void zend_file_handle_dtor(zend_file_handle *fh)
{
switch (fh->type) {
case ZEND_HANDLE_FP:
@@ -235,7 +235,7 @@ int zend_compare_file_handles(zend_file_handle *fh1, zend_file_handle *fh2)
}
ZEND_API void zend_close_file_handle(zend_file_handle *file_handle CLS_DC)
ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle CLS_DC)
{
zend_llist_del_element(&CG(open_files), file_handle, (int (*)(void *, void *)) zend_compare_file_handles);
}
@@ -243,7 +243,7 @@ ZEND_API void zend_close_file_handle(zend_file_handle *file_handle CLS_DC)
ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
{
char *file_path;
char *file_path=NULL;
#ifndef ZTS
switch (file_handle->type) {
@@ -252,19 +252,20 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
file_path = file_handle->opened_path;
break;
case ZEND_HANDLE_FD:
file_path = file_handle->filename;
file_handle->opened_path = NULL;
/* file_handle->opened_path = NULL; */
file_handle->handle.fp = fdopen(file_handle->handle.fd, "r");
break;
case ZEND_HANDLE_FP:
file_path = file_handle->filename;
file_handle->opened_path = NULL;
/* file_handle->opened_path = NULL; */
file_handle->handle.fp = file_handle->handle.fp;
break;
}
if (!file_handle->handle.fp) {
return FAILURE;
}
if (!file_path) {
file_path = file_handle->filename;
}
file_handle->type = ZEND_HANDLE_FP;
if (file_handle->handle.fp != stdin) {
zend_llist_add_element(&CG(open_files), file_handle);
@@ -276,7 +277,7 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
#else
switch (file_handle->type) {
case ZEND_HANDLE_FD:
file_handle->opened_path = NULL;
/* file_handle->opened_path = NULL; */
file_handle->handle.is = new ifstream(file_handle->handle.fd);
file_handle->type = ZEND_HANDLE_FSTREAM;
break;
@@ -291,7 +292,7 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
break;
}
case ZEND_HANDLE_FP:
file_handle->opened_path = NULL;
/* file_handle->opened_path = NULL; */
if (file_handle->handle.fp==stdin) {
file_handle->handle.is = &cin;
} else {
@@ -324,31 +325,16 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
END_EXTERN_C()
ZEND_API zend_op_array *zend_compile_files(int type CLS_DC, int file_count, ...)
{
va_list files;
zend_op_array *op_array;
va_start(files, file_count);
op_array = zend_v_compile_files(type CLS_CC, file_count, files);
va_end(files);
return op_array;
}
ZEND_API zend_op_array *v_compile_files(int type CLS_DC, int file_count, va_list files)
ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type CLS_DC)
{
zend_lex_state original_lex_state;
zend_op_array *op_array = (zend_op_array *) emalloc(sizeof(zend_op_array));
zend_op_array *original_active_op_array = CG(active_op_array);
zend_op_array *retval=NULL;
int i;
int compiler_result;
int compiled_files=0;
int last_file=0;
zend_bool compilation_successful=0;
znode retval_znode;
zend_bool original_in_compilation = CG(in_compilation);
zend_file_handle **file_handles = (zend_file_handle **) do_alloca(file_count * sizeof(zend_file_handle *));
retval_znode.op_type = IS_CONST;
retval_znode.u.constant.type = IS_LONG;
@@ -356,55 +342,42 @@ ZEND_API zend_op_array *v_compile_files(int type CLS_DC, int file_count, va_list
retval_znode.u.constant.is_ref = 0;
retval_znode.u.constant.refcount = 1;
init_op_array(op_array, ZEND_USER_FUNCTION, INITIAL_OP_ARRAY_SIZE);
save_lexical_state(&original_lex_state CLS_CC);
retval = op_array; /* success oriented */
for (i=0; i<file_count; i++) {
file_handles[i] = va_arg(files, zend_file_handle *);
if (file_handles[i]) {
last_file = i;
}
}
for (i=0; i<file_count; i++) {
if (!file_handles[i]) {
continue;
}
if (open_file_for_scanning(file_handles[i] CLS_CC)==FAILURE) {
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, file_handles[i]->filename);
if (open_file_for_scanning(file_handle CLS_CC)==FAILURE) {
if (type==ZEND_REQUIRE) {
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, file_handle->filename);
zend_bailout();
} else {
CG(in_compilation) = 1;
CG(active_op_array) = op_array;
compiler_result = zendparse(CLS_C);
zend_close_file_handle(file_handles[i] CLS_CC);
if (i == last_file) {
do_return(&retval_znode, 0 CLS_CC);
}
restore_lexical_state(&original_lex_state CLS_CC);
CG(in_compilation) = original_in_compilation;
if (compiler_result==1) { /* parser error */
CG(unclean_shutdown) = 1;
retval = NULL;
break;
}
compiled_files++;
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, file_handle->filename);
}
compilation_successful=0;
} else {
init_op_array(op_array, ZEND_USER_FUNCTION, INITIAL_OP_ARRAY_SIZE CLS_CC);
CG(in_compilation) = 1;
CG(active_op_array) = op_array;
compiler_result = zendparse(CLS_C);
do_return(&retval_znode, 0 CLS_CC);
restore_lexical_state(&original_lex_state CLS_CC);
CG(in_compilation) = original_in_compilation;
if (compiler_result==1) { /* parser error */
CG(unclean_shutdown) = 1;
retval = NULL;
}
compilation_successful=1;
}
if (retval) {
if (compiled_files>0) {
CG(active_op_array) = original_active_op_array;
CG(active_op_array) = original_active_op_array;
if (compilation_successful) {
pass_two(op_array);
} else {
CG(active_op_array) = original_active_op_array;
destroy_op_array(op_array);
efree(op_array);
retval = NULL;
}
}
free_alloca(file_handles);
return retval;
}
@@ -414,7 +387,6 @@ zend_op_array *compile_filename(int type, zval *filename CLS_DC ELS_DC)
zend_file_handle file_handle;
zval tmp;
zend_op_array *retval;
int error_reporting=0;
if (filename->type != IS_STRING) {
tmp = *filename;
@@ -428,22 +400,8 @@ zend_op_array *compile_filename(int type, zval *filename CLS_DC ELS_DC)
file_handle.opened_path = NULL;
if (type==ZEND_REQUIRE) {
/* We don't want to hear about inclusion failures; If we fail,
* we'll generate a require failure
*/
error_reporting = EG(error_reporting);
EG(error_reporting) = 0;
}
retval = zend_compile_files(type CLS_CC, 1, &file_handle);
if (type==ZEND_REQUIRE) {
EG(error_reporting) = error_reporting;
if (!retval) {
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, filename->value.str.val);
zend_bailout();
}
}
retval = zend_compile_file(&file_handle, type CLS_CC);
zend_destroy_file_handle(&file_handle CLS_CC);
if (filename==&tmp) {
zval_dtor(&tmp);
@@ -451,8 +409,11 @@ zend_op_array *compile_filename(int type, zval *filename CLS_DC ELS_DC)
return retval;
}
static inline int prepare_string_for_scanning(zval *str CLS_DC)
#ifndef ZTS
static inline int prepare_string_for_scanning(zval *str)
#else
static inline int prepare_string_for_scanning(zval *str, istrstream **input_stream CLS_DC)
#endif
{
#ifndef ZTS
/* enforce two trailing NULLs for flex... */
@@ -463,10 +424,10 @@ static inline int prepare_string_for_scanning(zval *str CLS_DC)
yyin=NULL;
yy_scan_buffer(str->value.str.val, str->value.str.len+2);
#else
istrstream *input_stream = new istrstream(str->value.str.val, str->value.str.len);
*input_stream = new istrstream(str->value.str.val, str->value.str.len);
CG(ZFL) = new ZendFlexLexer;
CG(ZFL)->switch_streams(input_stream, &cout);
CG(ZFL)->switch_streams(*input_stream, &cout);
#endif
zend_set_compiled_filename("Eval code");
CG(zend_lineno) = 1;
@@ -483,6 +444,9 @@ zend_op_array *compile_string(zval *source_string CLS_DC)
zval tmp;
int compiler_result;
zend_bool original_in_compilation = CG(in_compilation);
#ifdef ZTS
istrstream *input_stream;
#endif
if (source_string->value.str.len==0) {
efree(op_array);
@@ -496,13 +460,16 @@ zend_op_array *compile_string(zval *source_string CLS_DC)
convert_to_string(&tmp);
source_string = &tmp;
init_op_array(op_array, ZEND_EVAL_CODE, INITIAL_OP_ARRAY_SIZE);
save_lexical_state(&original_lex_state CLS_CC);
if (prepare_string_for_scanning(source_string CLS_CC)==FAILURE) {
destroy_op_array(op_array);
#ifndef ZTS
if (prepare_string_for_scanning(source_string)==FAILURE) {
#else
if (prepare_string_for_scanning(source_string, &input_stream CLS_CC)==FAILURE) {
#endif
efree(op_array);
retval = NULL;
} else {
init_op_array(op_array, ZEND_EVAL_CODE, INITIAL_OP_ARRAY_SIZE CLS_CC);
CG(active_op_array) = op_array;
#ifndef ZTS
BEGIN(ST_IN_SCRIPTING);
@@ -520,10 +487,12 @@ zend_op_array *compile_string(zval *source_string CLS_DC)
do_return(NULL, 0 CLS_CC);
CG(active_op_array) = original_active_op_array;
pass_two(op_array);
pass_include_eval(op_array);
retval = op_array;
}
}
#ifdef ZTS
delete input_stream;
#endif
zval_dtor(&tmp);
CG(in_compilation) = original_in_compilation;
return retval;
@@ -531,87 +500,6 @@ zend_op_array *compile_string(zval *source_string CLS_DC)
BEGIN_EXTERN_C()
int require_filename(char *filename, zend_bool unique CLS_DC)
{
zend_file_handle file_handle;
file_handle.type = ZEND_HANDLE_FILENAME;
file_handle.filename = filename;
file_handle.free_filename = 0;
if (require_file(&file_handle, unique CLS_CC)==FAILURE) {
zend_bailout();
return FAILURE; /* will never get here */
}
return SUCCESS;
}
int use_filename(char *filename, uint filename_length CLS_DC)
{
zend_error(E_COMPILE_ERROR,"use: Not yet supported. Please use include_once() or require_once()");
return FAILURE;
#if 0
zend_file_handle file_handle;
file_handle.filename = (char *) emalloc(filename_length + zend_uv.import_use_extension_length);
memcpy(file_handle.filename, filename, filename_length);
memcpy(file_handle.filename+filename_length, zend_uv.import_use_extension, zend_uv.import_use_extension_length);
file_handle.filename[filename_length+zend_uv.import_use_extension_length] = 0;
file_handle.free_filename = 1;
file_handle.type = ZEND_HANDLE_FILENAME;
if (require_file(&file_handle, 1 CLS_CC)==FAILURE) {
efree(file_handle.filename);
zend_bailout();
return FAILURE; /* will never get here */
}
return SUCCESS;
#endif
}
int require_file(zend_file_handle *file_handle, zend_bool unique CLS_DC)
{
zend_lex_state original_lex_state;
int compiler_result;
save_lexical_state(&original_lex_state CLS_CC);
if (open_file_for_scanning(file_handle CLS_CC)==FAILURE) {
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, file_handle->filename);
return FAILURE;
}
if (file_handle->opened_path) {
if (unique) {
zend_file_handle *pfh;
if (zend_hash_add(&CG(used_files), file_handle->opened_path, strlen(file_handle->opened_path)+1, file_handle, sizeof(zend_file_handle), (void **) &pfh)==FAILURE) {
zend_close_file_handle(file_handle CLS_CC);
restore_lexical_state(&original_lex_state CLS_CC);
return SUCCESS;
} else {
/* pfh is a copy we only save for get_used_files() */
pfh->type = ZEND_HANDLE_FILENAME;
if (pfh->filename) {
pfh->filename = estrdup(pfh->filename);
pfh->free_filename = 1;
}
if (pfh->opened_path) {
pfh->opened_path = strdup(pfh->opened_path);
}
}
}
}
compiler_result = zendparse(CLS_C);
zend_close_file_handle(file_handle CLS_CC);
restore_lexical_state(&original_lex_state CLS_CC);
if (compiler_result==1) {
zend_bailout();
}
return SUCCESS;
}
int highlight_file(char *filename, zend_syntax_highlighter_ini *syntax_highlighter_ini)
{
zend_lex_state original_lex_state;
@@ -628,7 +516,7 @@ int highlight_file(char *filename, zend_syntax_highlighter_ini *syntax_highlight
return FAILURE;
}
zend_highlight(syntax_highlighter_ini);
zend_close_file_handle(&file_handle CLS_CC);
zend_destroy_file_handle(&file_handle CLS_CC);
restore_lexical_state(&original_lex_state CLS_CC);
return SUCCESS;
}
@@ -638,16 +526,26 @@ int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_
{
zend_lex_state original_lex_state;
zval tmp = *str;
#ifdef ZTS
istrstream *input_stream;
#endif
CLS_FETCH();
str = &tmp;
zval_copy_ctor(str);
save_lexical_state(&original_lex_state CLS_CC);
if (prepare_string_for_scanning(str CLS_CC)==FAILURE) {
#ifndef ZTS
if (prepare_string_for_scanning(str)==FAILURE) {
#else
if (prepare_string_for_scanning(str, &input_stream CLS_CC)==FAILURE) {
#endif
return FAILURE;
}
zend_highlight(syntax_highlighter_ini);
restore_lexical_state(&original_lex_state CLS_CC);
#ifdef ZTS
delete input_stream;
#endif
zval_dtor(str);
return SUCCESS;
}
+34 -1
View File
@@ -357,7 +357,7 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
zend_get_ini_entry_p = utility_functions->get_ini_entry;
zend_ticks_function = utility_functions->ticks_function;
zend_v_compile_files = v_compile_files;
zend_compile_file = compile_file;
zend_execute = execute;
zend_startup_extensions();
@@ -692,3 +692,36 @@ ZEND_API void zend_output_debug_string(zend_bool trigger_break, char *format, ..
va_end(args);
#endif
}
ZEND_API int zend_execute_scripts(int type CLS_DC ELS_DC, int file_count, ...)
{
va_list files;
int i;
zend_file_handle *file_handle;
va_start(files, file_count);
for (i=0; i<file_count; i++) {
file_handle = va_arg(files, zend_file_handle *);
if (!file_handle) {
continue;
}
EG(active_op_array) = zend_compile_file(file_handle, ZEND_INCLUDE CLS_CC);
zend_destroy_file_handle(file_handle CLS_CC);
if (EG(active_op_array)) {
zend_execute(EG(active_op_array) ELS_CC);
zval_ptr_dtor(EG(return_value_ptr_ptr));
EG(return_value_ptr_ptr) = &EG(global_return_value_ptr);
EG(global_return_value_ptr) = NULL;
destroy_op_array(EG(active_op_array));
efree(EG(active_op_array));
} else if (type==ZEND_REQUIRE) {
va_end(files);
return FAILURE;
}
}
va_end(files);
return SUCCESS;
}
+1 -1
View File
@@ -21,7 +21,7 @@
#ifndef ZEND_H
#define ZEND_H
#define ZEND_VERSION "1.0.1"
#define ZEND_VERSION "1.0.2"
#ifdef __cplusplus
#define BEGIN_EXTERN_C() extern "C" {
+3 -3
View File
@@ -227,7 +227,7 @@ ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length,
#define ZVAL_EMPTY_STRING(z) { \
(z)->value.str.len = 0; \
(z)->value.str.val = empty_string \
(z)->value.str.val = empty_string; \
(z)->type = IS_STRING; \
}
@@ -268,7 +268,7 @@ ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length,
#define RETVAL_EMPTY_STRING() { \
return_value->value.str.len = 0; \
return_value->value.str.val = empty_string \
return_value->value.str.val = empty_string; \
return_value->type = IS_STRING; \
}
@@ -319,7 +319,7 @@ ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length,
#define RETURN_EMPTY_STRING() { \
return_value->value.str.len = 0; \
return_value->value.str.val = empty_string \
return_value->value.str.val = empty_string; \
return_value->type = IS_STRING; \
return; \
}
+18 -5
View File
@@ -57,11 +57,18 @@ ZEND_API zend_alloc_globals alloc_globals;
#define _CHECK_MEMORY_LIMIT(s, rs, file, lineno) { AG(allocated_memory) += rs;\
if (AG(memory_limit)<AG(allocated_memory)) {\
if (!file) { \
zend_error(E_ERROR,"Allowed memory size of %d bytes exhausted (tried to allocate %d bytes)", AG(memory_limit),s); \
} else { \
zend_error(E_ERROR,"Allowed memory size of %d bytes exhausted at %s:%d (tried to allocate %d bytes)", AG(memory_limit), file, lineno, s); \
} \
if ((AG(memory_limit)+1048576)<AG(allocated_memory)) { \
/* failed to handle this gracefully, exit() */ \
exit(1); \
} \
if (!AG(memory_exhausted)) { \
if (!file) { \
zend_error(E_ERROR,"Allowed memory size of %d bytes exhausted (tried to allocate %d bytes)", AG(memory_limit),s); \
} else { \
zend_error(E_ERROR,"Allowed memory size of %d bytes exhausted at %s:%d (tried to allocate %d bytes)", AG(memory_limit), file, lineno, s); \
} \
AG(memory_exhausted)=1; \
} \
} \
}
# endif
@@ -434,6 +441,9 @@ ZEND_API void shutdown_memory_manager(int silent, int clean_cache)
zend_message_dispatcher(ZMSG_MEMORY_LEAK_REPEATED, (void *) (long) (total_leak_count));
}
}
#endif
#if MEMORY_LIMIT
AG(allocated_memory) -= t->size;
#endif
p = t->pNext;
REMOVE_POINTER_FROM_LIST(t);
@@ -451,6 +461,9 @@ ZEND_API void shutdown_memory_manager(int silent, int clean_cache)
}
}
}
#if MEMORY_LIMIT
AG(memory_exhausted)=0;
#endif
#if (ZEND_DEBUG)
do {
+3 -19
View File
@@ -47,7 +47,6 @@ static ZEND_FUNCTION(leak);
#ifdef ZEND_TEST_EXCEPTIONS
static ZEND_FUNCTION(crash);
#endif
static ZEND_FUNCTION(get_required_files);
static ZEND_FUNCTION(get_included_files);
static ZEND_FUNCTION(is_subclass_of);
static ZEND_FUNCTION(get_class_vars);
@@ -91,8 +90,8 @@ static zend_function_entry builtin_functions[] = {
#ifdef ZEND_TEST_EXCEPTIONS
ZEND_FE(crash, NULL)
#endif
ZEND_FE(get_required_files, NULL)
ZEND_FE(get_included_files, NULL)
ZEND_FALIAS(get_required_files, get_included_files, NULL)
ZEND_FE(is_subclass_of, NULL)
ZEND_FE(get_class_vars, NULL)
ZEND_FE(get_object_vars, NULL)
@@ -713,22 +712,6 @@ static int copy_import_use_file(zend_file_handle *fh, zval *array)
}
/* {{{ proto array get_required_files(void)
Returns an array with the file names that were require_once()'d */
ZEND_FUNCTION(get_required_files)
{
CLS_FETCH();
if (ZEND_NUM_ARGS() != 0) {
ZEND_WRONG_PARAM_COUNT();
}
array_init(return_value);
zend_hash_apply_with_argument(&CG(used_files), (apply_func_arg_t) copy_import_use_file, return_value);
}
/* }}} */
/* {{{ proto array get_included_files(void)
Returns an array with the file names that were include_once()'d */
ZEND_FUNCTION(get_included_files)
@@ -914,13 +897,14 @@ ZEND_FUNCTION(create_function)
/* }}} */
#if ZEND_DEBUG
ZEND_FUNCTION(zend_test_func)
{
zval *arg1, *arg2;
zend_get_parameters(ht, 2, &arg1, &arg2);
}
#endif
ZEND_FUNCTION(get_resource_type)
+41 -46
View File
@@ -26,7 +26,7 @@
#include "zend_fast_cache.h"
ZEND_API zend_op_array *(*zend_v_compile_files)(int type CLS_DC, int file_count, va_list files);
ZEND_API zend_op_array *(*zend_compile_file)(zend_file_handle *file_handle, int type CLS_DC);
#ifndef ZTS
@@ -43,15 +43,15 @@ static void free_filename(void *p)
}
static void build_runtime_defined_function_key(zval *result, zval *name, zend_op *opline)
static void build_runtime_defined_function_key(zval *result, zval *name, zend_op *opline CLS_DC)
{
char lineno_buf[32];
uint lineno_len;
char *filename;
lineno_len = zend_sprintf(lineno_buf, "%d", opline->lineno);
if (opline->filename) {
filename = opline->filename;
if (CG(active_op_array)->filename) {
filename = CG(active_op_array)->filename;
} else {
filename = "-";
}
@@ -65,12 +65,6 @@ static void build_runtime_defined_function_key(zval *result, zval *name, zend_op
}
static void zend_open_file_dtor_wrapper(zend_file_handle *fh)
{
zend_open_file_dtor(fh);
}
static void init_compiler_declarables(CLS_D ELS_DC)
{
CG(declarables).ticks.type = IS_LONG;
@@ -89,13 +83,12 @@ void init_compiler(CLS_D ELS_DC)
CG(active_class_entry) = NULL;
zend_llist_init(&CG(list_llist), sizeof(list_llist_element), NULL, 0);
zend_llist_init(&CG(dimension_llist), sizeof(int), NULL, 0);
zend_llist_init(&CG(filenames_list), sizeof(char *), free_filename, 0);
zend_hash_init(&CG(filenames_table), 5, NULL, (dtor_func_t) free_filename, 0);
CG(handle_op_arrays) = 1;
CG(in_compilation) = 0;
zend_init_rsrc_list(ELS_C);
CG(unclean_shutdown) = 0;
zend_llist_init(&CG(open_files), sizeof(zend_file_handle), (void (*)(void *)) zend_open_file_dtor, 0);
zend_hash_init(&CG(used_files), 5, NULL, (void (*)(void *)) zend_open_file_dtor_wrapper, 0);
zend_llist_init(&CG(open_files), sizeof(zend_file_handle), (void (*)(void *)) zend_file_handle_dtor, 0);
init_compiler_declarables(CLS_C ELS_CC);
}
@@ -108,18 +101,22 @@ void shutdown_compiler(CLS_D)
zend_stack_destroy(&CG(foreach_copy_stack));
zend_stack_destroy(&CG(object_stack));
zend_stack_destroy(&CG(declare_stack));
zend_llist_destroy(&CG(filenames_list));
zend_hash_destroy(&CG(filenames_table));
zend_llist_destroy(&CG(open_files));
zend_hash_destroy(&CG(used_files));
}
ZEND_API char *zend_set_compiled_filename(char *new_compiled_filename)
{
char *p = estrdup(new_compiled_filename);
char **pp, *p;
int length = strlen(new_compiled_filename);
CLS_FETCH();
zend_llist_add_element(&CG(filenames_list), &p);
if (zend_hash_find(&CG(filenames_table), new_compiled_filename, length+1, (void **) &pp)==SUCCESS) {
return *pp;
}
p = estrndup(new_compiled_filename, length);
zend_hash_update(&CG(filenames_table), new_compiled_filename, length+1, &p, sizeof(char *), (void **) &pp);
CG(compiled_filename) = p;
return p;
}
@@ -328,7 +325,8 @@ void do_assign_ref(znode *result, znode *lvar, znode *rvar CLS_DC)
opline->result.u.var = get_temporary_variable(CG(active_op_array));
*result = opline->result;
} else {
SET_UNUSED(opline->result);
/* SET_UNUSED(opline->result); */
opline->result.u.EA.type |= EXT_TYPE_UNUSED;
}
opline->op1 = *lvar;
opline->op2 = *rvar;
@@ -717,7 +715,7 @@ void do_begin_function_declaration(znode *function_token, znode *function_name,
function_token->u.op_array = CG(active_op_array);
zend_str_tolower(name, name_len);
init_op_array(&op_array, ZEND_USER_FUNCTION, INITIAL_OP_ARRAY_SIZE);
init_op_array(&op_array, ZEND_USER_FUNCTION, INITIAL_OP_ARRAY_SIZE CLS_CC);
op_array.function_name = name;
op_array.arg_types = NULL;
@@ -730,7 +728,7 @@ void do_begin_function_declaration(znode *function_token, znode *function_name,
opline->opcode = ZEND_DECLARE_FUNCTION_OR_CLASS;
opline->op1.op_type = IS_CONST;
build_runtime_defined_function_key(&opline->op1.u.constant, &function_name->u.constant, opline);
build_runtime_defined_function_key(&opline->op1.u.constant, &function_name->u.constant, opline CLS_CC);
opline->op2.op_type = IS_CONST;
opline->op2.u.constant.type = IS_STRING;
opline->op2.u.constant.value.str.val = estrndup(name, name_len);
@@ -1345,10 +1343,22 @@ void do_brk_cont(int op, znode *expr CLS_DC)
void do_switch_cond(znode *cond CLS_DC)
{
zend_switch_entry switch_entry;
zend_op *opline;
/* Initialize the conditional value */
opline = get_next_op(CG(active_op_array) CLS_CC);
opline->opcode = ZEND_BOOL;
opline->result.u.var = get_temporary_variable(CG(active_op_array));
opline->result.op_type = IS_TMP_VAR;
opline->op1.op_type = IS_CONST;
opline->op1.u.constant.type = IS_BOOL;
opline->op1.u.constant.value.lval = 0;
INIT_PZVAL(&opline->op1.u.constant);
SET_UNUSED(opline->op2);
switch_entry.cond = *cond;
switch_entry.default_case = -1;
switch_entry.control_var = -1;
switch_entry.control_var = opline->result.u.var;
zend_stack_push(&CG(switch_cond_stack), (void *) &switch_entry, sizeof(switch_entry));
do_begin_loop(CLS_C);
@@ -1413,9 +1423,6 @@ void do_case_before_statement(znode *case_list, znode *case_token, znode *case_e
zend_stack_top(&CG(switch_cond_stack), (void **) &switch_entry_ptr);
opline->opcode = ZEND_CASE;
if (switch_entry_ptr->control_var==-1) {
switch_entry_ptr->control_var = get_temporary_variable(CG(active_op_array));
}
opline->result.u.var = switch_entry_ptr->control_var;
opline->result.op_type = IS_TMP_VAR;
opline->op1 = switch_entry_ptr->cond;
@@ -1478,22 +1485,19 @@ void do_default_before_statement(znode *case_list, znode *default_token CLS_DC)
next_op_number = get_next_op_number(CG(active_op_array));
opline = get_next_op(CG(active_op_array) CLS_CC);
opline->opcode = ZEND_BOOL;
if (switch_entry_ptr->control_var==-1) {
switch_entry_ptr->control_var = get_temporary_variable(CG(active_op_array));
}
opline->result.u.var = switch_entry_ptr->control_var;
opline->result.op_type = IS_TMP_VAR;
opline->op1.op_type = IS_CONST;
opline->op1.u.constant.type = IS_LONG;
opline->op1.u.constant.type = IS_BOOL;
opline->op1.u.constant.value.lval = 1;
INIT_PZVAL(&opline->op1.u.constant);
SET_UNUSED(opline->op2);
switch_entry_ptr->default_case = next_op_number;
next_op_number = get_next_op_number(CG(active_op_array));
if (case_list->op_type==IS_UNUSED) {
return;
}
next_op_number = get_next_op_number(CG(active_op_array));
CG(active_op_array)->opcodes[case_list->u.opline_num].op1.u.opline_num = next_op_number;
}
@@ -1551,7 +1555,7 @@ void do_begin_class_declaration(znode *class_name, znode *parent_class_name CLS_
opline->opcode = ZEND_DECLARE_FUNCTION_OR_CLASS;
opline->op1.op_type = IS_CONST;
build_runtime_defined_function_key(&opline->op1.u.constant, &class_name->u.constant, opline);
build_runtime_defined_function_key(&opline->op1.u.constant, &class_name->u.constant, opline CLS_CC);
opline->op2.op_type = IS_CONST;
opline->op2.u.constant.type = IS_STRING;
opline->op2.u.constant.refcount = 1;
@@ -1642,7 +1646,7 @@ void do_begin_new_object(znode *new_token, znode *class_name CLS_DC)
unsigned char *ptr = NULL;
opline->opcode = ZEND_NEW;
opline->result.op_type = IS_TMP_VAR;
opline->result.op_type = IS_VAR;
opline->result.u.var = get_temporary_variable(CG(active_op_array));
opline->op1 = *class_name;
SET_UNUSED(opline->op2);
@@ -1958,20 +1962,6 @@ void do_include_or_eval(int type, znode *result, znode *op1 CLS_DC)
}
void do_require(znode *filename, zend_bool unique CLS_DC)
{
if (filename->op_type==IS_CONST
&& filename->u.constant.type==IS_STRING) {
require_filename(filename->u.constant.value.str.val, unique CLS_CC);
zval_dtor(&filename->u.constant);
} else {
znode result;
do_include_or_eval(ZEND_REQUIRE, &result, filename CLS_CC);
}
}
void do_indirect_references(znode *result, znode *num_references, znode *variable CLS_DC)
{
int i;
@@ -2022,7 +2012,7 @@ void do_isset_or_isempty(int type, znode *result, znode *variable CLS_DC)
}
void do_foreach_begin(znode *foreach_token, znode *array, znode *open_brackets_token, znode *as_token CLS_DC)
void do_foreach_begin(znode *foreach_token, znode *array, znode *open_brackets_token, znode *as_token, int variable CLS_DC)
{
zend_op *opline = get_next_op(CG(active_op_array) CLS_CC);
@@ -2032,6 +2022,11 @@ void do_foreach_begin(znode *foreach_token, znode *array, znode *open_brackets_t
opline->result.u.var = get_temporary_variable(CG(active_op_array));
opline->op1 = *array;
SET_UNUSED(opline->op2);
if (variable) {
opline->extended_value = 1;
} else {
opline->extended_value = 0;
}
*open_brackets_token = opline->result;
zend_stack_push(&CG(foreach_copy_stack), (void *) &opline->result, sizeof(znode));
+10 -13
View File
@@ -80,7 +80,6 @@ typedef struct _zend_op {
znode op1;
znode op2;
ulong extended_value;
char *filename;
uint lineno;
} zend_op;
@@ -121,6 +120,8 @@ struct _zend_op_array {
zend_bool return_reference;
zend_bool done_pass_two;
char *filename;
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
};
@@ -211,7 +212,7 @@ BEGIN_EXTERN_C()
void init_compiler(CLS_D ELS_DC);
void shutdown_compiler(CLS_D);
extern ZEND_API zend_op_array *(*zend_v_compile_files)(int type CLS_DC, int file_count, va_list files);
extern ZEND_API zend_op_array *(*zend_compile_file)(zend_file_handle *file_handle, int type CLS_DC);
void zend_activate(CLS_D ELS_DC);
void zend_deactivate(CLS_D ELS_DC);
@@ -339,12 +340,11 @@ void do_new_list_end(CLS_D);
void do_cast(znode *result, znode *expr, int type CLS_DC);
void do_include_or_eval(int type, znode *result, znode *op1 CLS_DC);
void do_require(znode *filename, zend_bool unique CLS_DC);
void do_unset(znode *variable CLS_DC);
void do_isset_or_isempty(int type, znode *result, znode *variable CLS_DC);
void do_foreach_begin(znode *foreach_token, znode *array, znode *open_brackets_token, znode *as_token CLS_DC);
void do_foreach_begin(znode *foreach_token, znode *array, znode *open_brackets_token, znode *as_token, int variable CLS_DC);
void do_foreach_cont(znode *value, znode *key, znode *as_token CLS_DC);
void do_foreach_end(znode *foreach_token, znode *open_brackets_token CLS_DC);
@@ -375,18 +375,15 @@ ZEND_API void function_add_ref(zend_function *function);
/* helper functions in zend-scanner.l */
ZEND_API int require_file(zend_file_handle *file_handle, zend_bool unique CLS_DC);
ZEND_API int require_filename(char *filename, zend_bool unique CLS_DC);
ZEND_API int use_filename(char *filename, uint filename_length CLS_DC);
ZEND_API zend_op_array *zend_compile_files(int type CLS_DC, int file_count, ...);
ZEND_API zend_op_array *v_compile_files(int type CLS_DC, int file_count, va_list files);
ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type CLS_DC);
ZEND_API zend_op_array *compile_string(zval *source_string CLS_DC);
ZEND_API zend_op_array *compile_filename(int type, zval *filename CLS_DC ELS_DC);
ZEND_API int zend_execute_scripts(int type CLS_DC ELS_DC, int file_count, ...);
ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC);
ZEND_API void init_op_array(zend_op_array *op_array, int type, int initial_ops_size);
ZEND_API void init_op_array(zend_op_array *op_array, int type, int initial_ops_size CLS_DC);
ZEND_API void destroy_op_array(zend_op_array *op_array);
ZEND_API void zend_close_file_handle(zend_file_handle *file_handle CLS_DC);
ZEND_API void zend_open_file_dtor(zend_file_handle *fh);
ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle CLS_DC);
ZEND_API void zend_file_handle_dtor(zend_file_handle *fh);
ZEND_API void destroy_zend_function(zend_function *function);
ZEND_API void destroy_zend_class(zend_class_entry *ce);
@@ -401,7 +398,6 @@ int get_next_op_number(zend_op_array *op_array);
int print_class(zend_class_entry *class_entry);
void print_op_array(zend_op_array *op_array, int optimizations);
int pass_two(zend_op_array *op_array);
ZEND_API void pass_include_eval(zend_op_array *op_array);
zend_brk_cont_element *get_next_brk_cont_element(zend_op_array *op_array);
ZEND_API zend_bool zend_is_compiling(void);
@@ -572,6 +568,7 @@ int zendlex(znode *zendlval CLS_DC);
#define ZEND_INCLUDE (1<<1)
#define ZEND_INCLUDE_ONCE (1<<2)
#define ZEND_REQUIRE (1<<3)
#define ZEND_REQUIRE_ONCE (1<<4)
#define ZEND_ISSET (1<<0)
#define ZEND_ISEMPTY (1<<1)
+4 -1
View File
@@ -13,7 +13,8 @@
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
| Z
eev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
@@ -47,6 +48,7 @@ typedef unsigned int uint;
#define HAVE_VSNPRINTF 1
#define vsnprintf _vsnprintf
#define zend_isinf(a) 0
#ifdef inline
#undef inline
@@ -64,6 +66,7 @@ typedef unsigned int uint;
#endif
#define zend_finite(A) _finite(A)
#define zend_isnan(A) _isnan(A)
#ifdef LIBZEND_EXPORTS
# define ZEND_API __declspec(dllexport)
+39 -38
View File
@@ -1412,7 +1412,7 @@ binary_assign_op_addr: {
/* constructor call */
if (opline->op1.op_type == IS_VAR) {
PZVAL_LOCK(*Ts[opline->op1.u.var].var.ptr_ptr);
SELECTIVE_PZVAL_LOCK(*Ts[opline->op1.u.var].var.ptr_ptr, &opline->op1);
}
if (opline->op2.op_type==IS_VAR) {
PZVAL_LOCK(*Ts[opline->op2.u.var].var.ptr_ptr);
@@ -1720,6 +1720,7 @@ send_by_ref:
if (opline->op2.u.constant.type==IS_CONSTANT_ARRAY) {
zval_copy_ctor(default_value);
}
default_value->refcount=1;
zval_update_constant(&default_value, 0);
default_value->refcount=0;
default_value->is_ref=0;
@@ -1838,9 +1839,11 @@ send_by_ref:
if (zend_hash_find(EG(class_table), class_name.value.str.val, class_name.value.str.len+1, (void **) &ce)==FAILURE) {
zend_error(E_ERROR, "Cannot instantiate non-existent class: %s", class_name.value.str.val);
}
object_init_ex(&Ts[opline->result.u.var].tmp_var, ce);
Ts[opline->result.u.var].tmp_var.refcount=1;
Ts[opline->result.u.var].tmp_var.is_ref=1;
Ts[opline->result.u.var].var.ptr_ptr = &Ts[opline->result.u.var].var.ptr;
ALLOC_ZVAL(Ts[opline->result.u.var].var.ptr);
object_init_ex(Ts[opline->result.u.var].var.ptr, ce);
Ts[opline->result.u.var].var.ptr->refcount=1;
Ts[opline->result.u.var].var.ptr->is_ref=1;
zval_dtor(&class_name);
FREE_OP(&opline->op1, EG(free_op1));
}
@@ -1969,37 +1972,35 @@ send_by_ref:
return_value_used = RETURN_VALUE_USED(opline);
switch (opline->op2.u.constant.value.lval) {
case ZEND_INCLUDE_ONCE: {
case ZEND_INCLUDE_ONCE:
case ZEND_REQUIRE_ONCE: {
char *opened_path;
int dummy = 1;
zend_file_handle file_handle;
file_handle.handle.fp = zend_fopen(inc_filename->value.str.val, &opened_path);
file_handle.type = ZEND_HANDLE_FP;
if (opened_path) {
file_handle.filename = opened_path;
file_handle.free_filename = 0;
} else {
file_handle.filename = inc_filename->value.str.val;
file_handle.free_filename = 0;
}
file_handle.filename = inc_filename->value.str.val;
file_handle.opened_path = opened_path;
file_handle.free_filename = 0;
if (file_handle.handle.fp) {
if (!opened_path || zend_hash_add(&EG(included_files), opened_path, strlen(opened_path)+1, (void *)&dummy, sizeof(int), NULL)==SUCCESS) {
new_op_array = zend_compile_files(ZEND_INCLUDE CLS_CC, 1, &file_handle);
if (new_op_array) {
pass_include_eval(new_op_array);
} else {
fclose(file_handle.handle.fp);
}
new_op_array = zend_compile_file(&file_handle, (opline->op2.u.constant.value.lval==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) CLS_CC);
zend_destroy_file_handle(&file_handle CLS_CC);
opened_path = NULL; /* zend_destroy_file_handle() already frees it */
} else {
fclose(file_handle.handle.fp);
}
} else {
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, file_handle.filename);
if (opline->op2.u.constant.value.lval==ZEND_INCLUDE_ONCE) {
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, file_handle.filename);
} else {
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, file_handle.filename);
}
}
if (opened_path) {
free (opened_path);
free(opened_path);
}
break;
}
@@ -2008,9 +2009,6 @@ send_by_ref:
case ZEND_REQUIRE:
{
new_op_array = compile_filename(opline->op2.u.constant.value.lval, inc_filename CLS_CC ELS_CC);
if (new_op_array) {
pass_include_eval(new_op_array);
}
break;
}
case ZEND_EVAL:
@@ -2082,8 +2080,6 @@ send_by_ref:
if (container) {
HashTable *ht;
SEPARATE_ZVAL_IF_NOT_REF(container);
switch ((*container)->type) {
case IS_ARRAY:
ht = (*container)->value.ht;
@@ -2130,22 +2126,27 @@ send_by_ref:
}
NEXT_OPCODE();
case ZEND_FE_RESET: {
zval *array_ptr;
zval *array_ptr, **array_ptr_ptr;
HashTable *fe_ht;
array_ptr = get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R);
if (EG(free_op1)) { /* IS_TMP_VAR */
zval *tmp;
ALLOC_ZVAL(tmp);
*tmp = *array_ptr;
INIT_PZVAL(tmp);
array_ptr = tmp;
} else {
if (opline->extended_value) {
array_ptr_ptr = get_zval_ptr_ptr(&opline->op1, Ts, BP_VAR_R);
SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr);
array_ptr = *array_ptr_ptr;
array_ptr->refcount++;
}
} else {
array_ptr = get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R);
if (EG(free_op1)) { /* IS_TMP_VAR */
zval *tmp;
ALLOC_ZVAL(tmp);
*tmp = *array_ptr;
INIT_PZVAL(tmp);
array_ptr = tmp;
} else {
array_ptr->refcount++;
}
}
PZVAL_LOCK(array_ptr);
Ts[opline->result.u.var].var.ptr = array_ptr;
Ts[opline->result.u.var].var.ptr_ptr = &Ts[opline->result.u.var].var.ptr;
+1 -1
View File
@@ -216,7 +216,7 @@ ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **var
(*variable_ptr_ptr)->is_ref = 1;
}
if (result && (result->op_type != IS_UNUSED)) {
if (result && !(result->u.EA.type & EXT_TYPE_UNUSED)) {
Ts[result->u.var].var.ptr_ptr = variable_ptr_ptr;
SELECTIVE_PZVAL_LOCK(*variable_ptr_ptr, result);
AI_USE_PTR(Ts[result->u.var].var);
+5 -14
View File
@@ -115,8 +115,7 @@ void init_executor(CLS_D ELS_DC)
original_sigsegv_handler = signal(SIGSEGV, zend_handle_sigsegv);
#endif
EG(return_value_ptr_ptr) = &EG(global_return_value_ptr);
EG(global_return_value_ptr) = &EG(global_return_value);
INIT_ZVAL(EG(global_return_value));
EG(global_return_value_ptr) = NULL;
EG(symtable_cache_ptr) = EG(symtable_cache)-1;
EG(symtable_cache_limit)=EG(symtable_cache)+SYMTABLE_CACHE_SIZE-1;
@@ -129,7 +128,6 @@ void init_executor(CLS_D ELS_DC)
zend_ptr_stack_init(&EG(argument_stack));
EG(main_op_array) = NULL;
zend_hash_init(&EG(symbol_table), 50, NULL, ZVAL_PTR_DTOR, 0);
EG(active_symbol_table) = &EG(symbol_table);
@@ -155,11 +153,6 @@ void init_executor(CLS_D ELS_DC)
void shutdown_executor(ELS_D)
{
if (EG(global_return_value_ptr) == &EG(global_return_value)) {
zval_dtor(&EG(global_return_value));
} else {
zval_ptr_dtor(EG(return_value_ptr_ptr));
}
zend_ptr_stack_destroy(&EG(arg_types_stack));
while (EG(symtable_cache_ptr)>=EG(symtable_cache)) {
@@ -180,10 +173,6 @@ void shutdown_executor(ELS_D)
zend_ptr_stack_destroy(&EG(argument_stack));
/* Destroy all op arrays */
if (EG(main_op_array)) {
destroy_op_array(EG(main_op_array));
efree(EG(main_op_array));
}
zend_hash_apply(EG(function_table), (int (*)(void *)) is_not_internal_function);
zend_hash_apply(EG(class_table), (int (*)(void *)) is_not_internal_class);
@@ -236,8 +225,8 @@ ZEND_API char *get_active_function_name()
ZEND_API char *zend_get_executed_filename(ELS_D)
{
if (EG(opline_ptr)) {
return active_opline->filename;
if (EG(active_op_array)) {
return EG(active_op_array)->filename;
} else {
return "[no active file]";
}
@@ -367,7 +356,9 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio
return FAILURE;
}
function_name = *tmp_real_function_name;
SEPARATE_ZVAL_IF_NOT_REF(tmp_object_ptr);
object = *tmp_object_ptr;
object->is_ref = 1;
}
if (object) {
+1 -1
View File
@@ -23,7 +23,7 @@
#include "zend_compile.h"
#define ZEND_EXTENSION_API_NO 20000707
#define ZEND_EXTENSION_API_NO 20000815
typedef struct _zend_extension_version_info {
int zend_extension_api_no;
+1 -5
View File
@@ -91,9 +91,7 @@ struct _zend_compiler_globals {
HashTable *function_table; /* function symbol table */
HashTable *class_table; /* class table */
HashTable used_files; /* files already included using 'use' */
zend_llist filenames_list;
HashTable filenames_table;
zend_bool in_compilation;
zend_bool short_tags;
@@ -133,7 +131,6 @@ struct _zend_executor_globals {
/* for global return() support */
zval *global_return_value_ptr;
zval global_return_value;
/* symbol table cache */
HashTable *symtable_cache[SYMTABLE_CACHE_SIZE];
@@ -153,7 +150,6 @@ struct _zend_executor_globals {
int orig_error_reporting;
zend_op_array *active_op_array;
zend_op_array *main_op_array;
HashTable *function_table; /* function symbol table */
HashTable *class_table; /* class table */
+1 -1
View File
@@ -37,7 +37,7 @@ extern unsigned char second_arg_allow_ref[];
#include "zend.h"
#define ZEND_MODULE_API_NO 20000609
#define ZEND_MODULE_API_NO 20000809
#ifdef ZTS
#define USING_ZTS 1
#else
+5 -13
View File
@@ -50,7 +50,7 @@ static void op_array_alloc_ops(zend_op_array *op_array)
void init_op_array(zend_op_array *op_array, int type, int initial_ops_size)
void init_op_array(zend_op_array *op_array, int type, int initial_ops_size CLS_DC)
{
op_array->type = type;
#if SUPPORT_INTERACTIVE
@@ -78,6 +78,7 @@ void init_op_array(zend_op_array *op_array, int type, int initial_ops_size)
op_array->T = 0;
op_array->function_name = NULL;
op_array->filename = zend_get_compiled_filename(CLS_C);
op_array->arg_types = NULL;
@@ -188,7 +189,6 @@ void init_op(zend_op *op CLS_DC)
{
memset(&op->result, 0, sizeof(znode));
op->lineno = CG(zend_lineno);
op->filename = zend_get_compiled_filename(CLS_C);
op->result.op_type = IS_UNUSED;
op->extended_value = 0;
memset(&op->op1, 0, sizeof(znode));
@@ -252,7 +252,6 @@ static void zend_update_extended_info(zend_op_array *op_array CLS_DC)
continue;
}
opline->lineno = (opline+1)->lineno;
opline->filename = (opline+1)->filename;
} else {
opline->opcode = ZEND_NOP;
}
@@ -264,7 +263,6 @@ static void zend_update_extended_info(zend_op_array *op_array CLS_DC)
opline->op1.op_type = IS_UNUSED;
opline->op2.op_type = IS_UNUSED;
if (op_array->last>0) {
opline->filename = op_array->opcodes[op_array->last-2].filename;
opline->lineno= op_array->opcodes[op_array->last-2].lineno;
}
}
@@ -281,6 +279,7 @@ static void zend_extension_op_array_handler(zend_extension *extension, zend_op_a
int pass_two(zend_op_array *op_array)
{
zend_op *opline=op_array->opcodes, *end=opline+op_array->last;
CLS_FETCH();
if (op_array->type!=ZEND_USER_FUNCTION && op_array->type!=ZEND_EVAL_CODE) {
@@ -292,15 +291,6 @@ int pass_two(zend_op_array *op_array)
if (CG(handle_op_arrays)) {
zend_llist_apply_with_argument(&zend_extensions, (void (*)(void *, void *)) zend_extension_op_array_handler, op_array);
}
op_array->done_pass_two = 1;
return 0;
}
ZEND_API void pass_include_eval(zend_op_array *op_array)
{
zend_op *opline=op_array->opcodes, *end=opline+op_array->last;
while (opline<end) {
if (opline->op1.op_type==IS_CONST) {
opline->op1.u.constant.is_ref = 1;
@@ -312,6 +302,8 @@ ZEND_API void pass_include_eval(zend_op_array *op_array)
}
opline++;
}
op_array->done_pass_two = 1;
return 0;
}
+16 -22
View File
@@ -1,28 +1,22 @@
# Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved.
# +----------------------------------------------------------------------+
# | PHP version 4.0 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Authors: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
##############################################################################
# $Id$
#
#
# Makefile to generate build tools
#
+16 -22
View File
@@ -1,27 +1,21 @@
# Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved.
# +----------------------------------------------------------------------+
# | PHP version 4.0 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Authors: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# $Id$
#
##############################################################################
# $Id$
include generated_lists
+19
View File
@@ -1,4 +1,23 @@
#! /bin/sh
# +----------------------------------------------------------------------+
# | PHP version 4.0 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Authors: Stig Bakken <ssb@fast.no> |
# | Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id: buildcheck.sh,v 1.3 2000-08-20 05:39:37 sas Exp $
#
echo "buildconf: checking installation..."
+19
View File
@@ -1,3 +1,22 @@
# +----------------------------------------------------------------------+
# | PHP version 4.0 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Authors: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
all: all-recursive
include $(builddir)/libs.mk
+16 -23
View File
@@ -1,29 +1,22 @@
#! /bin/sh
#
# Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved.
# +----------------------------------------------------------------------+
# | PHP version 4.0 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Authors: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
##############################################################################
# $Id: fastgen.sh,v 1.7 2000-06-11 10:33:39 sas Exp $
# $Id: fastgen.sh,v 1.8 2000-08-20 05:39:37 sas Exp $
#
srcdir=$1
+15 -22
View File
@@ -1,26 +1,19 @@
# Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved.
# +----------------------------------------------------------------------+
# | PHP version 4.0 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Authors: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
##############################################################################
# $Id$
#
+15 -22
View File
@@ -1,26 +1,19 @@
# Copyright (c) 1999 Sascha Schumann. All rights reserved.
# +----------------------------------------------------------------------+
# | PHP version 4.0 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Authors: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
##############################################################################
# $Id$
#
+75
View File
@@ -0,0 +1,75 @@
# +----------------------------------------------------------------------+
# | PHP version 4.0 |
# +----------------------------------------------------------------------+
# | Copyright (c) 2000 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Authors: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
# Usage:
#
# echo top_srcdir top_builddir srcdir CPP [CPP-ARGS] filenames | \
# awk -f mkdep.awk > dependencies
{
top_srcdir=$1
top_builddir=$2
srcdir=$3
cmd=$4
for (i = 5; i <= NF; i++) {
if (match($i, "^-[A-Z]") == 0)
break;
cmd=cmd " " $i
}
dif=i-1
for (; i <= NF; i++)
filenames[i-dif]=$i
no_files=NF-dif
for(i = 1; i <= no_files; i++) {
if (system("test -r " filenames[i]) != 0)
continue
target=filenames[i]
sub(srcdir "/", "", target)
target2=target
sub("\.(c|cpp)$", ".lo", target);
sub("\.(c|cpp)$", ".slo", target2);
for (e in used)
delete used[e]
cmdx=cmd " " filenames[i]
done=0
while ((cmdx | getline) > 0) {
if (match($0, "^# [0-9]* \".*\.h\"") != 0) {
if (sub(top_srcdir, "$(top_srcdir)", $3) == 0)
sub(top_builddir, "$(top_builddir)", $3)
if (substr($3,2,1) != "/" && used[$3] != 1) {
if (done == 0)
printf(target " " target2 ":")
done=1
printf(" \\\n\t" substr($3,2,length($3)-2))
used[$3] = 1;
}
}
}
if (done == 1)
print "\n"
}
}
-91
View File
@@ -1,91 +0,0 @@
#!/usr/bin/perl
#
# $Id$
#
# Created: Thu Aug 15 11:57:33 1996 too
# Last modified: Mon Dec 27 09:23:56 1999 too
#
# Copyright (c) 1996-1999 Tomi Ollila. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
die "Usage: mkdep CPP-command [CPP options] file1 [file2...]\n"
if ($#ARGV < 1);
$cmdl = shift(@ARGV);
$cmdl = "$cmdl " . shift (@ARGV) while ($ARGV[0] =~ /^-[A-Z]/);
while ($file = shift(@ARGV))
{
$file =~ s/\.o$/.c/;
open(F, "$cmdl $file|");
&parseout;
close(F);
}
sub initinit
{
%used = ();
$of = $file;
$of =~ s/\.c$/.lo/;
$str = "$of:\t$file";
$len = length $str;
}
sub initstr
{
$str = "\t";
$len = length $str;
}
sub parseout
{
&initinit;
while (<F>)
{
next unless (/^# [0-9]* "(.*\.h)"/);
next if ($1 =~ /^\//);
next if $used{$1};
$used{$1} = 1;
$nlen = length($1) + 1;
if ($len + $nlen > 72)
{
print $str, "\\\n";
&initstr;
$str = $str . $1;
}
else { $str = $str . " " . $1; }
$len += $nlen;
}
print $str, "\n";
}
+15 -22
View File
@@ -1,26 +1,19 @@
# Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved.
# +----------------------------------------------------------------------+
# | PHP version 4.0 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Authors: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
##############################################################################
# $Id$
#
+20 -80
View File
@@ -1,86 +1,23 @@
# Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved.
# +----------------------------------------------------------------------+
# | PHP version 4.0 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Authors: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
##############################################################################
# $Id$
#
include $(top_builddir)/config_vars.mk
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS)
COMPILE = $(CC) $(COMMON_FLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
CXX_COMPILE = $(CXX) $(COMMON_FLAGS) $(CXXFLAGS) $(EXTRA_CXXFLAGS)
SHARED_COMPILE = $(SHARED_LIBTOOL) --mode=compile $(COMPILE) -c $< && touch $@
CXX_SHARED_COMPILE = $(SHARED_LIBTOOL) --mode=compile $(CXX_COMPILE) -c $< && touch $@
LINK = $(LIBTOOL) --mode=link $(COMPILE) $(LDFLAGS) -o $@
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
INSTALL = $(top_srcdir)/build/shtool install -c
INSTALL_DATA = $(INSTALL) -m 644
DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/main
moduledir = $(EXTENSION_DIR)
CXX_SUFFIX = .cxx
.SUFFIXES:
.SUFFIXES: .slo .c $(CXX_SUFFIX) .lo .o .s .y .l
.c.o:
$(COMPILE) -c $<
$(CXX_SUFFIX).o:
$(CXX_COMPILE) -c $<
.s.o:
$(COMPILE) -c $<
.c.lo:
$(PHP_COMPILE)
$(CXX_SUFFIX).lo:
$(CXX_PHP_COMPILE)
.s.lo:
$(PHP_COMPILE)
.c.slo:
$(SHARED_COMPILE)
$(CXX_SUFFIX).slo:
$(CXX_SHARED_COMPILE)
.y.c:
$(YACC) $(YFLAGS) $< && mv y.tab.c $*.c
if test -f y.tab.h; then \
if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
else :; fi
.l.c:
$(LEX) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
include $(top_srcdir)/build/rules_common.mk
all: all-recursive
install: install-recursive
@@ -104,7 +41,7 @@ install-p: $(targets) $(install_targets)
distclean-p depend-p clean-p:
depend: depend-recursive
test "`echo *.c`" = '*.c' || perl $(top_srcdir)/build/mkdep.perl $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) *.c > $(builddir)/.deps
@echo $(top_srcdir) $(top_builddir) $(srcdir) $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) $(DEFS) $(CPPFLAGS) $(srcdir)/*.c *.c | $(AWK) -f $(top_srcdir)/build/mkdep.awk > $(builddir)/.deps || true
clean: clean-recursive clean-x
@@ -116,6 +53,9 @@ distclean: distclean-recursive clean-x
rm -f config.cache config.log config.status config_vars.mk libtool \
php_config.h stamp-h Makefile build-defs.h php4.spec libphp4.module
test: $(top_builddir)/php
@$(top_builddir)/php -f $(top_srcdir)/run-tests.php `pwd`
include $(builddir)/.deps
.PHONY: all-recursive clean-recursive install-recursive \
+76
View File
@@ -0,0 +1,76 @@
# +----------------------------------------------------------------------+
# | PHP version 4.0 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Authors: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
include $(top_builddir)/config_vars.mk
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS)
COMPILE = $(CC) $(COMMON_FLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
CXX_COMPILE = $(CXX) $(COMMON_FLAGS) $(CXXFLAGS) $(EXTRA_CXXFLAGS)
SHARED_COMPILE = $(SHARED_LIBTOOL) --mode=compile $(COMPILE) -c $< && touch $@
CXX_SHARED_COMPILE = $(SHARED_LIBTOOL) --mode=compile $(CXX_COMPILE) -c $< && touch $@
LINK = $(LIBTOOL) --mode=link $(COMPILE) $(LDFLAGS) -o $@
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
INSTALL = $(top_srcdir)/build/shtool install -c
INSTALL_DATA = $(INSTALL) -m 644
DEFS = -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/main
moduledir = $(EXTENSION_DIR)
CXX_SUFFIX = .cpp
.SUFFIXES:
.SUFFIXES: .slo .c $(CXX_SUFFIX) .lo .o .s .y .l
.c.o:
$(COMPILE) -c $<
$(CXX_SUFFIX).o:
$(CXX_COMPILE) -c $<
.s.o:
$(COMPILE) -c $<
.c.lo:
$(PHP_COMPILE)
$(CXX_SUFFIX).lo:
$(CXX_PHP_COMPILE)
.s.lo:
$(PHP_COMPILE)
.c.slo:
$(SHARED_COMPILE)
$(CXX_SUFFIX).slo:
$(CXX_SHARED_COMPILE)
.y.c:
$(YACC) $(YFLAGS) $< && mv y.tab.c $*.c
if test -f y.tab.h; then \
if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
else :; fi
.l.c:
$(LEX) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
+17 -63
View File
@@ -1,69 +1,23 @@
# Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved.
# +----------------------------------------------------------------------+
# | PHP version 4.0 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Authors: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
##############################################################################
# $Id$
#
include $(top_builddir)/config_vars.mk
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -f -p
INSTALL = $(top_srcdir)/build/shtool install -c
INSTALL_DATA = $(INSTALL) -m 644
SHARED_COMPILE = $(SHARED_LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -c $< && touch $@
DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/main
moduledir = $(EXTENSION_DIR)
.SUFFIXES:
.SUFFIXES: .slo .c .lo .o .s .y .l
.c.o:
$(COMPILE) -c $<
.s.o:
$(COMPILE) -c $<
.c.lo:
$(PHP_COMPILE)
.s.lo:
$(PHP_COMPILE)
.c.slo:
$(SHARED_COMPILE)
.y.c:
$(YACC) $(YFLAGS) $< && mv y.tab.c $*.c
if test -f y.tab.h; then \
if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
else :; fi
.l.c:
$(LEX) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
include $(top_srcdir)/build/rules_common.mk
install_targets = install-modules
@@ -89,7 +43,7 @@ install-p: $(targets) $(install_targets)
distclean-p depend-p clean-p:
depend: depend-recursive
test "`echo *.c`" = '*.c' || perl $(top_srcdir)/build/mkdep.perl $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) *.c > $(builddir)/.deps
@echo $(top_srcdir) $(top_builddir) $(srcdir) $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) $(DEFS) $(CPPFLAGS) $(srcdir)/*.c *.c | $(AWK) -f $(top_srcdir)/build/mkdep.awk > $(builddir)/.deps || true
clean: clean-recursive clean-x
+2
View File
@@ -26,4 +26,6 @@ else
subdirs=''
fi
rm -f generated_lists
${MAKE:-make} -s -f build/build.mk AMFLAGS="$automake_flags"
+7 -6
View File
@@ -51,7 +51,7 @@ dnl ## All of these are normally in the extension directories.
dnl ## Diversion 5 is the last one. Here we generate files and clean up.
dnl ## This is where the version number is changed from now on!
AM_INIT_AUTOMAKE(php, 4.0.2-dev)
AM_INIT_AUTOMAKE(php, 4.0.2)
PHP_VERSION=$VERSION
echo "/* automatically generated by configure */" > php_version.h.new
@@ -73,6 +73,7 @@ dnl We want this one before the checks, so the checks can modify CFLAGS.
test -z "$CFLAGS" && auto_cflags=1
dnl Checks for programs.
AC_PROG_AWK
AC_PROG_YACC
if test "$YACC" != "bison -y"; then
AC_MSG_WARN(You will need bison if you want to regenerate the PHP parsers.)
@@ -95,7 +96,7 @@ case "$host_alias" in
CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS";;
*dgux*)
CPPFLAGS="$CPPFLAGS -D_BSD_TIMEOFDAY_FLAVOR";;
*rhapsody*)
*darwin*|*rhapsody*)
CPPFLAGS="$CPPFLAGS -traditional-cpp";;
esac
@@ -115,6 +116,9 @@ if test "$ac_cv_c_const" = "yes" ; then
LEX_CFLAGS="-DYY_USE_CONST"
fi
abs_srcdir=`(cd $srcdir; pwd)`
abs_builddir=`pwd`
sinclude(Zend/acinclude.m4)
sinclude(Zend/Zend.m4)
sinclude(TSRM/tsrm.m4)
@@ -410,9 +414,6 @@ fi
divert(4)
abs_srcdir=`(cd $srcdir; pwd)`
abs_builddir=`pwd`
PHP_ARG_WITH(config-file-path,whether to use a configuration file,
[ --with-config-file-path=PATH
@@ -551,7 +552,6 @@ if test "$PHP_PEAR" = "yes"; then
fi
PHP_OUTPUT(pear/pear)
PHP_OUTPUT(pear/run-tests)
PHP_OUTPUT(pear/phpize)
PHP_OUTPUT(pear/php-config)
PHP_OUTPUT(pear/PEAR.php)
@@ -695,6 +695,7 @@ PHP_SUBST(phplibdir)
PHP_SUBST(phptempdir)
PHP_SUBST(prefix)
PHP_SUBST(AWK)
PHP_SUBST(CC)
PHP_SUBST(CFLAGS)
PHP_SUBST(CONFIGURE_COMMAND)
+18
View File
@@ -1,3 +1,21 @@
# +----------------------------------------------------------------------+
# | PHP version 4.0 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Authors: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
+5 -5
View File
@@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Intermediate_Dir "Release_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MSSQL_EXPORTS" /D "COMPILE_DL_CALENDAR" /D "DBNTWIN32" /D ZTS=1 /YX /FD /c
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_CALENDAR" /D ZTS=1 /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALENDAR_EXPORTS" /D "COMPILE_DL_CALENDAR" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_CALENDAR=1 /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
@@ -53,8 +53,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib ntwdblib.lib /nologo /dll /machine:I386 /out:"MSSQL_65_Release/php_mssql.dll" /libpath:"..\..\Release_TS"
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_calendar.dll" /libpath:"..\..\Release_TS"
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_calendar.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
!ELSEIF "$(CFG)" == "calendar - Win32 Debug_TS"
@@ -70,7 +70,7 @@ LINK32=link.exe
# PROP Intermediate_Dir "Debug_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "mssql-70" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MSSQL_EXPORTS" /D "COMPILE_DL_CALENDAR" /D "DBNTWIN32" /D ZTS=1 /D MSSQL70=1 /YX /FD /c
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_CALENDAR" /D ZTS=1 /YX /FD /c
# ADD CPP /nologo /MDd /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALENDAR_EXPORTS" /D "COMPILE_DL_CALENDAR" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_CALENDAR=1 /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
@@ -80,7 +80,7 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib ntwdblib.lib /nologo /dll /machine:I386 /out:"MSSQL_65_Release/php_mssql.dll" /libpath:"..\..\Release_TS" /libpath:"mssql-70"
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts_debug.lib /nologo /dll /machine:I386 /out:"..\..\Debug_TS/php_calendar.dll" /libpath:"..\..\Debug_TS"
!ENDIF
+6
View File
@@ -0,0 +1,6 @@
# $Id$
LTLIBRARY_NAME = libccvs.la
LTLIBRARY_SOURCES = ccvs.c
include $(top_srcdir)/build/dynlib.mk
+7
View File
@@ -0,0 +1,7 @@
CCVS Module ToDo List
08/14/2000
Brendan W. McAdams <bmcadams@php.net>
-------------------------------------
- Return value of the final stats of an authorization should already be split out into a php aware associative
array, instead of having to do this at the PHP level. Right now we are splitting stuff out using text_value;
I'm evaluating the merits of having a seperate function for the 'finishing' of a sale....
+538
View File
@@ -0,0 +1,538 @@
/*
+----------------------------------------------------------------------+
| PHP version 4.0 |
+----------------------------------------------------------------------+
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Brendan W. McAdams <brendan@plexmedia.com> |
| Doug DeJulio <ddj@redhat.com> |
+----------------------------------------------------------------------+
*/
/*
* cvvs.c $Revision$ - PHP4 Interface to the RedHat CCVS API
* -------
* Interfaces RedHat's CCVS [Credit Card Verification System] <http://www.redhat.com/products/ccvs/>
* This code is ported from an original php3 interface written by RedHat's Doug DeJulio <ddj@redhat.com>
* The code was subsequently ported to the Zend API by Brendan W. McAdams <brendan@plexmedia.com>
* -------
*/
/*
* Code started on 2000.07.24@09.04.EST by Brendan W. McAdams <brendan@plexmedia.com>
* $Revision$
*/
static char const cvsid[] = "$Id$";
#include <php.h>
#include <stdlib.h>
#include <string.h>
#include <ccvs.h>
/*
* Create the Zend Internal hash construct to track this modules functions
*
* In case anyone is wondering why we use ccvs_<action> instead of cv_<action>,
* it's because we are directly importing functions of the actual CCVS, which uses functions that are
* cv_<action>, and we had problems implementing ZEND_NAMED_FE calls (bug in NAMED_FE? investigate
* later). We don't want our PHP calls to conflict with the C calls in the CCVS API.
*
* BWM - 2000.07.27@16.41.EST - Added FALIAS Calls. While I'm of the opinion that naming the
* functions in PHP ccvs_<action> is much more readable and clear to anyone reading the code than
* cv_<action>, It strikes me that many people coming from php3 -> php4 will need backwards
* compatibility. It was kind of careless to simply change the function calls (There were reasons other
* than readability behind this; the ZEND_NAMED_FE macro was misbehaving) and not provide for
* backwards compatibility - this *IS* an API and should scale with compatibility.
*
*/
function_entry ccvs_functions[] = {
PHP_FE(ccvs_init,NULL)
PHP_FALIAS(cv_init,ccvs_init,NULL)
PHP_FE(ccvs_done,NULL)
PHP_FALIAS(cv_done,ccvs_done,NULL)
PHP_FE(ccvs_new,NULL)
PHP_FALIAS(cv_new,ccvs_new,NULL)
PHP_FE(ccvs_add,NULL)
PHP_FALIAS(cv_add,ccvs_add,NULL)
PHP_FE(ccvs_delete,NULL)
PHP_FALIAS(cv_delete,ccvs_delete,NULL)
PHP_FE(ccvs_auth,NULL)
PHP_FALIAS(cv_auth,ccvs_auth,NULL)
PHP_FE(ccvs_return,NULL)
PHP_FALIAS(cv_return,ccvs_return,NULL)
PHP_FE(ccvs_reverse,NULL)
PHP_FALIAS(cv_reverse,ccvs_reverse,NULL)
PHP_FE(ccvs_sale,NULL)
PHP_FALIAS(cv_sale,ccvs_sale,NULL)
PHP_FE(ccvs_void,NULL)
PHP_FALIAS(cv_void,ccvs_void,NULL)
PHP_FE(ccvs_status,NULL)
PHP_FALIAS(cv_status,ccvs_status,NULL)
PHP_FE(ccvs_count,NULL)
PHP_FALIAS(cv_count,ccvs_count,NULL)
PHP_FE(ccvs_lookup,NULL)
PHP_FALIAS(cv_lookup,ccvs_lookup,NULL)
PHP_FE(ccvs_report,NULL)
PHP_FALIAS(cv_report,ccvs_report,NULL)
PHP_FE(ccvs_command,NULL)
PHP_FALIAS(cv_command,ccvs_command,NULL)
PHP_FE(ccvs_textvalue,NULL)
PHP_FALIAS(cv_textvalue,ccvs_textvalue,NULL)
{NULL,NULL}
};
/* End function declarations */
/* Zend Engine Exports - module information */
/* Declare our module to the Zend engine */
zend_module_entry ccvs_module_entry = {
"CCVS",
ccvs_functions,
NULL,NULL,NULL,NULL,
PHP_MINFO(ccvs),
STANDARD_MODULE_PROPERTIES
};
/* Full Functions (The actual CCVS functions and any internal php hooked functions such as MINFO) */
PHP_FUNCTION(ccvs_init) /* cv_init() */
{
zval **name;
void *vsess;
char *p;
if ((ZEND_NUM_ARGS() != 1) || (zend_get_parameters_ex(1, &name) != SUCCESS))
/* accept only SUCCESS in case something weird gets returned instead of 'FAILURE' on fail */
{
WRONG_PARAM_COUNT;
}
convert_to_string_ex(name);
vsess = cv_init((*name)->value.str.val);
/*
* -- In the case that we don't run error checking on the return value... --
* On 32 bit systems a failure of the cv_init call returns 0,0,0,0 ; on 64 bit systems its 0,0,0,0,0,0,0,0
* This unconsistent error (not to mention a string of comma seperated zeros in and of itself) is hard to
* Trap for in PHP (or any language). However, we can also grab cv_init to return CV_SESS_BAD on
* failure at the C API level, and return a set, fixed error code to the user which the user then knows to
* trap for... e.g. a NULL Value which PHP can then trap by:
* if (!($string = cv_init($config)) { or some such...
*/
if (vsess == CV_SESS_BAD) /* if the cv_init() call failed... */
{
p = ""; /* set p, the value we will return, to NULL */
}
else /* we got a valid session returned, which means it worked */
{
p = hks_ptr_ptrtostring(vsess); /* Convert the (void*) into a string representation. */
}
RETVAL_STRING(p, 1);
free(p);
return;
}
PHP_FUNCTION(ccvs_done) /* cv_done() */
{
zval **sess;
void *vsess;
if ((ZEND_NUM_ARGS() != 1) || (zend_get_parameters_ex(1, &sess) != SUCCESS)) /* accept only SUCCESS in case something weird gets returned instead of 'FAILURE' on fail */
{
WRONG_PARAM_COUNT;
}
convert_to_string_ex(sess);
/* Convert from the string representation back to a (void*) */
vsess = hks_ptr_stringtoptr((*sess)->value.str.val);
cv_done(vsess);
RETURN_STRING("OK", 1);
}
PHP_FUNCTION(ccvs_new) /* cv_new() */
{
zval **psess;
zval **pinvoice;
void *sess;
char *invoice;
int r;
if ((ZEND_NUM_ARGS() != 2) || (zend_get_parameters_ex(2, &psess, &pinvoice) != SUCCESS)) /* accept only SUCCESS in case something weird gets returned instead of 'FAILURE' on fail */
{
WRONG_PARAM_COUNT;
}
convert_to_string_ex(psess);
sess = hks_ptr_stringtoptr((*psess)->value.str.val);
convert_to_string_ex(pinvoice);
invoice = (*pinvoice)->value.str.val;
r = cv_new(sess, invoice);
RETURN_STRING(cv_ret2str(r), 1);
}
PHP_FUNCTION(ccvs_add) /* cv_add() */
{
zval **psess;
zval **pinvoice;
zval **pargtype;
zval **pargval;
void *sess;
char *invoice;
int argtype;
char *argval;
register int r;
if ((ZEND_NUM_ARGS() != 4) || (zend_get_parameters_ex(4, &psess, &pinvoice, &pargtype, &pargval) != SUCCESS)) /* accept only SUCCESS in case something weird gets returned instead of 'FAILURE' on fail */
{
WRONG_PARAM_COUNT;
}
/* Get meaningful arguments. */
convert_to_string_ex(psess);
convert_to_string_ex(pinvoice);
convert_to_string_ex(pargtype);
convert_to_string_ex(pargval);
sess = hks_ptr_stringtoptr((*psess)->value.str.val);
invoice = (*pinvoice)->value.str.val;
argtype = cv_str2arg((*pargtype)->value.str.val);
argval = (*pargval)->value.str.val;
r = cv_add(sess, invoice, argtype, argval);
RETURN_STRING(cv_ret2str(r), 1);
}
/*
* cv_create can't be implemented because of vararg limits in PHP3's C API.
* (COMMENT BY DDJ [from original code])
*
* BWM: I looked into this, checking in on what cv_create was; it is a deprecated function left in for
* backwards compatibility according
* to the CCVS C API ref. I didn't try to implement it for that reason. If anyone needs it, they can add it in
* themselves I'm sure.
*/
PHP_FUNCTION(ccvs_delete) /* cv_delete() */
{
zval **psess;
zval **pinvoice;
void *sess;
char *invoice;
register int r;
if ((ZEND_NUM_ARGS() != 2) || (zend_get_parameters_ex(2, &psess, &pinvoice) != SUCCESS)) /* accept only SUCCESS in case something weird gets returned instead of 'FAILURE' on fail */
{
WRONG_PARAM_COUNT;
}
convert_to_string_ex(psess);
convert_to_string_ex(pinvoice);
invoice = (*pinvoice)->value.str.val;
sess = hks_ptr_stringtoptr((*psess)->value.str.val);
r = cv_delete(sess, invoice);
RETURN_STRING(cv_ret2str(r), 1);
}
PHP_FUNCTION(ccvs_auth) /* cv_auth() */
{
zval **psess;
zval **pinvoice;
void *sess;
char *invoice;
register int r;
if ((ZEND_NUM_ARGS() != 2) || (zend_get_parameters_ex(2, &psess, &pinvoice) != SUCCESS)) /* accept only SUCCESS in case something weird gets returned instead of 'FAILURE' on fail */
{
WRONG_PARAM_COUNT;
}
convert_to_string_ex(psess);
convert_to_string_ex(pinvoice);
invoice = (*pinvoice)->value.str.val;
sess = hks_ptr_stringtoptr((*psess)->value.str.val);
r = cv_auth(sess, invoice);
RETURN_STRING(cv_ret2str(r), 1);
}
PHP_FUNCTION(ccvs_return) /* cv_return() */
{
zval **psess;
zval **pinvoice;
void *sess;
char *invoice;
register int r;
if ((ZEND_NUM_ARGS() != 2) || (zend_get_parameters_ex(2, &psess, &pinvoice) != SUCCESS)) /* accept only SUCCESS in case something weird gets returned instead of 'FAILURE' on fail */
{
WRONG_PARAM_COUNT;
}
convert_to_string_ex(psess);
convert_to_string_ex(pinvoice);
invoice = (*pinvoice)->value.str.val;
sess = hks_ptr_stringtoptr((*psess)->value.str.val);
r = cv_return(sess, invoice);
RETURN_STRING(cv_ret2str(r), 1);
}
PHP_FUNCTION(ccvs_reverse) /* cv_reverse() */
{
zval **psess;
zval **pinvoice;
void *sess;
char *invoice;
register int r;
if ((ZEND_NUM_ARGS() != 2) || (zend_get_parameters_ex(2, &psess, &pinvoice) != SUCCESS)) /* accept only SUCCESS in case something weird gets returned instead of 'FAILURE' on fail */
{
WRONG_PARAM_COUNT;
}
convert_to_string_ex(psess);
convert_to_string_ex(pinvoice);
invoice = (*pinvoice)->value.str.val;
sess = hks_ptr_stringtoptr((*psess)->value.str.val);
r = cv_reverse(sess, invoice);
RETURN_STRING(cv_ret2str(r), 1);
}
PHP_FUNCTION(ccvs_sale) /* cv_sale() */
{
zval **psess;
zval **pinvoice;
void *sess;
char *invoice;
register int r;
if ((ZEND_NUM_ARGS() != 2) || (zend_get_parameters_ex(ht, 2, &psess, &pinvoice) != SUCCESS)) /* accept only SUCCESS in case something weird gets returned instead of 'FAILURE' on fail */
{
WRONG_PARAM_COUNT;
}
convert_to_string_ex(psess);
convert_to_string_ex(pinvoice);
invoice = (*pinvoice)->value.str.val;
sess = hks_ptr_stringtoptr((*psess)->value.str.val);
r = cv_sale(sess, invoice);
RETURN_STRING(cv_ret2str(r), 1);
}
PHP_FUNCTION(ccvs_void) /* cv_void() */
{
zval **psess;
zval **pinvoice;
void *sess;
char *invoice;
register int r;
if ((ZEND_NUM_ARGS() != 2) || (zend_get_parameters_ex(2, &psess, &pinvoice) != SUCCESS)) /* accept only SUCCESS in case something weird gets returned instead of 'FAILURE' on fail */
{
WRONG_PARAM_COUNT;
}
convert_to_string_ex(psess);
convert_to_string_ex(pinvoice);
invoice = (*pinvoice)->value.str.val;
sess = hks_ptr_stringtoptr((*psess)->value.str.val);
r = cv_void(sess, invoice);
RETURN_STRING(cv_ret2str(r), 1);
}
PHP_FUNCTION(ccvs_status) /* cv_status() */
{
zval **psess;
zval **pinvoice;
void *sess;
char *invoice;
register int r;
if ((ZEND_NUM_ARGS() != 2) || (zend_get_parameters_ex(2, &psess, &pinvoice) != SUCCESS)) /* accept only SUCCESS in case something weird gets returned instead of 'FAILURE' on fail */
{
WRONG_PARAM_COUNT;
}
convert_to_string_ex(psess);
convert_to_string_ex(pinvoice);
invoice = (*pinvoice)->value.str.val;
sess = hks_ptr_stringtoptr((*psess)->value.str.val);
r = cv_status(sess, invoice);
RETURN_STRING(cv_stat2str(r), 1);
}
PHP_FUNCTION(ccvs_count) /* cv_count() */
{
zval **psess;
zval **ptype;
void *sess;
int type;
register int r;
if ((ZEND_NUM_ARGS() != 2) || (zend_get_parameters_ex(2, &psess, &ptype) != SUCCESS)) /* accept only SUCCESS in case something weird gets returned instead of 'FAILURE' on fail */
{
WRONG_PARAM_COUNT;
}
convert_to_string_ex(psess);
convert_to_string_ex(ptype);
type = cv_str2stat((*ptype)->value.str.val);
sess = hks_ptr_stringtoptr((*psess)->value.str.val);
r = cv_count(sess, type);
RETURN_LONG(r);
}
PHP_FUNCTION(ccvs_lookup) /* cv_lookup() */
{
zval **psess;
zval **ptype;
zval **pinum;
void *sess;
int type;
long inum;
register int r;
if ((ZEND_NUM_ARGS() != 3) || (zend_get_parameters_ex(3, &psess, &ptype, &pinum) != SUCCESS)) /* accept only SUCCESS in case something weird gets returned instead of 'FAILURE' on fail */
{
WRONG_PARAM_COUNT;
}
convert_to_string_ex(psess);
sess = hks_ptr_stringtoptr((*psess)->value.str.val);
convert_to_string_ex(ptype);
type = cv_str2stat((*ptype)->value.str.val);
convert_to_long_ex(pinum);
inum = (*pinum)->value.lval;
r = cv_lookup(sess, type, inum);
RETURN_STRING(cv_textvalue(sess), 1);
}
PHP_FUNCTION(ccvs_report) /* cv_report() */
{
zval **psess;
zval **ptype;
void *sess;
int type;
long inum;
register int r;
if ((ZEND_NUM_ARGS() != 2) || (zend_get_parameters_ex(2, &psess, &ptype) != SUCCESS)) /* accept only SUCCESS in case something weird gets returned instead of 'FAILURE' on fail */
{
WRONG_PARAM_COUNT;
}
convert_to_string_ex(psess);
sess = hks_ptr_stringtoptr((*psess)->value.str.val);
convert_to_string_ex(ptype);
type = cv_str2rep((*ptype)->value.str.val);
r = cv_report(sess, type);
RETURN_STRING(cv_stat2str(r), 1);
}
PHP_FUNCTION(ccvs_command) /* cv_command() */
{
zval **psess;
zval **ptype;
zval **pargval;
void *sess;
int type;
register int r;
char *argval;
if ((ZEND_NUM_ARGS() != 3) || (zend_get_parameters_ex(3, &psess, &ptype, &pargval) != SUCCESS)) /* accept only SUCCESS in case something weird gets returned instead of 'FAILURE' on fail */
{
WRONG_PARAM_COUNT;
}
convert_to_string_ex(psess);
sess = hks_ptr_stringtoptr((*psess)->value.str.val);
convert_to_string_ex(ptype);
type = cv_str2cmd((*ptype)->value.str.val);
convert_to_string_ex(pargval);
argval = (*pargval)->value.str.val;
r = cv_command(sess, type, argval);
RETURN_STRING(cv_stat2str(r), 1);
}
PHP_FUNCTION(ccvs_textvalue) /* cv_textvalue() */
{
zval **psess;
void *sess;
if ((ZEND_NUM_ARGS() != 1) || (zend_get_parameters_ex(1, &psess) != SUCCESS)) /* accept only SUCCESS in case something weird gets returned instead of 'FAILURE' on fail */
{
WRONG_PARAM_COUNT;
}
convert_to_string_ex(psess);
sess = hks_ptr_stringtoptr((*psess)->value.str.val);
RETURN_STRING(cv_textvalue(sess), 1);
}
/*
* Our Info Function which reports info on this module out to PHP's phpinfo() function
* Brendan W. McAdams <brendan@plexmedia.com> on 2000.07.26@16:22.EST
*/
PHP_MINFO_FUNCTION(ccvs)
{
php_info_print_table_start();
php_info_print_table_header(2, "RedHat CCVS support", "enabled");
php_info_print_table_row(2,"CCVS Support by","Brendan W. McAdams &lt;brendan@plexmedia.com&gt;<br>&amp; Doug DeJulio &lt;ddj@redhat.com&gt;");
php_info_print_table_row(2,"Release ID",cvsid);
php_info_print_table_row(2,"This Release Certified For CCVS Versions","3.0 and greater");
php_info_print_table_end();
/* DISPLAY_INI_ENTRIES(); */
/*
* In the future, we will probably have entries in php.ini for runtime config, in which case we will
* Uncomment the DISPLAY_INI_ENTRIES call...
*/
}
+59
View File
@@ -0,0 +1,59 @@
/*
+----------------------------------------------------------------------+
| PHP version 4.0 |
+----------------------------------------------------------------------+
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Brendan W. McAdams <brendan@plexmedia.com> |
| Doug DeJulio <ddj@redhat.com> |
+----------------------------------------------------------------------+
*/
#include <cv_api.h>
extern zend_module_entry ccvs_module_entry;
#define ccvs_module_ptr &ccvs_module_entry
#define phpext_ccvs_ptr ccvs_module_ptr
/* Declare functions not in cv_api.h but in libccvs.a. */
char *hks_ptr_ptrtostring(void *vptr);
void *hks_ptr_stringtoptr(char *str);
/* Declare the Functions this Module Makes Available to Zend */
/* Pre-declarations of functions */
PHP_FUNCTION(ccvs_init);
PHP_FUNCTION(ccvs_done);
PHP_FUNCTION(ccvs_new);
PHP_FUNCTION(ccvs_add);
PHP_FUNCTION(ccvs_delete);
PHP_FUNCTION(ccvs_auth);
PHP_FUNCTION(ccvs_return);
PHP_FUNCTION(ccvs_reverse);
PHP_FUNCTION(ccvs_sale);
PHP_FUNCTION(ccvs_void);
PHP_FUNCTION(ccvs_status);
PHP_FUNCTION(ccvs_count);
PHP_FUNCTION(ccvs_lookup);
PHP_FUNCTION(ccvs_report);
PHP_FUNCTION(ccvs_command);
PHP_FUNCTION(ccvs_textvalue);
PHP_MINFO_FUNCTION(ccvs);
/* Declare the information we need to dynamically link this module later */
#if COMPILE_DL
DLEXPORT zend_module_entry *get_module(void) { return &ccvs_module_entry; }
#endif
/* End exports */
+27
View File
@@ -0,0 +1,27 @@
dnl $Id$
dnl config.m4 for PHP4 CCVS Extension
AC_MSG_CHECKING(CCVS Support)
AC_ARG_WITH(ccvs,
[ --with-ccvs[=DIR] Compile CCVS support into PHP4.
Please specify your CCVS base install directory as DIR.
],
[
if test "$withval" != "no"; then
CCVS_DIR="$withval"
test -f $withval/include/cv_api.h && CCVS_INCLUDE_DIR="$withval/include"
test -f $withval/lib/libccvs.a && CCVS_LIB_DIR="$withval/lib"
if test -n "$CCVS_DIR"; then
AC_MSG_RESULT(yes)
PHP_EXTENSION(ccvs)
LIBS="$LIBS -L$CCVS_LIB_DIR"
AC_ADD_LIBRARY_WITH_PATH(ccvs, $CCVS_LIB_DIR)
AC_ADD_INCLUDE($CCVS_INCLUDE_DIR)
else
AC_MSG_RESULT(no)
fi
fi
],[
AC_MSG_RESULT(no)
])
+111
View File
@@ -0,0 +1,111 @@
# Microsoft Developer Studio Project File - Name="cpdf" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=cpdf - Win32 Release_TS
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "cpdf.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "cpdf.mak" CFG="cpdf - Win32 Release_TS"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "cpdf - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "cpdf - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "cpdf - Win32 Release_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release_TS"
# PROP BASE Intermediate_Dir "Release_TS"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release_TS"
# PROP Intermediate_Dir "Release_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_CPDF" /D ZTS=1 /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\..\bindlib_w32" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPDF_EXPORTS" /D "COMPILE_DL_CPDF" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_CPDFLIB=1 /D "HAVE_UNISTD_H" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x406 /d "NDEBUG"
# ADD RSC /l 0x406 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib cpdfi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386
# ADD LINK32 php4ts.lib zendts.lib user32.lib winspool.lib cpdf.lib php_gd.lib kernel32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_cpdf.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "cpdf - Win32 Debug_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Debug_TS"
# PROP BASE Intermediate_Dir "Debug_TS"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Debug_TS"
# PROP Intermediate_Dir "Debug_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_CPDF" /D ZTS=1 /D MSSQL70=1 /YX /FD /c
# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\..\bindlib_w32" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPDF_EXPORTS" /D "COMPILE_DL_CPDF" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_CPDFLIB=1 /D "HAVE_UNISTD_H" /FR /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x406 /d "NDEBUG"
# ADD RSC /l 0x406 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib cpdfi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386
# ADD LINK32 cpdf.lib php4ts_debug.lib user32.lib winspool.lib mckcrypto.lib kernel32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /debug /machine:I386 /nodefaultlib:"msvcrtd.lib" /out:"..\..\Debug_TS/php_cpdf.dll" /libpath:"..\..\Debug_TS"
# SUBTRACT LINK32 /pdb:none
!ENDIF
# Begin Target
# Name "cpdf - Win32 Release_TS"
# Name "cpdf - Win32 Debug_TS"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\cpdf.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\php_cpdf.h
# End Source File
# End Group
# End Target
# End Project
+381 -109
View File
@@ -24,8 +24,18 @@
#if HAVE_CURL
#include <stdio.h>
#ifdef PHP_WIN32
#include <winsock.h>
#include <sys/types.h>
#define fstat(handle, buff) _fstat(handle, buff)
#define stat _stat
#endif
#include <curl/curl.h>
#include <curl/easy.h>
#include <sys/stat.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "ext/standard/info.h"
#include "php_curl.h"
@@ -35,12 +45,45 @@ int curl_globals_id;
php_curl_globals curl_globals;
#endif
#ifdef PHP_WIN32
static void win32_cleanup();
static void win32_init();
static void win32_cleanup()
{
WSACleanup();
}
static CURLcode win32_init()
{
WORD wVersionRequested;
WSADATA wsaData;
int err;
wVersionRequested = MAKEWORD(1, 1);
err = WSAStartup(wVersionRequested, &wsaData);
if (err != 0) return CURLE_FAILED_INIT;
if ( LOBYTE(wsaData.wVersion) != 1 ||
HIBYTE(wsaData.wVersion) != 1 ) {
WSACleanup();
return CURLE_FAILED_INIT;
}
return CURLE_OK;
}
#else
static CURLcode win32_init(void) { return CURLE_OK; }
#define win32_cleanup()
#endif
function_entry curl_functions[] = {
PHP_FE (curl_init, NULL)
PHP_FE (curl_version, NULL)
PHP_FE (curl_setopt, NULL)
PHP_FE (curl_exec, NULL)
PHP_FE (curl_close, NULL)
PHP_FE(curl_init, NULL)
PHP_FE(curl_version, NULL)
PHP_FE(curl_setopt, NULL)
PHP_FE(curl_exec, NULL)
PHP_FE(curl_close, NULL)
{NULL, NULL, NULL}
};
@@ -48,7 +91,7 @@ zend_module_entry curl_module_entry = {
"curl",
curl_functions,
PHP_MINIT(curl),
NULL,
PHP_MSHUTDOWN(curl),
NULL,
NULL,
PHP_MINFO(curl),
@@ -59,131 +102,190 @@ zend_module_entry curl_module_entry = {
ZEND_GET_MODULE (curl)
#endif
static void php_curl_close (CURL *cp);
static void php_curl_close (CURL *cp)
{
curl_easy_cleanup (cp);
}
static void php_curl_close(php_curl *curl_handle);
static int php_curl_error_translator(CURLcode err);
PHP_MINFO_FUNCTION(curl)
{
php_info_print_table_start ();
php_info_print_table_row (2, "CURL support", "enabled");
php_info_print_table_row (2, "CURL Information", curl_version());
php_info_print_table_end ();
php_info_print_table_start();
php_info_print_table_row(2, "CURL support", "enabled");
php_info_print_table_row(2, "CURL Information", curl_version());
php_info_print_table_end();
}
PHP_MINIT_FUNCTION(curl)
{
CURLLS_FETCH();
CURLG(le_curl) = register_list_destructors(php_curl_close, NULL);
CURLG(le_curl) = register_list_destructors (php_curl_close, NULL);
REGISTER_LONG_CONSTANT ("CURLOPT_PORT", CURLOPT_PORT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_FILE", CURLOPT_FILE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_INFILE", CURLOPT_INFILE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_INFILESIZE", CURLOPT_INFILESIZE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_URL", CURLOPT_URL, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_PROXY", CURLOPT_PROXY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_VERBOSE", CURLOPT_VERBOSE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_HEADER", CURLOPT_HEADER, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_NOPROGRESS", CURLOPT_NOPROGRESS, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_NOBODY", CURLOPT_NOBODY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_FAILONERROR", CURLOPT_FAILONERROR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_UPLOAD", CURLOPT_UPLOAD, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_POST", CURLOPT_POST, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_FTPLISTONLY", CURLOPT_FTPLISTONLY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_FTPAPPEND", CURLOPT_FTPAPPEND, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_NETRC", CURLOPT_NETRC, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_FOLLOWLOCATION", CURLOPT_FOLLOWLOCATION, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_FTPASCII", CURLOPT_FTPASCII, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_PUT", CURLOPT_PUT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_MUTE", CURLOPT_MUTE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_USERPWD", CURLOPT_USERPWD, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_PROXYUSERPWD", CURLOPT_PROXYUSERPWD, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_RANGE", CURLOPT_RANGE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_TIMEOUT", CURLOPT_TIMEOUT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_POSTFIELDS", CURLOPT_POSTFIELDS, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_REFERER", CURLOPT_REFERER, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_USERAGENT", CURLOPT_USERAGENT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_FTPPORT", CURLOPT_FTPPORT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_LOW_SPEED_LIMIT", CURLOPT_LOW_SPEED_LIMIT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_LOW_SPEED_TIME", CURLOPT_LOW_SPEED_TIME, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_RESUME_FROM", CURLOPT_RESUME_FROM, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_COOKIE", CURLOPT_COOKIE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_SSLCERT", CURLOPT_SSLCERT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_SSLCERTPASSWD", CURLOPT_SSLCERTPASSWD, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_WRITEHEADER", CURLOPT_WRITEHEADER, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_COOKIEFILE", CURLOPT_COOKIEFILE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_SSLVERSION", CURLOPT_SSLVERSION, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_TIMECONDITION", CURLOPT_TIMECONDITION, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_TIMEVALUE", CURLOPT_TIMEVALUE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_CUSTOMREQUEST", CURLOPT_CUSTOMREQUEST, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_STDERR", CURLOPT_STDERR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_WRITEINFO", CURLOPT_WRITEINFO, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT ("CURLOPT_TRANSFERTEXT", CURLOPT_TRANSFERTEXT, CONST_CS | CONST_PERSISTENT);
/* Constants for curl_setopt() */
REGISTER_LONG_CONSTANT("CURLOPT_PORT", CURLOPT_PORT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_FILE", CURLOPT_FILE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_INFILE", CURLOPT_INFILE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_INFILESIZE", CURLOPT_INFILESIZE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_URL", CURLOPT_URL, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_PROXY", CURLOPT_PROXY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_VERBOSE", CURLOPT_VERBOSE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_HEADER", CURLOPT_HEADER, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_NOPROGRESS", CURLOPT_NOPROGRESS, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_NOBODY", CURLOPT_NOBODY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_FAILONERROR", CURLOPT_FAILONERROR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_UPLOAD", CURLOPT_UPLOAD, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_POST", CURLOPT_POST, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_FTPLISTONLY", CURLOPT_FTPLISTONLY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_FTPAPPEND", CURLOPT_FTPAPPEND, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_NETRC", CURLOPT_NETRC, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_FOLLOWLOCATION", CURLOPT_FOLLOWLOCATION, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_FTPASCII", CURLOPT_FTPASCII, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_PUT", CURLOPT_PUT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_MUTE", CURLOPT_MUTE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_USERPWD", CURLOPT_USERPWD, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_PROXYUSERPWD", CURLOPT_PROXYUSERPWD, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_RANGE", CURLOPT_RANGE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_TIMEOUT", CURLOPT_TIMEOUT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_POSTFIELDS", CURLOPT_POSTFIELDS, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_REFERER", CURLOPT_REFERER, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_USERAGENT", CURLOPT_USERAGENT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_FTPPORT", CURLOPT_FTPPORT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_LOW_SPEED_LIMIT", CURLOPT_LOW_SPEED_LIMIT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_LOW_SPEED_TIME", CURLOPT_LOW_SPEED_TIME, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_RESUME_FROM", CURLOPT_RESUME_FROM, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_COOKIE", CURLOPT_COOKIE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_SSLCERT", CURLOPT_SSLCERT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_SSLCERTPASSWD", CURLOPT_SSLCERTPASSWD, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_WRITEHEADER", CURLOPT_WRITEHEADER, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_COOKIEFILE", CURLOPT_COOKIEFILE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_SSLVERSION", CURLOPT_SSLVERSION, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_TIMECONDITION", CURLOPT_TIMECONDITION, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_TIMEVALUE", CURLOPT_TIMEVALUE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_CUSTOMREQUEST", CURLOPT_CUSTOMREQUEST, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_STDERR", CURLOPT_STDERR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_WRITEINFO", CURLOPT_WRITEINFO, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_TRANSFERTEXT", CURLOPT_TRANSFERTEXT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLOPT_RETURNTRANSFER", CURLOPT_RETURNTRANSFER, CONST_CS | CONST_PERSISTENT);
/* Error Constants */
REGISTER_LONG_CONSTANT("CURLE_OK", CE_OK, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_UNSUPPORTED_PROTOCOL", CE_UNSUPPORTED_PROTOCOL, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_FAILED_INIT", CE_FAILED_INIT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_URL_MALFORMAT", CE_URL_MALFORMAT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_URL_MALFORMAT_USER", CE_URL_MALFORMAT_USER, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_COULDNT_RESOLVE_PROXY", CE_COULDNT_RESOLVE_PROXY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_COULDNT_RESOLVE_HOST", CE_COULDNT_RESOLVE_HOST, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_COULDNT_CONNECT", CE_COULDNT_CONNECT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_FTP_WEIRD_SERVER_REPLY", CE_FTP_WEIRD_SERVER_REPLY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_FTP_ACCESS_DENIED", CE_FTP_ACCESS_DENIED, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_FTP_USER_PASSWORD_INCORRECT", CE_FTP_USER_PASSWORD_INCORRECT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_FTP_WEIRD_PASS_REPLY", CE_FTP_WEIRD_PASS_REPLY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_FTP_WEIRD_USER_REPLY", CE_FTP_WEIRD_USER_REPLY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_FTP_WEIRD_PASV_REPLY", CE_FTP_WEIRD_PASV_REPLY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_FTP_WEIRD_227_FORMAT", CE_FTP_WEIRD_227_FORMAT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_FTP_CANT_GET_HOST", CE_FTP_CANT_GET_HOST, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_FTP_CANT_RECONNECT", CE_FTP_CANT_RECONNECT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_FTP_COULDNT_SET_BINARY", CE_FTP_COULDNT_SET_BINARY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_PARTIAL_FILE", CE_PARTIAL_FILE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_FTP_COULDNT_RETR_FILE", CE_FTP_COULDNT_RETR_FILE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_FTP_WRITE_ERROR", CE_FTP_WRITE_ERROR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_FTP_QUOTE_ERROR", CE_FTP_QUOTE_ERROR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_HTTP_NOT_FOUND", CE_HTTP_NOT_FOUND, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_WRITE_ERROR", CE_WRITE_ERROR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_MALFORMAT_USER", CE_MALFORMAT_USER, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_FTP_COULDNT_STOR_FILE", CE_FTP_COULDNT_STOR_FILE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_READ_ERROR", CE_READ_ERROR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_OUT_OF_MEMORY", CE_OUT_OF_MEMORY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_OPERATION_TIMEOUTED", CE_OPERATION_TIMEOUTED, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_FTP_COULDNT_SET_ASCII", CE_FTP_COULDNT_SET_ASCII, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_FTP_PORT_FAILED", CE_FTP_PORT_FAILED, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_FTP_COULDNT_USE_REST", CE_FTP_COULDNT_USE_REST, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_FTP_COULDNT_GET_SIZE", CE_FTP_COULDNT_GET_SIZE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_HTTP_RANGE_ERROR", CE_HTTP_RANGE_ERROR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_HTTP_POST_ERROR", CE_HTTP_POST_ERROR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_SSL_CONNECT_ERROR", CE_SSL_CONNECT_ERROR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_FTP_BAD_DOWNLOAD_RESUME", CE_FTP_BAD_DOWNLOAD_RESUME, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_FILE_COULDNT_READ_FILE", CE_FILE_COULDNT_READ_FILE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_LDAP_CANNOT_BIND", CE_LDAP_CANNOT_BIND, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_LDAP_SEARCH_FAILED", CE_LDAP_SEARCH_FAILED, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_LIBRARY_NOT_FOUND", CE_LIBRARY_NOT_FOUND, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_FUNCTION_NOT_FOUND", CE_FUNCTION_NOT_FOUND, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_ABORTED_BY_CALLBACK", CE_ABORTED_BY_CALLBACK, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_BAD_FUNCTION_ARGUMENT", CE_BAD_FUNCTION_ARGUMENT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURLE_BAD_CALLING_ORDER", CE_BAD_CALLING_ORDER, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CURL_LAST", C_LAST, CONST_CS | CONST_PERSISTENT);
win32_init();
return SUCCESS;
}
/* {{{ proto string curl_version ()
PHP_MSHUTDOWN_FUNCTION(curl)
{
win32_cleanup();
}
/* {{{ proto string curl_version (void)
Return the CURL version string. */
PHP_FUNCTION (curl_version)
{
RETURN_STRING(curl_version(),1);
RETURN_STRING(curl_version(), 1);
}
/* }}} */
/* {{{ proto int curl_init ([string url])
Initialize a CURL session */
PHP_FUNCTION (curl_init)
PHP_FUNCTION(curl_init)
{
zval **uUrl;
CURL *cp;
int numArgs = ZEND_NUM_ARGS();
zval **u_url;
php_curl *curl_handle;
int argcount = ZEND_NUM_ARGS();
CURLLS_FETCH();
if (numArgs < 0 || numArgs > 1 ||
zend_get_parameters_ex (numArgs, &uUrl) == FAILURE) {
if (argcount < 0 || argcount > 1 ||
zend_get_parameters_ex(argcount, &u_url) == FAILURE) {
WRONG_PARAM_COUNT;
}
cp = curl_easy_init ();
curl_handle->cp = curl_easy_init();
if (!cp) {
php_error (E_ERROR, "Cannot initialize CURL Handle");
if (!curl_handle->cp) {
php_error(E_ERROR, "Cannot initialize CURL Handle");
RETURN_FALSE;
}
if (numArgs > 0) {
convert_to_string_ex (uUrl);
curl_easy_setopt (cp, CURLOPT_URL, Z_STRVAL_PP (uUrl));
if (argcount > 0) {
convert_to_string_ex(u_url);
curl_easy_setopt(curl_handle->cp, CURLOPT_URL, Z_STRVAL_PP(u_url));
}
curl_easy_setopt(cp, CURLOPT_NOPROGRESS, 1);
curl_easy_setopt(cp, CURLOPT_VERBOSE, 0);
curl_easy_setopt(curl_handle->cp, CURLOPT_NOPROGRESS, 1);
curl_easy_setopt(curl_handle->cp, CURLOPT_VERBOSE, 0);
ZEND_REGISTER_RESOURCE (return_value, cp, CURLG(le_curl));
curl_handle->output_file = 0;
curl_handle->php_stdout = 1;
ZEND_REGISTER_RESOURCE(return_value, curl_handle, CURLG(le_curl));
}
/* }}} */
/* {{{ proto bool curl_setopt (int ch, string option, mixed value)
Set an option for a CURL transfer */
PHP_FUNCTION (curl_setopt)
PHP_FUNCTION(curl_setopt)
{
zval **uCurlId, **uCurlOption, **uCurlValue;
CURL *cp;
zval **u_curl_id, **u_curl_option, **u_curl_value;
php_curl *curl_handle;
CURLcode ret;
int option;
CURLLS_FETCH();
if (ZEND_NUM_ARGS() != 3 ||
zend_get_parameters_ex (3, &uCurlId, &uCurlOption, &uCurlValue) == FAILURE) {
zend_get_parameters_ex(3, &u_curl_id, &u_curl_option, &u_curl_value) == FAILURE) {
WRONG_PARAM_COUNT;
}
ZEND_FETCH_RESOURCE (cp, CURL *, uCurlId, -1, "CURL Handle", CURLG(le_curl));
ZEND_FETCH_RESOURCE(curl_handle, php_curl *, u_curl_id, -1, "CURL Handle", CURLG(le_curl));
convert_to_long_ex (uCurlOption);
option = Z_LVAL_PP (uCurlOption);
convert_to_long_ex(u_curl_option);
option = Z_LVAL_PP(u_curl_option);
if (option == CURLOPT_INFILESIZE || option == CURLOPT_VERBOSE ||
option == CURLOPT_HEADER || option == CURLOPT_NOPROGRESS ||
@@ -197,8 +299,8 @@ PHP_FUNCTION (curl_setopt)
option == CURLOPT_SSLVERSION || option == CURLOPT_TIMECONDITION ||
option == CURLOPT_TIMEVALUE || option == CURLOPT_TRANSFERTEXT) {
convert_to_long_ex (uCurlValue);
ret = curl_easy_setopt (cp, option, Z_LVAL_PP (uCurlValue));
convert_to_long_ex(u_curl_value);
ret = curl_easy_setopt(curl_handle->cp, option, Z_LVAL_PP(u_curl_value));
} else if (option == CURLOPT_URL || option == CURLOPT_PROXY ||
option == CURLOPT_USERPWD || option == CURLOPT_PROXYUSERPWD ||
@@ -208,47 +310,111 @@ PHP_FUNCTION (curl_setopt)
option == CURLOPT_SSLCERTPASSWD || option == CURLOPT_COOKIEFILE ||
option == CURLOPT_CUSTOMREQUEST) {
convert_to_string_ex (uCurlValue);
ret = curl_easy_setopt (cp, option, Z_STRVAL_PP (uCurlValue));
convert_to_string_ex(u_curl_value);
ret = curl_easy_setopt(curl_handle->cp, option, Z_STRVAL_PP(u_curl_value));
} else if (option == CURLOPT_FILE || option == CURLOPT_INFILE ||
option == CURLOPT_WRITEHEADER || option == CURLOPT_STDERR) {
FILE *fp;
ZEND_FETCH_RESOURCE (fp, FILE *, uCurlValue, -1, "File-handle", php_file_le_fopen ());
ret = curl_easy_setopt (cp, option, fp);
}
ZEND_FETCH_RESOURCE(fp, FILE *, u_curl_value, -1, "File-handle", php_file_le_fopen());
ret = curl_easy_setopt(curl_handle->cp, option, fp);
if (option == CURLOPT_FILE) {
curl_handle->output_file = Z_LVAL_PP(u_curl_value);
curl_handle->php_stdout = 0;
}
} else if (option == CURLOPT_RETURNTRANSFER) {
if (ret == CURLE_OK) {
RETURN_TRUE;
} else {
RETURN_FALSE;
convert_to_long_ex(u_curl_value);
curl_handle->return_transfer = Z_LVAL_PP(u_curl_value);
curl_handle->php_stdout = 0;
}
RETURN_LONG(php_curl_error_translator(ret));
}
/* }}} */
/* {{{ proto bool curl_exec (int ch)
Perform a CURL session */
PHP_FUNCTION (curl_exec)
PHP_FUNCTION(curl_exec)
{
zval **uCurlId;
CURL *cp;
zval **u_curl_id;
php_curl *curl_handle;
CURLcode ret;
FILE *fp;
char buf[4096];
int b;
CURLLS_FETCH();
if (ZEND_NUM_ARGS() != 1 ||
zend_get_parameters_ex (1, &uCurlId) == FAILURE) {
zend_get_parameters_ex(1, &u_curl_id) == FAILURE) {
WRONG_PARAM_COUNT;
}
ZEND_FETCH_RESOURCE (cp, CURL *, uCurlId, -1, "CURL Handle", CURLG(le_curl));
ret = curl_easy_perform (cp);
ZEND_FETCH_RESOURCE(curl_handle, php_curl *, u_curl_id, -1, "CURL Handle", CURLG(le_curl));
if ((curl_handle->return_transfer &&
!curl_handle->output_file) || curl_handle->php_stdout) {
if ((fp = tmpfile()) == NULL) {
php_error(E_WARNING, "Cannot initialize temporary file to save output from curl_exec()");
RETURN_FALSE;
}
curl_easy_setopt(curl_handle->cp, CURLOPT_FILE, fp);
} else if (curl_handle->return_transfer &&
curl_handle->output_file) {
zval **id;
Z_LVAL_PP(id) = curl_handle->output_file;
Z_TYPE_PP(id) = IS_RESOURCE;
ZEND_FETCH_RESOURCE(fp, FILE *, id, -1, "File-Handle", php_file_le_fopen());
if (ret == CURLE_OK) {
RETURN_TRUE;
} else {
RETURN_FALSE;
}
ret = curl_easy_perform(curl_handle->cp);
if ((!curl_handle->return_transfer && !curl_handle->php_stdout) ||
(ret != CURLE_OK)) {
RETURN_LONG(php_curl_error_translator(ret));
}
fseek(fp, 0, SEEK_SET);
if (curl_handle->php_stdout) {
while ((b = fread(buf, 1, sizeof(buf), fp)) > 0) {
php_write(buf, b);
}
} else {
char *ret_data;
struct stat stat_sb;
if (fstat(fileno(fp), &stat_sb)) {
RETURN_FALSE;
}
ret_data = emalloc((stat_sb.st_size+1)*sizeof(char));
while ((b = fread(buf, 1, sizeof(buf), fp)) > 0) {
strcat(ret_data, buf);
}
RETURN_STRINGL(ret_data, stat_sb.st_size, 0);
}
}
/* }}} */
@@ -256,18 +422,124 @@ PHP_FUNCTION (curl_exec)
Close a CURL session */
PHP_FUNCTION (curl_close)
{
zval **uCurlId;
CURL *cp;
zval **u_curl_id;
php_curl *curl_handle;
CURLLS_FETCH();
if (ZEND_NUM_ARGS() != 1 ||
zend_get_parameters_ex (1, &uCurlId) == FAILURE) {
zend_get_parameters_ex(1, &u_curl_id) == FAILURE) {
WRONG_PARAM_COUNT;
}
ZEND_FETCH_RESOURCE (cp, CURL *, uCurlId, -1, "CURL Handle", CURLG(le_curl));
zend_list_delete (Z_LVAL_PP (uCurlId));
ZEND_FETCH_RESOURCE(curl_handle, php_curl *, u_curl_id, -1, "CURL Handle", CURLG(le_curl));
zend_list_delete(Z_LVAL_PP(u_curl_id));
}
/* }}} */
static int php_curl_error_translator(CURLcode err)
{
switch (err)
{
case CURLE_OK:
return(CE_OK);
case CURLE_UNSUPPORTED_PROTOCOL:
return(CE_UNSUPPORTED_PROTOCOL);
case CURLE_FAILED_INIT:
return(CE_FAILED_INIT);
case CURLE_URL_MALFORMAT:
return(CE_URL_MALFORMAT);
case CURLE_URL_MALFORMAT_USER:
return(CE_URL_MALFORMAT_USER);
case CURLE_COULDNT_RESOLVE_PROXY:
return(CE_COULDNT_RESOLVE_PROXY);
case CURLE_COULDNT_RESOLVE_HOST:
return(CE_COULDNT_RESOLVE_HOST);
case CURLE_COULDNT_CONNECT:
return(CE_COULDNT_CONNECT);
case CURLE_FTP_WEIRD_SERVER_REPLY:
return(CE_FTP_WEIRD_SERVER_REPLY);
case CURLE_FTP_ACCESS_DENIED:
return(CE_FTP_ACCESS_DENIED);
case CURLE_FTP_USER_PASSWORD_INCORRECT:
return(CE_FTP_USER_PASSWORD_INCORRECT);
case CURLE_FTP_WEIRD_PASS_REPLY:
return(CE_FTP_WEIRD_PASS_REPLY);
case CURLE_FTP_WEIRD_USER_REPLY:
return(CE_FTP_WEIRD_USER_REPLY);
case CURLE_FTP_WEIRD_PASV_REPLY:
return(CE_FTP_WEIRD_PASV_REPLY);
case CURLE_FTP_WEIRD_227_FORMAT:
return(CE_FTP_WEIRD_227_FORMAT);
case CURLE_FTP_CANT_GET_HOST:
return(CE_FTP_CANT_GET_HOST);
case CURLE_FTP_CANT_RECONNECT:
return(CE_FTP_CANT_RECONNECT);
case CURLE_FTP_COULDNT_SET_BINARY:
return(CE_FTP_COULDNT_SET_BINARY);
case CURLE_PARTIAL_FILE:
return(CE_PARTIAL_FILE);
case CURLE_FTP_COULDNT_RETR_FILE:
return(CE_FTP_COULDNT_RETR_FILE);
case CURLE_FTP_WRITE_ERROR:
return(CE_FTP_WRITE_ERROR);
case CURLE_FTP_QUOTE_ERROR:
return(CE_FTP_QUOTE_ERROR);
case CURLE_HTTP_NOT_FOUND:
return(CE_HTTP_NOT_FOUND);
case CURLE_WRITE_ERROR:
return(CE_WRITE_ERROR);
case CURLE_MALFORMAT_USER:
return(CE_MALFORMAT_USER);
case CURLE_FTP_COULDNT_STOR_FILE:
return(CE_FTP_COULDNT_STOR_FILE);
case CURLE_READ_ERROR:
return(CE_READ_ERROR);
case CURLE_OUT_OF_MEMORY:
return(CE_OUT_OF_MEMORY);
case CURLE_OPERATION_TIMEOUTED:
return(CE_OPERATION_TIMEOUTED);
case CURLE_FTP_COULDNT_SET_ASCII:
return(CE_FTP_COULDNT_SET_ASCII);
case CURLE_FTP_PORT_FAILED:
return(CE_FTP_PORT_FAILED);
case CURLE_FTP_COULDNT_USE_REST:
return(CE_FTP_COULDNT_USE_REST);
case CURLE_FTP_COULDNT_GET_SIZE:
return(CE_FTP_COULDNT_GET_SIZE);
case CURLE_HTTP_RANGE_ERROR:
return(CE_HTTP_RANGE_ERROR);
case CURLE_HTTP_POST_ERROR:
return(CE_HTTP_POST_ERROR);
case CURLE_SSL_CONNECT_ERROR:
return(CE_SSL_CONNECT_ERROR);
case CURLE_FTP_BAD_DOWNLOAD_RESUME:
return(CE_FTP_BAD_DOWNLOAD_RESUME);
case CURLE_FILE_COULDNT_READ_FILE:
return(CE_FILE_COULDNT_READ_FILE);
case CURLE_LDAP_CANNOT_BIND:
return(CE_LDAP_CANNOT_BIND);
case CURLE_LDAP_SEARCH_FAILED:
return(CE_LDAP_SEARCH_FAILED);
case CURLE_LIBRARY_NOT_FOUND:
return(CE_LIBRARY_NOT_FOUND);
case CURLE_FUNCTION_NOT_FOUND:
return(CE_FUNCTION_NOT_FOUND);
case CURLE_ABORTED_BY_CALLBACK:
return(CE_ABORTED_BY_CALLBACK);
case CURLE_BAD_FUNCTION_ARGUMENT:
return(CE_BAD_FUNCTION_ARGUMENT);
case CURLE_BAD_CALLING_ORDER:
return(CE_BAD_CALLING_ORDER);
case CURL_LAST:
return(C_LAST);
}
}
static void php_curl_close(php_curl *curl_handle)
{
curl_easy_cleanup(curl_handle->cp);
}
#endif
+115
View File
@@ -0,0 +1,115 @@
# Microsoft Developer Studio Project File - Name="curl" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=curl - Win32 Release_TS
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "curl.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "curl.mak" CFG="curl - Win32 Release_TS"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "curl - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "curl - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "curl - Win32 Release_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release_TS"
# PROP BASE Intermediate_Dir "Release_TS"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release_TS"
# PROP Intermediate_Dir "Release_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_CURL" /D ZTS=1 /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "..\..\main" /D "WIN32" /D "CURL_EXPORTS" /D "COMPILE_DL_CURL" /D ZTS=1 /D HAVE_CURL=1 /D ZEND_DEBUG=0 /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZEND_WIN32" /D "PHP_WIN32" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x406 /d "NDEBUG"
# ADD RSC /l 0x406 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386
# ADD LINK32 php4ts.lib libcurl.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /nodefaultlib:"msvcrt.lib" /out:"..\..\Release_TS/php_curl.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "curl - Win32 Debug_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Debug_TS"
# PROP BASE Intermediate_Dir "Debug_TS"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Debug_TS"
# PROP Intermediate_Dir "Debug_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_CURL" /D ZTS=1 /YX /FD /c
# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CURL_EXPORTS" /D "COMPILE_DL_CURL" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_CURL=1 /FR /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x406 /d "NDEBUG"
# ADD RSC /l 0x406 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386
# ADD LINK32 php4ts_debug.lib libcurl.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /debug /machine:I386 /nodefaultlib:"msvcrtd.lib" /out:"..\..\Debug_TS/php_curl.dll" /libpath:"..\..\Debug_TS"
# SUBTRACT LINK32 /pdb:none
!ENDIF
# Begin Target
# Name "curl - Win32 Release_TS"
# Name "curl - Win32 Debug_TS"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\curl.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\php_curl.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project
+65 -8
View File
@@ -28,17 +28,74 @@
#if HAVE_CURL
#include <curl/curl.h>
extern zend_module_entry curl_module_entry;
#define curl_module_ptr &curl_module_entry
PHP_MINIT_FUNCTION (curl);
PHP_MINFO_FUNCTION (curl);
PHP_FUNCTION (curl_version);
PHP_FUNCTION (curl_init);
PHP_FUNCTION (curl_setopt);
PHP_FUNCTION (curl_exec);
PHP_FUNCTION (curl_close);
PHP_MINIT_FUNCTION(curl);
PHP_MSHUTDOWN_FUNCTION(curl);
PHP_MINFO_FUNCTION(curl);
PHP_FUNCTION(curl_version);
PHP_FUNCTION(curl_init);
PHP_FUNCTION(curl_setopt);
PHP_FUNCTION(curl_exec);
PHP_FUNCTION(curl_close);
#define CE_OK 0
#define CE_UNSUPPORTED_PROTOCOL 1
#define CE_FAILED_INIT 2
#define CE_URL_MALFORMAT 3
#define CE_URL_MALFORMAT_USER 4
#define CE_COULDNT_RESOLVE_PROXY 5
#define CE_COULDNT_RESOLVE_HOST 6
#define CE_COULDNT_CONNECT 7
#define CE_FTP_WEIRD_SERVER_REPLY 8
#define CE_FTP_ACCESS_DENIED 9
#define CE_FTP_USER_PASSWORD_INCORRECT 10
#define CE_FTP_WEIRD_PASS_REPLY 11
#define CE_FTP_WEIRD_USER_REPLY 12
#define CE_FTP_WEIRD_PASV_REPLY 13
#define CE_FTP_WEIRD_227_FORMAT 14
#define CE_FTP_CANT_GET_HOST 15
#define CE_FTP_CANT_RECONNECT 16
#define CE_FTP_COULDNT_SET_BINARY 17
#define CE_PARTIAL_FILE 18
#define CE_FTP_COULDNT_RETR_FILE 19
#define CE_FTP_WRITE_ERROR 20
#define CE_FTP_QUOTE_ERROR 21
#define CE_HTTP_NOT_FOUND 22
#define CE_WRITE_ERROR 23
#define CE_MALFORMAT_USER 24
#define CE_FTP_COULDNT_STOR_FILE 25
#define CE_READ_ERROR 26
#define CE_OUT_OF_MEMORY 27
#define CE_OPERATION_TIMEOUTED 28
#define CE_FTP_COULDNT_SET_ASCII 29
#define CE_FTP_PORT_FAILED 30
#define CE_FTP_COULDNT_USE_REST 31
#define CE_FTP_COULDNT_GET_SIZE 32
#define CE_HTTP_RANGE_ERROR 33
#define CE_HTTP_POST_ERROR 34
#define CE_SSL_CONNECT_ERROR 35
#define CE_FTP_BAD_DOWNLOAD_RESUME 36
#define CE_FILE_COULDNT_READ_FILE 37
#define CE_LDAP_CANNOT_BIND 38
#define CE_LDAP_SEARCH_FAILED 39
#define CE_LIBRARY_NOT_FOUND 40
#define CE_FUNCTION_NOT_FOUND 41
#define CE_ABORTED_BY_CALLBACK 42
#define CE_BAD_FUNCTION_ARGUMENT 43
#define CE_BAD_CALLING_ORDER 44
#define C_LAST 45
#define CURLOPT_RETURNTRANSFER 500
typedef struct {
int return_transfer;
int output_file;
int php_stdout;
CURL *cp;
} php_curl;
typedef struct {
int le_curl;
@@ -46,7 +103,7 @@ typedef struct {
#ifdef ZTS
#define CURLG(v) (curl_globals->v)
#define CURLLS_FETCH() php_curl_globals *curl_globals = ts_resource(gd_curl_id)
#define CURLLS_FETCH() php_curl_globals *curl_globals = ts_resource(curl_globals_id)
#else
#define CURLG(v) (curl_globals.v)
#define CURLLS_FETCH()
+110
View File
@@ -0,0 +1,110 @@
# Microsoft Developer Studio Project File - Name="cybercash" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=cybercash - Win32 Release_TS
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "cybercash.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "cybercash.mak" CFG="cybercash - Win32 Release_TS"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "cybercash - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "cybercash - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "cybercash - Win32 Release_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release_TS"
# PROP BASE Intermediate_Dir "Release_TS"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release_TS"
# PROP Intermediate_Dir "Release_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_CYBERCASH" /D ZTS=1 /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CYBERCASH_EXPORTS" /D "COMPILE_DL_CYBERCASH" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_MCK=1 /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x406 /d "NDEBUG"
# ADD RSC /l 0x406 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib cybercashi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386
# ADD LINK32 php4ts.lib user32.lib winspool.lib mckcrypto.lib kernel32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /nodefaultlib:"libcmt.lib" /out:"..\..\Release_TS/php_cybercash.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "cybercash - Win32 Debug_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Debug_TS"
# PROP BASE Intermediate_Dir "Debug_TS"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Debug_TS"
# PROP Intermediate_Dir "Debug_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_CYBERCASH" /D ZTS=1 /YX /FD /c
# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\TSRM" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CYBERCASH_EXPORTS" /D "COMPILE_DL_CYBERCASH" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_MCK=1 /FR /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x406 /d "NDEBUG"
# ADD RSC /l 0x406 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib cybercashi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts_debug.lib /nologo /dll /machine:I386
# ADD LINK32 php4ts_debug.lib user32.lib winspool.lib mckcrypto.lib kernel32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /debug /machine:I386 /nodefaultlib:"libcmt.lib" /out:"..\..\Debug_TS/php_cybercash.dll" /libpath:"..\..\Debug_TS"
!ENDIF
# Begin Target
# Name "cybercash - Win32 Release_TS"
# Name "cybercash - Win32 Debug_TS"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\cybercash.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\cybercash.h
# End Source File
# End Group
# End Target
# End Project
+11
View File
@@ -0,0 +1,11 @@
--TEST--
DBM File Creation Test
--POST--
--GET--
--FILE--
<?php
dbmopen("./test.dbm","n");
dbmclose("./test.dbm");
?>
--EXPECT--
+14
View File
@@ -0,0 +1,14 @@
--TEST--
DBM Insert/Fetch Test
--POST--
--GET--
--FILE--
<?php
dbmopen("./test.dbm","n");
dbminsert("./test.dbm","key1","This is a test insert");
$a = dbmfetch("./test.dbm","key1");
dbmclose("./test.dbm");
echo $a
?>
--EXPECT--
This is a test insert
+15
View File
@@ -0,0 +1,15 @@
--TEST--
DBM Insert/Replace/Fetch Test
--POST--
--GET--
--FILE--
<?php
dbmopen("./test.dbm","n");
dbminsert("./test.dbm","key1","This is a test insert");
dbmreplace("./test.dbm","key1","This is the replacement text");
$a = dbmfetch("./test.dbm","key1");
dbmclose("./test.dbm");
echo $a
?>
--EXPECT--
This is the replacement text
+19
View File
@@ -0,0 +1,19 @@
--TEST--
DBM Multiple Insert/Fetch Test
--POST--
--GET--
--FILE--
<?php
dbmopen("./test.dbm","n");
dbminsert("./test.dbm","key1","Content String 1");
dbminsert("./test.dbm","key2","Content String 2");
dbminsert("./test.dbm","key3","Third Content String");
dbminsert("./test.dbm","key4","Another Content String");
dbminsert("./test.dbm","key5","The last content string");
$a = dbmfetch("./test.dbm","key4");
$b = dbmfetch("./test.dbm","key2");
dbmclose("./test.dbm");
echo "$a $b";
?>
--EXPECT--
Another Content String Content String 2
+23
View File
@@ -0,0 +1,23 @@
--TEST--
DBM FirstKey/NextKey Loop Test With 5 Items
--POST--
--GET--
--FILE--
<?php
dbmopen("./test.dbm","n");
dbminsert("./test.dbm","key1","Content String 1");
dbminsert("./test.dbm","key2","Content String 2");
dbminsert("./test.dbm","key3","Third Content String");
dbminsert("./test.dbm","key4","Another Content String");
dbminsert("./test.dbm","key5","The last content string");
$a = dbmfirstkey("./test.dbm");
$i=0;
while($a) {
$a = dbmnextkey("./test.dbm",$a);
$i++;
}
dbmclose("./test.dbm");
echo $i
?>
--EXPECT--
5
+25
View File
@@ -0,0 +1,25 @@
--TEST--
DBM FirstKey/NextKey with 2 deletes
--POST--
--GET--
--FILE--
<?php
dbmopen("./test.dbm","n");
dbminsert("./test.dbm","key1","Content String 1");
dbminsert("./test.dbm","key2","Content String 2");
dbminsert("./test.dbm","key3","Third Content String");
dbminsert("./test.dbm","key4","Another Content String");
dbminsert("./test.dbm","key5","The last content string");
dbmdelete("./test.dbm","key3");
dbmdelete("./test.dbm","key1");
$a = dbmfirstkey("./test.dbm");
$i=0;
while($a) {
$a = dbmnextkey("./test.dbm",$a);
$i++;
}
dbmclose("./test.dbm");
echo $i
?>
--EXPECT--
3
+2 -2
View File
@@ -233,7 +233,7 @@ PHP_FUNCTION(dbase_pack) {
/* {{{ proto bool dbase_add_record(int identifier, array data)
Adds a record to the database */
PHP_FUNCTION(dbase_add_record) {
pval *dbh_id, *fields, *field;
pval *dbh_id, *fields, **field;
dbhead_t *dbh;
int dbh_type;
@@ -281,7 +281,7 @@ PHP_FUNCTION(dbase_add_record) {
RETURN_FALSE;
}
tmp = *field;
tmp = **field;
zval_copy_ctor(&tmp);
convert_to_string(&tmp);
sprintf(t_cp, cur_f->db_format, tmp.value.str.val);
+151
View File
@@ -0,0 +1,151 @@
# Microsoft Developer Studio Project File - Name="dbase" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=dbase - Win32 Release_TS
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "dbase.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "dbase.mak" CFG="dbase - Win32 Release_TS"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "dbase - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "dbase - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "dbase - Win32 Release_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release_TS"
# PROP BASE Intermediate_Dir "Release_TS"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release_TS"
# PROP Intermediate_Dir "Release_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_DBASE" /D ZTS=1 /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "..\..\main" /D "WIN32" /D "DBASE_EXPORTS" /D "COMPILE_DL_DBASE" /D ZTS=1 /D HAVE_DBASE=1 /D ZEND_DEBUG=0 /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZEND_WIN32" /D "PHP_WIN32" /D DBASE=1 /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x406 /d "NDEBUG"
# ADD RSC /l 0x406 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386
# ADD LINK32 php4ts.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_dbase.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "dbase - Win32 Debug_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Debug_TS"
# PROP BASE Intermediate_Dir "Debug_TS"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Debug_TS"
# PROP Intermediate_Dir "Debug_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_DBASE" /D ZTS=1 /YX /FD /c
# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DBASE_EXPORTS" /D "COMPILE_DL_DBASE" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_DBASE=1 /FR /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x406 /d "NDEBUG"
# ADD RSC /l 0x406 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386
# ADD LINK32 php4ts_debug.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /debug /machine:I386 /nodefaultlib:"msvcrtd.lib" /out:"..\..\Debug_TS/php_dbase.dll" /libpath:"..\..\Debug_TS"
# SUBTRACT LINK32 /pdb:none
!ENDIF
# Begin Target
# Name "dbase - Win32 Release_TS"
# Name "dbase - Win32 Debug_TS"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\dbase.c
# End Source File
# Begin Source File
SOURCE=.\dbf_head.c
# End Source File
# Begin Source File
SOURCE=.\dbf_misc.c
# End Source File
# Begin Source File
SOURCE=.\dbf_ndx.c
# End Source File
# Begin Source File
SOURCE=.\dbf_rec.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\dbf.h
# End Source File
# Begin Source File
SOURCE=.\dbf_head.h
# End Source File
# Begin Source File
SOURCE=.\dbf_misc.h
# End Source File
# Begin Source File
SOURCE=.\dbf_ndx.h
# End Source File
# Begin Source File
SOURCE=.\dbf_rec.h
# End Source File
# Begin Source File
SOURCE=.\php_dbase.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project
+114
View File
@@ -0,0 +1,114 @@
# Microsoft Developer Studio Project File - Name="domxml" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=domxml - Win32 Release_TS
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "domxml.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "domxml.mak" CFG="domxml - Win32 Release_TS"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "domxml - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "domxml - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "domxml - Win32 Release_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release_TS"
# PROP BASE Intermediate_Dir "Release_TS"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release_TS"
# PROP Intermediate_Dir "Release_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_DOMXML" /D ZTS=1 /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D "WIN32" /D "DOMXML_EXPORTS" /D "COMPILE_DL_DOMXML" /D ZTS=1 /D HAVE_DOMXML=1 /D ZEND_DEBUG=0 /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZEND_WIN32" /D "PHP_WIN32" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x406 /d "NDEBUG"
# ADD RSC /l 0x406 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386
# ADD LINK32 libxml.lib wsock32.lib php4ts.lib resolv.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /nodefaultlib:"msvcrt.lib" /out:"..\..\Release_TS/php_domxml.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "domxml - Win32 Debug_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Debug_TS"
# PROP BASE Intermediate_Dir "Debug_TS"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Debug_TS"
# PROP Intermediate_Dir "Debug_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "mssql-70" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_DOMXML" /D ZTS=1 /YX /FD /c
# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DOMXML_EXPORTS" /D "COMPILE_DL_DOMXML" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_DOMXML=1 /FR /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x406 /d "NDEBUG"
# ADD RSC /l 0x406 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386
# ADD LINK32 libxml.lib php4ts_debug.lib resolv.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /debug /machine:I386 /nodefaultlib:"msvcrtd.lib" /out:"..\..\Debug_TS/php_domxml.dll" /libpath:"..\..\Debug_TS"
!ENDIF
# Begin Target
# Name "domxml - Win32 Release_TS"
# Name "domxml - Win32 Debug_TS"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\php_domxml.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\php_domxml.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project
+7 -3
View File
@@ -41,7 +41,7 @@ static zend_class_entry *domxmltestnode_class_entry_ptr;
static int node_attributes(zval **attributes, xmlNode *nodep);
static int node_children(zval **children, xmlNode *nodep);
static zend_function_entry php_domxml_functions[] = {
static zend_function_entry domxml_functions[] = {
PHP_FE(xmldoc, NULL)
PHP_FE(xmldocfile, NULL)
PHP_FE(xmltree, NULL)
@@ -103,10 +103,14 @@ static zend_function_entry php_domxmlns_class_functions[] = {
void domxmltestnode_class_startup();
#endif
zend_module_entry php_domxml_module_entry = {
"domxml", php_domxml_functions, PHP_MINIT(domxml), NULL, NULL, NULL, PHP_MINFO(domxml), STANDARD_MODULE_PROPERTIES
zend_module_entry domxml_module_entry = {
"domxml", domxml_functions, PHP_MINIT(domxml), NULL, NULL, NULL, PHP_MINFO(domxml), STANDARD_MODULE_PROPERTIES
};
#ifdef COMPILE_DL_DOMXML
ZEND_GET_MODULE(domxml)
#endif
void _free_node(xmlNode *tmp) {
/*fprintf(stderr, "Freeing node: %s\n", tmp->name);*/
}
+4 -4
View File
@@ -24,8 +24,8 @@
#if HAVE_DOMXML
#include <libxml/parser.h>
extern zend_module_entry php_domxml_module_entry;
#define php_domxml_module_ptr &php_domxml_module_entry
extern zend_module_entry domxml_module_entry;
#define domxml_module_ptr &domxml_module_entry
/* directory functions */
extern PHP_MINIT_FUNCTION(domxml);
@@ -56,8 +56,8 @@ PHP_FUNCTION(domxml_attrname);
PHP_FUNCTION(domxml_test);
#else
#define php_domxml_module_ptr NULL
#define domxml_module_ptr NULL
#endif /* HAVE_DOMXML */
#define phpext_domxml_ptr php_domxml_module_ptr
#define phpext_domxml_ptr domxml_module_ptr
#endif /* _PHP_DIR_H */
+32
View File
@@ -0,0 +1,32 @@
Warning
=======
This support is EXPERIMENTAL. In fact, it integrates code that
Microsoft labels as pre-beta. Use at your own risk.
Build instructions
==================
Download and install the .NET Framework SDK Technology Preview from
http://msdn.microsoft.com/net/#sdk. Once installed, copy Mscoree.h
(typically found in C:\Program Files\NGWSSDK\Include to ext\dotnet).
Do not simply add the NGWSSDK\Include directory to the include path
as this will cause compilation failures.
Download and unzip the source to the dm.net COM Moniker from
http://staff.develop.com/jasonw/clr/readme.htm. Copy mscorlib.h
to ext\dotnet. There is no need to register the clrmonsrv.dll as
it is not used.
At this point, the dotnet project can be built like any other
project, from either VisualStudio 6's GUI or from the command line.
Example command line invocation:
msdev dotnet.dsp /MAKE "dotnet - Win32 Debug_TS"
Execution instructions:
=======================
Add "extension=php_dotnet.dll" into php.ini.
Sample program can be found at dotnet.php
+243
View File
@@ -0,0 +1,243 @@
/*
+----------------------------------------------------------------------+
| PHP version 4.0 |
+----------------------------------------------------------------------+
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Sam Ruby <rubys@us.ibm.com> |
+----------------------------------------------------------------------+
*/
/*
* This module implements support for Microsoft .Net components.
*/
#ifdef PHP_WIN32
#include <iostream.h>
#include <math.h>
#include <comdef.h>
extern "C" {
#include "php.h"
#include "php_ini.h"
pval php_COM_get_property_handler(zend_property_reference *property_reference);
int php_COM_set_property_handler(zend_property_reference *property_reference, pval *value);
char *php_COM_error_message(HRESULT hr);
void php_COM_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference);
int php_COM_get_le_idispatch();
}
#include <stdio.h>
#include "Mscoree.h"
#include "mscorlib.h"
using namespace mscorlib;
static ICorRuntimeHost *pHost;
static mscorlib::_AppDomain *pDomain;
static zend_class_entry dotnet_class_entry;
static OLECHAR *php_char_to_OLECHAR(char *C_str, uint strlen)
{
OLECHAR *unicode_str = (OLECHAR *) emalloc(sizeof(OLECHAR)*(strlen+1));
OLECHAR *unicode_ptr = unicode_str;
while (*C_str) {
*unicode_ptr++ = (unsigned short) *C_str++;
}
*unicode_ptr = 0;
return unicode_str;
}
HRESULT dotnet_init() {
HRESULT hr;
hr = CoCreateInstance(CLSID_CorRuntimeHost, NULL, CLSCTX_ALL,
IID_ICorRuntimeHost, (void **)&pHost);
if (FAILED(hr)) return hr;
hr = pHost->Start();
if (FAILED(hr)) return hr;
IUnknown *uDomain;
hr = pHost->GetDefaultDomain(&uDomain);
if (FAILED(hr)) return hr;
hr = uDomain->QueryInterface(__uuidof(_AppDomain), (void**) &pDomain);
if (FAILED(hr)) return -1;
uDomain->Release();
return ERROR_SUCCESS;
}
HRESULT dotnet_create(OLECHAR *assembly, OLECHAR *datatype, struct IDispatch **object) {
HRESULT hr;
_ObjectHandle *pHandle;
hr = pDomain->CreateInstance(_bstr_t(assembly), _bstr_t(datatype), &pHandle);
if (FAILED(hr)) return hr;
if (!pHandle) return hr;
_variant_t unwrapped;
hr = pHandle->Unwrap(&unwrapped);
pHandle->Release();
if (FAILED(hr)) return hr;
*object = unwrapped.pdispVal;
return ERROR_SUCCESS;
}
void dotnet_term() {
if (pHost) pHost->Stop();
if (pHost) pHost->Release();
if (pDomain) pDomain->Release();
pHost = 0;
pDomain = 0;
}
/* {{{ proto int dotnet_load(string module_name)
Loads a DOTNET module */
PHP_FUNCTION(DOTNET_load)
{
HRESULT hr;
pval *assembly_name, *datatype_name;
OLECHAR *assembly, *datatype;
IDispatch FAR *i_dispatch = NULL;
if (ZEND_NUM_ARGS() != 2) WRONG_PARAM_COUNT;
getParameters(ht, 2, &assembly_name, &datatype_name);
convert_to_string(assembly_name);
assembly = php_char_to_OLECHAR(assembly_name->value.str.val, assembly_name->value.str.len);
convert_to_string(datatype_name);
datatype = php_char_to_OLECHAR(datatype_name->value.str.val, datatype_name->value.str.len);
/* obtain IDispatch */
hr=dotnet_create(assembly, datatype, &i_dispatch);
efree(assembly);
efree(datatype);
if (FAILED(hr)) {
char *error_message;
error_message = php_COM_error_message(hr);
php_error(E_WARNING,"Error obtaining .Net class for %s in assembly %s: %s",datatype_name->value.str.val,assembly_name->value.str.val,error_message);
LocalFree(error_message);
RETURN_FALSE;
}
if (!i_dispatch) {
php_error(E_WARNING,"Unable to locate %s in assembly %s",datatype_name->value.str.val,assembly_name->value.str.val);
RETURN_FALSE;
}
RETURN_LONG(zend_list_insert(i_dispatch,php_COM_get_le_idispatch()));
}
/* }}} */
void php_DOTNET_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference)
{
pval *object = property_reference->object;
zend_overloaded_element *function_name = (zend_overloaded_element *) property_reference->elements_list->tail->data;
if (zend_llist_count(property_reference->elements_list)==1
&& !strcmp(function_name->element.value.str.val, "dotnet")) { /* constructor */
pval *object_handle;
PHP_FN(DOTNET_load)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
if (!zend_is_true(return_value)) {
var_reset(object);
return;
}
ALLOC_ZVAL(object_handle);
*object_handle = *return_value;
pval_copy_constructor(object_handle);
INIT_PZVAL(object_handle);
zend_hash_index_update(object->value.obj.properties, 0, &object_handle, sizeof(pval *), NULL);
pval_destructor(&function_name->element);
} else {
php_COM_call_function_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU, property_reference);
}
}
void php_register_DOTNET_class()
{
INIT_OVERLOADED_CLASS_ENTRY(dotnet_class_entry, "DOTNET", NULL,
php_DOTNET_call_function_handler,
php_COM_get_property_handler,
php_COM_set_property_handler);
zend_register_internal_class(&dotnet_class_entry);
}
function_entry DOTNET_functions[] = {
{NULL, NULL, NULL}
};
static PHP_MINFO_FUNCTION(DOTNET)
{
DISPLAY_INI_ENTRIES();
}
PHP_INI_BEGIN()
PHP_INI_END()
PHP_MINIT_FUNCTION(DOTNET)
{
HRESULT hr;
CoInitialize(0);
hr = dotnet_init();
if (FAILED(hr)) return hr;
php_register_DOTNET_class();
REGISTER_INI_ENTRIES();
return SUCCESS;
}
PHP_MSHUTDOWN_FUNCTION(DOTNET)
{
dotnet_term();
CoUninitialize();
UNREGISTER_INI_ENTRIES();
return SUCCESS;
}
zend_module_entry dotnet_module_entry = {
"dotnet", DOTNET_functions, PHP_MINIT(DOTNET), PHP_MSHUTDOWN(DOTNET), NULL, NULL, PHP_MINFO(DOTNET), STANDARD_MODULE_PROPERTIES
};
extern "C" {
ZEND_GET_MODULE(dotnet)
}
void php_register_DOTNET_class();
#endif
+171
View File
@@ -0,0 +1,171 @@
# Microsoft Developer Studio Project File - Name="dotnet" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=dotnet - Win32 Debug_TS
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "dotnet.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "dotnet.mak" CFG="dotnet - Win32 Debug_TS"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "dotnet - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "dotnet - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "dotnet - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "dotnet - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "dotnet - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "..\..\Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "..\..\Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "PHP_WIN32" /D "ZEND_WIN32" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "$(JAVA_HOME)\include\win32" /I "$(JAVA_HOME)\include" /I "..\..\..\bindlib_w32" /D "NDEBUG" /D ZEND_DEBUG=0 /D "PHP_WIN32" /D "ZEND_WIN32" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_JAVA" /D HAVE_JAVA=1 /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x40d /d "NDEBUG"
# ADD RSC /l 0x40d /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\Release/php_dotnet.dll" /libpath:"$(JAVA_HOME)\lib" /libpath:"..\..\Release"
!ELSEIF "$(CFG)" == "dotnet - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "..\..\Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "PHP_WIN32" /D "ZEND_WIN32" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "$(JAVA_HOME)\include\win32" /I "$(JAVA_HOME)\include" /I "..\..\..\bindlib_w32" /D "_DEBUG" /D ZEND_DEBUG=1 /D "PHP_WIN32" /D "ZEND_WIN32" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_JAVA" /D HAVE_JAVA=1 /FR /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x40d /d "_DEBUG"
# ADD RSC /l 0x40d /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"..\..\Debug/php_dotnet.dll" /pdbtype:sept /libpath:"$(JAVA_HOME)\lib" /libpath:"..\..\Debug"
!ELSEIF "$(CFG)" == "dotnet - Win32 Debug_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "..\..\Debug_TS"
# PROP BASE Intermediate_Dir "Debug_TS"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\Debug_TS"
# PROP Intermediate_Dir "Debug_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\..\Zend" /I "$(JAVA_HOME)\include\win32" /I "$(JAVA_HOME)\include" /I "..\..\..\bindlib_w32" /D "_DEBUG" /D "PHP_WIN32" /D "ZEND_WIN32" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_JAVA" /FR /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\\" /I "..\..\main" /I "..\..\Zend" /I "$(JAVA_HOME)\include\win32" /I "$(JAVA_HOME)\include" /I "..\..\..\bindlib_w32" /D "_DEBUG" /D ZEND_DEBUG=1 /D "ZTS" /D "PHP_WIN32" /D "ZEND_WIN32" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_JAVA" /D HAVE_JAVA=1 /FR /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x40d /d "_DEBUG"
# ADD RSC /l 0x40d /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts_debug.lib /nologo /dll /debug /machine:I386 /out:"..\..\Debug_TS/php_dotnet.dll" /pdbtype:sept /libpath:"$(JAVA_HOME)\lib" /libpath:"..\..\Debug_TS"
!ELSEIF "$(CFG)" == "dotnet - Win32 Release_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "..\..\Release_TS"
# PROP BASE Intermediate_Dir "Release_TS"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "..\..\Release_TS"
# PROP Intermediate_Dir "Release_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "$(JAVA_HOME)\include\win32" /I "$(JAVA_HOME)\include" /I "..\..\..\bindlib_w32" /D "NDEBUG" /D "PHP_WIN32" /D "ZEND_WIN32" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_JAVA" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\\" /I "..\..\main" /I "..\..\Zend" /I "$(JAVA_HOME)\include\win32" /I "$(JAVA_HOME)\include" /I "..\..\..\bindlib_w32" /D "NDEBUG" /D ZEND_DEBUG=0 /D "ZTS" /D "PHP_WIN32" /D "ZEND_WIN32" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_JAVA" /D HAVE_JAVA=1 /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x40d /d "NDEBUG"
# ADD RSC /l 0x40d /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_dotnet.dll" /libpath:"$(JAVA_HOME)\lib" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
!ENDIF
# Begin Target
# Name "dotnet - Win32 Release"
# Name "dotnet - Win32 Debug"
# Name "dotnet - Win32 Debug_TS"
# Name "dotnet - Win32 Release_TS"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\dotnet.cpp
# End Source File
# Begin Source File
SOURCE=.\..\..\win32\winutil.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\php_dotnet.h
# End Source File
# End Group
# Begin Source File
SOURCE=.\README
# End Source File
# End Target
# End Project
+8
View File
@@ -0,0 +1,8 @@
<?
$stack = new DOTNET("mscorlib","System.Collections.Stack");
$stack->Push(".Net");
$stack->Push("Hello ");
echo $stack->Pop() . $stack->Pop();
?>
+21
View File
@@ -0,0 +1,21 @@
#ifndef PHP_DOTNET_H
#define PHP_DOTNET_H
#if WIN32|WINNT
extern PHP_MINIT_FUNCTION(DOTNET);
extern PHP_MSHUTDOWN_FUNCTION(DOTNET);
PHP_FUNCTION(DOTNET_load);
extern zend_module_entry DOTNET_module_entry;
#define DOTNET_module_ptr &DOTNET_module_entry
#else
#define DOTNET_module_ptr NULL
#endif /* Win32|WINNT */
#define phpext_DOTNET_ptr DOTNET_module_ptr
#endif /* PHP_DOTNET_H */
+9
View File
@@ -0,0 +1,9 @@
--TEST--
RegReplace test 1
--POST--
--GET--
--FILE--
<?php $a="abc123";
echo ereg_replace("123","def",$a)?>
--EXPECT--
abcdef
+9
View File
@@ -0,0 +1,9 @@
--TEST--
RegReplace test 2
--POST--
--GET--
--FILE--
<?php $a="abc123";
echo ereg_replace("123","",$a)?>
--EXPECT--
abc
+11
View File
@@ -0,0 +1,11 @@
--TEST--
ereg_replace single-quote test
--POST--
--GET--
--FILE--
<?php $a="\\'test";
echo ereg_replace("\\\\'","'",$a)
?>
--EXPECT--
'test
+16
View File
@@ -0,0 +1,16 @@
--TEST--
simple ereg test
--POST--
--GET--
--FILE--
<?php $a="This is a nice and simple string";
if (ereg(".*nice and simple.*",$a)) {
echo "ok\n";
}
if (!ereg(".*doesn't exist.*",$a)) {
echo "ok\n";
}
?>
--EXPECT--
ok
ok
+20
View File
@@ -0,0 +1,20 @@
--TEST--
Test Regular expression register support in ereg
--POST--
--GET--
--FILE--
<?php $a="This is a nice and simple string";
echo ereg(".*(is).*(is).*",$a,$registers);
echo "\n";
echo $registers[0];
echo "\n";
echo $registers[1];
echo "\n";
echo $registers[2];
echo "\n";
?>
--EXPECT--
32
This is a nice and simple string
is
is
+10
View File
@@ -0,0 +1,10 @@
--TEST--
Test ereg_replace of start-of-line
--POST--
--GET--
--FILE--
<?php $a="This is a nice and simple string";
echo ereg_replace("^This","That",$a);
?>
--EXPECT--
That is a nice and simple string
+12
View File
@@ -0,0 +1,12 @@
--TEST--
Test empty result buffer in reg_replace
--POST--
--GET--
--FILE--
<?php
$a="abcd";
$b=ereg_replace("abcd","",$a);
echo strlen($b);
?>
--EXPECT--
0
+10
View File
@@ -0,0 +1,10 @@
--TEST--
Test back-references in regular expressions
--POST--
--GET--
--FILE--
<?php
echo ereg_replace("([a-z]*)([-=+|]*)([0-9]+)","\\3 \\1 \\2\n","abc+-|=123");
?>
--EXPECT--
123 abc +-|=
+19
View File
@@ -0,0 +1,19 @@
--TEST--
Test split()
--POST--
--GET--
--FILE--
<?php
$a=split("[[:space:]]","this is a
test");
echo count($a) . "\n";
for ($i = 0; $i < count($a); $i++) {
echo $a[$i] . "\n";
}
?>
--EXPECT--
4
this
is
a
test
+9
View File
@@ -0,0 +1,9 @@
--TEST--
Long back references
--POST--
--GET--
--FILE--
<?php $a="abc122222222223";
echo ereg_replace("1(2*)3","\\1def\\1",$a)?>
--EXPECT--
abc2222222222def2222222222
+9
View File
@@ -0,0 +1,9 @@
--TEST--
\0 back reference
--POST--
--GET--
--FILE--
<?php $a="abc123";
echo ereg_replace("123","def\\0ghi",$a)?>
--EXPECT--
abcdef123ghi
+9
View File
@@ -0,0 +1,9 @@
--TEST--
nonexisting back reference
--POST--
--GET--
--FILE--
<?php $a="abc123";
echo ereg_replace("123",'def\1ghi',$a)?>
--EXPECT--
abcdef\1ghi
+9
View File
@@ -0,0 +1,9 @@
--TEST--
escapes in replace string
--POST--
--GET--
--FILE--
<?php $a="abc123";
echo ereg_replace("123","def\\g\\\\hi\\",$a)?>
--EXPECT--
abcdef\g\\hi\
+9
View File
@@ -0,0 +1,9 @@
--TEST--
backreferences not replaced recursively
--POST--
--GET--
--FILE--
<?php $a="a\\2bxc";
echo ereg_replace("a(.*)b(.*)c","\\1",$a)?>
--EXPECT--
\2
+8
View File
@@ -0,0 +1,8 @@
--TEST--
replace empty matches
--POST--
--GET--
--FILE--
<?php echo ereg_replace("^","z","abc123")?>
--EXPECT--
zabc123
+8
View File
@@ -0,0 +1,8 @@
--TEST--
test backslash handling in regular expressions
--POST--
--GET--
--FILE--
<?php echo ereg_replace('\?',"abc","?123?")?>
--EXPECT--
abc123abc
+5 -5
View File
@@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Intermediate_Dir "Release_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MSSQL_EXPORTS" /D "COMPILE_DL_EXIF" /D "DBNTWIN32" /D ZTS=1 /YX /FD /c
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_EXIF" /D ZTS=1 /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXIF_EXPORTS" /D "COMPILE_DL_EXIF" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_EXIF=1 /FR /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
@@ -53,8 +53,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib ntwdblib.lib /nologo /dll /machine:I386 /out:"MSSQL_65_Release/php_mssql.dll" /libpath:"..\..\Release_TS"
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_exif.dll" /libpath:"..\..\Release_TS"
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_exif.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
!ELSEIF "$(CFG)" == "exif - Win32 Debug_TS"
@@ -70,7 +70,7 @@ LINK32=link.exe
# PROP Intermediate_Dir "Debug_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "mssql-70" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MSSQL_EXPORTS" /D "COMPILE_DL_EXIF" /D "DBNTWIN32" /D ZTS=1 /D MSSQL70=1 /YX /FD /c
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_EXIF" /D ZTS=1 /YX /FD /c
# ADD CPP /nologo /MDd /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXIF_EXPORTS" /D "COMPILE_DL_EXIF" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_EXIF=1 /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
@@ -80,7 +80,7 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib ntwdblib.lib /nologo /dll /machine:I386 /out:"MSSQL_65_Release/php_mssql.dll" /libpath:"..\..\Release_TS" /libpath:"mssql-70"
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts_debug.lib /nologo /dll /machine:I386 /out:"..\..\Debug_TS/php_exif.dll" /libpath:"..\..\Debug_TS"
!ENDIF
+159 -16
View File
@@ -27,22 +27,6 @@
#undef THREAD_SAFE
#endif
#if 0
if((NULL != SG(request_info).content_type) && (0 == strcmp(SG(request_info).content_type, "application/vnd.fdf"))) {
pval *tmp;
ALLOC_ZVAL(tmp);
tmp->value.str.len = SG(request_info).post_data_length;
tmp->value.str.val = estrndup(SG(request_info).post_data, SG(request_info).post_data_length);
tmp->type = IS_STRING;
INIT_PZVAL(tmp);
zend_hash_add(&EG(symbol_table), "HTTP_FDF_DATA", sizeof("HTTP_FDF_DATA"), &tmp, sizeof(pval *),NULL);
} else {
#endif
#include "php.h"
#include "ext/standard/head.h"
#include <math.h>
@@ -95,6 +79,10 @@ function_entry fdf_functions[] = {
PHP_FE(fdf_set_file, NULL)
PHP_FE(fdf_get_file, NULL)
PHP_FE(fdf_add_template, NULL)
PHP_FE(fdf_set_flags, NULL)
PHP_FE(fdf_set_opt, NULL)
PHP_FE(fdf_set_submit_form_action, NULL)
PHP_FE(fdf_set_javascript_action, NULL)
{NULL, NULL, NULL}
};
@@ -115,6 +103,35 @@ PHP_MINIT_FUNCTION(fdf)
{
FDFErc err;
FDF_GLOBAL(le_fdf) = register_list_destructors(phpi_FDFClose, NULL);
/* Constants used by fdf_set_opt() */
REGISTER_LONG_CONSTANT("FDFValue", FDFValue, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FDFStatus", FDFStatus, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FDFFile", FDFFile, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FDFID", FDFID, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FDFFf", FDFFf, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FDFSetFf", FDFSetFf, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FDFClearFf", FDFClearFf, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FDFFlags", FDFFlags, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FDFSetF", FDFSetF, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FDFClrF", FDFClrF, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FDFAP", FDFAP, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FDFAS", FDFAS, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FDFAction", FDFAction, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FDFAA", FDFAA, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FDFAPRef", FDFAPRef, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FDFIF", FDFIF, CONST_CS | CONST_PERSISTENT);
/* Constants used by fdf_set_javascript_action() */
REGISTER_LONG_CONSTANT("FDFEnter", FDFEnter, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FDFExit", FDFExit, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FDFDown", FDFDown, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FDFUp", FDFUp, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FDFFormat", FDFFormat, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FDFValidate", FDFValidate, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FDFKeystroke", FDFKeystroke, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FDFCalculate", FDFCalculate, CONST_CS | CONST_PERSISTENT);
#ifdef PHP_WIN32
return SUCCESS;
#endif
@@ -593,6 +610,132 @@ PHP_FUNCTION(fdf_add_template) {
}
/* }}} */
/* {{{ proto void fdf_set_flags(int fdfdoc, string fieldname, int whichFlags, int newFlags)
modifies a flag for a field in the fdf*/
PHP_FUNCTION(fdf_set_flags) {
pval **arg1, **arg2, **arg3, **arg4;
int id, type;
FDFDoc fdf;
FDFErc err;
FDF_TLS_VARS;
if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &arg1, &arg2,&arg3, &arg4) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
convert_to_string_ex(arg2);
convert_to_long_ex(arg3);
convert_to_long_ex(arg4);
id=(*arg1)->value.lval;
fdf = zend_list_find(id,&type);
if(!fdf || type!=FDF_GLOBAL(le_fdf)) {
php_error(E_WARNING,"Unable to find file identifier %d",id);
RETURN_FALSE;
}
err=FDFSetFlags(fdf,(*arg2)->value.str.val,(*arg3)->value.lval,(*arg4)->value.lval);
if(err != FDFErcOK)
printf("Error setting FDF flags: %d\n",err);
RETURN_TRUE;
}
/* }}} */
/* {{{ proto void fdf_set_opt(int fdfdoc, string fieldname, int element, string value, string name)
Sets a value in the opt array for a field in the FDF*/
PHP_FUNCTION(fdf_set_opt) {
pval **arg1, **arg2, **arg3, **arg4, **arg5;
int id, type;
FDFDoc fdf;
FDFErc err;
FDF_TLS_VARS;
if (ZEND_NUM_ARGS() != 5 || zend_get_parameters_ex(5, &arg1, &arg2,&arg3, &arg4, &arg5) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
convert_to_string_ex(arg2);
convert_to_long_ex(arg3);
convert_to_string_ex(arg4);
convert_to_string_ex(arg5);
id=(*arg1)->value.lval;
fdf = zend_list_find(id,&type);
if(!fdf || type!=FDF_GLOBAL(le_fdf)) {
php_error(E_WARNING,"Unable to find file identifier %d",id);
RETURN_FALSE;
}
err = FDFSetOpt(fdf,(*arg2)->value.str.val,(*arg3)->value.lval,(*arg4)->value.str.val,(*arg5)->value.str.val);
if(err != FDFErcOK)
printf("Error setting FDF option: %d",err);
RETURN_TRUE;
}
/* }}} */
/* {{{ proto void fdf_set_submit_form_action(int fdfdoc, string fieldname, int whichTrigger, string url, int flags)
sets the submit form action for a field in the fdf*/
PHP_FUNCTION(fdf_set_submit_form_action) {
pval **arg1, **arg2, **arg3, **arg4, **arg5;
int id, type;
FDFDoc fdf;
FDFErc err;
FDF_TLS_VARS;
if (ZEND_NUM_ARGS() != 5 || zend_get_parameters_ex(5, &arg1, &arg2,&arg3, &arg4, &arg5) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
convert_to_string_ex(arg2);
convert_to_long_ex(arg3);
convert_to_string_ex(arg4);
convert_to_long_ex(arg5);
id=(*arg1)->value.lval;
fdf = zend_list_find(id,&type);
if(!fdf || type!=FDF_GLOBAL(le_fdf)) {
php_error(E_WARNING,"Unable to find file identifier %d",id);
RETURN_FALSE;
}
err = FDFSetSubmitFormAction(fdf,(*arg2)->value.str.val,(*arg3)->value.lval,(*arg4)->value.str.val,(*arg5)->value.lval);
if(err != FDFErcOK)
printf("Error setting FDF submit action: %d",err);
RETURN_TRUE;
}
/* {{{ proto void fdf_set_javascript_action(int fdfdoc, string fieldname, int whichTrigger, string script)
sets the javascript action for a field in the fdf*/
PHP_FUNCTION(fdf_set_javascript_action) {
pval **arg1, **arg2, **arg3, **arg4;
int id, type;
FDFDoc fdf;
FDFErc err;
FDF_TLS_VARS;
if (ZEND_NUM_ARGS() != 5 || zend_get_parameters_ex(4, &arg1, &arg2,&arg3, &arg4) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
convert_to_string_ex(arg2);
convert_to_long_ex(arg3);
convert_to_string_ex(arg4);
id=(*arg1)->value.lval;
fdf = zend_list_find(id,&type);
if(!fdf || type!=FDF_GLOBAL(le_fdf)) {
php_error(E_WARNING,"Unable to find file identifier %d",id);
RETURN_FALSE;
}
err = FDFSetJavaScriptAction(fdf,(*arg2)->value.str.val,(*arg3)->value.lval,(*arg4)->value.str.val);
if(err != FDFErcOK)
printf("Error setting FDF JavaScript action: %d",err);
RETURN_TRUE;
}
#endif
/*
+114
View File
@@ -0,0 +1,114 @@
# Microsoft Developer Studio Project File - Name="fdf" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=fdf - Win32 Release_TS
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "fdf.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "fdf.mak" CFG="fdf - Win32 Release_TS"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "fdf - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "fdf - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "fdf - Win32 Release_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release_TS"
# PROP BASE Intermediate_Dir "Release_TS"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release_TS"
# PROP Intermediate_Dir "Release_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_FDF" /D ZTS=1 /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "FDF_EXPORTS" /D "COMPILE_DL_FDF" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_FDFLIB=1 /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x406 /d "NDEBUG"
# ADD RSC /l 0x406 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386
# ADD LINK32 php4ts.lib fdftk.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_fdf.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "fdf - Win32 Debug_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Debug_TS"
# PROP BASE Intermediate_Dir "Debug_TS"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Debug_TS"
# PROP Intermediate_Dir "Debug_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "mssql-70" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_FDF" /D ZTS=1 /YX /FD /c
# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "FDF_EXPORTS" /D "COMPILE_DL_FDF" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_FDFLIB=1 /FR /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x406 /d "NDEBUG"
# ADD RSC /l 0x406 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts_debug.lib /nologo /dll /machine:I386
# ADD LINK32 php4ts_debug.lib fdftk.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /debug /machine:I386 /out:"..\..\Debug_TS/php_fdf.dll" /libpath:"..\..\Debug_TS"
!ENDIF
# Begin Target
# Name "fdf - Win32 Release_TS"
# Name "fdf - Win32 Debug_TS"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\fdf.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\php_fdf.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project
+4
View File
@@ -49,6 +49,10 @@ PHP_FUNCTION(fdf_set_status);
PHP_FUNCTION(fdf_set_file);
PHP_FUNCTION(fdf_get_file);
PHP_FUNCTION(fdf_add_template);
PHP_FUNCTION(fdf_set_flags);
PHP_FUNCTION(fdf_set_opt);
PHP_FUNCTION(fdf_set_submit_form_action);
PHP_FUNCTION(fdf_set_javascript_action);
#else
#define fdf_module_ptr NULL
#endif
+14 -11
View File
@@ -790,26 +790,29 @@ ftp_readline(ftpbuf_t *ftp)
int
ftp_getresp(ftpbuf_t *ftp)
{
char *buf;
char *buf;
if (ftp == NULL)
return 0;
if (ftp == NULL) return 0;
buf = ftp->inbuf;
ftp->resp = 0;
while (1) {
if (!ftp_readline(ftp))
if (!ftp_readline(ftp)) {
return 0;
if (ftp->inbuf[3] == '-')
continue;
else if (ftp->inbuf[3] != ' ')
return 0;
break;
}
/* Break out when the end-tag is found */
if (isdigit(ftp->inbuf[0]) &&
isdigit(ftp->inbuf[1]) &&
isdigit(ftp->inbuf[2]) &&
ftp->inbuf[3] == ' ') {
break;
}
}
/* translate the tag */
if ( !isdigit(ftp->inbuf[0]) ||
if (!isdigit(ftp->inbuf[0]) ||
!isdigit(ftp->inbuf[1]) ||
!isdigit(ftp->inbuf[2]))
{
+5 -5
View File
@@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Intermediate_Dir "Release_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MSSQL_EXPORTS" /D "COMPILE_DL_FTP" /D "DBNTWIN32" /D ZTS=1 /YX /FD /c
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_FTP" /D ZTS=1 /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "FTP_EXPORTS" /D "COMPILE_DL_FTP" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_FTP=1 /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
@@ -53,8 +53,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib ntwdblib.lib /nologo /dll /machine:I386 /out:"MSSQL_65_Release/php_mssql.dll" /libpath:"..\..\Release_TS"
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib php4ts.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_ftp.dll" /libpath:"..\..\Release_TS"
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib php4ts.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_ftp.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
!ELSEIF "$(CFG)" == "ftp - Win32 Debug_TS"
@@ -70,7 +70,7 @@ LINK32=link.exe
# PROP Intermediate_Dir "Debug_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "mssql-70" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MSSQL_EXPORTS" /D "COMPILE_DL_FTP" /D "DBNTWIN32" /D ZTS=1 /D MSSQL70=1 /YX /FD /c
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_FTP" /D ZTS=1 /YX /FD /c
# ADD CPP /nologo /MDd /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "FTP_EXPORTS" /D "COMPILE_DL_FTP" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_FTP=1 /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
@@ -80,7 +80,7 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib ntwdblib.lib /nologo /dll /machine:I386 /out:"MSSQL_65_Release/php_mssql.dll" /libpath:"..\..\Release_TS" /libpath:"mssql-70"
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib php4ts_debug.lib /nologo /dll /machine:I386 /out:"..\..\Debug_TS/php_ftp.dll" /libpath:"..\..\Debug_TS"
!ENDIF
+2 -3
View File
@@ -24,8 +24,7 @@
| If you did not, or have any questions about PHP licensing, please |
| contact core@php.net. |
+----------------------------------------------------------------------+
| Authors: |
| Andrew Skalski <askalski@chek.com> |
| Authors: Andrew Skalski <askalski@chek.com> |
+----------------------------------------------------------------------+
*/
@@ -130,7 +129,7 @@ PHP_MINIT_FUNCTION(ftp)
}
/* {{{ proto int ftp_connect(string host [, int port])
Open a FTP stream */
Opens a FTP stream */
PHP_FUNCTION(ftp_connect)
{
pval *arg1, *arg2;
+6 -6
View File
@@ -70,8 +70,8 @@ AC_ARG_WITH(gd,
AC_CHECK_LIB(gd, gdImageString16, [ AC_DEFINE(HAVE_LIBGD13,1,[ ]) ])
AC_CHECK_LIB(gd, gdImagePaletteCopy, [ AC_DEFINE(HAVE_LIBGD15,1,[ ]) ])
AC_CHECK_LIB(gd, gdImageColorClosestHWB, [ AC_DEFINE(HAVE_COLORCLOSESTHWB,1,[ ]) ])
AC_CHECK_LIB(z,compress, LIBS="$LIBS -lz",,)
AC_CHECK_LIB(png,png_info_init, LIBS="$LIBS -lpng",,)
AC_CHECK_LIB(z,compress, LIBS="-lz $LIBS",,)
AC_CHECK_LIB(png,png_info_init, LIBS="-lpng $LIBS",,)
AC_CHECK_LIB(gd, gdImageColorResolve, [AC_DEFINE(HAVE_GDIMAGECOLORRESOLVE,1,[ ])])
dnl Some versions of GD support both PNG and GIF. Check for both.
AC_CHECK_LIB(gd, gdImageCreateFromPng, [AC_DEFINE(HAVE_GD_PNG, 1, [ ])])
@@ -126,8 +126,8 @@ dnl A whole whack of possible places where this might be
LDFLAGS="$LDFLAGS -L$GD_LIB"
old_LIBS=$LIBS
AC_CHECK_LIB(gd, gdImageString16, [ AC_DEFINE(HAVE_LIBGD13,1, [ ]) ])
AC_CHECK_LIB(z,compress, LIBS="$LIBS -lz",,)
AC_CHECK_LIB(png,png_info_init, LIBS="$LIBS -lpng",,)
AC_CHECK_LIB(z,compress, LIBS="-lz $LIBS",,)
AC_CHECK_LIB(png,png_info_init, LIBS="-lpng $LIBS",,)
AC_CHECK_LIB(gd, gdImageColorResolve, [AC_DEFINE(HAVE_GDIMAGECOLORRESOLVE,1,[ ])])
AC_CHECK_LIB(gd, gdImageCreateFromPng, [AC_DEFINE(HAVE_GD_PNG, 1, [ ])])
AC_CHECK_LIB(gd, gdImageCreateFromGif, [AC_DEFINE(HAVE_GD_GIF, 1, [ ])])
@@ -154,8 +154,8 @@ dnl A whole whack of possible places where this might be
if test "$ac_cv_lib_gd_gdImageLine" = "yes"; then
old_LIBS=$LIBS
AC_CHECK_LIB(gd, gdImageString16, [ AC_DEFINE(HAVE_LIBGD13,1, [ ]) ])
AC_CHECK_LIB(z,compress, LIBS="$LIBS -lz",,)
AC_CHECK_LIB(png,png_info_init, LIBS="$LIBS -lpng",,)
AC_CHECK_LIB(z,compress, LIBS="-lz $LIBS",,)
AC_CHECK_LIB(png,png_info_init, LIBS="-lpng $LIBS",,)
AC_CHECK_LIB(gd, gdImageColorResolve, [AC_DEFINE(HAVE_GDIMAGECOLORRESOLVE,1, [ ])])
AC_CHECK_LIB(gd, gdImageCreateFromPng, [AC_DEFINE(HAVE_GD_PNG, 1, [ ])])
AC_CHECK_LIB(gd, gdImageCreateFromGif, [AC_DEFINE(HAVE_GD_GIF, 1, [ ])])
+3 -4
View File
@@ -1391,7 +1391,7 @@ PHP_FUNCTION(imagecolorstotal)
Define a color as transparent */
PHP_FUNCTION(imagecolortransparent)
{
zval **IM, **COL = NULL;
zval **IM, **COL;
gdImagePtr im;
int col;
GDLS_FETCH();
@@ -1414,9 +1414,8 @@ PHP_FUNCTION(imagecolortransparent)
ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, "Image", GDG(le_gd));
if ((*COL) != NULL) {
col = (*COL)->value.lval;
gdImageColorTransparent(im,col);
if (ZEND_NUM_ARGS() > 1) {
gdImageColorTransparent(im, Z_LVAL_PP(COL));
}
col = gdImageGetTransparent(im);
RETURN_LONG(col);
+139
View File
@@ -0,0 +1,139 @@
# Microsoft Developer Studio Project File - Name="gd" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=gd - Win32 Release_TS
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "gd.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "gd.mak" CFG="gd - Win32 Release_TS"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "gd - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "gd - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "gd - Win32 Release_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release_TS"
# PROP BASE Intermediate_Dir "Release_TS"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release_TS"
# PROP Intermediate_Dir "Release_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_GD" /D ZTS=1 /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GD_EXPORTS" /D "COMPILE_DL_GD" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_GDIMAGECOLORRESOLVE=1 /D HAVE_LIBTTF=1 /D "HAVE_GD_PNG" /D "HAVE_GD_JPG" /D "HAVE_GD_WBMP" /D HAVE_LIBGD13=1 /FR /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x406 /d "NDEBUG"
# ADD RSC /l 0x406 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386
# ADD LINK32 php4ts.lib freetype.lib gd.lib libjpeg.lib libtiff.lib libpng.lib zlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /nodefaultlib:"libcmt.lib" /nodefaultlib:"libc.lib" /out:"..\..\Release_TS/php_gd.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Debug_TS"
# PROP BASE Intermediate_Dir "Debug_TS"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Debug_TS"
# PROP Intermediate_Dir "Debug_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_GD" /D "DBNTWIN32" /D ZTS=1 /YX /FD /c
# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GD_EXPORTS" /D "COMPILE_DL_GD" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_GDIMAGECOLORRESOLVE=1 /D HAVE_LIBTTF=1 /D "HAVE_GD_PNG" /D "HAVE_GD_JPG" /D "HAVE_GD_WBMP" /D HAVE_LIBGD13=1 /FR /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x406 /d "NDEBUG"
# ADD RSC /l 0x406 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts_debug.lib /nologo /dll /machine:I386
# ADD LINK32 php4ts_debug.lib gd.lib libjpeg.lib freetype.lib libtiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /debug /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcmt.lib" /out:"..\..\Debug_TS/php_gd.dll" /libpath:"..\..\Debug_TS"
# SUBTRACT LINK32 /pdb:none
!ENDIF
# Begin Target
# Name "gd - Win32 Release_TS"
# Name "gd - Win32 Debug_TS"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\gd.c
# End Source File
# Begin Source File
SOURCE=.\gdcache.c
# End Source File
# Begin Source File
SOURCE=.\gdt1.c
# End Source File
# Begin Source File
SOURCE=.\gdttf.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\gdcache.h
# End Source File
# Begin Source File
SOURCE=.\gdt1.h
# End Source File
# Begin Source File
SOURCE=.\gdttf.h
# End Source File
# Begin Source File
SOURCE=.\php_gd.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project
+5 -5
View File
@@ -53,7 +53,7 @@ PHP_MINFO_FUNCTION(gettext)
}
/* {{{ proto string textdomain(string domain)
Set the textdomain to "domain". Returns the current domain. */
Set the textdomain to "domain". Returns the current domain */
PHP_FUNCTION(textdomain)
{
pval **domain;
@@ -79,7 +79,7 @@ PHP_FUNCTION(textdomain)
/* }}} */
/* {{{ proto string gettext(string msgid)
Return the translation of msgid for the current domain, or msgid unaltered if a translation does not exist. */
Return the translation of msgid for the current domain, or msgid unaltered if a translation does not exist */
PHP_FUNCTION(gettext)
{
pval **msgid;
@@ -97,7 +97,7 @@ PHP_FUNCTION(gettext)
/* }}} */
/* {{{ proto string dgettext(string domain_name, string msgid)
Return the translation of msgid for domain_name, or msgid unaltered if a translation does not exist. */
Return the translation of msgid for domain_name, or msgid unaltered if a translation does not exist */
PHP_FUNCTION(dgettext)
{
pval **domain_name, **msgid;
@@ -118,7 +118,7 @@ PHP_FUNCTION(dgettext)
/* }}} */
/* {{{ proto string dcgettext(string domain_name, string msgid, long category)
Return the translation of msgid for domain_name and category, or msgid unaltered if a translation does not exist. */
Return the translation of msgid for domain_name and category, or msgid unaltered if a translation does not exist */
PHP_FUNCTION(dcgettext)
{
pval **domain_name, **msgid, **category;
@@ -142,7 +142,7 @@ PHP_FUNCTION(dcgettext)
/* }}} */
/* {{{ proto string bindtextdomain(string domain_name, string dir)
Bind to the text domain domain_name, looking for translations in dir. Returns the current domain. */
Bind to the text domain domain_name, looking for translations in dir. Returns the current domain */
PHP_FUNCTION(bindtextdomain)
{
pval **domain_name, **dir;
+113
View File
@@ -0,0 +1,113 @@
# Microsoft Developer Studio Project File - Name="gettext" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=gettext - Win32 Release_TS
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "gettext.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "gettext.mak" CFG="gettext - Win32 Release_TS"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "gettext - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "gettext - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "gettext - Win32 Release_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release_TS"
# PROP BASE Intermediate_Dir "Release_TS"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release_TS"
# PROP Intermediate_Dir "Release_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_GETTEXT" /D ZTS=1 /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D "WIN32" /D "GETTEXT_EXPORTS" /D "COMPILE_DL_GETTEXT" /D ZTS=1 /D HAVE_LIBINTL=1 /D ZEND_DEBUG=0 /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZEND_WIN32" /D "PHP_WIN32" /FR /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x406 /d "NDEBUG"
# ADD RSC /l 0x406 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_gettext.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
# ADD LINK32 php4ts.lib gnu_gettext.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_gettext.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
!ELSEIF "$(CFG)" == "gettext - Win32 Debug_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Debug_TS"
# PROP BASE Intermediate_Dir "Debug_TS"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Debug_TS"
# PROP Intermediate_Dir "Debug_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MSSQL_EXPORTS" /D "COMPILE_DL_GETTEXT" /D ZTS=1 /YX /FD /c
# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GETTEXT_EXPORTS" /D "COMPILE_DL_GETTEXT" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_LIBINTL=1 /FR /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x406 /d "NDEBUG"
# ADD RSC /l 0x406 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386 /out:"../../Debug_TS/php_gettext.dll" /libpath:"..\..\Debug_TS"
# ADD LINK32 php4ts_debug.lib gnu_gettext.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /debug /machine:I386 /out:"../../Debug_TS/php_gettext.dll" /libpath:"..\..\Debug_TS"
!ENDIF
# Begin Target
# Name "gettext - Win32 Release_TS"
# Name "gettext - Win32 Debug_TS"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\gettext.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\php_gettext.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project
+1 -1
View File
@@ -3367,7 +3367,7 @@ PHP_FUNCTION(hw_identify) {
}
/* }}} */
/* {{{ proto array hw_objrec2array(string objrec)
/* {{{ proto array hw_objrec2array(string objrec, [array format])
Returns object array of object record */
PHP_FUNCTION(hw_objrec2array) {
zval **arg1, **arg2;
+3 -3
View File
@@ -47,7 +47,7 @@
#include "php_icap.h"
#include "modules.h"
#include "ext/standard/info.h"
#include "ext/standard/php_global.h"
#include "ext/standard/basic_functions.h"
#ifdef PHP_WIN32
#include "winsock.h"
#endif
@@ -64,7 +64,7 @@ typedef struct php_icap_le_struct {
typedef struct cal_list
{
UINT4 uid;
php_uint32 uid;
struct cal_list *next;
} cal_list_t;
@@ -904,7 +904,7 @@ void cc_searched (unsigned long cal_uid)
}
void cc_appended(UINT4 uid)
void cc_appended(php_uint32 uid)
{
}
+1 -1
View File
@@ -133,7 +133,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib wsock32.lib winmm.lib cclient.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_imap.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\..\php_build\IMAP\C-Client"
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib wsock32.lib winmm.lib cclient.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_imap.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline" /libpath:"..\..\..\php_build\IMAP\C-Client"
!ENDIF
-103
View File
@@ -1,103 +0,0 @@
#ifndef _INCLUDED_IMAP_H
#define _INCLUDED_IMAP_H
#if COMPILE_DL
#undef HAVE_IMAP
#define HAVE_IMAP 1
#endif
#if HAVE_IMAP
#ifndef PHP_WIN32
#include "build-defs.h"
#endif
/* Functions accessable to PHP */
extern zend_module_entry imap_module_entry;
#define imap_module_ptr &imap_module_entry
extern PHP_MINIT_FUNCTION(imap);
extern PHP_RINIT_FUNCTION(imap);
extern PHP_RSHUTDOWN_FUNCTION(imap);
PHP_MINFO_FUNCTION(imap);
PHP_FUNCTION(imap_open);
PHP_FUNCTION(imap_popen);
PHP_FUNCTION(imap_reopen);
PHP_FUNCTION(imap_num_msg);
PHP_FUNCTION(imap_num_recent);
PHP_FUNCTION(imap_headers);
PHP_FUNCTION(imap_headerinfo);
PHP_FUNCTION(imap_rfc822_parse_headers);
PHP_FUNCTION(imap_body);
PHP_FUNCTION(imap_fetchstructure);
PHP_FUNCTION(imap_fetchbody);
PHP_FUNCTION(imap_expunge);
PHP_FUNCTION(imap_delete);
PHP_FUNCTION(imap_undelete);
PHP_FUNCTION(imap_check);
PHP_FUNCTION(imap_close);
PHP_FUNCTION(imap_mail_copy);
PHP_FUNCTION(imap_mail_move);
PHP_FUNCTION(imap_createmailbox);
PHP_FUNCTION(imap_renamemailbox);
PHP_FUNCTION(imap_deletemailbox);
PHP_FUNCTION(imap_listmailbox);
PHP_FUNCTION(imap_scanmailbox);
PHP_FUNCTION(imap_subscribe);
PHP_FUNCTION(imap_unsubscribe);
PHP_FUNCTION(imap_append);
PHP_FUNCTION(imap_ping);
PHP_FUNCTION(imap_base64);
PHP_FUNCTION(imap_qprint);
PHP_FUNCTION(imap_8bit);
PHP_FUNCTION(imap_binary);
PHP_FUNCTION(imap_mailboxmsginfo);
PHP_FUNCTION(imap_rfc822_write_address);
PHP_FUNCTION(imap_rfc822_parse_adrlist);
PHP_FUNCTION(imap_setflag_full);
PHP_FUNCTION(imap_clearflag_full);
PHP_FUNCTION(imap_sort);
PHP_FUNCTION(imap_fetchheader);
PHP_FUNCTION(imap_fetchtext);
PHP_FUNCTION(imap_uid);
PHP_FUNCTION(imap_msgno);
PHP_FUNCTION(imap_list);
PHP_FUNCTION(imap_list_full);
PHP_FUNCTION(imap_listscan);
PHP_FUNCTION(imap_lsub);
PHP_FUNCTION(imap_lsub_full);
PHP_FUNCTION(imap_create);
PHP_FUNCTION(imap_rename);
PHP_FUNCTION(imap_status);
PHP_FUNCTION(imap_bodystruct);
PHP_FUNCTION(imap_fetch_overview);
PHP_FUNCTION(imap_mail_compose);
PHP_FUNCTION(imap_alerts);
PHP_FUNCTION(imap_errors);
PHP_FUNCTION(imap_last_error);
PHP_FUNCTION(imap_mail);
PHP_FUNCTION(imap_search);
PHP_FUNCTION(imap_utf8);
PHP_FUNCTION(imap_utf7_decode);
PHP_FUNCTION(imap_utf7_encode);
PHP_FUNCTION(imap_mime_header_decode);
#else
#define imap_module_ptr NULL
#endif /* HAVE_IMAP */
#endif
#define phpext_imap_ptr imap_module_ptr
+11 -4
View File
@@ -137,9 +137,9 @@ function_entry imap_functions[] = {
PHP_FE(imap_errors, NULL)
PHP_FE(imap_last_error, NULL)
#ifndef PHP_WIN32
PHP_FALIAS(pdf_open_memory_image, warn_not_available, NULL)
#else
PHP_FE(imap_mail, NULL)
#else
PHP_FALIAS(imap_mail, warn_not_available, NULL)
#endif
PHP_FE(imap_search, NULL)
PHP_FE(imap_utf7_decode, NULL)
@@ -2664,7 +2664,7 @@ PHP_FUNCTION(imap_fetchheader)
RETVAL_STRINGL(tempstring,(hlen+blen+1),1);
efree(tempstring);
} else {
RETVAL_STRING(mail_fetchheader_full(imap_le_struct->imap_stream, Z_LVAL_PP(msgno), NIL, NIL, NIL), 1);
RETVAL_STRING(mail_fetchheader_full(imap_le_struct->imap_stream, Z_LVAL_PP(msgno), NIL, NIL, (myargc == 3 ? Z_LVAL_PP(flags) : NIL)), 1);
}
}
/* }}} */
@@ -3056,6 +3056,10 @@ PHP_FUNCTION(imap_mail_compose)
convert_to_string_ex(pvalue);
rfc822_parse_adrlist (&env->reply_to, Z_STRVAL_PP(pvalue), "NO HOST");
}
if (zend_hash_find(Z_ARRVAL_PP(envelope), "subject", sizeof("subject"), (void **) &pvalue)== SUCCESS) {
convert_to_string_ex(pvalue);
env->subject=cpystr(Z_STRVAL_PP(pvalue));
}
if (zend_hash_find(Z_ARRVAL_PP(envelope), "to", sizeof("to"), (void **) &pvalue)== SUCCESS) {
convert_to_string_ex(pvalue);
rfc822_parse_adrlist (&env->to, Z_STRVAL_PP(pvalue), "NO HOST");
@@ -3381,6 +3385,7 @@ PHP_FUNCTION(imap_search)
int ind, ind_type, args;
pils *imap_le_struct;
long flags;
char *search_criteria;
MESSAGELIST *cur;
IMAPLS_FETCH();
@@ -3391,6 +3396,7 @@ PHP_FUNCTION(imap_search)
convert_to_long_ex(streamind);
convert_to_string_ex(criteria);
search_criteria = estrndup(Z_STRVAL_PP(criteria), Z_STRLEN_PP(criteria));
if (args == 2) {
flags = SE_FREE;
@@ -3407,7 +3413,7 @@ PHP_FUNCTION(imap_search)
}
IMAPG(imap_messages) = NIL;
mail_search_full(imap_le_struct->imap_stream, NIL, mail_criteria(Z_STRVAL_PP(criteria)), flags);
mail_search_full(imap_le_struct->imap_stream, NIL, mail_criteria(search_criteria), flags);
if (IMAPG(imap_messages) == NIL) {
RETURN_FALSE;
}
@@ -3419,6 +3425,7 @@ PHP_FUNCTION(imap_search)
cur = cur->next;
}
mail_free_messagelist(&IMAPG(imap_messages));
efree(search_criteria);
}
/* }}} */
Loaded 100 of 344 files, more files were not shown because too many files have changed in this diff. Show more