[PHP-DOC] Re: [PHP-DEV] Moving PHP documentation to Git repository

2013-06-25 Thread Pierre Joye
and now with the right name...

On Tue, Jun 25, 2013 at 10:18 AM, Pierre Joye pierre@gmail.com wrote:
 On Tue, Jun 25, 2013 at 9:45 AM, Christoph Rosse cro...@2bepublished.at 
 wrote:
 On 25.06.2013 08:46, Christian Stoller wrote:

 Hi internals.

 What do you think about moving the PHP documentation to a Git repository,
 mirrored on Github? Doing this would make it possible for everybody to
 extend the documentation easily by creating pull requests.

 Today one has to get an SVN account to edit the docu or you have to use
 https://edit.php.net/ which does not work as expected (at least for me when
 I tried to update some German documentation). My changes have not been
 integrated for some months (I had to write an email to somebody of the doc
 team to apply the changes).

 Symfony does it this way (see https://github.com/symfony/symfony-docs/)
 and I like it very much. It is really easy to extend/update parts of the
 docu which are not complete or outdated and I am sure that it is comfortable
 and timesaving for the doc team, too.

 What do you think?

 Best regards
 Christian


 As one who's had very similar experiences when trying to update some
 documentation via. edit.php.net (no feedback, no integration etc.) I would
 really love to see this feature.

 Really? That's not too good as we have been promoted this tool for
 some time already.

 However adding the php-doc list to CC so they can answer and give us
 some feedback/info.

 Cheers,
 --
 Pierre

 @pierrejoye |  http://www.libgd.org



-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


[PHP-DOC] Re: A Broken Link on Your Site About OSX Dashboard

2012-12-10 Thread Pierre Joye
fwd to the right list.

On Mon, Dec 10, 2012 at 8:30 AM, Erin Williams
erin.williams...@gmail.com wrote:
 Hi Administrator,

 I came across your website and wanted to notify you about a broken link on
 your page in case you weren't aware of it. The link on cn2.php.net/tips.php
 which links to http://www.apple.com/macosx/features/dashboard/ is no longer
 working. I've included a link to a useful page on OSX Dashboard that you
 could replace the broken link with if you're interested in updating your
 website. Thanks for providing a great resource!

 Link: http://www.learnstuff.com/osx-dashboard/

 Best,
 Erin Williams




-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


[PHP-DOC] Re: Chinese doc gone

2012-09-17 Thread Pierre Joye
Adding the right list to the loop.

On Mon, Sep 17, 2012 at 9:58 AM, Laruence larue...@php.net wrote:
 Hi:
 I noticed that chinese doc is not availble anymore at
 http://www.php.net/docs.php

 I am not sure what's wrong with it..  but lot's of people in china
 asked me about that..

 could some one related fix that? :)

 and, there are almost 40 million PHPers in china, I will try to
 find someone to contribute to the doc translating ...

 thanks

 --
 Laruence  Xinchen Hui
 http://www.laruence.com/



-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


[PHP-DOC] Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ UPGRADING

2011-11-22 Thread Pierre Joye
Please document them as deprecated and mention that they always return
false (obviously :)

On Tue, Nov 22, 2011 at 2:29 PM, Peter Cowburn petercowb...@gmail.com wrote:
 Hi docs folks,

 What are your thoughts on how to treat the
 get_magic_quotes_(gpc|runtime) functions, in the documentation.
 Traditionally we mark functions as deprecated if they're deprecated in
 the code (e.g. PHP_DEP_FE), but that's not the case for these two.

 Should we just say in the change log that they'll always return false,
 or should the term deprecated be used?

 Peter

 On 22 November 2011 13:16, Pierre Joye pierre@gmail.com wrote:
 they are, we only not raise notices or warnings anymore to keep the
 user experience at a good level. So please keep them in here :)

 On Tue, Nov 22, 2011 at 2:11 PM, Pierrick Charron pierr...@php.net wrote:
 pierrick                                 Tue, 22 Nov 2011 13:11:20 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=319679

 Log:
 Those functions are not deprecated (r319249 #55371)

 Bug: https://bugs.php.net/55371 (Closed) get_magic_quotes_gpc() throws 
 deprecation warning

 Changed paths:
    U   php/php-src/branches/PHP_5_4/UPGRADING

 Modified: php/php-src/branches/PHP_5_4/UPGRADING
 ===
 --- php/php-src/branches/PHP_5_4/UPGRADING      2011-11-22 12:47:49 UTC 
 (rev 319678)
 +++ php/php-src/branches/PHP_5_4/UPGRADING      2011-11-22 13:11:20 UTC 
 (rev 319679)
 @@ -258,8 +258,6 @@
  7. Deprecated
  =

 -- get_magic_quotes_gpc()
 -- get_magic_quotes_runtime()
  - mcrypt_generic_end()
  - mysql_list_dbs()



 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




 --
 Pierre

 @pierrejoye | http://blog.thepimp.net | http://www.libgd.org

 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php






-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


Re: [PHP-DOC] [PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ UPGRADING

2011-11-22 Thread Pierre Joye
On Tue, Nov 22, 2011 at 5:56 PM, Philip Olson phi...@roshambo.org wrote:

 I do not think they are deprecated, nor think they should be documented as 
 such.

They are but we removed the warnings to ease migration.

 These functions exist to help write portable code that works with 5.3 and 5.4 
 and beyond. What does deprecating or removing them solve?

Clear statement about the situation and to ensure that people can find
this info (about MQ being dead too), better to have that in many
places instead of none.

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


[PHP-DOC] Re: [PHP-CVS] Re: [PHP-DOC] [PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ UPGRADING

2011-11-22 Thread Pierre Joye
On Tue, Nov 22, 2011 at 6:28 PM, Hannes Magnusson
hannes.magnus...@gmail.com wrote:
 On Tue, Nov 22, 2011 at 18:19, Pierre Joye pierre@gmail.com wrote:
 On Tue, Nov 22, 2011 at 5:56 PM, Philip Olson phi...@roshambo.org wrote:

 I do not think they are deprecated, nor think they should be documented as 
 such.

 They are but we removed the warnings to ease migration.


 No they are not deprecated.
 The feature itself is deprecated,

The feature is removed in 5.4, not deprecated. So the function to
check if MQ is enabled or not has been kept as convenience only for
now and is deprecated. Please refer to the discussion about that on
the internals mailing list. We only agreed on removing the warnings as
it makes no sense to be noisy in this case.


[PHP-DOC] Re: [PHP-CVS] Re: [PHP-DOC] [PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ UPGRADING

2011-11-22 Thread Pierre Joye
On Tue, Nov 22, 2011 at 6:41 PM, Hannes Magnusson
hannes.magnus...@gmail.com wrote:

 No.
 Please stop telling the doc team how to do their work.

I'm not telling anyone anything but how things have been discussed.

However, now that you open this topic, the doc team may document what
we decide not what you think is right or not.

 They know exactly how to community the appropriate information.

You do not in this, other surely for what I hear.

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


[PHP-DOC] Re: [PHP-CVS] Re: [PHP-DOC] [PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ UPGRADING

2011-11-22 Thread Pierre Joye
On Tue, Nov 22, 2011 at 6:53 PM, Pierre Joye pierre@gmail.com wrote:
 On Tue, Nov 22, 2011 at 6:41 PM, Hannes Magnusson
 hannes.magnus...@gmail.com wrote:

 No.
 Please stop telling the doc team how to do their work.

 I'm not telling anyone anything but how things have been discussed.

 However, now that you open this topic, the doc team may document what
 we decide not what you think is right or not.

 They know exactly how to community the appropriate information.

 You do not in this, other surely for what I hear.

+case


[PHP-DOC] Re: [PHP-CVS] [PHP-DOC] [PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ UPGRADING

2011-11-22 Thread Pierre Joye
On Tue, Nov 22, 2011 at 7:04 PM, Philip Olson phi...@roshambo.org wrote:

 I cannot find a discussion or decision. An old patch was applied that
 lacked an associated RFC. People later noticed the E_DEPRECATED error,
 so it was removed. That's how I see it, at least,


We removed it because it makes no sense to have such a noise here,
that's not very developer friendly. But the function remains
deprecated and the related feature has been removed. Does that not
make sense to you to deprecate (in the doc only here, for the reason I
explained in here) a function related to a dead feature? If not then
I'm out of argument, sorry.

-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


[PHP-DOC] Re: [PECL-DEV] libidn2 extension for php

2011-11-02 Thread Pierre Joye
On Wed, Nov 2, 2011 at 12:15 PM, Kalle Sommer Nielsen ka...@php.net wrote:
 2011/11/2 Pierre Joye pierre@gmail.com:
 Pecl's idn is php5 only.

 PHP 5.0, 5.1 where intl is not supported then?

Again, they are different functions with some incompatibilities.
Saying 5.2+ only and only mentioning that for dead php versions, one
can rely (at their own risk etc.) on dead cow pecl's idn is just fine
and better than showing wrong ways to do something.


Re: [PHP-DOC] Re: [PECL-DEV] libidn2 extension for php

2011-11-02 Thread Pierre Joye
On Wed, Nov 2, 2011 at 12:28 PM, Hannes Magnusson
hannes.magnus...@gmail.com wrote:
 On Wed, Nov 2, 2011 at 12:18, Pierre Joye pierre@gmail.com wrote:
 On Wed, Nov 2, 2011 at 12:15 PM, Kalle Sommer Nielsen ka...@php.net wrote:
 2011/11/2 Pierre Joye pierre@gmail.com:
 Pecl's idn is php5 only.

 PHP 5.0, 5.1 where intl is not supported then?

 Again, they are different functions with some incompatibilities.
 Saying 5.2+ only and only mentioning that for dead php versions, one
 can rely (at their own risk etc.) on dead cow pecl's idn is just fine
 and better than showing wrong ways to do something.


 We do not only document for people writing new code.
 We also document for people running dead cow pecl's idn code trying
 to understand wtf.

 There is nothing wrong with the version info there.
 If you are aware of specific differences in these functions that
 should be document, please file a bug report.

There is something wrong from the beginning (I stated that already
back then) as they are two different functions totally unrelated to
each other except that they have the same features.

If anything, I would simply add for PECL's IDN (superseded and not
maintained anymore), please read some other page).

-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


[PHP-DOC] Re: [PHP-DEV] 5.4 beta

2011-10-17 Thread Pierre Joye
hi Hannes,

On Mon, Oct 17, 2011 at 12:24 PM, Hannes Magnusson
hannes.magnus...@gmail.com wrote:

 The UPGRADING file has usually served as a base for
 php.net/migration53 for example.
 Its been a quite confusing topic though, stuff added in bugfix
 release.. should that go there too?
 The migration docs generally list everything from BC issues to new
 params constants and functions and classes within the .0 release, but
 after that... not so much.

That's right. Also the original idea was to have sections, per PHP
version. Now it is a big file and it is hard to get what was introduce
in which version.

 We should probably try to come up with some RFC on this to try to keep
 it consistent.

Agreed.

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


Re: [PHP-DOC] Broken URL entities report

2011-08-23 Thread Pierre Joye
On Tue, Aug 23, 2011 at 5:44 PM, Kalle Sommer Nielsen ka...@php.net wrote:
 2011/8/23 Hannes Magnusson hannes.magnus...@gmail.com:
 Anyone knows which urls should be used for these now?

 I don't even know any of the Windows urls anymore, only Pierre does
 after the new pecl site was moved to use pecl2

It is in the wiki, since ages. So no, not only knows it. Please do not
spread misleading info if you are not aware of the updates, thanks :)

@hannes, please open a doc bug and assign it to me, I can take care of
that in the next couple of weeks, thanks!

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


Re: [PHP-DOC] [DOC-CVS] svn: /phpdoc/ doc-base/trunk/entities/global.ent doc-base/trunk/manual.xml.in en/trunk/reference/suhosin/book.xml en/trunk/reference/suhosin/configure.xml en/trunk/reference/su

2011-08-16 Thread Pierre Joye
On Tue, Aug 16, 2011 at 8:06 PM, Ferenc Kovacs tyr...@gmail.com wrote:

 Stefan also mentioned that he won't continue the development of
 bytekit in it's current form, and if I remember correctly Pierre
 suggested that if the package is abandoned by the original developer,
 a new developer could take it over and bring it to pecl.
 for suhosin, having a decent documentation is much needed, and as you
 also mentioned, it's really popular, albeit the Gentoo dropped the
 suhosin patch recently, as the it doesn't apply cleanly anymore.
 for the long term, I would like to see that we leave the past behind,
 and the useful features should be incorporated in the core, this way
 removing the need for suhosin in it's current form.

As of now there is almost zero reason to actually use it. Most were
arguing about blowfish or session safety (entropy src) which is now
fully supported in core and even in a better form than in the
extension. I'm still waiting for a list of the feature/addition we
should introduce in core.

I'm totally against to document suhosin in www.php.net or any related
sites. This extension is not supported, nor it is part of our
projects. Distros having a wrong definition of safety and enabling
random extension is a real problem, making it somehow official won't
improve the situation.

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


Re: [PHP-DOC] Fwd: Farewell CHM, hello EPUB!

2010-09-06 Thread Pierre Joye
http://forums.adobe.com/thread/708344 is informative.

On Mon, Sep 6, 2010 at 8:24 PM, pedram salehpoor
pedram.salehp...@gmail.com wrote:
 I hope it will not have problems about right to left languages.

 Regards,
 Pedram

 We may as well do this too.

 I immediately downloaded the EPUB version from mysql.com and spent 5 minutes
 trying to open it on my Mac, and failed. Sure this can be overcome with
 education but it's worth noting that it's not easy, yet, and feels geared
 towards mobile devices so far. I didn't try the Firefox plugin. Although,
 the MySQL epub download appears to be missing an .epub file but I don't know
 the topic.

 Regardless of my epub ignorance, I think it's a good idea to offer this
 alternative via PhD. I vaguely remember it coming up before, but now forget.

 Regards,
 Philip

 Begin forwarded message:

 From: Brett Bieber brett.bie...@gmail.com
 Date: September 6, 2010 6:10:38 AM PDT
 To: PEAR Doc List pear-...@lists.php.net
 Subject: [PEAR-DOC] Fwd: Farewell CHM, hello EPUB!

 An interesting announcement here — I know we've had plenty of issues
 with our CHM manuals, and maybe this is something we should consider.
 I would be in favor of an epub format for our manual.


 -- Forwarded message --
 From: Stefan Hinz stefan.h...@oracle.com
 Date: Mon, Sep 6, 2010 at 4:31 AM
 Subject: Farewell CHM, hello EPUB!
 To: annou...@lists.mysql.com


 For a long time, the MySQL Documentation Team has been providing CHM
 files for most MySQL documentation we publish. Like many other formats,
 CHM-format docs can be downloaded from http://dev.mysql.com/doc. CHM
 (Compiled HTML Help) has been the de facto standard help file format on
 Windows since 1997, but the technology behind it is outdated and has all
 kinds of quirks. The successor format introduced with Windows Vista is
 AP Help, but it hasn't taken off in practice so far. So, with CHM being
 outdated and AP Help spread anything but widely, lots of vendors have
 started providing documentation on Windows in PDF or HTML format.

 Building CHM-format documentation is a challenge of its own. I'll not go
 into details here, so let me just state that it requires a dedicated
 Windows box (or VM), and while it can be automated using Power Shell
 commands, there's no way to find out whether or not a CHM file was built
 correctly, except by manual inspection. This makes it different from all
 other documentation formats where technical QA is done (successfully) in
 an automated fashion.

 With the increasing complexity and size of our documentation (the MySQL
 5.1 Manual contains more than 1.6 million words now!), providing CHM has
 become more and more of a pain, because builds tend to break more often.
 We've stopped shipping CHM with the MySQL Server on Windows months ago
 because we simply couldn't guarantee that the help file shipped with the
 software would work. Also, we're running short on hardware resources, so
 we'd rather stop wasting the resources we have on building a format
 that's of limited use, anyway.

 This is why we'll stop providing CHM for any of the documentation we
 publish.

 To alleviate potential pains anyone might have with this decision, let
 me tell you that we've started providing EPUB-format docs. EPUB (see
 http://en.wikipedia.org/wiki/EPUB) is an open standard format for screen
 readers, mobile or not, and is fairly easy (and not resource-intensive!)
 to compile. Thanks to Lenz for suggesting to build EPUB!

 Go to http://dev.mysql.com/doc to grab MySQL documentation in EPUB
 format. To read EPUB on desktop machines, I use a Firefox add-on,
 unsurprisingly called epubreader, which loads EPUB documents fast and
 renders them nicely. That said, please be aware that EPUB can't do
 anything about the fact that the MySQL Reference Manual is huge, so
 downloading it to a mobile device can take a while. The MySQL 5.1 Manual
 is currently a whopping 15 MB!

 See also: http://blogs.sun.com/mysqlf/entry/farewell_chm_hello_epub

 --
 Cheers,

 Stefan Hinz stefan.h...@sun.com, MySQL Documentation Manager

 Phone: +49-30-82702940, Fax: +49-30-82702941, http://dev.mysql.com/doc

 ORACLE Deutschland B.V.  Co. KG
 Registered Office: Riesstr. 25, 80992 Muenchen, Germany
 Commercial Register: Local Court Of Munich, HRA 95603

 General Partner: ORACLE Deutschland Verwaltung B.V.
 Rijnzathe 6, 3454PV De Meern, Niederlande
 Register Of Chamber Of Commerce: Midden-Niederlande, No. 30143697
 Managing Directors: Juergen Kunz, Marcel van de Molen,
 Alexander van der Ven

 --
 MySQL Announce Mailing List
 For list archives: http://lists.mysql.com/announce
 To unsubscribe:
 http://lists.mysql.com/announce?unsub=brett.bie...@gmail.com




 --
 Brett Bieber

 --
 PEAR Documentation List Mailing List (http://pear.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php







-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


[PHP-DOC] Re: oti1.php.net down?

2010-08-10 Thread Pierre Joye
I fixed that earlier. But I was missing the initial steps to setup the
env. Is it not in the wiki somewhere?

On Tue, Aug 10, 2010 at 11:59 AM, Hannes Magnusson
hannes.magnus...@gmail.com wrote:
 On Tue, Aug 10, 2010 at 11:51, Pierre Joye pierre@gmail.com wrote:
 ok...

 Hannes can you point me again to the procedure to setup an environment
 to generate CHM from php-doc please?

  pear install doc.php.net/phd
  for lang in en fr ja ; do
   svn co http://svn.php.net/repository/phpdoc/modules/doc-$lang
   php configure.php doc-base/configure.php --lang=$lang
   phd -d doc-$lang/doc-base/.manual.xml --package PHP --format chm --lang 
 $lang
   ./doc-base/trunk/build.chms.bat $lang
  done

 or something along those lines.
 You may want to have just one full svn checkout of the languages.
 Kalle did some changes to the build.chms.bat so you should probably
 ask him or look at how it works

 -Hannes




-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


[PHP-DOC] Re: oti1.php.net down?

2010-08-10 Thread Pierre Joye
ok, I have no time yet (holidays) to ask every single detail to
restore this service. I will take care of that when I'm back to work.

On Tue, Aug 10, 2010 at 12:16 PM, Hannes Magnusson
hannes.magnus...@gmail.com wrote:
 I have absolutely no idea what you are talking about.
 If you mean Windows specific setup things, or external dependencies,
 you'll have to ask Kalle.

 All I almost-know how works is the how actual manual building is done.

 Ouh, the scp (in the .bat file) used to refer to a ssh key I generated
 for the windows box.. don't have that private key anywhere, so we'll
 have to create another one.

 -Hannes


 On Tue, Aug 10, 2010 at 12:04, Pierre Joye pierre@gmail.com wrote:
 I fixed that earlier. But I was missing the initial steps to setup the
 env. Is it not in the wiki somewhere?

 On Tue, Aug 10, 2010 at 11:59 AM, Hannes Magnusson
 hannes.magnus...@gmail.com wrote:
 On Tue, Aug 10, 2010 at 11:51, Pierre Joye pierre@gmail.com wrote:
 ok...

 Hannes can you point me again to the procedure to setup an environment
 to generate CHM from php-doc please?

  pear install doc.php.net/phd
  for lang in en fr ja ; do
   svn co http://svn.php.net/repository/phpdoc/modules/doc-$lang
   php configure.php doc-base/configure.php --lang=$lang
   phd -d doc-$lang/doc-base/.manual.xml --package PHP --format chm --lang 
 $lang
   ./doc-base/trunk/build.chms.bat $lang
  done

 or something along those lines.
 You may want to have just one full svn checkout of the languages.
 Kalle did some changes to the build.chms.bat so you should probably
 ask him or look at how it works

 -Hannes




 --
 Pierre

 @pierrejoye | http://blog.thepimp.net | http://www.libgd.org





-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


Re: [PHP-DOC] Re: [PECL-CVS] svn: /pecl/

2010-08-09 Thread Pierre Joye
hi Philip,

Thanks for the clarification :)

Cheers,

2010/8/6 Philip Olson phi...@roshambo.org:

 While hosting code within the PECL SVN repository has its advantages, I don't 
 think one of them should be the 'ability to have documentation at php.net' 
 and instead we, the documentation team, should adhere to what's listed at 
 pecl.php.net.

 Users mostly care about 'pecl install foo' which is what we document. So if 
 extensions like XDebug, Mongo and Memcached want to host sources elsewhere 
 then so be it, but they are listed at pecl.php.net so can (and should) be 
 documented at php.net. The VCS landscape has changed, so let's accept it.

 Also, I think it's far worse to scatter documentation all over the Internet 
 which is something PEAR is suffering from today.

 Regards,
 Philip


-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


[PHP-DOC] Re: [PECL-CVS] svn: /pecl/

2010-08-05 Thread Pierre Joye
hi,

On Thu, Aug 5, 2010 at 10:18 AM, Hannes Magnusson
hannes.magnus...@gmail.com wrote:
 On Wed, Aug 4, 2010 at 22:59, Kristina Chodorow krist...@php.net wrote:
 kristina                                 Wed, 04 Aug 2010 20:59:18 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=301862

 Log:
 mongo extension is now maintained on github

 Hmh. There is one quite large consequence of not maintaining the
 extension in PECL: The docs.
 http://php.net/manual only documents things that is within our SVN and 
 control.
 That effectively means; if you don't want the ext in PECL anymore, the
 docs will have to be removed too.

It is more the repository rather than the extension itself. More and
more extensions repo have been moved to github to be able to enjoy
git. But the releases are still done under pecl.php.net.

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


[PHP-DOC] Re: [PECL-CVS] svn: /pecl/

2010-08-05 Thread Pierre Joye
hi,

On Thu, Aug 5, 2010 at 10:50 AM, Hannes Magnusson
hannes.magnus...@gmail.com wrote:

 I suppose the definition of a 'PECL extension' if if its packaged and
 released on pecl.php.net (like xdebug for example).
 But we do have the problem though of not having access to the code if
 its not in PHP SVN, and therefore we cannot do anything when problems
 occur - and I think for that reason we cannot have the docs in the PHP
 manual (just like xdebug) :|

Why do you need to access the code? You can always report a bug if necessary.

 There is a View Documentation link on the package page on
 pecl.php.net, which in the case of xdebug links to xdebug.org - and I
 think the same applies to this case.

I don't think so. And I'm also strongly considering to move some of my
exts repo to github to make my work easier. It is also possible to
better integrate github in pecl.php.net, but that's something I would
like to investigate once I'm back to normal work :).

Cheers,
--
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


[PHP-DOC] Re: [PECL-CVS] svn: /pecl/

2010-08-05 Thread Pierre Joye
On Thu, Aug 5, 2010 at 11:12 AM, Hannes Magnusson
hannes.magnus...@gmail.com wrote:
 On Thu, Aug 5, 2010 at 10:58, Pierre Joye pierre@gmail.com wrote:
 hi,

 On Thu, Aug 5, 2010 at 10:50 AM, Hannes Magnusson
 hannes.magnus...@gmail.com wrote:

 I suppose the definition of a 'PECL extension' if if its packaged and
 released on pecl.php.net (like xdebug for example).
 But we do have the problem though of not having access to the code if
 its not in PHP SVN, and therefore we cannot do anything when problems
 occur - and I think for that reason we cannot have the docs in the PHP
 manual (just like xdebug) :|

 Why do you need to access the code? You can always report a bug if necessary.

 History tells us different.
 We cannot even reach many of the people who have code in our SVN - but
 we do have the possibility of fixing issues ourself because we have
 access to it.

 Also keep in mind that PECL extensions are often updated when the API
 in PHP changes drastically, and various people help out making sure
 they build on newer PHP versions. We cannot do that with extensions
 hosted outside of PHP SVN.

 We have never published docs from extensions not within our control in
 the passed, and doing that now will create a precedence for all the
 random extensions in the world wanting the same.
 We simply cannot do that.

Very different topics are mixed in your reply.

We never forced (and we decided to) to use php.net's repository.

You said that docs have issues when the code is not in php.net's repo,
but I don't see why in your reply

Patches can always be sent via the bug tracker. However I have more
issues with extensions like xdebug when they use nothing but the web
site to release their code. They should just create their own channel
and that's it.

What prevents you to publish the docs for a doc when the code for the
extension is not in php.net's repository?

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


[PHP-DOC] Re: [PECL-CVS] svn: /pecl/

2010-08-05 Thread Pierre Joye
On Thu, Aug 5, 2010 at 11:44 AM, Hannes Magnusson
hannes.magnus...@gmail.com wrote:

 This thread is about mongo (with general explanation of how things work).
 Mongo uses nothing of the PHP infrastructure, other then maybe PECL
 packaging. They have external repo, bug tracker and support channels -
 just like xdebug.

We knew that when we accepted this extension and I have no problem
with continuing to publish the mongo documentation. Or to be more
clear, I see no reason to change anything in our policy right now.

 We have no control whatsoever over anything, and therefore cannot even
 pay attention to new features to document. We simply cannot have docs
 for extensions not maintain in our infrastructure.

If you want to force every pecl's project to use svn.php.net and
pecl's bug trackers, then please make a proposal.

For one, I would rather go (and will propose it) down the way to
integrate external services like github and bitbucket with our
infrastructures to be sure that PECL remains the place to be for PHP's
innovations (it is not anymore).

I don't have a problem either with projects using both pecl and
external trackers (makes sense for daemon clients as some bugs may
move from server to client). Howevere I do understand your feeling
while looking at xdebug (but still has no issue).

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


[PHP-DOC] Re: [PECL-CVS] svn: /pecl/

2010-08-05 Thread Pierre Joye
On Thu, Aug 5, 2010 at 12:37 PM, Hannes Magnusson
hannes.magnus...@gmail.com wrote:

 We knew that when we accepted this extension and I have no problem
 with continuing to publish the mongo documentation. Or to be more
 clear, I see no reason to change anything in our policy right now.

 I have a big problem with it. This has been the policy for years.

 In the end, its the doc teams call (hence the CC).

No it is not the current policy. It is the policy for the
documentation (to be in php-doc's repo) but not for the code. It was
never a requirement, not even the usage of a VCS is requirement.

 We have no control whatsoever over anything, and therefore cannot even
 pay attention to new features to document. We simply cannot have docs
 for extensions not maintain in our infrastructure.

 If you want to force every pecl's project to use svn.php.net and
 pecl's bug trackers, then please make a proposal.

 I don't want to enforce it. But to get the docs in the PHP manual
 certain rules have to be followed, and this is one of them.

I don't see what's the code has to do with the code. As long as the
doc is in php-doc, what or where is the problem?

 I don't have a problem either with projects using both pecl and
 external trackers (makes sense for daemon clients as some bugs may
 move from server to client). Howevere I do understand your feeling
 while looking at xdebug (but still has no issue).

 Using external bug tracker for the extension and then our tracker for
 doc issues doesn't make sense.
 The doc team simply cannot follow random bug trackers.

And does not have to. Reporting bugs to pecl.php.net's tracker works
just fine and developers follow them.

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


[PHP-DOC] Re: [PECL-CVS] svn: /pecl/

2010-08-05 Thread Pierre Joye
On Thu, Aug 5, 2010 at 2:44 PM, Pierre Joye pierre@gmail.com wrote:

 I don't see what's the code has to do with the code. As long as the
 doc is in php-doc, what or where is the problem?

with the ..doc.. :)

-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


[PHP-DOC] Re: [PECL-CVS] svn: /pecl/

2010-08-05 Thread Pierre Joye
hi,

On Thu, Aug 5, 2010 at 3:43 PM, Hannes Magnusson
hannes.magnus...@gmail.com wrote:

 It is waaay to much hassle to work with things outside of our domain.
 If all the things around the extension is external, then your users
 expect to find the manual at your site anyway..

As I said already numerous times in this discussion:

- the developers are available via the normal and standard way, the
pecl's tracker, the mailing list and on IRC too for some of them

- The developers read the bugs via the bug trackers too

Alternatively I have no problem either to request the use of the
pecl's bug tracker (if another one is also used, that's not a problem
as long as pecl's tracker is allowed too). Doing so will minimize the
pain for patch ore request submission.

Now, if the php-doc team considers to stop hosting documentation for
PECL's extension not having their repository in svn.php.net, then it
is a rather drastic change and I have to think a bit further about the
consequences of such changes in our policies.

About users expecting everything to be at other location, my personal
experience told me that they don't. They install an extension using
'pecl install foo' and then go to www.php.net/foo to find the doc (or
via the TOC).

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


Re: [PHP-DOC] Re: [PECL-CVS] svn: /pecl/

2010-08-05 Thread Pierre Joye
On Thu, Aug 5, 2010 at 5:24 PM, Derick Rethans der...@php.net wrote:

 Perhaps it's time to write up a few of those guidelines? I obviously
 have little problem with having the mongo driver docs in phpdoc, but
 we do need to realize that we can't just have any random PHP extension's
 docs in phpdoc. For example, we probably don't want
 code-licence-incompatible extension's docs in phpdoc.

php-doc policy is clear about that. Any doc must be under the CC license.

 So restricting it to PECL extensions that are
 installable through our pecl channel makes sense. (Because we demand
 certain licenses for those).

That's what we do already (and why mongo and xdebug are fine). What
Hannes seems to ask is that the code must be in svn.php.net and only
pecl's tracker can be used.

The latter is something I can imagine but as a complement to other
trackers (like for mysql for example). For the code repository, I can
imagine to restrict to svn.php.net, github and bitbucket. That should
give enough options and we can nicely integrate each of these repos
with our infrastructure (commits mail and tracker included).


Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


Re: [PHP-DOC] Re: [PECL-CVS] svn: /pecl/

2010-08-05 Thread Pierre Joye
On Thu, Aug 5, 2010 at 5:51 PM, Derick Rethans der...@php.net wrote:

 Sure, you can still make docs CC-licensed for a very closed extension
 though.

  So restricting it to PECL extensions that are installable through
  our pecl channel makes sense. (Because we demand certain licenses
  for those).

 That's what we do already (and why mongo and xdebug are fine). What
 Hannes seems to ask is that the code must be in svn.php.net and only
 pecl's tracker can be used.

 The latter is something I can imagine but as a complement to other
 trackers (like for mysql for example). For the code repository, I can
 imagine to restrict to svn.php.net, github and bitbucket. That should
 give enough options and we can nicely integrate each of these repos
 with our infrastructure (commits mail and tracker included).

 Actually, I don't see why you want to restrict where the code is; as
 long as it is publically available (and not just a code dump once in a
 while).

I don't want to. Docs seem to be willing to have such restrictions.

 I would not be in favour of integrating other repositories either.

I am in favor of nice integration to make the pecl platform a better
place to host PHP extensions. The current situation is very obvious
and clear, people does not like pecl because we don't provide what
they need.

I don't care about VCS related discussions but it is a good thing to
provide alternative to SVN. github and bitbuckets are the leading
tools of choice. And both github and bitbucket allow clean integration
in any external tools (like pecl.php.net, trackers, snaps, builds,
etc.). That's definitively something I'm willing to do.

It is also not about good/choosen extensions but about being sure that
we are attractive to new or existing developers. Right now we are not.

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


[PHP-DOC] Re: [PECL-CVS] svn: /pecl/

2010-08-05 Thread Pierre Joye
On Thu, Aug 5, 2010 at 6:09 PM, Hannes Magnusson
hannes.magnus...@gmail.com wrote:
 On Thu, Aug 5, 2010 at 15:59, Pierre Joye pierre@gmail.com wrote:
 Now, if the php-doc team considers to stop hosting documentation for
 PECL's extension not having their repository in svn.php.net, then it
 is a rather drastic change and I have to think a bit further about the
 consequences of such changes in our policies.

 I don't know where you are extracting phpdoc policies from, but since
 I have been involved with the project only docs for extensions that
 live within our domain and control are included in the PHP manual.
 Noone is policing commits to phpdoc, and those who have karma are
 trusted to follow the rules and guidelines of the project.

Hannes, Mongo is hosted on php.net, period.

The code repository is another discussion which has nothing do to with
php-doc. However if the php-doc team considers that the code must be
in php.net too to allow the doc to be hosted on www.php.net, then we
have a serious issue and we need to fix it.

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


Re: [PHP-DOC] CHM builds need help

2010-06-02 Thread Pierre Joye
hi,

As I told you on IRC earlier this week, the problem is fixed and
everything is back online.

The script works as expected and the configuration on the server is
fixed. I will update the wiki to document how to do it as soon as
possible.

Cheers,

On Wed, Jun 2, 2010 at 9:54 PM, Philip Olson phi...@roshambo.org wrote:
 Hello everyone,

 A few people have tried to solve our CHM build problem but without success. 
 This is a call to anyone who knows much about the topic, and is willing to 
 share insight into solving this problem.

 Currently only en/ ja/ and tr/ CHM files build with success, whereas all the 
 others end up as broken builds. The simplest way to determine if a build is 
 broken (aside from opening the file) is to look at its size. Broken builds 
 are currently ~15Kb or ~2000Kb whereas successful builds are closer to 
 11000Kb.

Looks to me as there are some encoding issues in there. The CHM are
invalid, only incomplete or badly encoded. I will take a look at the
non English version once I'm back at real work (June 10/11th ~).

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


Re: [PHP-DOC] CHM builds need help

2010-06-02 Thread Pierre Joye
On Wed, Jun 2, 2010 at 10:30 PM, Philip Olson phi...@roshambo.org wrote:

 Cool. Maybe someone else will fix it by then, but in the meantime I'm hopeful 
 someone will remove all of these bogus CHM files from the rsync box, so 
 php.net mirrors will stop hosting them. Hannes?

I removed them.

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


[PHP-DOC] Re: [DOC-CVS] svn: /phpdoc/ doc-base/trunk/entities/global.ent en/trunk/install/windows/building.xml

2010-01-11 Thread Pierre Joye
On Mon, Jan 11, 2010 at 9:56 AM, Hannes Magnusson
hannes.magnus...@gmail.com wrote:
 On Mon, Jan 11, 2010 at 09:50, Pierre Joye pierre@gmail.com wrote:
 hi,

 Hm, for what I read the doc is not correct. What was the URL to
 preview it already?

 http://docs.php.net/manual/en/install.windows.building.php

 Unsure why it hasn't updated yet, thought it built every 3 hours.
 Should get updated shortly.

I asked Kalle to fix this doc, I will also do a final review as well
before Friday.

Thanks for the headup.

Cheers,
-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org


[PHP-DOC] cvs: php-src(PHP_5_3) /main main.c

2009-06-04 Thread Pierre-Alain Joye
pajoye  Thu Jun  4 06:59:46 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   main.c 
  Log:
  - [DOC] add PHP_WINDOWS_NT_* and PHP_WINDOWS_VERSION_* constants (usefull for 
testing and features detections)
 see http://msdn.microsoft.com/en-us/library/ms724451(VS.85).aspx for the 
explanation
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.53r2=1.640.2.23.2.57.2.54diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.53 
php-src/main/main.c:1.640.2.23.2.57.2.54
--- php-src/main/main.c:1.640.2.23.2.57.2.53Sat May 30 09:48:16 2009
+++ php-src/main/main.c Thu Jun  4 06:59:46 2009
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.53 2009/05/30 09:48:16 scottmac Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.54 2009/06/04 06:59:46 pajoye Exp $ */
 
 /* {{{ includes
  */
@@ -1888,6 +1888,20 @@
REGISTER_MAIN_LONG_CONSTANT(PHP_INT_MAX, LONG_MAX, CONST_PERSISTENT | 
CONST_CS);
REGISTER_MAIN_LONG_CONSTANT(PHP_INT_SIZE, sizeof(long), 
CONST_PERSISTENT | CONST_CS);
 
+#ifdef PHP_WIN32
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_MAJOR,  
EG(windows_version_info).dwMajorVersion, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_MINOR,  
EG(windows_version_info).dwMinorVersion, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_BUILD,  
EG(windows_version_info).dwBuildNumber, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_PLATFORM,   
EG(windows_version_info).dwPlatformId, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_SP_MAJOR,   
EG(windows_version_info).wServicePackMajor, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_SP_MINOR,   
EG(windows_version_info).wServicePackMinor, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_SUITEMASK,  
EG(windows_version_info).wSuiteMask, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_PRODUCTYPE, 
EG(windows_version_info).wProductType, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_NT_DOMAIN_CONTROLLER, 
VER_NT_DOMAIN_CONTROLLER, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_NT_SERVER, VER_NT_SERVER, 
CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_NT_WORKSTATION, 
VER_NT_WORKSTATION, CONST_PERSISTENT | CONST_CS);
+#endif
+
php_output_register_constants(TSRMLS_C);
php_rfc1867_register_constants(TSRMLS_C);
 




[PHP-DOC] cvs: php-src /main main.c

2009-06-04 Thread Pierre-Alain Joye
pajoye  Thu Jun  4 07:00:37 2009 UTC

  Modified files:  
/php-src/main   main.c 
  Log:
  - [DOC] MF53: add PHP_WINDOWS_NT_* and PHP_WINDOWS_VERSION_* constants 
(usefull for testing and features detections)
 see http://msdn.microsoft.com/en-us/library/ms724451(VS.85).aspx for the 
explanation
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.800r2=1.801diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.800 php-src/main/main.c:1.801
--- php-src/main/main.c:1.800   Sat May 30 09:47:39 2009
+++ php-src/main/main.c Thu Jun  4 07:00:37 2009
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.800 2009/05/30 09:47:39 scottmac Exp $ */
+/* $Id: main.c,v 1.801 2009/06/04 07:00:37 pajoye Exp $ */
 
 /* {{{ includes
  */
@@ -1998,6 +1998,20 @@
REGISTER_MAIN_LONG_CONSTANT(PHP_INT_MAX, LONG_MAX, CONST_PERSISTENT | 
CONST_CS);
REGISTER_MAIN_LONG_CONSTANT(PHP_INT_SIZE, sizeof(long), 
CONST_PERSISTENT | CONST_CS);
 
+#ifdef PHP_WIN32
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_MAJOR,  
EG(windows_version_info).dwMajorVersion, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_MINOR,  
EG(windows_version_info).dwMinorVersion, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_BUILD,  
EG(windows_version_info).dwBuildNumber, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_PLATFORM,   
EG(windows_version_info).dwPlatformId, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_SP_MAJOR,   
EG(windows_version_info).wServicePackMajor, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_SP_MINOR,   
EG(windows_version_info).wServicePackMinor, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_SUITEMASK,  
EG(windows_version_info).wSuiteMask, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_PRODUCTYPE, 
EG(windows_version_info).wProductType, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_NT_DOMAIN_CONTROLLER, 
VER_NT_DOMAIN_CONTROLLER, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_NT_SERVER, VER_NT_SERVER, 
CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_NT_WORKSTATION, 
VER_NT_WORKSTATION, CONST_PERSISTENT | CONST_CS);
+#endif
+
php_output_register_constants(TSRMLS_C);
php_rfc1867_register_constants(TSRMLS_C);
 




[PHP-DOC] cvs: php-src /ext/gd config.m4 config.w32 gd.c php_gd.h /ext/gd/libgd gd.c gd_compat.h gd_rotate.c

2009-05-27 Thread Pierre-Alain Joye
diff -u php-src/ext/gd/php_gd.h:1.80 php-src/ext/gd/php_gd.h:1.81
--- php-src/ext/gd/php_gd.h:1.80Tue May 26 14:48:18 2009
+++ php-src/ext/gd/php_gd.h Wed May 27 07:16:55 2009
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: php_gd.h,v 1.80 2009/05/26 14:48:18 pajoye Exp $ */
+/* $Id: php_gd.h,v 1.81 2009/05/27 07:16:55 pajoye Exp $ */
 
 #ifndef PHP_GD_H
 #define PHP_GD_H
@@ -119,8 +119,9 @@
 PHP_FUNCTION(imagegrabscreen);
 #endif
 
-#ifdef HAVE_GD_BUNDLED
 PHP_FUNCTION(imagerotate);
+
+#ifdef HAVE_GD_BUNDLED
 PHP_FUNCTION(imageantialias);
 #endif
 
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd.c?r1=1.125r2=1.126diff_format=u
Index: php-src/ext/gd/libgd/gd.c
diff -u php-src/ext/gd/libgd/gd.c:1.125 php-src/ext/gd/libgd/gd.c:1.126
--- php-src/ext/gd/libgd/gd.c:1.125 Tue May 26 19:56:17 2009
+++ php-src/ext/gd/libgd/gd.c   Wed May 27 07:16:55 2009
@@ -2550,540 +2550,6 @@
}
 }
 
-
-/*
- * Rotate function Added on 2003/12
- * by Pierre-Alain Joye (paj...@pearfr.org)
- **/
-/* Begin rotate function */
-#ifdef ROTATE_PI
-#undef ROTATE_PI
-#endif /* ROTATE_PI */
-
-#define ROTATE_DEG2RAD  3.1415926535897932384626433832795/180
-void gdImageSkewX (gdImagePtr dst, gdImagePtr src, int uRow, int iOffset, 
double dWeight, int clrBack, int ignoretransparent)
-{
-   typedef int (*FuncPtr)(gdImagePtr, int, int);
-   int i, r, g, b, a, clrBackR, clrBackG, clrBackB, clrBackA;
-   FuncPtr f;
-
-   int pxlOldLeft, pxlLeft=0, pxlSrc;
-
-   /* Keep clrBack as color index if required */
-   if (src-trueColor) {
-   pxlOldLeft = clrBack;
-   f = gdImageGetTrueColorPixel;
-   } else {
-   pxlOldLeft = clrBack;
-   clrBackR = gdImageRed(src, clrBack);
-   clrBackG = gdImageGreen(src, clrBack);
-   clrBackB = gdImageBlue(src, clrBack);
-   clrBackA = gdImageAlpha(src, clrBack);
-   clrBack =  gdTrueColorAlpha(clrBackR, clrBackG, clrBackB, 
clrBackA);
-   f = gdImageGetPixel;
-   }
-
-   for (i = 0; i  iOffset; i++) {
-   gdImageSetPixel (dst, i, uRow, clrBack);
-   }
-
-   if (i  dst-sx) {
-   gdImageSetPixel (dst, i, uRow, clrBack);
-   }
-
-   for (i = 0; i  src-sx; i++) {
-   pxlSrc = f (src,i,uRow);
-
-   r = (int)(gdImageRed(src,pxlSrc) * dWeight);
-   g = (int)(gdImageGreen(src,pxlSrc) * dWeight);
-   b = (int)(gdImageBlue(src,pxlSrc) * dWeight);
-   a = (int)(gdImageAlpha(src,pxlSrc) * dWeight);
-
-   pxlLeft = gdImageColorAllocateAlpha(src, r, g, b, a);
-
-   if (pxlLeft == -1) {
-   pxlLeft = gdImageColorClosestAlpha(src, r, g, b, a);
-   }
-
-   r = gdImageRed(src,pxlSrc) - (gdImageRed(src,pxlLeft) - 
gdImageRed(src,pxlOldLeft));
-   g = gdImageGreen(src,pxlSrc) - (gdImageGreen(src,pxlLeft) - 
gdImageGreen(src,pxlOldLeft));
-   b = gdImageBlue(src,pxlSrc) - (gdImageBlue(src,pxlLeft) - 
gdImageBlue(src,pxlOldLeft));
-   a = gdImageAlpha(src,pxlSrc) - (gdImageAlpha(src,pxlLeft) - 
gdImageAlpha(src,pxlOldLeft));
-
-if (r255) {
-   r = 255;
-}
-
-   if (g255) {
-   g = 255;
-   }
-
-   if (b255) {
-   b = 255;
-   }
-
-   if (a127) {
-   a = 127;
-   }
-
-   if (ignoretransparent  pxlSrc == dst-transparent) {
-   pxlSrc = dst-transparent;
-   } else {
-   pxlSrc = gdImageColorAllocateAlpha(dst, r, g, b, a);
-
-   if (pxlSrc == -1) {
-   pxlSrc = gdImageColorClosestAlpha(dst, r, g, b, 
a);
-   }
-   }
-
-   if ((i + iOffset = 0)  (i + iOffset  dst-sx)) {
-   gdImageSetPixel (dst, i+iOffset, uRow,  pxlSrc);
-   }
-
-   pxlOldLeft = pxlLeft;
-   }
-
-   i += iOffset;
-
-   if (i  dst-sx) {
-   gdImageSetPixel (dst, i, uRow, pxlLeft);
-   }
-
-   gdImageSetPixel (dst, iOffset, uRow, clrBack);
-
-   i--;
-
-   while (++i  dst-sx) {
-   gdImageSetPixel (dst, i, uRow, clrBack);
-   }
-}
-
-void gdImageSkewY (gdImagePtr dst, gdImagePtr src, int uCol, int iOffset, 
double dWeight, int clrBack, int ignoretransparent)
-{
-   typedef int (*FuncPtr)(gdImagePtr, int, int);
-   int i, iYPos=0, r, g, b, a;
-   FuncPtr f;
-   int pxlOldLeft, pxlLeft=0, pxlSrc;
-
-   if (src-trueColor) {
-   f = gdImageGetTrueColorPixel;
-   } else {
-   f = gdImageGetPixel;
-   }
-
-   for (i = 0; i=iOffset; i++) {
-   gdImageSetPixel (dst, uCol, i, clrBack

[PHP-DOC] cvs: php-src(PHP_5_3) /ext/gd config.m4 config.w32 gd.c php_gd.h /ext/gd/libgd gd.c gd_compat.h

2009-05-27 Thread Pierre-Alain Joye
 
 #if HAVE_GD_IMAGESETTILE
 /* {{{ proto bool imagesettile(resource image, resource tile)
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/php_gd.h?r1=1.59.2.3.2.5.2.7r2=1.59.2.3.2.5.2.8diff_format=u
Index: php-src/ext/gd/php_gd.h
diff -u php-src/ext/gd/php_gd.h:1.59.2.3.2.5.2.7 
php-src/ext/gd/php_gd.h:1.59.2.3.2.5.2.8
--- php-src/ext/gd/php_gd.h:1.59.2.3.2.5.2.7Tue May 26 12:50:40 2009
+++ php-src/ext/gd/php_gd.h Wed May 27 07:17:54 2009
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: php_gd.h,v 1.59.2.3.2.5.2.7 2009/05/26 12:50:40 pajoye Exp $ */
+/* $Id: php_gd.h,v 1.59.2.3.2.5.2.8 2009/05/27 07:17:54 pajoye Exp $ */
 
 #ifndef PHP_GD_H
 #define PHP_GD_H
@@ -121,8 +121,9 @@
 PHP_FUNCTION(imagegrabscreen);
 #endif
 
-#ifdef HAVE_GD_BUNDLED
 PHP_FUNCTION(imagerotate);
+
+#ifdef HAVE_GD_BUNDLED
 PHP_FUNCTION(imageantialias);
 #endif
 
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd.c?r1=1.90.2.1.2.21.2.12r2=1.90.2.1.2.21.2.13diff_format=u
Index: php-src/ext/gd/libgd/gd.c
diff -u php-src/ext/gd/libgd/gd.c:1.90.2.1.2.21.2.12 
php-src/ext/gd/libgd/gd.c:1.90.2.1.2.21.2.13
--- php-src/ext/gd/libgd/gd.c:1.90.2.1.2.21.2.12Tue May 26 20:12:45 2009
+++ php-src/ext/gd/libgd/gd.c   Wed May 27 07:17:54 2009
@@ -2557,540 +2557,6 @@
}
 }
 
-
-/*
- * Rotate function Added on 2003/12
- * by Pierre-Alain Joye (paj...@pearfr.org)
- **/
-/* Begin rotate function */
-#ifdef ROTATE_PI
-#undef ROTATE_PI
-#endif /* ROTATE_PI */
-
-#define ROTATE_DEG2RAD  3.1415926535897932384626433832795/180
-void gdImageSkewX (gdImagePtr dst, gdImagePtr src, int uRow, int iOffset, 
double dWeight, int clrBack, int ignoretransparent)
-{
-   typedef int (*FuncPtr)(gdImagePtr, int, int);
-   int i, r, g, b, a, clrBackR, clrBackG, clrBackB, clrBackA;
-   FuncPtr f;
-
-   int pxlOldLeft, pxlLeft=0, pxlSrc;
-
-   /* Keep clrBack as color index if required */
-   if (src-trueColor) {
-   pxlOldLeft = clrBack;
-   f = gdImageGetTrueColorPixel;
-   } else {
-   pxlOldLeft = clrBack;
-   clrBackR = gdImageRed(src, clrBack);
-   clrBackG = gdImageGreen(src, clrBack);
-   clrBackB = gdImageBlue(src, clrBack);
-   clrBackA = gdImageAlpha(src, clrBack);
-   clrBack =  gdTrueColorAlpha(clrBackR, clrBackG, clrBackB, 
clrBackA);
-   f = gdImageGetPixel;
-   }
-
-   for (i = 0; i  iOffset; i++) {
-   gdImageSetPixel (dst, i, uRow, clrBack);
-   }
-
-   if (i  dst-sx) {
-   gdImageSetPixel (dst, i, uRow, clrBack);
-   }
-
-   for (i = 0; i  src-sx; i++) {
-   pxlSrc = f (src,i,uRow);
-
-   r = (int)(gdImageRed(src,pxlSrc) * dWeight);
-   g = (int)(gdImageGreen(src,pxlSrc) * dWeight);
-   b = (int)(gdImageBlue(src,pxlSrc) * dWeight);
-   a = (int)(gdImageAlpha(src,pxlSrc) * dWeight);
-
-   pxlLeft = gdImageColorAllocateAlpha(src, r, g, b, a);
-
-   if (pxlLeft == -1) {
-   pxlLeft = gdImageColorClosestAlpha(src, r, g, b, a);
-   }
-
-   r = gdImageRed(src,pxlSrc) - (gdImageRed(src,pxlLeft) - 
gdImageRed(src,pxlOldLeft));
-   g = gdImageGreen(src,pxlSrc) - (gdImageGreen(src,pxlLeft) - 
gdImageGreen(src,pxlOldLeft));
-   b = gdImageBlue(src,pxlSrc) - (gdImageBlue(src,pxlLeft) - 
gdImageBlue(src,pxlOldLeft));
-   a = gdImageAlpha(src,pxlSrc) - (gdImageAlpha(src,pxlLeft) - 
gdImageAlpha(src,pxlOldLeft));
-
-if (r255) {
-   r = 255;
-}
-
-   if (g255) {
-   g = 255;
-   }
-
-   if (b255) {
-   b = 255;
-   }
-
-   if (a127) {
-   a = 127;
-   }
-
-   if (ignoretransparent  pxlSrc == dst-transparent) {
-   pxlSrc = dst-transparent;
-   } else {
-   pxlSrc = gdImageColorAllocateAlpha(dst, r, g, b, a);
-
-   if (pxlSrc == -1) {
-   pxlSrc = gdImageColorClosestAlpha(dst, r, g, b, 
a);
-   }
-   }
-
-   if ((i + iOffset = 0)  (i + iOffset  dst-sx)) {
-   gdImageSetPixel (dst, i+iOffset, uRow,  pxlSrc);
-   }
-
-   pxlOldLeft = pxlLeft;
-   }
-
-   i += iOffset;
-
-   if (i  dst-sx) {
-   gdImageSetPixel (dst, i, uRow, pxlLeft);
-   }
-
-   gdImageSetPixel (dst, iOffset, uRow, clrBack);
-
-   i--;
-
-   while (++i  dst-sx) {
-   gdImageSetPixel (dst, i, uRow, clrBack);
-   }
-}
-
-void gdImageSkewY (gdImagePtr dst, gdImagePtr src, int uCol, int iOffset, 
double dWeight, int clrBack, int ignoretransparent)
-{
-   typedef int (*FuncPtr)(gdImagePtr, int, int

[PHP-DOC] cvs: php-src(PHP_5_3) /ext/gd/libgd gd_rotate.c

2009-05-27 Thread Pierre-Alain Joye
pajoye  Wed May 27 07:18:05 2009 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/gd/libgd   gd_rotate.c 
  Log:
  - MFH: [DOC] always enable imagerotate (bundled or system gd)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd_rotate.c?view=markuprev=1.1
Index: php-src/ext/gd/libgd/gd_rotate.c
+++ php-src/ext/gd/libgd/gd_rotate.c
#if HAVE_GD_BUNDLED
# include gd.h
#else
# include gd.h
#endif

#include gd_intern.h
#include math.h

/*
 * Rotate function Added on 2003/12
 * by Pierre-Alain Joye (pie...@php.net)
 **/
/* Begin rotate function */
#ifdef ROTATE_PI
#undef ROTATE_PI
#endif /* ROTATE_PI */

#define ROTATE_DEG2RAD  3.1415926535897932384626433832795/180
void gdImageSkewX (gdImagePtr dst, gdImagePtr src, int uRow, int iOffset, 
double dWeight, int clrBack, int ignoretransparent)
{
typedef int (*FuncPtr)(gdImagePtr, int, int);
int i, r, g, b, a, clrBackR, clrBackG, clrBackB, clrBackA;
FuncPtr f;

int pxlOldLeft, pxlLeft=0, pxlSrc;

/* Keep clrBack as color index if required */
if (src-trueColor) {
pxlOldLeft = clrBack;
f = gdImageGetTrueColorPixel;
} else {
pxlOldLeft = clrBack;
clrBackR = gdImageRed(src, clrBack);
clrBackG = gdImageGreen(src, clrBack);
clrBackB = gdImageBlue(src, clrBack);
clrBackA = gdImageAlpha(src, clrBack);
clrBack =  gdTrueColorAlpha(clrBackR, clrBackG, clrBackB, 
clrBackA);
f = gdImageGetPixel;
}

for (i = 0; i  iOffset; i++) {
gdImageSetPixel (dst, i, uRow, clrBack);
}

if (i  dst-sx) {
gdImageSetPixel (dst, i, uRow, clrBack);
}

for (i = 0; i  src-sx; i++) {
pxlSrc = f (src,i,uRow);

r = (int)(gdImageRed(src,pxlSrc) * dWeight);
g = (int)(gdImageGreen(src,pxlSrc) * dWeight);
b = (int)(gdImageBlue(src,pxlSrc) * dWeight);
a = (int)(gdImageAlpha(src,pxlSrc) * dWeight);

pxlLeft = gdImageColorAllocateAlpha(src, r, g, b, a);

if (pxlLeft == -1) {
pxlLeft = gdImageColorClosestAlpha(src, r, g, b, a);
}

r = gdImageRed(src,pxlSrc) - (gdImageRed(src,pxlLeft) - 
gdImageRed(src,pxlOldLeft));
g = gdImageGreen(src,pxlSrc) - (gdImageGreen(src,pxlLeft) - 
gdImageGreen(src,pxlOldLeft));
b = gdImageBlue(src,pxlSrc) - (gdImageBlue(src,pxlLeft) - 
gdImageBlue(src,pxlOldLeft));
a = gdImageAlpha(src,pxlSrc) - (gdImageAlpha(src,pxlLeft) - 
gdImageAlpha(src,pxlOldLeft));

if (r255) {
r = 255;
}

if (g255) {
g = 255;
}

if (b255) {
b = 255;
}

if (a127) {
a = 127;
}

if (ignoretransparent  pxlSrc == dst-transparent) {
pxlSrc = dst-transparent;
} else {
pxlSrc = gdImageColorAllocateAlpha(dst, r, g, b, a);

if (pxlSrc == -1) {
pxlSrc = gdImageColorClosestAlpha(dst, r, g, b, 
a);
}
}

if ((i + iOffset = 0)  (i + iOffset  dst-sx)) {
gdImageSetPixel (dst, i+iOffset, uRow,  pxlSrc);
}

pxlOldLeft = pxlLeft;
}

i += iOffset;

if (i  dst-sx) {
gdImageSetPixel (dst, i, uRow, pxlLeft);
}

gdImageSetPixel (dst, iOffset, uRow, clrBack);

i--;

while (++i  dst-sx) {
gdImageSetPixel (dst, i, uRow, clrBack);
}
}

void gdImageSkewY (gdImagePtr dst, gdImagePtr src, int uCol, int iOffset, 
double dWeight, int clrBack, int ignoretransparent)
{
typedef int (*FuncPtr)(gdImagePtr, int, int);
int i, iYPos=0, r, g, b, a;
FuncPtr f;
int pxlOldLeft, pxlLeft=0, pxlSrc;

if (src-trueColor) {
f = gdImageGetTrueColorPixel;
} else {
f = gdImageGetPixel;
}

for (i = 0; i=iOffset; i++) {
gdImageSetPixel (dst, uCol, i, clrBack);
}
r = (int)((double)gdImageRed(src,clrBack) * dWeight);
g = (int)((double)gdImageGreen(src,clrBack) * dWeight);
b = (int)((double)gdImageBlue(src,clrBack) * dWeight);
a = (int)((double)gdImageAlpha(src,clrBack) * dWeight);

pxlOldLeft = gdImageColorAllocateAlpha(dst, r, g, b, a);

for (i = 0; i  src-sy; i++) {
pxlSrc = f (src, uCol, i);
iYPos = i + iOffset;

r = (int)((double)gdImageRed(src,pxlSrc) * dWeight);
g = (int

[PHP-DOC] cvs: php-src /ext/gd config.m4 config.w32 gd.c php_gd.h /ext/gd/libgd gd_color.c gd_topal.c

2009-05-27 Thread Pierre-Alain Joye
pajoye  Wed May 27 08:12:08 2009 UTC

  Added files: 
/php-src/ext/gd/libgd   gd_color.c 

  Modified files:  
/php-src/ext/gd config.m4 config.w32 gd.c php_gd.h 
/php-src/ext/gd/libgd   gd_topal.c 
  Log:
  - [DOC] always enable imagecolormatch
  http://cvs.php.net/viewvc.cgi/php-src/ext/gd/config.m4?r1=1.182r2=1.183diff_format=u
Index: php-src/ext/gd/config.m4
diff -u php-src/ext/gd/config.m4:1.182 php-src/ext/gd/config.m4:1.183
--- php-src/ext/gd/config.m4:1.182  Wed May 27 07:16:55 2009
+++ php-src/ext/gd/config.m4Wed May 27 08:12:07 2009
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.182 2009/05/27 07:16:55 pajoye Exp $
+dnl $Id: config.m4,v 1.183 2009/05/27 08:12:07 pajoye Exp $
 dnl
 
 dnl
@@ -275,7 +275,7 @@
  libgd/gdfontg.c libgd/gdtables.c libgd/gdft.c libgd/gdcache.c 
libgd/gdkanji.c \
  libgd/wbmp.c libgd/gd_wbmp.c libgd/gdhelpers.c 
libgd/gd_topal.c libgd/gd_gif_in.c \
  libgd/xbm.c libgd/gd_gif_out.c libgd/gd_security.c 
libgd/gd_filter.c \
- libgd/gd_pixelate.c libgd/gd_arc.c libgd/gd_rotate.c
+ libgd/gd_pixelate.c libgd/gd_arc.c libgd/gd_rotate.c 
libgd/gd_color.c
 
 dnl check for fabsf and floorf which are available since C99
   AC_CHECK_FUNCS([fabsf floorf])
@@ -312,7 +312,8 @@
   PHP_ADD_BUILD_DIR($ext_builddir/libgd)
 
   GD_MODULE_TYPE=external
-  extra_sources=gdcache.c libgd/gd_compat.c libgd/gd_filter.c 
libgd/gd_pixelate.c libgd/gd_arc.c libgd/gd_rotate.c
+  extra_sources=gdcache.c libgd/gd_compat.c libgd/gd_filter.c 
libgd/gd_pixelate.c libgd/gd_arc.c \
+ libgd/gd_rotate.c libgd/gd_color.c
 
   GD_FEATURES=`$GDLIB_CONFIG --features`
 
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/config.w32?r1=1.38r2=1.39diff_format=u
Index: php-src/ext/gd/config.w32
diff -u php-src/ext/gd/config.w32:1.38 php-src/ext/gd/config.w32:1.39
--- php-src/ext/gd/config.w32:1.38  Wed May 27 07:16:55 2009
+++ php-src/ext/gd/config.w32   Wed May 27 08:12:07 2009
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.38 2009/05/27 07:16:55 pajoye Exp $
+// $Id: config.w32,v 1.39 2009/05/27 08:12:07 pajoye Exp $
 // vim:ft=javascript
 
 ARG_WITH(gd, Bundled GD support, yes,shared);
@@ -34,7 +34,7 @@
gdft.c gd_gd2.c gd_gd.c gd_gif_in.c gd_gif_out.c 
gdhelpers.c gd_io.c gd_io_dp.c \
gd_io_file.c gd_io_ss.c gd_jpeg.c gdkanji.c gd_png.c 
gd_ss.c \
gdtables.c gd_topal.c gd_wbmp.c gdxpm.c wbmp.c xbm.c 
gd_security.c \
-   gd_filter.c gd_pixelate.c gd_arc.c gd_rotate.c, gd);
+   gd_filter.c gd_pixelate.c gd_arc.c gd_rotate.c 
gd_color.c, gd);
AC_DEFINE('HAVE_LIBGD', 1, 'GD support');
ADD_FLAG(CFLAGS_GD,  \
 /D HAVE_GD_BUNDLED=1  \
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.414r2=1.415diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.414 php-src/ext/gd/gd.c:1.415
--- php-src/ext/gd/gd.c:1.414   Wed May 27 07:16:55 2009
+++ php-src/ext/gd/gd.c Wed May 27 08:12:07 2009
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.414 2009/05/27 07:16:55 pajoye Exp $ */
+/* $Id: gd.c,v 1.415 2009/05/27 08:12:07 pajoye Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -167,12 +167,10 @@
ZEND_ARG_INFO(0, colorsWanted)
 ZEND_END_ARG_INFO()
 
-#if HAVE_GD_BUNDLED
 ZEND_BEGIN_ARG_INFO(arginfo_imagecolormatch, 0)
ZEND_ARG_INFO(0, im1)
ZEND_ARG_INFO(0, im2)
 ZEND_END_ARG_INFO()
-#endif
 
 ZEND_BEGIN_ARG_INFO(arginfo_imagesetthickness, 0)
ZEND_ARG_INFO(0, im)
@@ -980,9 +978,11 @@
PHP_FE(image2wbmp,  
arginfo_image2wbmp)
 #if HAVE_GD_BUNDLED
PHP_FE(imagelayereffect,
arginfo_imagelayereffect)
-   PHP_FE(imagecolormatch, 
arginfo_imagecolormatch)
PHP_FE(imagexbm,arginfo_imagexbm)
 #endif
+
+   PHP_FE(imagecolormatch, 
arginfo_imagecolormatch)
+
 /* gd filters */
PHP_FE(imagefilter, 
arginfo_imagefilter)
PHP_FE(imageconvolution,
arginfo_imageconvolution)
@@ -1555,7 +1555,6 @@
 }
 /* }}} */
 
-#if HAVE_GD_BUNDLED
 /* {{{ proto bool imagecolormatch(resource im1, resource im2) U
Makes the colors of the palette version of an image more closely match the 
true color version */
 PHP_FUNCTION(imagecolormatch)
@@ -1594,7 +1593,6 @@
RETURN_TRUE;
 }
 /* }}} */
-#endif
 
 /* {{{ proto bool imagesetthickness(resource im, int thickness) U
Set line thickness for drawing lines, 

[PHP-DOC] cvs: php-src(PHP_5_3) /ext/gd config.m4 config.w32 gd.c php_gd.h /ext/gd/libgd gd_color.c gd_compat.h gd_topal.c

2009-05-27 Thread Pierre-Alain Joye
pajoye  Wed May 27 08:18:24 2009 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/gd/libgd   gd_color.c 

  Modified files:  
/php-src/ext/gd config.m4 config.w32 gd.c php_gd.h 
/php-src/ext/gd/libgd   gd_compat.h gd_topal.c 
  Log:
  - [DOC] always enable imagecolormatch
  http://cvs.php.net/viewvc.cgi/php-src/ext/gd/config.m4?r1=1.154.2.1.2.6.2.7r2=1.154.2.1.2.6.2.8diff_format=u
Index: php-src/ext/gd/config.m4
diff -u php-src/ext/gd/config.m4:1.154.2.1.2.6.2.7 
php-src/ext/gd/config.m4:1.154.2.1.2.6.2.8
--- php-src/ext/gd/config.m4:1.154.2.1.2.6.2.7  Wed May 27 07:17:53 2009
+++ php-src/ext/gd/config.m4Wed May 27 08:18:23 2009
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.154.2.1.2.6.2.7 2009/05/27 07:17:53 pajoye Exp $
+dnl $Id: config.m4,v 1.154.2.1.2.6.2.8 2009/05/27 08:18:23 pajoye Exp $
 dnl
 
 dnl
@@ -270,7 +270,7 @@
  libgd/gdfontg.c libgd/gdtables.c libgd/gdft.c libgd/gdcache.c 
libgd/gdkanji.c \
  libgd/wbmp.c libgd/gd_wbmp.c libgd/gdhelpers.c 
libgd/gd_topal.c libgd/gd_gif_in.c \
  libgd/xbm.c libgd/gd_gif_out.c libgd/gd_security.c 
libgd/gd_filter.c \
- libgd/gd_pixelate.c libgd/gd_arc.c libgd/gd_rotate.c
+ libgd/gd_pixelate.c libgd/gd_arc.c libgd/gd_rotate.c 
libgd/gd_color.c
 
 dnl check for fabsf and floorf which are available since C99
   AC_CHECK_FUNCS(fabsf floorf)
@@ -343,7 +343,8 @@
 
  if test $PHP_GD != no; then
   GD_MODULE_TYPE=external
-  extra_sources=gdcache.c libgd/gd_compat.c libgd/gd_filter.c 
libgd/gd_pixelate.c libgd/gd_arc.c libgd/gd_rotate.c
+  extra_sources=gdcache.c libgd/gd_compat.c libgd/gd_filter.c 
libgd/gd_pixelate.c libgd/gd_arc.c \
+ libgd/gd_rotate.c libgd/gd_color.c
 
 dnl Various checks for GD features
   PHP_GD_ZLIB
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/config.w32?r1=1.10.4.4.2.14r2=1.10.4.4.2.15diff_format=u
Index: php-src/ext/gd/config.w32
diff -u php-src/ext/gd/config.w32:1.10.4.4.2.14 
php-src/ext/gd/config.w32:1.10.4.4.2.15
--- php-src/ext/gd/config.w32:1.10.4.4.2.14 Wed May 27 07:17:53 2009
+++ php-src/ext/gd/config.w32   Wed May 27 08:18:23 2009
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.10.4.4.2.14 2009/05/27 07:17:53 pajoye Exp $
+// $Id: config.w32,v 1.10.4.4.2.15 2009/05/27 08:18:23 pajoye Exp $
 // vim:ft=javascript
 
 ARG_WITH(gd, Bundled GD support, yes,shared);
@@ -34,7 +34,7 @@
gdft.c gd_gd2.c gd_gd.c gd_gif_in.c gd_gif_out.c 
gdhelpers.c gd_io.c gd_io_dp.c \
gd_io_file.c gd_io_ss.c gd_jpeg.c gdkanji.c gd_png.c 
gd_ss.c \
gdtables.c gd_topal.c gd_wbmp.c gdxpm.c wbmp.c xbm.c 
gd_security.c \
-   gd_filter.c gd_pixelate.c gd_arc.c gd_rotate.c, gd);
+   gd_filter.c gd_pixelate.c gd_arc.c gd_rotate.c 
gd_color.c, gd);
AC_DEFINE('HAVE_LIBGD', 1, 'GD support');
ADD_FLAG(CFLAGS_GD,  \
 /D HAVE_GD_DYNAMIC_CTX_EX=1 \
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.32.2.41r2=1.312.2.20.2.32.2.42diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.32.2.41 
php-src/ext/gd/gd.c:1.312.2.20.2.32.2.42
--- php-src/ext/gd/gd.c:1.312.2.20.2.32.2.41Wed May 27 07:17:53 2009
+++ php-src/ext/gd/gd.c Wed May 27 08:18:23 2009
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.32.2.41 2009/05/27 07:17:53 pajoye Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.32.2.42 2009/05/27 08:18:23 pajoye Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -195,12 +195,10 @@
ZEND_ARG_INFO(0, colorsWanted)
 ZEND_END_ARG_INFO()
 
-#if HAVE_GD_BUNDLED
 ZEND_BEGIN_ARG_INFO(arginfo_imagecolormatch, 0)
ZEND_ARG_INFO(0, im1)
ZEND_ARG_INFO(0, im2)
 ZEND_END_ARG_INFO()
-#endif
 
 ZEND_BEGIN_ARG_INFO(arginfo_imagesetthickness, 0)
ZEND_ARG_INFO(0, im)
@@ -1038,9 +1036,11 @@
 #endif
 #if HAVE_GD_BUNDLED
PHP_FE(imagelayereffect,
arginfo_imagelayereffect)
-   PHP_FE(imagecolormatch, 
arginfo_imagecolormatch)
PHP_FE(imagexbm,arginfo_imagexbm)
 #endif
+
+   PHP_FE(imagecolormatch, 
arginfo_imagecolormatch)
+
 /* gd filters */
PHP_FE(imagefilter, 
arginfo_imagefilter)
PHP_FE(imageconvolution,
arginfo_imageconvolution)
@@ -1674,7 +1674,6 @@
 }
 /* }}} */
 
-#if HAVE_GD_BUNDLED
 /* {{{ proto bool imagecolormatch(resource im1, resource im2)
Makes the colors of the palette version of an image more closely match the 
true color version */
 PHP_FUNCTION(imagecolormatch)
@@ 

[PHP-DOC] cvs: php-src(PHP_5_3) /ext/gd config.m4 config.w32 gd.c php_gd.h /ext/gd/libgd gd.c gd_compat.h gd_filter.c gd_intern.h

2009-05-26 Thread Pierre-Alain Joye
 @@
PHP_FE(imagexbm,arginfo_imagexbm)
 #endif
 /* gd filters */
-#ifdef HAVE_GD_BUNDLED
PHP_FE(imagefilter, 
arginfo_imagefilter)
PHP_FE(imageconvolution,
arginfo_imageconvolution)
-#endif
 
{NULL, NULL, NULL}
 };
@@ -4738,8 +4733,6 @@
 #endif /* HAVE_LIBGD */
 
 /* Section Filters */
-#ifdef HAVE_GD_BUNDLED
-
 #define PHP_GD_SINGLE_RES  \
zval *SIM;  \
gdImagePtr im_src;  \
@@ -5033,9 +5026,9 @@
}
 }
 /* }}} */
-
 /* End section: Filters */
 
+#ifdef HAVE_GD_BUNDLED
 /* {{{ proto bool imageantialias(resource im, bool on)
Should antialiased functions used or not*/
 PHP_FUNCTION(imageantialias)
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/php_gd.h?r1=1.59.2.3.2.5.2.6r2=1.59.2.3.2.5.2.7diff_format=u
Index: php-src/ext/gd/php_gd.h
diff -u php-src/ext/gd/php_gd.h:1.59.2.3.2.5.2.6 
php-src/ext/gd/php_gd.h:1.59.2.3.2.5.2.7
--- php-src/ext/gd/php_gd.h:1.59.2.3.2.5.2.6Tue Mar 31 18:05:36 2009
+++ php-src/ext/gd/php_gd.h Tue May 26 12:50:40 2009
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: php_gd.h,v 1.59.2.3.2.5.2.6 2009/03/31 18:05:36 pajoye Exp $ */
+/* $Id: php_gd.h,v 1.59.2.3.2.5.2.7 2009/05/26 12:50:40 pajoye Exp $ */
 
 #ifndef PHP_GD_H
 #define PHP_GD_H
@@ -192,11 +192,12 @@
 #if HAVE_GD_BUNDLED
 PHP_FUNCTION(imagelayereffect);
 PHP_FUNCTION(imagecolormatch);
-PHP_FUNCTION(imagefilter);
-PHP_FUNCTION(imageconvolution);
 PHP_FUNCTION(imagexbm);
 #endif
 
+PHP_FUNCTION(imagefilter);
+PHP_FUNCTION(imageconvolution);
+
 PHP_GD_API int phpi_get_le_gd(void);
 
 #else
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd.c?r1=1.90.2.1.2.21.2.10r2=1.90.2.1.2.21.2.11diff_format=u
Index: php-src/ext/gd/libgd/gd.c
diff -u php-src/ext/gd/libgd/gd.c:1.90.2.1.2.21.2.10 
php-src/ext/gd/libgd/gd.c:1.90.2.1.2.21.2.11
--- php-src/ext/gd/libgd/gd.c:1.90.2.1.2.21.2.10Sat Apr 25 06:25:55 2009
+++ php-src/ext/gd/libgd/gd.c   Tue May 26 12:50:40 2009
@@ -3641,459 +3641,3 @@
*y2P = im-cy2;
 }
 
-
-/* Filters function added on 2003/12
- * by Pierre-Alain Joye (paj...@pearfr.org)
- **/
-/* Begin filters function */
-#ifndef HAVE_GET_TRUE_COLOR
-#define 
GET_PIXEL_FUNCTION(src)(src-trueColor?gdImageGetTrueColorPixel:gdImageGetPixel)
-#endif
-
-/* invert src image */
-int gdImageNegate(gdImagePtr src)
-{
-   int x, y;
-   int r,g,b,a;
-   int new_pxl, pxl;
-   typedef int (*FuncPtr)(gdImagePtr, int, int);
-   FuncPtr f;
-
-   if (src==NULL) {
-   return 0;
-   }
-
-   f = GET_PIXEL_FUNCTION(src);
-
-   for (y=0; ysrc-sy; ++y) {
-   for (x=0; xsrc-sx; ++x) {
-   pxl = f (src, x, y);
-   r = gdImageRed(src, pxl);
-   g = gdImageGreen(src, pxl);
-   b = gdImageBlue(src, pxl);
-   a = gdImageAlpha(src, pxl);
-
-   new_pxl = gdImageColorAllocateAlpha(src, 255-r, 255-g, 
255-b, a);
-   if (new_pxl == -1) {
-   new_pxl = gdImageColorClosestAlpha(src, 255-r, 
255-g, 255-b, a);
-   }
-   gdImageSetPixel (src, x, y, new_pxl);
-   }
-   }
-   return 1;
-}
-
-/* Convert the image src to a grayscale image */
-int gdImageGrayScale(gdImagePtr src)
-{
-   int x, y;
-   int r,g,b,a;
-   int new_pxl, pxl;
-   typedef int (*FuncPtr)(gdImagePtr, int, int);
-   FuncPtr f;
-   f = GET_PIXEL_FUNCTION(src);
-
-   if (src==NULL) {
-   return 0;
-   }
-
-   for (y=0; ysrc-sy; ++y) {
-   for (x=0; xsrc-sx; ++x) {
-   pxl = f (src, x, y);
-   r = gdImageRed(src, pxl);
-   g = gdImageGreen(src, pxl);
-   b = gdImageBlue(src, pxl);
-   a = gdImageAlpha(src, pxl);
-   r = g = b = (int) (.299 * r + .587 * g + .114 * b);
-
-   new_pxl = gdImageColorAllocateAlpha(src, r, g, b, a);
-   if (new_pxl == -1) {
-   new_pxl = gdImageColorClosestAlpha(src, r, g, 
b, a);
-   }
-   gdImageSetPixel (src, x, y, new_pxl);
-   }
-   }
-   return 1;
-}
-
-/* Set the brightness level level for the image src */
-int gdImageBrightness(gdImagePtr src, int brightness)
-{
-   int x, y;
-   int r,g,b,a;
-   int new_pxl, pxl;
-   typedef int (*FuncPtr)(gdImagePtr, int, int);
-   FuncPtr f;
-   f = GET_PIXEL_FUNCTION(src);
-
-   if (src==NULL || (brightness  -255 || brightness255)) {
-   return 0;
-   }
-
-   if (brightness==0) {
-   return 1

[PHP-DOC] cvs: php-src /ext/gd config.m4 gd.c /ext/gd/libgd gd.h gd_compat.h gd_filter.c gd_intern.h

2009-05-26 Thread Pierre-Alain Joye
, CONST_CS | CONST_PERSISTENT);
-#endif
 
 #ifdef GD_VERSION_STRING
REGISTER_STRING_CONSTANT(GD_VERSION, GD_VERSION_STRING, CONST_CS | 
CONST_PERSISTENT);
@@ -1209,11 +1206,11 @@
char tmp[256];
 
 #ifdef FREETYPE_PATCH
-snprintf(tmp, sizeof(tmp), %d.%d.%d, FREETYPE_MAJOR, FREETYPE_MINOR, 
FREETYPE_PATCH);
+   snprintf(tmp, sizeof(tmp), %d.%d.%d, FREETYPE_MAJOR, 
FREETYPE_MINOR, FREETYPE_PATCH);
 #elif defined(FREETYPE_MAJOR)
-snprintf(tmp, sizeof(tmp), %d.%d, FREETYPE_MAJOR, FREETYPE_MINOR);
+   snprintf(tmp, sizeof(tmp), %d.%d, FREETYPE_MAJOR, 
FREETYPE_MINOR);
 #else
-snprintf(tmp, sizeof(tmp), 1.x);
+   snprintf(tmp, sizeof(tmp), 1.x);
 #endif
php_info_print_table_row(2, FreeType Version, tmp);
}
@@ -1242,6 +1239,7 @@
php_info_print_table_row(2, libJPEG Version, tmp);
}
 #endif
+
 #ifdef HAVE_GD_PNG
php_info_print_table_row(2, PNG Support, enabled);
php_info_print_table_row(2, libPNG Version, gdPngGetVersionString());
@@ -2657,7 +2655,6 @@
if (ct  0) {
RETURN_FALSE;
}
-
RETURN_LONG(ct);
 }
 /* }}} */
@@ -2899,6 +2896,7 @@
}
RETURN_TRUE;
}
+
for (i = 0; i  gdImageColorsTotal(im); i++) {
im-red[i]   = (int)((pow((pow((im-red[i]   / 255.0), input)), 
1.0 / output) * 255) + .5);
im-green[i] = (int)((pow((pow((im-green[i] / 255.0), input)), 
1.0 / output) * 255) + .5);
@@ -2923,7 +2921,6 @@
 
ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, Image, le_gd);
gdImageSetPixel(im, x, y, col);
-
RETURN_TRUE;
 }
 /* }}} */
@@ -2968,7 +2965,6 @@
 
ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, Image, le_gd);
gdImageDashedLine(im, x1, y1, x2, y2, col);
-
RETURN_TRUE;
 }
 /* }}} */
@@ -2987,7 +2983,6 @@
 
ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, Image, le_gd);
gdImageRectangle(im, x1, y1, x2, y2, col);
-
RETURN_TRUE;
 }
 /* }}} */
@@ -3006,7 +3001,6 @@
 
ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, Image, le_gd);
gdImageFilledRectangle(im, x1, y1, x2, y2, col);
-
RETURN_TRUE;
 }
 /* }}} */
@@ -3076,7 +3070,6 @@
 
ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, Image, le_gd);
gdImageFillToBorder(im, x, y, border, col);
-
RETURN_TRUE;
 }
 /* }}} */
@@ -3095,7 +3088,6 @@
 
ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, Image, le_gd);
gdImageFill(im, x, y, col);
-
RETURN_TRUE;
 }
 /* }}} */
@@ -3446,7 +3438,6 @@
ZEND_FETCH_RESOURCE(im_src, gdImagePtr, SIM, -1, Image, le_gd);
ZEND_FETCH_RESOURCE(im_dst, gdImagePtr, DIM, -1, Image, le_gd);
gdImageCopy(im_dst, im_src, dstX, dstY, srcX, srcY, srcW, srcH);
-
RETURN_TRUE;
 }
 /* }}} */
@@ -3466,7 +3457,6 @@
ZEND_FETCH_RESOURCE(im_src, gdImagePtr, SIM, -1, Image, le_gd);
ZEND_FETCH_RESOURCE(im_dst, gdImagePtr, DIM, -1, Image, le_gd);
gdImageCopyMerge(im_dst, im_src, dstX, dstY, srcX, srcY, srcW, srcH, 
pct);
-
RETURN_TRUE;
 }
 /* }}} */
@@ -3511,7 +3501,6 @@
RETURN_FALSE;
}
gdImageCopyResized(im_dst, im_src, dstX, dstY, srcX, srcY, dstW, dstH, 
srcW, srcH);
-
RETURN_TRUE;
 }
 /* }}} */
@@ -4432,8 +4421,6 @@
 #endif /* HAVE_LIBGD */
 
 /* Section Filters */
-#ifdef HAVE_GD_BUNDLED
-
 #define PHP_GD_SINGLE_RES  \
zval *SIM;  \
gdImagePtr im_src;  \
@@ -4640,7 +4627,6 @@
RETURN_FALSE;
 }
 
-
 /* {{{ proto bool imagefilter(resource src_im, int filtertype, [args] ) U
Applies Filter an image using a custom angle */
 PHP_FUNCTION(imagefilter)
@@ -4723,10 +4709,10 @@
RETURN_BOOL(gdImageConvolution(im_src, matrix, div, offset));
 }
 /* }}} */
-
 /* End section: Filters */
 
-/* {{{ proto bool imageantialias(resource im, bool on) U
+#ifdef HAVE_GD_BUNDLED
+/* {{{ proto bool imageantialias(resource im, bool on)
Should antialiased functions used or not*/
 PHP_FUNCTION(imageantialias)
 {
@@ -4740,7 +4726,6 @@
 
ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, Image, le_gd);
gdImageAntialias(im, alias);
-
RETURN_TRUE;
 }
 /* }}} */
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd_filter.c?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/gd/libgd/gd_filter.c
diff -u /dev/null php-src/ext/gd/libgd/gd_filter.c:1.2
--- /dev/null   Tue May 26 14:26:40 2009
+++ php-src/ext/gd/libgd/gd_filter.cTue May 26 14:26:39 2009
@@ -0,0 +1,461 @@
+#if HAVE_GD_BUNDLED
+# include gd.h
+#else
+# include gd.h
+#endif
+
+#include gd_intern.h
+
+/* Filters function added on 2003/12
+ * by Pierre-Alain Joye (pie...@php.net)
+ **/
+/* Begin filters function */
+#define 
GET_PIXEL_FUNCTION(src)(src-trueColor?gdImageGetTrueColorPixel:gdImageGetPixel)
+
+/* invert src image */
+int gdImageNegate(gdImagePtr src)
+{
+   int x, y;
+   int r,g,b

[PHP-DOC] cvs: php-src(PHP_5_3) /ext/gd config.m4 config.w32 gd.c /ext/gd/libgd gd.c gd_compat.h

2009-05-26 Thread Pierre-Alain Joye
 @@
}
 }
 
-
-/**
- * Integer Ellipse functions (gdImageEllipse and gdImageFilledEllipse)
- * Function added by Pierre-Alain Joye 02/08/2003 (p...@pearfr.org)
- * See the ellipse function simplification for the equation
- * as well as the midpoint algorithm.
- */
-
-void gdImageEllipse(gdImagePtr im, int mx, int my, int w, int h, int c)
-{
-   int x=0,mx1=0,mx2=0,my1=0,my2=0;
-   long aq,bq,dx,dy,r,rx,ry,a,b;
-
-   a=w1;
-   b=h1;
-   gdImageSetPixel(im,mx+a, my, c);
-   gdImageSetPixel(im,mx-a, my, c);
-   mx1 = mx-a;my1 = my;
-   mx2 = mx+a;my2 = my;
-
-   aq = a * a;
-   bq = b * b;
-   dx = aq  1;
-   dy = bq  1;
-   r  = a * bq;
-   rx = r  1;
-   ry = 0;
-   x = a;
-   while (x  0){
-   if (r  0) {
-   my1++;my2--;
-   ry +=dx;
-   r  -=ry;
-   }
-   if (r = 0){
-   x--;
-   mx1++;mx2--;
-   rx -=dy;
-   r  +=rx;
-   }
-   gdImageSetPixel(im,mx1, my1, c);
-   gdImageSetPixel(im,mx1, my2, c);
-   gdImageSetPixel(im,mx2, my1, c);
-   gdImageSetPixel(im,mx2, my2, c);
-   }
-}
-
-void gdImageFilledEllipse (gdImagePtr im, int mx, int my, int w, int h, int c)
-{
-   int x=0,mx1=0,mx2=0,my1=0,my2=0;
-   long aq,bq,dx,dy,r,rx,ry,a,b;
-   int i;
-   int old_y1,old_y2;
-
-   a=w1;
-   b=h1;
-
-   for (x = mx-a; x = mx+a; x++) {
-   gdImageSetPixel(im, x, my, c);
-   }
-
-   mx1 = mx-a;my1 = my;
-   mx2 = mx+a;my2 = my;
-
-   aq = a * a;
-   bq = b * b;
-   dx = aq  1;
-   dy = bq  1;
-   r  = a * bq;
-   rx = r  1;
-   ry = 0;
-   x = a;
-   old_y2=-2;
-   old_y1=-2;
-   while (x  0){
-   if (r  0) {
-   my1++;my2--;
-   ry +=dx;
-   r  -=ry;
-   }
-   if (r = 0){
-   x--;
-   mx1++;mx2--;
-   rx -=dy;
-   r  +=rx;
-   }
-   if(old_y2!=my2){
-   for(i=mx1;i=mx2;i++){
-   gdImageSetPixel(im,i,my1,c);
-   }
-   }
-   if(old_y2!=my2){
-   for(i=mx1;i=mx2;i++){
-   gdImageSetPixel(im,i,my2,c);
-   }
-   }
-   old_y2 = my2;
-   old_y1 = my1;
-   }
-}
-
 void gdImageFillToBorder (gdImagePtr im, int x, int y, int border, int color)
 {
int lastBorder;
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd_compat.h?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/gd/libgd/gd_compat.h
diff -u php-src/ext/gd/libgd/gd_compat.h:1.1.2.2 
php-src/ext/gd/libgd/gd_compat.h:1.1.2.3
--- php-src/ext/gd/libgd/gd_compat.h:1.1.2.2Tue May 26 12:50:40 2009
+++ php-src/ext/gd/libgd/gd_compat.hTue May 26 20:12:45 2009
@@ -49,6 +49,10 @@
 
 int gdImagePixelate(gdImagePtr im, int block_size, const unsigned int mode);
 
+#if !HAVE_GD_IMAGEELLIPSE
+void gdImageEllipse(gdImagePtr im, int cx, int cy, int w, int h, int c);
+#endif
+
 
 #endif
 




[PHP-DOC] cvs: php-src(PHP_5_3) /ext/gd/libgd gd_arc.c

2009-05-26 Thread Pierre-Alain Joye
pajoye  Tue May 26 20:14:31 2009 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/gd/libgd   gd_arc.c 
  Log:
  - MFH: [DOC]  - add image(filled)ellipse to the compat layer (work around a 
bug in debian too, function is declared but not present in the lib...)
  

http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd_arc.c?view=markuprev=1.1
Index: php-src/ext/gd/libgd/gd_arc.c
+++ php-src/ext/gd/libgd/gd_arc.c
#if HAVE_GD_BUNDLED
# include gd.h
#else
# include gd.h
#endif

#include gd_intern.h


/**
 * Integer Ellipse functions (gdImageEllipse and gdImageFilledEllipse)
 * Function added by Pierre-Alain Joye 02/08/2003 (p...@pearfr.org)
 * See the ellipse function simplification for the equation
 * as well as the midpoint algorithm.
 */

void gdImageEllipse(gdImagePtr im, int mx, int my, int w, int h, int c)
{
int x=0,mx1=0,mx2=0,my1=0,my2=0;
long aq,bq,dx,dy,r,rx,ry,a,b;

a=w1;
b=h1;
gdImageSetPixel(im,mx+a, my, c);
gdImageSetPixel(im,mx-a, my, c);
mx1 = mx-a;my1 = my;
mx2 = mx+a;my2 = my;

aq = a * a;
bq = b * b;
dx = aq  1;
dy = bq  1;
r  = a * bq;
rx = r  1;
ry = 0;
x = a;
while (x  0){
if (r  0) {
my1++;my2--;
ry +=dx;
r  -=ry;
}
if (r = 0){
x--;
mx1++;mx2--;
rx -=dy;
r  +=rx;
}
gdImageSetPixel(im,mx1, my1, c);
gdImageSetPixel(im,mx1, my2, c);
gdImageSetPixel(im,mx2, my1, c);
gdImageSetPixel(im,mx2, my2, c);
}
}

void gdImageFilledEllipse (gdImagePtr im, int mx, int my, int w, int h, int c)
{
int x=0,mx1=0,mx2=0,my1=0,my2=0;
long aq,bq,dx,dy,r,rx,ry,a,b;
int i;
int old_y1,old_y2;

a=w1;
b=h1;

for (x = mx-a; x = mx+a; x++) {
gdImageSetPixel(im, x, my, c);
}

mx1 = mx-a;my1 = my;
mx2 = mx+a;my2 = my;

aq = a * a;
bq = b * b;
dx = aq  1;
dy = bq  1;
r  = a * bq;
rx = r  1;
ry = 0;
x = a;
old_y2=-2;
old_y1=-2;
while (x  0){
if (r  0) {
my1++;my2--;
ry +=dx;
r  -=ry;
}
if (r = 0){
x--;
mx1++;mx2--;
rx -=dy;
r  +=rx;
}
if(old_y2!=my2){
for(i=mx1;i=mx2;i++){
gdImageSetPixel(im,i,my1,c);
}
}
if(old_y2!=my2){
for(i=mx1;i=mx2;i++){
gdImageSetPixel(im,i,my2,c);
}
}
old_y2 = my2;
old_y1 = my1;
}
}






[PHP-DOC] cvs: php-src /ext/curl interface.c

2009-05-04 Thread Pierre-Alain Joye
pajoye  Mon May  4 12:12:40 2009 UTC

  Modified files:  
/php-src/ext/curl   interface.c 
  Log:
  - [DOC] #47739. add option CURLOPT_IPRESOLVE which accepts 
CURL_IPRESOLVE_WHATEVER, CURL_IPRESOLVE_V4 or CURL_IPRESOLVE_V6
  
http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.153r2=1.154diff_format=u
Index: php-src/ext/curl/interface.c
diff -u php-src/ext/curl/interface.c:1.153 php-src/ext/curl/interface.c:1.154
--- php-src/ext/curl/interface.c:1.153  Sun May  3 21:47:52 2009
+++ php-src/ext/curl/interface.cMon May  4 12:12:40 2009
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: interface.c,v 1.153 2009/05/03 21:47:52 pajoye Exp $ */
+/* $Id: interface.c,v 1.154 2009/05/04 12:12:40 pajoye Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -443,6 +443,10 @@
le_curl_multi_handle = 
zend_register_list_destructors_ex(_php_curl_multi_close, NULL, curl, 
module_number);
 
/* Constants for curl_setopt() */
+   REGISTER_CURL_CONSTANT(CURLOPT_IPRESOLVE);
+   REGISTER_CURL_CONSTANT(CURL_IPRESOLVE_WHATEVER);
+   REGISTER_CURL_CONSTANT(CURL_IPRESOLVE_V4);
+   REGISTER_CURL_CONSTANT(CURL_IPRESOLVE_V6);
REGISTER_CURL_CONSTANT(CURLOPT_DNS_USE_GLOBAL_CACHE);
REGISTER_CURL_CONSTANT(CURLOPT_DNS_CACHE_TIMEOUT);
REGISTER_CURL_CONSTANT(CURLOPT_PORT);
@@ -1525,6 +1529,7 @@
case CURLOPT_REDIR_PROTOCOLS:
case CURLOPT_PROTOCOLS:
 #endif
+   case CURLOPT_IPRESOLVE:
convert_to_long_ex(zvalue);
error = curl_easy_setopt(ch-cp, option, 
Z_LVAL_PP(zvalue));
break;




[PHP-DOC] cvs: php-src(PHP_5_3) /ext/curl interface.c

2009-05-04 Thread Pierre-Alain Joye
pajoye  Mon May  4 12:12:57 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/curl   interface.c 
  Log:
  - MFH: [DOC] #47739. add option CURLOPT_IPRESOLVE which accepts 
CURL_IPRESOLVE_WHATEVER, CURL_IPRESOLVE_V4 or CURL_IPRESOLVE_V6
  
http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.62.2.14.2.27.2.35r2=1.62.2.14.2.27.2.36diff_format=u
Index: php-src/ext/curl/interface.c
diff -u php-src/ext/curl/interface.c:1.62.2.14.2.27.2.35 
php-src/ext/curl/interface.c:1.62.2.14.2.27.2.36
--- php-src/ext/curl/interface.c:1.62.2.14.2.27.2.35Sun May  3 15:16:10 2009
+++ php-src/ext/curl/interface.cMon May  4 12:12:57 2009
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: interface.c,v 1.62.2.14.2.27.2.35 2009/05/03 15:16:10 pajoye Exp $ */
+/* $Id: interface.c,v 1.62.2.14.2.27.2.36 2009/05/04 12:12:57 pajoye Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -444,6 +444,10 @@
le_curl_multi_handle = 
zend_register_list_destructors_ex(_php_curl_multi_close, NULL, curl, 
module_number);
 
/* Constants for curl_setopt() */
+   REGISTER_CURL_CONSTANT(CURLOPT_IPRESOLVE);
+   REGISTER_CURL_CONSTANT(CURL_IPRESOLVE_WHATEVER);
+   REGISTER_CURL_CONSTANT(CURL_IPRESOLVE_V4);
+   REGISTER_CURL_CONSTANT(CURL_IPRESOLVE_V6);
REGISTER_CURL_CONSTANT(CURLOPT_DNS_USE_GLOBAL_CACHE);
REGISTER_CURL_CONSTANT(CURLOPT_DNS_CACHE_TIMEOUT);
REGISTER_CURL_CONSTANT(CURLOPT_PORT);
@@ -1512,6 +1516,7 @@
case CURLOPT_REDIR_PROTOCOLS:
case CURLOPT_PROTOCOLS:
 #endif
+   case CURLOPT_IPRESOLVE:
convert_to_long_ex(zvalue);
error = curl_easy_setopt(ch-cp, option, 
Z_LVAL_PP(zvalue));
break;




[PHP-DOC] cvs: php-src(PHP_5_3) /ext/curl interface.c

2009-05-04 Thread Pierre-Alain Joye
pajoye  Mon May  4 14:09:28 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/curl   interface.c 
  Log:
  - [DOC] MFH: #39637, add CURLOPT_FTP_FILEMETHOD which accepts 
CURLFTPMETHOD_MULTICWD, CURLFTPMETHOD_NOCWD and CURLFTPMETHOD_SINGLECWD
  
http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.62.2.14.2.27.2.36r2=1.62.2.14.2.27.2.37diff_format=u
Index: php-src/ext/curl/interface.c
diff -u php-src/ext/curl/interface.c:1.62.2.14.2.27.2.36 
php-src/ext/curl/interface.c:1.62.2.14.2.27.2.37
--- php-src/ext/curl/interface.c:1.62.2.14.2.27.2.36Mon May  4 12:12:57 2009
+++ php-src/ext/curl/interface.cMon May  4 14:09:28 2009
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: interface.c,v 1.62.2.14.2.27.2.36 2009/05/04 12:12:57 pajoye Exp $ */
+/* $Id: interface.c,v 1.62.2.14.2.27.2.37 2009/05/04 14:09:28 pajoye Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -757,6 +757,13 @@
REGISTER_CURL_CONSTANT(CURLPROTO_ALL);
 #endif
 
+#if LIBCURL_VERSION_NUM = 0x070f01
+   REGISTER_CURL_CONSTANT(CURLOPT_FTP_FILEMETHOD);
+   REGISTER_CURL_CONSTANT(CURLFTPMETHOD_MULTICWD);
+   REGISTER_CURL_CONSTANT(CURLFTPMETHOD_NOCWD);
+   REGISTER_CURL_CONSTANT(CURLFTPMETHOD_SINGLECWD);
+#endif
+
 #ifdef PHP_CURL_NEED_OPENSSL_TSL
if (!CRYPTO_get_id_callback()) {
int i, c = CRYPTO_num_locks();
@@ -1517,6 +1524,7 @@
case CURLOPT_PROTOCOLS:
 #endif
case CURLOPT_IPRESOLVE:
+   case CURLOPT_FTP_FILEMETHOD:
convert_to_long_ex(zvalue);
error = curl_easy_setopt(ch-cp, option, 
Z_LVAL_PP(zvalue));
break;




[PHP-DOC] cvs: php-src /ext/curl interface.c

2009-05-04 Thread Pierre-Alain Joye
pajoye  Mon May  4 14:11:34 2009 UTC

  Modified files:  
/php-src/ext/curl   interface.c 
  Log:
  - [DOC] a note about the symbol - version page/doc
  
http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.155r2=1.156diff_format=u
Index: php-src/ext/curl/interface.c
diff -u php-src/ext/curl/interface.c:1.155 php-src/ext/curl/interface.c:1.156
--- php-src/ext/curl/interface.c:1.155  Mon May  4 14:09:12 2009
+++ php-src/ext/curl/interface.cMon May  4 14:11:34 2009
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: interface.c,v 1.155 2009/05/04 14:09:12 pajoye Exp $ */
+/* $Id: interface.c,v 1.156 2009/05/04 14:11:34 pajoye Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -442,6 +442,11 @@
le_curl = zend_register_list_destructors_ex(_php_curl_close, NULL, 
curl, module_number);
le_curl_multi_handle = 
zend_register_list_destructors_ex(_php_curl_multi_close, NULL, curl, 
module_number);
 
+
+   /* See http://curl.haxx.se/lxr/source/docs/libcurl/symbols-in-versions
+  or curl src/docs/libcurl/symbols-in-versions for a (almost) complete 
list 
+  of options and which version they were introduced */
+
/* Constants for curl_setopt() */
REGISTER_CURL_CONSTANT(CURLOPT_IPRESOLVE);
REGISTER_CURL_CONSTANT(CURL_IPRESOLVE_WHATEVER);




[PHP-DOC] cvs: php-src(PHP_5_3) /ext/curl interface.c

2009-05-04 Thread Pierre-Alain Joye
pajoye  Mon May  4 14:11:46 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/curl   interface.c 
  Log:
  - [DOC] a note about the symbol - version page/doc
  
http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.62.2.14.2.27.2.37r2=1.62.2.14.2.27.2.38diff_format=u
Index: php-src/ext/curl/interface.c
diff -u php-src/ext/curl/interface.c:1.62.2.14.2.27.2.37 
php-src/ext/curl/interface.c:1.62.2.14.2.27.2.38
--- php-src/ext/curl/interface.c:1.62.2.14.2.27.2.37Mon May  4 14:09:28 2009
+++ php-src/ext/curl/interface.cMon May  4 14:11:45 2009
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: interface.c,v 1.62.2.14.2.27.2.37 2009/05/04 14:09:28 pajoye Exp $ */
+/* $Id: interface.c,v 1.62.2.14.2.27.2.38 2009/05/04 14:11:45 pajoye Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -443,6 +443,11 @@
le_curl = zend_register_list_destructors_ex(_php_curl_close, NULL, 
curl, module_number);
le_curl_multi_handle = 
zend_register_list_destructors_ex(_php_curl_multi_close, NULL, curl, 
module_number);
 
+
+   /* See http://curl.haxx.se/lxr/source/docs/libcurl/symbols-in-versions
+  or curl src/docs/libcurl/symbols-in-versions for a (almost) complete 
list 
+  of options and which version they were introduced */
+
/* Constants for curl_setopt() */
REGISTER_CURL_CONSTANT(CURLOPT_IPRESOLVE);
REGISTER_CURL_CONSTANT(CURL_IPRESOLVE_WHATEVER);




[PHP-DOC] cvs: php-src /ext/curl interface.c

2009-05-04 Thread Pierre-Alain Joye
pajoye  Mon May  4 14:09:13 2009 UTC

  Modified files:  
/php-src/ext/curl   interface.c 
  Log:
  - [DOC] #39637, add CURLOPT_FTP_FILEMETHOD which accepts 
CURLFTPMETHOD_MULTICWD, CURLFTPMETHOD_NOCWD and CURLFTPMETHOD_SINGLECWD
  
http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.154r2=1.155diff_format=u
Index: php-src/ext/curl/interface.c
diff -u php-src/ext/curl/interface.c:1.154 php-src/ext/curl/interface.c:1.155
--- php-src/ext/curl/interface.c:1.154  Mon May  4 12:12:40 2009
+++ php-src/ext/curl/interface.cMon May  4 14:09:12 2009
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: interface.c,v 1.154 2009/05/04 12:12:40 pajoye Exp $ */
+/* $Id: interface.c,v 1.155 2009/05/04 14:09:12 pajoye Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -757,6 +757,13 @@
REGISTER_CURL_CONSTANT(CURLPROTO_ALL);
 #endif
 
+#if LIBCURL_VERSION_NUM = 0x070f01
+   REGISTER_CURL_CONSTANT(CURLOPT_FTP_FILEMETHOD);
+   REGISTER_CURL_CONSTANT(CURLFTPMETHOD_MULTICWD);
+   REGISTER_CURL_CONSTANT(CURLFTPMETHOD_NOCWD);
+   REGISTER_CURL_CONSTANT(CURLFTPMETHOD_SINGLECWD);
+#endif
+
 #ifdef PHP_CURL_NEED_OPENSSL_TSL
if (!CRYPTO_get_id_callback()) {
int i, c = CRYPTO_num_locks();
@@ -1530,6 +1537,7 @@
case CURLOPT_PROTOCOLS:
 #endif
case CURLOPT_IPRESOLVE:
+   case CURLOPT_FTP_FILEMETHOD:
convert_to_long_ex(zvalue);
error = curl_easy_setopt(ch-cp, option, 
Z_LVAL_PP(zvalue));
break;




[PHP-DOC] cvs: php-src /ext/curl interface.c php_curl.h

2009-05-03 Thread Pierre-Alain Joye
pajoye  Sun May  3 14:58:06 2009 UTC

  Modified files:  
/php-src/ext/curl   interface.c php_curl.h 
  Log:
  - [DOC] #41712, implement  progress callback
- add constants CURLOPT_NOPROGRESS and CURLOPT_PROGRESSFUNCTION
  
http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.149r2=1.150diff_format=u
Index: php-src/ext/curl/interface.c
diff -u php-src/ext/curl/interface.c:1.149 php-src/ext/curl/interface.c:1.150
--- php-src/ext/curl/interface.c:1.149  Mon Mar 16 15:05:21 2009
+++ php-src/ext/curl/interface.cSun May  3 14:58:06 2009
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: interface.c,v 1.149 2009/03/16 15:05:21 felipe Exp $ */
+/* $Id: interface.c,v 1.150 2009/05/03 14:58:06 pajoye Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -456,6 +456,7 @@
REGISTER_CURL_CONSTANT(CURLOPT_HEADER);
REGISTER_CURL_CONSTANT(CURLOPT_HTTPHEADER);
REGISTER_CURL_CONSTANT(CURLOPT_NOPROGRESS);
+   REGISTER_CURL_CONSTANT(CURLOPT_PROGRESSFUNCTION);
REGISTER_CURL_CONSTANT(CURLOPT_NOBODY);
REGISTER_CURL_CONSTANT(CURLOPT_FAILONERROR);
REGISTER_CURL_CONSTANT(CURLOPT_UPLOAD);
@@ -902,6 +903,87 @@
 }
 /* }}} */
 
+/* {{{ curl_progress
+ */
+static size_t curl_progress(void *clientp,
+double dltotal,
+double dlnow,
+double ultotal,
+double ulnow)
+{
+   php_curl   *ch = (php_curl *) clientp;
+   php_curl_progress  *t  = ch-handlers-progress;
+   int length = -1;
+   size_t  rval = 0;
+
+#if PHP_CURL_DEBUG
+   fprintf(stderr, curl_progress() called\n);
+   fprintf(stderr, clientp = %x, dltotal = %f, dlnow = %f, ultotal = %f, 
ulnow = %f\n, clientp, dltotal, dlnow, ultotal, ulnow);
+#endif
+
+   switch (t-method) {
+   case PHP_CURL_USER: {
+   zval **argv[4];
+   zval  *zdltotal = NULL;
+   zval  *zdlnow = NULL;
+   zval  *zultotal = NULL;
+   zval  *zulnow = NULL;
+   zval  *retval_ptr;
+   int   error;
+   zend_fcall_info fci;
+   TSRMLS_FETCH_FROM_CTX(ch-thread_ctx);
+
+   MAKE_STD_ZVAL(zdltotal);
+   MAKE_STD_ZVAL(zdlnow);
+   MAKE_STD_ZVAL(zultotal);
+   MAKE_STD_ZVAL(zulnow);
+   
+   ZVAL_LONG(zdltotal, dltotal);
+   ZVAL_LONG(zdlnow, dlnow);
+   ZVAL_LONG(zultotal, ultotal);
+   ZVAL_LONG(zulnow, ulnow);
+
+   argv[0] = zdltotal;
+   argv[1] = zdlnow;
+   argv[2] = zultotal;
+   argv[3] = zulnow;
+
+   fci.size = sizeof(fci);
+   fci.function_table = EG(function_table);
+   fci.function_name = t-func_name;
+   fci.object_ptr = NULL;
+   fci.retval_ptr_ptr = retval_ptr;
+   fci.param_count = 4;
+   fci.params = argv;
+   fci.no_separation = 0;
+   fci.symbol_table = NULL;
+
+   ch-in_callback = 1;
+   error = zend_call_function(fci, t-fci_cache 
TSRMLS_CC);
+   ch-in_callback = 0;
+   if (error == FAILURE) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Cannot call the CURLOPT_READFUNCTION); 
+   length = -1;
+   } else if (retval_ptr) {
+   if (Z_TYPE_P(retval_ptr) != IS_LONG) {
+   convert_to_long_ex(retval_ptr);
+   }
+   if(0 != Z_LVAL_P(retval_ptr))
+   rval = 1;
+   zval_ptr_dtor(retval_ptr);
+   }
+   zval_ptr_dtor(argv[0]);
+   zval_ptr_dtor(argv[1]);
+   zval_ptr_dtor(argv[2]);
+   zval_ptr_dtor(argv[3]);
+   break;
+   }
+   }
+   return rval;
+}
+/* }}} */
+
+
 /* {{{ curl_read
  */
 static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
@@ -1199,6 +1281,7 @@
(*ch)-handlers-write= ecalloc(1, sizeof(php_curl_write));
(*ch)-handlers-write_header = ecalloc(1, sizeof(php_curl_write));
(*ch)-handlers-read = ecalloc(1, sizeof(php_curl_read));
+   (*ch)-handlers-progress = ecalloc(1, sizeof(php_curl_progress));
 
(*ch)-in_callback = 0;

[PHP-DOC] cvs: php-src(PHP_5_3) /ext/curl interface.c php_curl.h

2009-05-03 Thread Pierre-Alain Joye
pajoye  Sun May  3 14:59:46 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/curl   interface.c php_curl.h 
  Log:
  - [DOC] MFH: #41712, implement  progress callback
- add constants  CURLOPT_PROGRESSFUNCTION
  
http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.62.2.14.2.27.2.32r2=1.62.2.14.2.27.2.33diff_format=u
Index: php-src/ext/curl/interface.c
diff -u php-src/ext/curl/interface.c:1.62.2.14.2.27.2.32 
php-src/ext/curl/interface.c:1.62.2.14.2.27.2.33
--- php-src/ext/curl/interface.c:1.62.2.14.2.27.2.32Mon Mar 16 15:08:56 2009
+++ php-src/ext/curl/interface.cSun May  3 14:59:46 2009
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: interface.c,v 1.62.2.14.2.27.2.32 2009/03/16 15:08:56 felipe Exp $ */
+/* $Id: interface.c,v 1.62.2.14.2.27.2.33 2009/05/03 14:59:46 pajoye Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -457,6 +457,7 @@
REGISTER_CURL_CONSTANT(CURLOPT_HEADER);
REGISTER_CURL_CONSTANT(CURLOPT_HTTPHEADER);
REGISTER_CURL_CONSTANT(CURLOPT_NOPROGRESS);
+   REGISTER_CURL_CONSTANT(CURLOPT_PROGRESSFUNCTION);
REGISTER_CURL_CONSTANT(CURLOPT_NOBODY);
REGISTER_CURL_CONSTANT(CURLOPT_FAILONERROR);
REGISTER_CURL_CONSTANT(CURLOPT_UPLOAD);
@@ -902,6 +903,87 @@
 }
 /* }}} */
 
+/* {{{ curl_progress
+ */
+static size_t curl_progress(void *clientp,
+double dltotal,
+double dlnow,
+double ultotal,
+double ulnow)
+{
+   php_curl   *ch = (php_curl *) clientp;
+   php_curl_progress  *t  = ch-handlers-progress;
+   int length = -1;
+   size_t  rval = 0;
+
+#if PHP_CURL_DEBUG
+   fprintf(stderr, curl_progress() called\n);
+   fprintf(stderr, clientp = %x, dltotal = %f, dlnow = %f, ultotal = %f, 
ulnow = %f\n, clientp, dltotal, dlnow, ultotal, ulnow);
+#endif
+
+   switch (t-method) {
+   case PHP_CURL_USER: {
+   zval **argv[4];
+   zval  *zdltotal = NULL;
+   zval  *zdlnow = NULL;
+   zval  *zultotal = NULL;
+   zval  *zulnow = NULL;
+   zval  *retval_ptr;
+   int   error;
+   zend_fcall_info fci;
+   TSRMLS_FETCH_FROM_CTX(ch-thread_ctx);
+
+   MAKE_STD_ZVAL(zdltotal);
+   MAKE_STD_ZVAL(zdlnow);
+   MAKE_STD_ZVAL(zultotal);
+   MAKE_STD_ZVAL(zulnow);
+   
+   ZVAL_LONG(zdltotal, dltotal);
+   ZVAL_LONG(zdlnow, dlnow);
+   ZVAL_LONG(zultotal, ultotal);
+   ZVAL_LONG(zulnow, ulnow);
+
+   argv[0] = zdltotal;
+   argv[1] = zdlnow;
+   argv[2] = zultotal;
+   argv[3] = zulnow;
+
+   fci.size = sizeof(fci);
+   fci.function_table = EG(function_table);
+   fci.function_name = t-func_name;
+   fci.object_ptr = NULL;
+   fci.retval_ptr_ptr = retval_ptr;
+   fci.param_count = 4;
+   fci.params = argv;
+   fci.no_separation = 0;
+   fci.symbol_table = NULL;
+
+   ch-in_callback = 1;
+   error = zend_call_function(fci, t-fci_cache 
TSRMLS_CC);
+   ch-in_callback = 0;
+   if (error == FAILURE) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Cannot call the CURLOPT_READFUNCTION); 
+   length = -1;
+   } else if (retval_ptr) {
+   if (Z_TYPE_P(retval_ptr) != IS_LONG) {
+   convert_to_long_ex(retval_ptr);
+   }
+   if(0 != Z_LVAL_P(retval_ptr))
+   rval = 1;
+   zval_ptr_dtor(retval_ptr);
+   }
+   zval_ptr_dtor(argv[0]);
+   zval_ptr_dtor(argv[1]);
+   zval_ptr_dtor(argv[2]);
+   zval_ptr_dtor(argv[3]);
+   break;
+   }
+   }
+   return rval;
+}
+/* }}} */
+
+
 /* {{{ curl_read
  */
 static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
@@ -1195,6 +1277,7 @@
(*ch)-handlers-write= ecalloc(1, sizeof(php_curl_write));
(*ch)-handlers-write_header = ecalloc(1, sizeof(php_curl_write));
(*ch)-handlers-read = ecalloc(1, sizeof(php_curl_read));
+   

[PHP-DOC] cvs: php-src /ext/imap php_imap.c php_imap.h /ext/imap/tests imap_mutf7_to_utf8.phpt imap_utf8_to_mutf7_basic.phpt

2009-05-02 Thread Pierre-Alain Joye
pajoye  Sat May  2 17:32:36 2009 UTC

  Added files: 
/php-src/ext/imap/tests imap_mutf7_to_utf8.phpt 
imap_utf8_to_mutf7_basic.phpt 

  Modified files:  
/php-src/ext/imap   php_imap.c php_imap.h 
  Log:
  - [DOC] add imap_mutf7_to_utf8 and imap_utf8_to_mutf7
  
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.285r2=1.286diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.285 php-src/ext/imap/php_imap.c:1.286
--- php-src/ext/imap/php_imap.c:1.285   Thu Apr 30 18:57:50 2009
+++ php-src/ext/imap/php_imap.c Sat May  2 17:32:35 2009
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski z...@zend.com   |
+--+
  */
-/* $Id: php_imap.c,v 1.285 2009/04/30 18:57:50 pajoye Exp $ */
+/* $Id: php_imap.c,v 1.286 2009/05/02 17:32:35 pajoye Exp $ */
 
 #define IMAP41
 
@@ -351,6 +351,14 @@
ZEND_ARG_INFO(0, buf)
 ZEND_END_ARG_INFO()
 
+ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_utf8_to_mutf7, 0, 0, 1)
+   ZEND_ARG_INFO(0, in)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_mutf7_to_utf8, 0, 0, 1)
+   ZEND_ARG_INFO(0, in)
+ZEND_END_ARG_INFO()
+
 ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_setflag_full, 0, 0, 3)
ZEND_ARG_INFO(0, stream_id)
ZEND_ARG_INFO(0, sequence)
@@ -509,6 +517,8 @@
PHP_FE(imap_search, 
arginfo_imap_search)
PHP_FE(imap_utf7_decode,
arginfo_imap_utf7_decode)
PHP_FE(imap_utf7_encode,
arginfo_imap_utf7_encode)
+   PHP_FE(imap_utf8_to_mutf7,  
arginfo_imap_utf8_to_mutf7)
+   PHP_FE(imap_mutf7_to_utf8,  
arginfo_imap_mutf7_to_utf8)
PHP_FE(imap_mime_header_decode, 
arginfo_imap_mime_header_decode)
PHP_FE(imap_thread, 
arginfo_imap_thread)
PHP_FE(imap_timeout,
arginfo_imap_timeout)
@@ -2881,6 +2891,61 @@
 #undef B64
 #undef UNB64
 
+static void php_imap_mutf7(INTERNAL_FUNCTION_PARAMETERS, int mode)
+{
+   char *in;
+   int in_len;
+   unsigned char *out;
+
+   if (mode == 0) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, in, 
in_len, UG(utf8_conv)) == FAILURE) {
+   return;
+   }
+   
+   if (in_len  1) {
+   RETURN_EMPTY_STRING();
+   }
+
+   out = utf8_to_mutf7((unsigned char *) in);
+   } else {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, S, in, 
in_len) == FAILURE) {
+   return;
+   }
+
+   if (in_len  1) {
+   RETURN_EMPTY_UNICODE();
+   }
+
+   out = utf8_from_mutf7((unsigned char *) in);
+   }
+
+   if (out == NIL) {
+   RETURN_FALSE;
+   return;
+   }
+
+   if (mode == 0) {
+   RETURN_STRING((char *)out, 1);
+   } else {
+   RETURN_UTF8_STRING(out, ZSTR_DUPLICATE);
+   }
+}
+
+/* {{{ proto string imap_utf8_to_mutf7(string in)
+   Encode a UTF-8 string to modified UTF-7 */
+PHP_FUNCTION(imap_utf8_to_mutf7)
+{
+   php_imap_mutf7(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
+}
+
+/* {{{ proto string imap_mutf7_to_utf8(string in)
+   Decode a modified UTF-7 string to UTF-8 */
+PHP_FUNCTION(imap_mutf7_to_utf8)
+{
+   php_imap_mutf7(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
+}
+
+
 /* {{{ proto bool imap_setflag_full(resource stream_id, string sequence, 
string flag [, int options])
Sets flags on messages */
 PHP_FUNCTION(imap_setflag_full)
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.h?r1=1.39r2=1.40diff_format=u
Index: php-src/ext/imap/php_imap.h
diff -u php-src/ext/imap/php_imap.h:1.39 php-src/ext/imap/php_imap.h:1.40
--- php-src/ext/imap/php_imap.h:1.39Tue Apr 28 08:23:32 2009
+++ php-src/ext/imap/php_imap.h Sat May  2 17:32:35 2009
@@ -27,7 +27,7 @@
+--+
  */
 
-/* $Id: php_imap.h,v 1.39 2009/04/28 08:23:32 pajoye Exp $ */
+/* $Id: php_imap.h,v 1.40 2009/05/02 17:32:35 pajoye Exp $ */
 
 #ifndef PHP_IMAP_H
 #define PHP_IMAP_H
@@ -165,6 +165,8 @@
 PHP_FUNCTION(imap_utf8);
 PHP_FUNCTION(imap_utf7_decode);
 PHP_FUNCTION(imap_utf7_encode);
+PHP_FUNCTION(imap_utf8_to_mutf7);
+PHP_FUNCTION(imap_mutf7_to_utf8);
 PHP_FUNCTION(imap_mime_header_decode);
 PHP_FUNCTION(imap_thread);
 PHP_FUNCTION(imap_timeout);

http://cvs.php.net/viewvc.cgi/php-src/ext/imap/tests/imap_mutf7_to_utf8.phpt?view=markuprev=1.1
Index: 

[PHP-DOC] cvs: php-src(PHP_5_3) /ext/imap php_imap.c php_imap.h /ext/imap/tests imap_mutf7_to_utf8.phpt imap_utf8_to_mutf7_basic.phpt

2009-05-02 Thread Pierre-Alain Joye
pajoye  Sat May  2 17:59:46 2009 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/imap/tests imap_mutf7_to_utf8.phpt 
imap_utf8_to_mutf7_basic.phpt 

  Modified files:  
/php-src/ext/imap   php_imap.c php_imap.h 
  Log:
  - [DOC] MFH: add imap_mutf7_to_utf8 and imap_utf8_to_mutf7
  
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.208.2.7.2.26.2.44r2=1.208.2.7.2.26.2.45diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.44 
php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.45
--- php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.44 Thu Apr 30 18:56:25 2009
+++ php-src/ext/imap/php_imap.c Sat May  2 17:59:46 2009
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski z...@zend.com   |
+--+
  */
-/* $Id: php_imap.c,v 1.208.2.7.2.26.2.44 2009/04/30 18:56:25 pajoye Exp $ */
+/* $Id: php_imap.c,v 1.208.2.7.2.26.2.45 2009/05/02 17:59:46 pajoye Exp $ */
 
 #define IMAP41
 
@@ -351,6 +351,14 @@
ZEND_ARG_INFO(0, buf)
 ZEND_END_ARG_INFO()
 
+ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_utf8_to_mutf7, 0, 0, 1)
+   ZEND_ARG_INFO(0, in)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_mutf7_to_utf8, 0, 0, 1)
+   ZEND_ARG_INFO(0, in)
+ZEND_END_ARG_INFO()
+
 ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_setflag_full, 0, 0, 3)
ZEND_ARG_INFO(0, stream_id)
ZEND_ARG_INFO(0, sequence)
@@ -509,6 +517,8 @@
PHP_FE(imap_search, 
arginfo_imap_search)
PHP_FE(imap_utf7_decode,
arginfo_imap_utf7_decode)
PHP_FE(imap_utf7_encode,
arginfo_imap_utf7_encode)
+   PHP_FE(imap_utf8_to_mutf7,  
arginfo_imap_utf8_to_mutf7)
+   PHP_FE(imap_mutf7_to_utf8,  
arginfo_imap_mutf7_to_utf8)
PHP_FE(imap_mime_header_decode, 
arginfo_imap_mime_header_decode)
PHP_FE(imap_thread, 
arginfo_imap_thread)
PHP_FE(imap_timeout,
arginfo_imap_timeout)
@@ -2885,6 +2895,47 @@
 #undef B64
 #undef UNB64
 
+static void php_imap_mutf7(INTERNAL_FUNCTION_PARAMETERS, int mode)
+{
+   char *in;
+   int in_len;
+   unsigned char *out;
+   
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, in, in_len) 
== FAILURE) {
+   return;
+   }
+
+   if (in_len  1) {
+   RETURN_EMPTY_STRING();
+   }
+
+   if (mode == 0) {
+   out = utf8_to_mutf7((unsigned char *) in);
+   } else {
+   out = utf8_from_mutf7((unsigned char *) in);
+   }
+
+   if (out == NIL) {
+   RETURN_FALSE;
+   } else {
+   RETURN_STRING((char *)out, 1);
+   }
+}
+
+/* {{{ proto string imap_utf8_to_mutf7(string in)
+   Encode a UTF-8 string to modified UTF-7 */
+PHP_FUNCTION(imap_utf8_to_mutf7)
+{
+   php_imap_mutf7(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
+}
+
+/* {{{ proto string imap_mutf7_to_utf8(string in)
+   Decode a modified UTF-7 string to UTF-8 */
+PHP_FUNCTION(imap_mutf7_to_utf8)
+{
+   php_imap_mutf7(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
+}
+
 /* {{{ proto bool imap_setflag_full(resource stream_id, string sequence, 
string flag [, int options])
Sets flags on messages */
 PHP_FUNCTION(imap_setflag_full)
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.h?r1=1.32.2.2.2.1.2.3r2=1.32.2.2.2.1.2.4diff_format=u
Index: php-src/ext/imap/php_imap.h
diff -u php-src/ext/imap/php_imap.h:1.32.2.2.2.1.2.3 
php-src/ext/imap/php_imap.h:1.32.2.2.2.1.2.4
--- php-src/ext/imap/php_imap.h:1.32.2.2.2.1.2.3Tue Apr 28 08:22:57 2009
+++ php-src/ext/imap/php_imap.h Sat May  2 17:59:46 2009
@@ -27,7 +27,7 @@
+--+
  */
 
-/* $Id: php_imap.h,v 1.32.2.2.2.1.2.3 2009/04/28 08:22:57 pajoye Exp $ */
+/* $Id: php_imap.h,v 1.32.2.2.2.1.2.4 2009/05/02 17:59:46 pajoye Exp $ */
 
 #ifndef PHP_IMAP_H
 #define PHP_IMAP_H
@@ -165,6 +165,8 @@
 PHP_FUNCTION(imap_utf8);
 PHP_FUNCTION(imap_utf7_decode);
 PHP_FUNCTION(imap_utf7_encode);
+PHP_FUNCTION(imap_utf8_to_mutf7);
+PHP_FUNCTION(imap_mutf7_to_utf8);
 PHP_FUNCTION(imap_mime_header_decode);
 PHP_FUNCTION(imap_thread);
 PHP_FUNCTION(imap_timeout);

http://cvs.php.net/viewvc.cgi/php-src/ext/imap/tests/imap_mutf7_to_utf8.phpt?view=markuprev=1.1
Index: php-src/ext/imap/tests/imap_mutf7_to_utf8.phpt
+++ php-src/ext/imap/tests/imap_mutf7_to_utf8.phpt
--TEST--
imap_mutf7_to_utf8
--SKIPIF--
?php if (!extension_loaded(imap)) print skip; ?
--FILE--
?php


[PHP-DOC] cvs: php-src(PHP_5_3) /ext/imap php_imap.c php_imap.h

2009-04-28 Thread Pierre-Alain Joye
pajoye  Tue Apr 28 08:22:57 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/imap   php_imap.c php_imap.h 
  Log:
  - [DOC] add imap_gc (purge cache(s) and constants IMAP_GC_ELT, IMAP_GC_ENV 
and IMAP_GC_TEXTS to control imap_gc behavior
  
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.208.2.7.2.26.2.41r2=1.208.2.7.2.26.2.42diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.41 
php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.42
--- php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.41 Mon Apr 27 00:00:42 2009
+++ php-src/ext/imap/php_imap.c Tue Apr 28 08:22:56 2009
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski z...@zend.com   |
+--+
  */
-/* $Id: php_imap.c,v 1.208.2.7.2.26.2.41 2009/04/27 00:00:42 pajoye Exp $ */
+/* $Id: php_imap.c,v 1.208.2.7.2.26.2.42 2009/04/28 08:22:56 pajoye Exp $ */
 
 #define IMAP41
 
@@ -167,6 +167,11 @@
ZEND_ARG_INFO(0, stream_id)
 ZEND_END_ARG_INFO()
 
+ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_gc, 0, 0, 1)
+   ZEND_ARG_INFO(0, stream_id)
+   ZEND_ARG_INFO(0, flags)
+ZEND_END_ARG_INFO()
+
 ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_close, 0, 0, 1)
ZEND_ARG_INFO(0, stream_id)
ZEND_ARG_INFO(0, options)
@@ -468,6 +473,7 @@
PHP_FE(imap_savebody,   
arginfo_imap_savebody)
PHP_FE(imap_fetchheader,
arginfo_imap_fetchheader)
PHP_FE(imap_fetchstructure, 
arginfo_imap_fetchstructure)
+   PHP_FE(imap_gc, 
arginfo_imap_gc)
PHP_FE(imap_expunge,
arginfo_imap_expunge)
PHP_FE(imap_delete, 
arginfo_imap_delete)
PHP_FE(imap_undelete,   
arginfo_imap_undelete)
@@ -1025,6 +1031,15 @@
ENCOTHERunknown
*/
 
+   REGISTER_LONG_CONSTANT(IMAP_GC_ELT, GC_ELT , CONST_PERSISTENT | 
CONST_CS);
+   REGISTER_LONG_CONSTANT(IMAP_GC_ENV, GC_ENV , CONST_PERSISTENT | 
CONST_CS);
+   REGISTER_LONG_CONSTANT(IMAP_GC_TEXTS, GC_TEXTS , CONST_PERSISTENT | 
CONST_CS);
+   /*
+   GC_ELT message cache elements
+   GC_ENV ENVELOPEs and BODYs
+   GC_TEXTS   texts
+   */
+
le_imap = zend_register_list_destructors_ex(mail_close_it, NULL, 
imap, module_number);
return SUCCESS;
 }
@@ -1472,6 +1487,31 @@
 }
 /* }}} */
 
+/* {{{ proto bool imap_gc(resource stream_id, int flags)
+   This function garbage collects (purges) the cache of entries of a specific 
type. */
+PHP_FUNCTION(imap_gc)
+{
+   zval *streamind;
+   pils *imap_le_struct;
+   long flags;
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rl, streamind, 
flags) == FAILURE) {
+   return;
+   }
+
+   if (flags  ((flags  ~(GC_TEXTS | GC_ELT | GC_ENV)) != 0)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid value for 
the flags parameter);
+   RETURN_FALSE;
+   }
+
+   ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, imap, 
le_imap);
+
+   mail_gc(imap_le_struct-imap_stream, flags);
+
+   RETURN_TRUE;
+}
+/* }}} */
+
 /* {{{ proto bool imap_close(resource stream_id [, int options])
Close an IMAP stream */
 PHP_FUNCTION(imap_close)
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.h?r1=1.32.2.2.2.1.2.2r2=1.32.2.2.2.1.2.3diff_format=u
Index: php-src/ext/imap/php_imap.h
diff -u php-src/ext/imap/php_imap.h:1.32.2.2.2.1.2.2 
php-src/ext/imap/php_imap.h:1.32.2.2.2.1.2.3
--- php-src/ext/imap/php_imap.h:1.32.2.2.2.1.2.2Wed Dec 31 11:15:37 2008
+++ php-src/ext/imap/php_imap.h Tue Apr 28 08:22:57 2009
@@ -27,7 +27,7 @@
+--+
  */
 
-/* $Id: php_imap.h,v 1.32.2.2.2.1.2.2 2008/12/31 11:15:37 sebastian Exp $ */
+/* $Id: php_imap.h,v 1.32.2.2.2.1.2.3 2009/04/28 08:22:57 pajoye Exp $ */
 
 #ifndef PHP_IMAP_H
 #define PHP_IMAP_H
@@ -115,6 +115,7 @@
 PHP_FUNCTION(imap_fetchstructure);
 PHP_FUNCTION(imap_fetchbody);
 PHP_FUNCTION(imap_savebody);
+PHP_FUNCTION(imap_gc);
 PHP_FUNCTION(imap_expunge);
 PHP_FUNCTION(imap_delete);
 PHP_FUNCTION(imap_undelete);




[PHP-DOC] cvs: php-src /ext/imap php_imap.c php_imap.h

2009-04-28 Thread Pierre-Alain Joye
pajoye  Tue Apr 28 08:23:32 2009 UTC

  Modified files:  
/php-src/ext/imap   php_imap.c php_imap.h 
  Log:
  - [DOC] MFB: add imap_gc (purge cache(s) and constants IMAP_GC_ELT, 
IMAP_GC_ENV and IMAP_GC_TEXTS to control imap_gc behavior
  
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.282r2=1.283diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.282 php-src/ext/imap/php_imap.c:1.283
--- php-src/ext/imap/php_imap.c:1.282   Sun Apr 26 23:44:46 2009
+++ php-src/ext/imap/php_imap.c Tue Apr 28 08:23:32 2009
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski z...@zend.com   |
+--+
  */
-/* $Id: php_imap.c,v 1.282 2009/04/26 23:44:46 pajoye Exp $ */
+/* $Id: php_imap.c,v 1.283 2009/04/28 08:23:32 pajoye Exp $ */
 
 #define IMAP41
 
@@ -167,6 +167,11 @@
ZEND_ARG_INFO(0, stream_id)
 ZEND_END_ARG_INFO()
 
+ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_gc, 0, 0, 1)
+   ZEND_ARG_INFO(0, stream_id)
+   ZEND_ARG_INFO(0, flags)
+ZEND_END_ARG_INFO()
+
 ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_close, 0, 0, 1)
ZEND_ARG_INFO(0, stream_id)
ZEND_ARG_INFO(0, options)
@@ -468,6 +473,7 @@
PHP_FE(imap_savebody,   
arginfo_imap_savebody)
PHP_FE(imap_fetchheader,
arginfo_imap_fetchheader)
PHP_FE(imap_fetchstructure, 
arginfo_imap_fetchstructure)
+   PHP_FE(imap_gc, 
arginfo_imap_gc)
PHP_FE(imap_expunge,
arginfo_imap_expunge)
PHP_FE(imap_delete, 
arginfo_imap_delete)
PHP_FE(imap_undelete,   
arginfo_imap_undelete)
@@ -1025,6 +1031,15 @@
ENCOTHERunknown
*/
 
+   REGISTER_LONG_CONSTANT(IMAP_GC_ELT, GC_ELT , CONST_PERSISTENT | 
CONST_CS);
+   REGISTER_LONG_CONSTANT(IMAP_GC_ENV, GC_ENV , CONST_PERSISTENT | 
CONST_CS);
+   REGISTER_LONG_CONSTANT(IMAP_GC_TEXTS, GC_TEXTS , CONST_PERSISTENT | 
CONST_CS);
+   /*
+   GC_ELT message cache elements
+   GC_ENV ENVELOPEs and BODYs
+   GC_TEXTS   texts
+   */
+
le_imap = zend_register_list_destructors_ex(mail_close_it, NULL, 
imap, module_number);
return SUCCESS;
 }
@@ -1468,6 +1483,31 @@
 }
 /* }}} */
 
+/* {{{ proto bool imap_gc(resource stream_id, int flags)
+   This function garbage collects (purges) the cache of entries of a specific 
type. */
+PHP_FUNCTION(imap_gc)
+{
+   zval *streamind;
+   pils *imap_le_struct;
+   long flags;
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rl, streamind, 
flags) == FAILURE) {
+   return;
+   }
+
+   if (flags  ((flags  ~(GC_TEXTS | GC_ELT | GC_ENV)) != 0)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid value for 
the flags parameter);
+   RETURN_FALSE;
+   }
+
+   ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, imap, 
le_imap);
+
+   mail_gc(imap_le_struct-imap_stream, flags);
+
+   RETURN_TRUE;
+}
+/* }}} */
+
 /* {{{ proto bool imap_close(resource stream_id [, int options])
Close an IMAP stream */
 PHP_FUNCTION(imap_close)
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.h?r1=1.38r2=1.39diff_format=u
Index: php-src/ext/imap/php_imap.h
diff -u php-src/ext/imap/php_imap.h:1.38 php-src/ext/imap/php_imap.h:1.39
--- php-src/ext/imap/php_imap.h:1.38Tue Mar 10 23:39:22 2009
+++ php-src/ext/imap/php_imap.h Tue Apr 28 08:23:32 2009
@@ -27,7 +27,7 @@
+--+
  */
 
-/* $Id: php_imap.h,v 1.38 2009/03/10 23:39:22 helly Exp $ */
+/* $Id: php_imap.h,v 1.39 2009/04/28 08:23:32 pajoye Exp $ */
 
 #ifndef PHP_IMAP_H
 #define PHP_IMAP_H
@@ -115,6 +115,7 @@
 PHP_FUNCTION(imap_fetchstructure);
 PHP_FUNCTION(imap_fetchbody);
 PHP_FUNCTION(imap_savebody);
+PHP_FUNCTION(imap_gc);
 PHP_FUNCTION(imap_expunge);
 PHP_FUNCTION(imap_delete);
 PHP_FUNCTION(imap_undelete);




[PHP-DOC] Re: [pear-webmaster] Announcement: CHM manuals are compiled on pear.php.net now

2009-02-22 Thread Pierre Joye
hi Christian,

On Sun, Feb 22, 2009 at 2:31 PM, Christian Weiske cwei...@cweiske.de wrote:
 Hello all,


 The PEAR documentation in Windows HTML Help (chm) format gets compiled
 on pear.php.net now during the weekly build process.

 I got the HTML help compiler running on our Linux box using wine and
 integrated it into the build process.

You mean the same box that you use for pear.php.net?

 Wine and hhc.exe run as a
 different user to prevent compromisation of our system by Microsoft
 software.

Well, not sure what you are talking about here. The only problem I
could see is to run wine itself on a web server, if that's the case :)

 No Windows server needed! No manual uploading! Regular chm builds!

The doc team has a dedicated server to generate the docs and it has
many free cycles. There is no manual upload, everything is automatic
(Yes, Bjori, I forgot the PDF :( ).

I wonder why you did not simply use it too? Besides the fun of
installing wine, it will be nicer ;)

Cheers,
-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org


[PHP-DOC] cvs: php-src(PHP_5_3) /ext/intl config.m4 php_intl.c /ext/intl/idn idn.c idn.h

2009-01-26 Thread Pierre-Alain Joye
pajoye  Mon Jan 26 22:30:58 2009 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/intl/idn   idn.c idn.h 

  Modified files:  
/php-src/ext/intl   config.m4 php_intl.c 
  Log:
  - [DOC] add IDN support, idn_to_ascii and idn_to_utf8
tests and MFB will follow Wednesday
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/intl/config.m4?r1=1.1.2.3r2=1.1.2.4diff_format=u
Index: php-src/ext/intl/config.m4
diff -u php-src/ext/intl/config.m4:1.1.2.3 php-src/ext/intl/config.m4:1.1.2.4
--- php-src/ext/intl/config.m4:1.1.2.3  Wed Jul 16 12:37:00 2008
+++ php-src/ext/intl/config.m4  Mon Jan 26 22:30:56 2009
@@ -51,7 +51,8 @@
 msgformat/msgformat_helpers.cpp \
 msgformat/msgformat_parse.c \
 grapheme/grapheme_string.c \
-grapheme/grapheme_util.c,$ext_shared,,$ICU_INCS)
+grapheme/grapheme_util.c \
+idn/idn.c, $ext_shared,,$ICU_INCS)
 
   PHP_ADD_BUILD_DIR($ext_builddir/collator)
   PHP_ADD_BUILD_DIR($ext_builddir/common)
@@ -61,4 +62,5 @@
   PHP_ADD_BUILD_DIR($ext_builddir/locale)
   PHP_ADD_BUILD_DIR($ext_builddir/msgformat)
   PHP_ADD_BUILD_DIR($ext_builddir/grapheme)
+  PHP_ADD_BUILD_DIR($ext_builddir/idn)
 fi
http://cvs.php.net/viewvc.cgi/php-src/ext/intl/php_intl.c?r1=1.1.2.8r2=1.1.2.9diff_format=u
Index: php-src/ext/intl/php_intl.c
diff -u php-src/ext/intl/php_intl.c:1.1.2.8 php-src/ext/intl/php_intl.c:1.1.2.9
--- php-src/ext/intl/php_intl.c:1.1.2.8 Mon Nov 17 11:27:55 2008
+++ php-src/ext/intl/php_intl.c Mon Jan 26 22:30:56 2009
@@ -62,6 +62,8 @@
 #include dateformat/dateformat_parse.h
 #include dateformat/dateformat_data.h
 
+#include idn/idn.h
+
 #include msgformat/msgformat.h
 #include common/common_error.h
 
@@ -316,6 +318,18 @@
ZEND_ARG_INFO(0, calendar)
ZEND_ARG_INFO(0, pattern)
 ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_idn_to_ascii, 0, 0, 1)
+   ZEND_ARG_INFO(0, domain)
+   ZEND_ARG_INFO(0, option)
+   ZEND_ARG_INFO(0, status)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_idn_to_utf8, 0, 0, 1)
+   ZEND_ARG_INFO(0, domain)
+   ZEND_ARG_INFO(0, option)
+   ZEND_ARG_INFO(0, status)
+ZEND_END_ARG_INFO()
 /* }}} */
 
 /* {{{ intl_functions
@@ -422,6 +436,10 @@
PHP_FE( grapheme_stristr, grapheme_strstr_args )
PHP_FE( grapheme_extract, grapheme_extract_args )
 
+   /* IDN functions */
+   PHP_FE(idn_to_ascii, arginfo_idn_to_ascii)
+   PHP_FE(idn_to_utf8, arginfo_idn_to_ascii)
+
/* common functions */
PHP_FE( intl_get_error_code, intl_0_args )
PHP_FE( intl_get_error_message, intl_0_args )
@@ -521,12 +539,15 @@
/* Expose ICU error codes to PHP scripts. */
intl_expose_icu_error_codes( INIT_FUNC_ARGS_PASSTHRU );
 
+   /* Expose IDN constants to PHP scripts. */
+   idn_register_constants(INIT_FUNC_ARGS_PASSTHRU);
+
/* Global error handling. */
intl_error_init( NULL TSRMLS_CC );
 
/* Set the default_locale value */
-   if( INTL_G(default_locale) == NULL ) {
-   INTL_G(default_locale) = pestrdup(uloc_getDefault(), 1) ;
+   if( INTL_G(default_locale) == NULL ) {
+   INTL_G(default_locale) = pestrdup(uloc_getDefault(), 1) ;
}
 
return SUCCESS;

http://cvs.php.net/viewvc.cgi/php-src/ext/intl/idn/idn.c?view=markuprev=1.1
Index: php-src/ext/intl/idn/idn.c
+++ php-src/ext/intl/idn/idn.c

http://cvs.php.net/viewvc.cgi/php-src/ext/intl/idn/idn.h?view=markuprev=1.1
Index: php-src/ext/intl/idn/idn.h
+++ php-src/ext/intl/idn/idn.h




[PHP-DOC] cvs: php-src /ext/curl interface.c

2009-01-25 Thread Pierre-Alain Joye
pajoye  Sun Jan 25 16:27:27 2009 UTC

  Modified files:  
/php-src/ext/curl   interface.c 
  Log:
  - [DOC] Add support for SSH via libssh2
   - new constants: CURLE_SSH, CURLSSH_AUTH_NONE, CURLSSH_AUTH_PUBLICKEY, 
CURLSSH_AUTH_PASSWORD, CURLSSH_AUTH_HOST, CURLSSH_AUTH_KEYBOARD, 
CURLSSH_AUTH_DEFAULT, CURLOPT_SSH_AUTH_TYPES, CURLOPT_KEYPASSWD, 
CURLOPT_SSH_PUBLIC_KEYFILE, CURLOPT_SSH_PRIVATE_KEYFILE, 
CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
See http://curl.haxx.se/libcurl/c/curl_easy_setopt.html fortheir roles or 
usages
  
http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.141r2=1.142diff_format=u
Index: php-src/ext/curl/interface.c
diff -u php-src/ext/curl/interface.c:1.141 php-src/ext/curl/interface.c:1.142
--- php-src/ext/curl/interface.c:1.141  Wed Dec 31 11:12:30 2008
+++ php-src/ext/curl/interface.cSun Jan 25 16:27:25 2009
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: interface.c,v 1.141 2008/12/31 11:12:30 sebastian Exp $ */
+/* $Id: interface.c,v 1.142 2009/01/25 16:27:25 pajoye Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -431,7 +431,7 @@
}
 #endif
 
-#if defined(CURLVERSION_FOURTH)   CURLVERSION_NOW = CURLVERSION_FOURTH
+#if LIBCURL_VERSION_NUM = 0x071300
 
if (d-iconv_ver_num) {
php_info_print_table_row(2, IconV Version, d-iconv_ver_num);
@@ -694,7 +694,9 @@
 #if LIBCURL_VERSION_NUM = 0x070b00
REGISTER_CURL_CONSTANT(CURLE_FTP_SSL_FAILED);
 #endif
-
+#ifdef LIBCURL_VERSION_NUM = 0x071300
+   REGISTER_CURL_CONSTANT(CURLE_SSH);
+#endif
REGISTER_CURL_CONSTANT(CURLPROXY_HTTP);
REGISTER_CURL_CONSTANT(CURLPROXY_SOCKS4);
REGISTER_CURL_CONSTANT(CURLPROXY_SOCKS5);
@@ -731,6 +733,22 @@
REGISTER_CURL_CONSTANT(CURLFTPSSL_ALL);
 #endif
 
+/* SSH support works in 7.19.0+ using libssh2 */
+#ifdef LIBCURL_VERSION_NUM = 0x071300
+   REGISTER_CURL_CONSTANT(CURLSSH_AUTH_NONE);
+   REGISTER_CURL_CONSTANT(CURLSSH_AUTH_PUBLICKEY);
+   REGISTER_CURL_CONSTANT(CURLSSH_AUTH_PASSWORD);
+   REGISTER_CURL_CONSTANT(CURLSSH_AUTH_HOST);
+   REGISTER_CURL_CONSTANT(CURLSSH_AUTH_KEYBOARD);
+   REGISTER_CURL_CONSTANT(CURLSSH_AUTH_DEFAULT);
+   REGISTER_CURL_CONSTANT(CURLOPT_SSH_AUTH_TYPES);
+   REGISTER_CURL_CONSTANT(CURLOPT_KEYPASSWD);
+   REGISTER_CURL_CONSTANT(CURLOPT_SSH_PUBLIC_KEYFILE);
+   REGISTER_CURL_CONSTANT(CURLOPT_SSH_PRIVATE_KEYFILE);
+   REGISTER_CURL_CONSTANT(CURLOPT_SSH_HOST_PUBLIC_KEY_MD5);
+   REGISTER_CURL_CONSTANT(CURLE_SSH);
+#endif
+
 #ifdef PHP_CURL_NEED_OPENSSL_TSL
if (!CRYPTO_get_id_callback()) {
int i, c = CRYPTO_num_locks();
@@ -1454,14 +1472,23 @@
case CURLOPT_SSLENGINE: 
case CURLOPT_SSLENGINE_DEFAULT:
case CURLOPT_SSLCERTTYPE:
-   case CURLOPT_ENCODING: {
+   case CURLOPT_ENCODING:
+#if LIBCURL_VERSION_NUM = 0x071300
+   case CURLOPT_SSH_PUBLIC_KEYFILE:
+   case CURLOPT_SSH_PRIVATE_KEYFILE: 
+#endif
+   {
 #if LIBCURL_VERSION_NUM  0x071100
char *copystr = NULL;
 #endif

convert_to_string_ex(zvalue);
 
-   if (option == CURLOPT_URL) {
+   if (option == CURLOPT_URL
+#if LIBCURL_VERSION_NUM = 0x071300
+   || option == CURLOPT_SSH_PUBLIC_KEYFILE || 
option == CURLOPT_SSH_PRIVATE_KEYFILE
+#endif
+   ) {

PHP_CURL_CHECK_OPEN_BASEDIR(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue), 1);
}
 




[PHP-DOC] cvs: php-src(PHP_5_3) /ext/curl interface.c

2009-01-25 Thread Pierre-Alain Joye
pajoye  Sun Jan 25 16:28:19 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/curl   interface.c 
  Log:
  - MFH
   - [DOC] Add support for SSH via libssh2
- new constants: CURLE_SSH, CURLSSH_AUTH_NONE, CURLSSH_AUTH_PUBLICKEY, 
CURLSSH_AUTH_PASSWORD, CURLSSH_AUTH_HOST, CURLSSH_AUTH_KEYBOARD, 
CURLSSH_AUTH_DEFAULT, CURLOPT_SSH_AUTH_TYPES, CURLOPT_KEYPASSWD, 
CURLOPT_SSH_PUBLIC_KEYFILE, CURLOPT_SSH_PRIVATE_KEYFILE, 
CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
 See http://curl.haxx.se/libcurl/c/curl_easy_setopt.html fortheir roles or 
usages
  
http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.62.2.14.2.27.2.26r2=1.62.2.14.2.27.2.27diff_format=u
Index: php-src/ext/curl/interface.c
diff -u php-src/ext/curl/interface.c:1.62.2.14.2.27.2.26 
php-src/ext/curl/interface.c:1.62.2.14.2.27.2.27
--- php-src/ext/curl/interface.c:1.62.2.14.2.27.2.26Wed Dec 31 11:15:35 2008
+++ php-src/ext/curl/interface.cSun Jan 25 16:28:18 2009
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: interface.c,v 1.62.2.14.2.27.2.26 2008/12/31 11:15:35 sebastian Exp $ 
*/
+/* $Id: interface.c,v 1.62.2.14.2.27.2.27 2009/01/25 16:28:18 pajoye Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -433,7 +433,7 @@
}
 #endif
 
-#if defined(CURLVERSION_FOURTH)   CURLVERSION_NOW = CURLVERSION_FOURTH
+#if LIBCURL_VERSION_NUM = 0x071300
 
if (d-iconv_ver_num) {
php_info_print_table_row(2, IconV Version, d-iconv_ver_num);
@@ -696,7 +696,9 @@
 #if LIBCURL_VERSION_NUM = 0x070b00
REGISTER_CURL_CONSTANT(CURLE_FTP_SSL_FAILED);
 #endif
-
+#if LIBCURL_VERSION_NUM = 0x071300
+   REGISTER_CURL_CONSTANT(CURLE_SSH);
+#endif
REGISTER_CURL_CONSTANT(CURLPROXY_HTTP);
REGISTER_CURL_CONSTANT(CURLPROXY_SOCKS5);
 
@@ -732,6 +734,22 @@
REGISTER_CURL_CONSTANT(CURLFTPSSL_ALL);
 #endif
 
+/* SSH support works in 7.19.0+ using libssh2 */
+#if LIBCURL_VERSION_NUM = 0x071300
+   REGISTER_CURL_CONSTANT(CURLSSH_AUTH_NONE);
+   REGISTER_CURL_CONSTANT(CURLSSH_AUTH_PUBLICKEY);
+   REGISTER_CURL_CONSTANT(CURLSSH_AUTH_PASSWORD);
+   REGISTER_CURL_CONSTANT(CURLSSH_AUTH_HOST);
+   REGISTER_CURL_CONSTANT(CURLSSH_AUTH_KEYBOARD);
+   REGISTER_CURL_CONSTANT(CURLSSH_AUTH_DEFAULT);
+   REGISTER_CURL_CONSTANT(CURLOPT_SSH_AUTH_TYPES);
+   REGISTER_CURL_CONSTANT(CURLOPT_KEYPASSWD);
+   REGISTER_CURL_CONSTANT(CURLOPT_SSH_PUBLIC_KEYFILE);
+   REGISTER_CURL_CONSTANT(CURLOPT_SSH_PRIVATE_KEYFILE);
+   REGISTER_CURL_CONSTANT(CURLOPT_SSH_HOST_PUBLIC_KEY_MD5);
+   REGISTER_CURL_CONSTANT(CURLE_SSH);
+#endif
+
 #ifdef PHP_CURL_NEED_OPENSSL_TSL
if (!CRYPTO_get_id_callback()) {
int i, c = CRYPTO_num_locks();
@@ -1442,14 +1460,23 @@
case CURLOPT_SSLENGINE: 
case CURLOPT_SSLENGINE_DEFAULT:
case CURLOPT_SSLCERTTYPE:
-   case CURLOPT_ENCODING: {
+   case CURLOPT_ENCODING:
+#if LIBCURL_VERSION_NUM = 0x071300
+   case CURLOPT_SSH_PUBLIC_KEYFILE:
+   case CURLOPT_SSH_PRIVATE_KEYFILE: 
+#endif
+   {
 #if LIBCURL_VERSION_NUM  0x071100
char *copystr = NULL;
 #endif

convert_to_string_ex(zvalue);
 
-   if (option == CURLOPT_URL) {
+   if (option == CURLOPT_URL
+#if LIBCURL_VERSION_NUM = 0x071300
+   || option == CURLOPT_SSH_PUBLIC_KEYFILE || 
option == CURLOPT_SSH_PRIVATE_KEYFILE
+#endif
+   ) {

PHP_CURL_CHECK_OPEN_BASEDIR(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue), 1);
}
 
@@ -1471,7 +1498,7 @@
FILE *fp = NULL;
int type;
void * what;
-   
+
what = zend_fetch_resource(zvalue TSRMLS_CC, -1, 
File-Handle, type, 1, php_file_le_stream());
if (!what) {
RETVAL_FALSE;




[PHP-DOC] cvs: php-src(PHP_5_3) /ext/standard file.c /ext/standard/tests/file fnmatch_basic.phpt fnmatch_error.phpt fnmatch_variation.phpt

2009-01-19 Thread Pierre-Alain Joye
pajoye  Tue Jan 20 01:40:07 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   file.c 
/php-src/ext/standard/tests/filefnmatch_basic.phpt 
fnmatch_error.phpt 
fnmatch_variation.phpt 
  Log:
  - [DOC] add support for fnmatch() on Windows
  - enable tests (pass)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.409.2.6.2.28.2.28r2=1.409.2.6.2.28.2.29diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.409.2.6.2.28.2.28 
php-src/ext/standard/file.c:1.409.2.6.2.28.2.29
--- php-src/ext/standard/file.c:1.409.2.6.2.28.2.28 Wed Dec 31 11:15:45 2008
+++ php-src/ext/standard/file.c Tue Jan 20 01:40:05 2009
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: file.c,v 1.409.2.6.2.28.2.28 2008/12/31 11:15:45 sebastian Exp $ */
+/* $Id: file.c,v 1.409.2.6.2.28.2.29 2009/01/20 01:40:05 pajoye Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -48,6 +48,7 @@
 #define O_RDONLY _O_RDONLY
 #include win32/param.h
 #include win32/winutil.h
+#include win32/fnmatch.h
 #elif defined(NETWARE)
 #include sys/param.h
 #include sys/select.h
@@ -116,7 +117,7 @@
 php_file_globals file_globals;
 #endif
 
-#ifdef HAVE_FNMATCH
+#if defined(HAVE_FNMATCH)  !defined(PHP_WIN32)
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE
 #endif
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fnmatch_basic.phpt?r1=1.1.2.2.2.2r2=1.1.2.2.2.3diff_format=u
Index: php-src/ext/standard/tests/file/fnmatch_basic.phpt
diff -u php-src/ext/standard/tests/file/fnmatch_basic.phpt:1.1.2.2.2.2 
php-src/ext/standard/tests/file/fnmatch_basic.phpt:1.1.2.2.2.3
--- php-src/ext/standard/tests/file/fnmatch_basic.phpt:1.1.2.2.2.2  Tue Oct 
21 13:38:18 2008
+++ php-src/ext/standard/tests/file/fnmatch_basic.phpt  Tue Jan 20 01:40:06 2009
@@ -2,9 +2,6 @@
 Test fnmatch() function: Basic functionality
 --SKIPIF--
 ?php
-if (substr(PHP_OS, 0, 3) == 'WIN')
-die(skip do not run on Windows);
-
 if (!function_exists('fnmatch'))
 die(skip fnmatch() function is not available);
 ?
@@ -34,7 +31,7 @@
 
 echo \n*** Done ***\n;
 ?
---EXPECTF--
+--EXPECT--
 *** Testing fnmatch() with file ***
 bool(true)
 bool(true)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fnmatch_error.phpt?r1=1.1.2.2.2.3r2=1.1.2.2.2.4diff_format=u
Index: php-src/ext/standard/tests/file/fnmatch_error.phpt
diff -u php-src/ext/standard/tests/file/fnmatch_error.phpt:1.1.2.2.2.3 
php-src/ext/standard/tests/file/fnmatch_error.phpt:1.1.2.2.2.4
--- php-src/ext/standard/tests/file/fnmatch_error.phpt:1.1.2.2.2.3  Tue Oct 
21 13:38:18 2008
+++ php-src/ext/standard/tests/file/fnmatch_error.phpt  Tue Jan 20 01:40:06 2009
@@ -2,9 +2,6 @@
 Test fnmatch() function: Error conditions
 --SKIPIF--
 ?php
-if (substr(PHP_OS, 0, 3) == 'WIN')
-die(skip do not run on Windows);
-
 if (!function_exists('fnmatch'))
 die(skip fnmatch() function is not available);
 ?
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fnmatch_variation.phpt?r1=1.1.2.2.2.3r2=1.1.2.2.2.4diff_format=u
Index: php-src/ext/standard/tests/file/fnmatch_variation.phpt
diff -u php-src/ext/standard/tests/file/fnmatch_variation.phpt:1.1.2.2.2.3 
php-src/ext/standard/tests/file/fnmatch_variation.phpt:1.1.2.2.2.4
--- php-src/ext/standard/tests/file/fnmatch_variation.phpt:1.1.2.2.2.3  Tue Oct 
21 13:38:18 2008
+++ php-src/ext/standard/tests/file/fnmatch_variation.phpt  Tue Jan 20 
01:40:06 2009
@@ -2,9 +2,6 @@
 Test fnmatch() function: Variations
 --SKIPIF--
 ?php
-if (substr(PHP_OS, 0, 3) == 'WIN')
-die(skip do not run on Windows);
-
 if (!function_exists('fnmatch'))
 die(skip fnmatch() function is not available);
 ?
@@ -18,6 +15,11 @@
 echo *** Testing fnmatch() with file and various patterns ***\n;
 $file_name = dirname(__FILE__)./match.tmp;
 
+/* avoid using \, it breaks the pattern */
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+$file_name = str_replace('\\','/', $file_name);
+}
+
 fopen($file_name, w);
 
 $pattern_arr = array(
@@ -132,7 +134,7 @@
 
 echo \n*** Done ***\n;
 ?
---EXPECTF--
+--EXPECT--
 *** Testing fnmatch() with file and various patterns ***
 -- Iteration 0 --
 bool(true)




[PHP-DOC] cvs: php-src /ext/standard file.c /ext/standard/tests/file fnmatch_basic.phpt fnmatch_error.phpt fnmatch_variation.phpt

2009-01-19 Thread Pierre-Alain Joye
pajoye  Tue Jan 20 01:41:19 2009 UTC

  Modified files:  
/php-src/ext/standard   file.c 
/php-src/ext/standard/tests/filefnmatch_basic.phpt 
fnmatch_error.phpt 
fnmatch_variation.phpt 
  Log:
  - MFB
   - [DOC] add support for fnmatch() on Windows
   - enable tests (pass)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.537r2=1.538diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.537 php-src/ext/standard/file.c:1.538
--- php-src/ext/standard/file.c:1.537   Fri Jan  9 22:50:45 2009
+++ php-src/ext/standard/file.c Tue Jan 20 01:41:18 2009
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: file.c,v 1.537 2009/01/09 22:50:45 tony2001 Exp $ */
+/* $Id: file.c,v 1.538 2009/01/20 01:41:18 pajoye Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -48,6 +48,7 @@
 #define O_RDONLY _O_RDONLY
 #include win32/param.h
 #include win32/winutil.h
+#include win32/fnmatch.h
 #elif defined(NETWARE)
 #include sys/param.h
 #include sys/select.h
@@ -115,7 +116,7 @@
 php_file_globals file_globals;
 #endif
 
-#ifdef HAVE_FNMATCH
+#if defined(HAVE_FNMATCH)  !defined(PHP_WIN32)
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE
 #endif
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fnmatch_basic.phpt?r1=1.6r2=1.7diff_format=u
Index: php-src/ext/standard/tests/file/fnmatch_basic.phpt
diff -u php-src/ext/standard/tests/file/fnmatch_basic.phpt:1.6 
php-src/ext/standard/tests/file/fnmatch_basic.phpt:1.7
--- php-src/ext/standard/tests/file/fnmatch_basic.phpt:1.6  Tue Oct 21 
13:38:57 2008
+++ php-src/ext/standard/tests/file/fnmatch_basic.phpt  Tue Jan 20 01:41:19 2009
@@ -2,9 +2,6 @@
 Test fnmatch() function: Basic functionality
 --SKIPIF--
 ?php
-if (substr(PHP_OS, 0, 3) == 'WIN')
-die(skip do not run on Windows);
-
 if (!function_exists('fnmatch'))
 die(skip fnmatch() function is not available);
 ?
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fnmatch_error.phpt?r1=1.6r2=1.7diff_format=u
Index: php-src/ext/standard/tests/file/fnmatch_error.phpt
diff -u php-src/ext/standard/tests/file/fnmatch_error.phpt:1.6 
php-src/ext/standard/tests/file/fnmatch_error.phpt:1.7
--- php-src/ext/standard/tests/file/fnmatch_error.phpt:1.6  Tue Oct 21 
13:38:57 2008
+++ php-src/ext/standard/tests/file/fnmatch_error.phpt  Tue Jan 20 01:41:19 2009
@@ -2,9 +2,6 @@
 Test fnmatch() function: Error conditions
 --SKIPIF--
 ?php
-if (substr(PHP_OS, 0, 3) == 'WIN')
-die(skip do not run on Windows);
-
 if (!function_exists('fnmatch'))
 die(skip fnmatch() function is not available);
 ?
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fnmatch_variation.phpt?r1=1.6r2=1.7diff_format=u
Index: php-src/ext/standard/tests/file/fnmatch_variation.phpt
diff -u php-src/ext/standard/tests/file/fnmatch_variation.phpt:1.6 
php-src/ext/standard/tests/file/fnmatch_variation.phpt:1.7
--- php-src/ext/standard/tests/file/fnmatch_variation.phpt:1.6  Tue Oct 21 
13:38:57 2008
+++ php-src/ext/standard/tests/file/fnmatch_variation.phpt  Tue Jan 20 
01:41:19 2009
@@ -2,9 +2,6 @@
 Test fnmatch() function: Variations
 --SKIPIF--
 ?php
-if (substr(PHP_OS, 0, 3) == 'WIN')
-die(skip do not run on Windows);
-
 if (!function_exists('fnmatch'))
 die(skip fnmatch() function is not available);
 ?
@@ -18,6 +15,11 @@
 echo *** Testing fnmatch() with file and various patterns ***\n;
 $file_name = dirname(__FILE__)./match.tmp;
 
+/* avoid using \, it breaks the pattern */
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+$file_name = str_replace('\\','/', $file_name);
+}
+
 fopen($file_name, w);
 
 $pattern_arr = array(




[PHP-DOC] cvs: php-src /win32 time.c time.h unistd.h

2009-01-18 Thread Pierre-Alain Joye
pajoye  Mon Jan 19 02:29:24 2009 UTC

  Modified files:  
/php-src/win32  time.c time.h unistd.h 
  Log:
  - add nanosleep
  - expose nanosleep and usleep
  - [DOC] time_ nanosleep and time_ sleep_ until available on windows
  
http://cvs.php.net/viewvc.cgi/php-src/win32/time.c?r1=1.12r2=1.13diff_format=u
Index: php-src/win32/time.c
diff -u php-src/win32/time.c:1.12 php-src/win32/time.c:1.13
--- php-src/win32/time.c:1.12   Thu Aug 14 23:21:32 2008
+++ php-src/win32/time.cMon Jan 19 02:29:24 2009
@@ -11,7 +11,7 @@
  *
  */
 
-/* $Id: time.c,v 1.12 2008/08/14 23:21:32 kalle Exp $ */
+/* $Id: time.c,v 1.13 2009/01/19 02:29:24 pajoye Exp $ */
 
  /**
   *
@@ -127,7 +127,7 @@
return 0;
 }
 
-void usleep(unsigned int useconds)
+PHPAPI int usleep(unsigned int useconds)
 {
HANDLE timer;
LARGE_INTEGER due;
@@ -138,6 +138,17 @@
SetWaitableTimer(timer, due, 0, NULL, NULL, 0);
WaitForSingleObject(timer, INFINITE);
CloseHandle(timer);
+   return 0;
+}
+
+PHPAPI int nanosleep( const struct timespec * rqtp, struct timespec * rmtp )
+{
+   if (rqtp-tv_nsec  9) {
+   /* The time interval specified 1,000,000 or more microseconds. 
*/
+   errno = EINVAL;
+   return -1;
+   }
+   return usleep( rqtp-tv_sec * 100 + rqtp-tv_nsec / 1000  );
 }
 
 #if 0 /* looks pretty ropey in here */
http://cvs.php.net/viewvc.cgi/php-src/win32/time.h?r1=1.9r2=1.10diff_format=u
Index: php-src/win32/time.h
diff -u php-src/win32/time.h:1.9 php-src/win32/time.h:1.10
--- php-src/win32/time.h:1.9Tue Feb 18 13:34:52 2003
+++ php-src/win32/time.hMon Jan 19 02:29:24 2009
@@ -28,6 +28,14 @@
struct timeval it_value;/* current value */
 };
 
+#ifndef timespec
+struct timespec
+{
+   time_t   tv_sec;   /* seconds */
+   long tv_nsec;  /* nanoseconds */
+};
+#endif
+
 #define ITIMER_REAL0   /*generates sigalrm */
 #define ITIMER_VIRTUAL 1   /*generates sigvtalrm */
 #define ITIMER_VIRT1   /*generates sigvtalrm */
@@ -40,4 +48,6 @@
 PHPAPI extern int setitimer(int which, const struct itimerval *value,
 struct itimerval *ovalue);
 
+PHPAPI int nanosleep( const struct timespec * rqtp, struct timespec * rmtp );
+
 #endif
http://cvs.php.net/viewvc.cgi/php-src/win32/unistd.h?r1=1.2r2=1.3diff_format=u
Index: php-src/win32/unistd.h
diff -u php-src/win32/unistd.h:1.2 php-src/win32/unistd.h:1.3
--- php-src/win32/unistd.h:1.2  Thu Jun 28 23:28:25 2001
+++ php-src/win32/unistd.h  Mon Jan 19 02:29:24 2009
@@ -1,4 +1,4 @@
 #ifndef _PHP_WIN32_UNISTD_H
 #define _PHP_WIN32_UNISTD_H
-void usleep(unsigned int useconds);
+PHPAPI int usleep(unsigned int useconds);
 #endif




[PHP-DOC] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c /win32 time.c time.h unistd.h /win32/build config.w32.h.in

2009-01-18 Thread Pierre-Alain Joye
pajoye  Mon Jan 19 02:35:22 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
/php-src/win32/buildconfig.w32.h.in 
/php-src/win32  time.c time.h unistd.h 
  Log:
  - MFH:
   - add nanosleep
   - expose nanosleep and usleep
   - [DOC] time_ nanosleep and time_ sleep_ until available on windows
   - change nanosleep signature to match posix one
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.85r2=1.725.2.31.2.64.2.86diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.85 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.86
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.85 Fri Jan 16 
01:01:04 2009
+++ php-src/ext/standard/basic_functions.c  Mon Jan 19 02:35:21 2009
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.85 2009/01/16 01:01:04 pajoye 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.86 2009/01/19 02:35:21 pajoye 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -39,6 +39,7 @@
 
 #ifdef PHP_WIN32
 #include win32/php_win32_globals.h
+#include win32/time.h
 #endif
 
 typedef struct yy_buffer_state *YY_BUFFER_STATE;
http://cvs.php.net/viewvc.cgi/php-src/win32/build/config.w32.h.in?r1=1.7.2.4.2.3.2.7r2=1.7.2.4.2.3.2.8diff_format=u
Index: php-src/win32/build/config.w32.h.in
diff -u php-src/win32/build/config.w32.h.in:1.7.2.4.2.3.2.7 
php-src/win32/build/config.w32.h.in:1.7.2.4.2.3.2.8
--- php-src/win32/build/config.w32.h.in:1.7.2.4.2.3.2.7 Wed Dec 31 19:47:13 2008
+++ php-src/win32/build/config.w32.h.in Mon Jan 19 02:35:21 2009
@@ -1,6 +1,6 @@
 /*
Build Configuration Template for Win32.
-   $Id: config.w32.h.in,v 1.7.2.4.2.3.2.7 2008/12/31 19:47:13 pajoye Exp $
+   $Id: config.w32.h.in,v 1.7.2.4.2.3.2.8 2009/01/19 02:35:21 pajoye Exp $
 */
 
 /* Define the minimum supported version */
@@ -53,6 +53,7 @@
 
 /* its in win32/time.c */
 #define HAVE_USLEEP 1
+#define HAVE_NANOSLEEP 1
 
 #define HAVE_GETHOSTNAME 1
 #define HAVE_GETCWD 1
http://cvs.php.net/viewvc.cgi/php-src/win32/time.c?r1=1.10.6.2r2=1.10.6.3diff_format=u
Index: php-src/win32/time.c
diff -u php-src/win32/time.c:1.10.6.2 php-src/win32/time.c:1.10.6.3
--- php-src/win32/time.c:1.10.6.2   Thu Aug 14 23:29:25 2008
+++ php-src/win32/time.cMon Jan 19 02:35:21 2009
@@ -11,7 +11,7 @@
  *
  */
 
-/* $Id: time.c,v 1.10.6.2 2008/08/14 23:29:25 kalle Exp $ */
+/* $Id: time.c,v 1.10.6.3 2009/01/19 02:35:21 pajoye Exp $ */
 
  /**
   *
@@ -127,7 +127,7 @@
return 0;
 }
 
-void usleep(unsigned int useconds)
+PHPAPI int usleep(unsigned int useconds)
 {
HANDLE timer;
LARGE_INTEGER due;
@@ -138,6 +138,17 @@
SetWaitableTimer(timer, due, 0, NULL, NULL, 0);
WaitForSingleObject(timer, INFINITE);
CloseHandle(timer);
+   return 0;
+}
+
+PHPAPI int nanosleep( const struct timespec * rqtp, struct timespec * rmtp )
+{
+   if (rqtp-tv_nsec  9) {
+   /* The time interval specified 1,000,000 or more microseconds. 
*/
+   errno = EINVAL;
+   return -1;
+   }
+   return usleep( rqtp-tv_sec * 100 + rqtp-tv_nsec / 1000  );
 }
 
 #if 0 /* looks pretty ropey in here */
http://cvs.php.net/viewvc.cgi/php-src/win32/time.h?r1=1.9r2=1.9.8.1diff_format=u
Index: php-src/win32/time.h
diff -u php-src/win32/time.h:1.9 php-src/win32/time.h:1.9.8.1
--- php-src/win32/time.h:1.9Tue Feb 18 13:34:52 2003
+++ php-src/win32/time.hMon Jan 19 02:35:22 2009
@@ -28,6 +28,14 @@
struct timeval it_value;/* current value */
 };
 
+#ifndef timespec
+struct timespec
+{
+   time_t   tv_sec;   /* seconds */
+   long tv_nsec;  /* nanoseconds */
+};
+#endif
+
 #define ITIMER_REAL0   /*generates sigalrm */
 #define ITIMER_VIRTUAL 1   /*generates sigvtalrm */
 #define ITIMER_VIRT1   /*generates sigvtalrm */
@@ -40,4 +48,6 @@
 PHPAPI extern int setitimer(int which, const struct itimerval *value,
 struct itimerval *ovalue);
 
+PHPAPI int nanosleep( const struct timespec * rqtp, struct timespec * rmtp );
+
 #endif
http://cvs.php.net/viewvc.cgi/php-src/win32/unistd.h?r1=1.2r2=1.2.30.1diff_format=u
Index: php-src/win32/unistd.h
diff -u php-src/win32/unistd.h:1.2 php-src/win32/unistd.h:1.2.30.1
--- php-src/win32/unistd.h:1.2  Thu Jun 28 23:28:25 2001
+++ php-src/win32/unistd.h  Mon Jan 19 02:35:22 2009
@@ -1,4 +1,4 @@
 #ifndef _PHP_WIN32_UNISTD_H
 #define _PHP_WIN32_UNISTD_H
-void usleep(unsigned int useconds);
+PHPAPI int usleep(unsigned int useconds);
 #endif




[PHP-DOC] cvs: php-src /main main.c win32_internal_function_disabled.h

2009-01-16 Thread Pierre-Alain Joye
pajoye  Fri Jan 16 10:02:50 2009 UTC

  Modified files:  
/php-src/main   win32_internal_function_disabled.h main.c 
  Log:
  MFB: 
   - add EG(windows_version_info), set at init time once per instance
 contains a OSVERSIONINFOEX struct. It lets us determine easily on which 
windows version is used (for example)
   - [DOC] add the ability to disable a function when the windows function does 
not support a feature (for example symlink)
   - [DOC] symlink, hardlink  co support (1/3)
  
http://cvs.php.net/viewvc.cgi/php-src/main/win32_internal_function_disabled.h?r1=1.1r2=1.2diff_format=u
Index: php-src/main/win32_internal_function_disabled.h
diff -u /dev/null php-src/main/win32_internal_function_disabled.h:1.2
--- /dev/null   Fri Jan 16 10:02:50 2009
+++ php-src/main/win32_internal_function_disabled.h Fri Jan 16 10:02:50 2009
@@ -0,0 +1,25 @@
+/*
+   +--+
+   | PHP Version 5|
+   +--+
+   | Copyright (c) 1997-2009 The PHP Group|
+   +--+
+   | This source file is subject to version 3.01 of the PHP license,  |
+   | that is bundled with this package in the file LICENSE, and is|
+   | available through the world-wide-web at the following url:   |
+   | http://www.php.net/license/3_01.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  |
+   | lice...@php.net so we can mail you a copy immediately.   |
+   +--+
+   | Author: Pierre A. Joye pie...@php.net  |
+   +--+
+ */
+
+/* $Id: win32_internal_function_disabled.h,v 1.2 2009/01/16 10:02:50 pajoye 
Exp $ */
+
+/* 5 means the min version is 5 (XP/2000), 6 (2k8/vista), etc. */
+static const char *function_name_5[] = {link, NULL};
+const int function_name_cnt_5 = 1;
+static const char *function_name_6[] = {readlink, symlink, NULL};
+const int function_name_cnt_6 = 2;
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.788r2=1.789diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.788 php-src/main/main.c:1.789
--- php-src/main/main.c:1.788   Fri Jan  9 15:00:36 2009
+++ php-src/main/main.c Fri Jan 16 10:02:50 2009
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.788 2009/01/09 15:00:36 iliaa Exp $ */
+/* $Id: main.c,v 1.789 2009/01/16 10:02:50 pajoye Exp $ */
 
 /* {{{ includes
  */
@@ -99,6 +99,33 @@
 PHPAPI int core_globals_id;
 #endif
 
+#ifdef PHP_WIN32
+#include win32_internal_function_disabled.h
+
+static php_win32_disable_functions() {
+   int i;
+   TSRMLS_FETCH();
+
+   if (EG(windows_version_info).dwMajorVersion  5) {
+   for (i = 0; i  function_name_cnt_5; i++) {
+   if (zend_hash_del(CG(function_table), 
function_name_5[i], strlen(function_name_5[i]) + 1)==FAILURE) {
+   php_printf(Unable to disable function '%s'\n, 
function_name_5[i]);
+   return FAILURE;
+   }
+   }
+   }
+
+   if (EG(windows_version_info).dwMajorVersion  6) {
+   for (i = 0; i  function_name_cnt_6; i++) {
+   if (zend_hash_del(CG(function_table), 
function_name_6[i], strlen(function_name_6[i]) + 1)==FAILURE) {
+   php_printf(Unable to disable function '%s'\n, 
function_name_6[i]);
+   return FAILURE;
+   }
+   }
+   }
+}
+#endif
+
 #define SAFE_FILENAME(f) ((f)?(f):-)
 
 /* {{{ PHP_INI_MH
@@ -1788,6 +1815,9 @@
 #ifdef ZTS
zend_executor_globals *executor_globals;
void ***tsrm_ls;
+#ifdef PHP_WIN32
+   DWORD dwVersion = GetVersion();
+#endif
 
php_core_globals *core_globals;
 #endif
@@ -1796,16 +1826,12 @@
WSADATA wsaData;
 #endif
 #ifdef PHP_WIN32
-   {
-   DWORD dwVersion = GetVersion();
-
/* Get build numbers for Windows NT or Win95 */
if (dwVersion  0x8000){
php_os=WINNT;
} else {
php_os=WIN32;
}
-   }
 #if defined(_MSC_VER)  (_MSC_VER = 1400)
old_invalid_parameter_handler =
_set_invalid_parameter_handler(dummy_invalid_parameter_handler);
@@ -1862,6 +1888,18 @@
 #endif
gc_globals_ctor(TSRMLS_C);
 
+#ifdef PHP_WIN32
+   {
+   OSVERSIONINFOEX *osvi = EG

[PHP-DOC] cvs: php-src(PHP_5_3) / NEWS

2009-01-14 Thread Pierre-Alain Joye
pajoye  Wed Jan 14 09:46:34 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  - NEWS entry for the recent DNS improvement
  - [DOC] already submitted but it is a good summary
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.452r2=1.2027.2.547.2.965.2.453diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.452 
php-src/NEWS:1.2027.2.547.2.965.2.453
--- php-src/NEWS:1.2027.2.547.2.965.2.452   Tue Jan 13 18:27:59 2009
+++ php-src/NEWSWed Jan 14 09:46:34 2009
@@ -1,6 +1,13 @@
 PHPNEWS
 |||
 ?? ??? 2009, PHP 5.3.0 Alpha 4
+- Improved DNS API
+ . Windows support for dns_check_record, dns_get_mx (checkdnsrr and getmxrr).
+   (Pierre)
+ . Added support for old style DNS functions (supports OSX and FBSD). (Scott)
+ . Added a new entries array in dns_check_record containing the TXT elements
+   (Felipe, Pierre)
+
 - Changed __call() to be invoked on private/protected method access, similar to
   properties and __get(). (Andrei)
 - Upgraded bundled sqlite to version 3.6.8. (Scott, Ilia)
@@ -18,7 +25,6 @@
 
 - Added DOMNode::getLineNo to get line number of parsed node. (Rob)
 - Added table info to PDO::getColumnMeta() with SQLite. (Martin Jansen, Scott)
-- Added support for old style DNS functions. (Scott)
 - Added mail logging functionality that allows logging of mail sent via
   mail() function. (Ilia)
 - Added json_last_error() to return any error information from json_decode().




[PHP-DOC] cvs: php-src(PHP_5_3) /ext/gd/libgd gd_png.c

2009-01-14 Thread Pierre-Alain Joye
pajoye  Wed Jan 14 10:16:15 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/gd/libgd   gd_png.c 
  Log:
  - [DOC] support for PNG gray levels+ alpha  image, loaded as truecolor
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd_png.c?r1=1.17.4.2.2.5.2.2r2=1.17.4.2.2.5.2.3diff_format=u
Index: php-src/ext/gd/libgd/gd_png.c
diff -u php-src/ext/gd/libgd/gd_png.c:1.17.4.2.2.5.2.2 
php-src/ext/gd/libgd/gd_png.c:1.17.4.2.2.5.2.3
--- php-src/ext/gd/libgd/gd_png.c:1.17.4.2.2.5.2.2  Thu Nov  6 10:14:37 2008
+++ php-src/ext/gd/libgd/gd_png.c   Wed Jan 14 10:16:15 2009
@@ -189,7 +189,8 @@
png_read_info(png_ptr, info_ptr);   /* read all PNG info up to 
image data */
 
png_get_IHDR(png_ptr, info_ptr, width, height, bit_depth, 
color_type, interlace_type, NULL, NULL);
-   if ((color_type == PNG_COLOR_TYPE_RGB) || (color_type == 
PNG_COLOR_TYPE_RGB_ALPHA)) {
+   if ((color_type == PNG_COLOR_TYPE_RGB) || (color_type == 
PNG_COLOR_TYPE_RGB_ALPHA)
+   || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
im = gdImageCreateTrueColor((int) width, (int) height);
} else {
im = gdImageCreate((int) width, (int) height);
@@ -225,7 +226,6 @@
}
 #endif
 
-
switch (color_type) {
case PNG_COLOR_TYPE_PALETTE:
png_get_PLTE(png_ptr, info_ptr, palette, num_palette);
@@ -251,7 +251,6 @@
}
break;
case PNG_COLOR_TYPE_GRAY:
-   case PNG_COLOR_TYPE_GRAY_ALPHA:
/* create a fake palette and check for single-shade 
transparency */
if ((palette = (png_colorp) gdMalloc (256 * sizeof 
(png_color))) == NULL) {
php_gd_error(gd-png error: cannot allocate 
gray palette);
@@ -293,6 +292,9 @@
}
break;
 
+   case PNG_COLOR_TYPE_GRAY_ALPHA:
+   png_set_gray_to_rgb(png_ptr);
+
case PNG_COLOR_TYPE_RGB:
case PNG_COLOR_TYPE_RGB_ALPHA:
/* gd 2.0: we now support truecolor. See the 
comment above
@@ -365,6 +367,7 @@
}
break;
 
+   case PNG_COLOR_TYPE_GRAY_ALPHA:
case PNG_COLOR_TYPE_RGB_ALPHA:
for (h = 0; h  height; h++) {
int boffset = 0;




[PHP-DOC] cvs: php-src /ext/gd/libgd gd_png.c

2009-01-14 Thread Pierre-Alain Joye
pajoye  Wed Jan 14 10:16:42 2009 UTC

  Modified files:  
/php-src/ext/gd/libgd   gd_png.c 
  Log:
  - [DOC] support for PNG gray levels+ alpha  image, loaded as truecolor
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd_png.c?r1=1.26r2=1.27diff_format=u
Index: php-src/ext/gd/libgd/gd_png.c
diff -u php-src/ext/gd/libgd/gd_png.c:1.26 php-src/ext/gd/libgd/gd_png.c:1.27
--- php-src/ext/gd/libgd/gd_png.c:1.26  Thu Nov  6 10:23:52 2008
+++ php-src/ext/gd/libgd/gd_png.c   Wed Jan 14 10:16:42 2009
@@ -189,7 +189,8 @@
png_read_info(png_ptr, info_ptr);   /* read all PNG info up to 
image data */
 
png_get_IHDR(png_ptr, info_ptr, width, height, bit_depth, 
color_type, interlace_type, NULL, NULL);
-   if ((color_type == PNG_COLOR_TYPE_RGB) || (color_type == 
PNG_COLOR_TYPE_RGB_ALPHA)) {
+   if ((color_type == PNG_COLOR_TYPE_RGB) || (color_type == 
PNG_COLOR_TYPE_RGB_ALPHA)
+   || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
im = gdImageCreateTrueColor((int) width, (int) height);
} else {
im = gdImageCreate((int) width, (int) height);
@@ -251,7 +252,6 @@
}
break;
case PNG_COLOR_TYPE_GRAY:
-   case PNG_COLOR_TYPE_GRAY_ALPHA:
/* create a fake palette and check for single-shade 
transparency */
if ((palette = (png_colorp) gdMalloc (256 * sizeof 
(png_color))) == NULL) {
php_gd_error(gd-png error: cannot allocate 
gray palette);
@@ -293,6 +293,9 @@
}
break;
 
+   case PNG_COLOR_TYPE_GRAY_ALPHA:
+   png_set_gray_to_rgb(png_ptr);
+
case PNG_COLOR_TYPE_RGB:
case PNG_COLOR_TYPE_RGB_ALPHA:
/* gd 2.0: we now support truecolor. See the 
comment above
@@ -365,6 +368,7 @@
}
break;
 
+   case PNG_COLOR_TYPE_GRAY_ALPHA:
case PNG_COLOR_TYPE_RGB_ALPHA:
for (h = 0; h  height; h++) {
int boffset = 0;




[PHP-DOC] cvs: php-src /ext/standard basic_functions.c config.w32 dns.c dns.h dns_win32.c

2009-01-06 Thread Pierre-Alain Joye
, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(DNS_MX,PHP_DNS_MX,CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(DNS_TXT,   PHP_DNS_TXT,   CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(DNS_SRV,   PHP_DNS_SRV,   CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(DNS_NAPTR, PHP_DNS_NAPTR, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(DNS_,  PHP_DNS_,  CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(DNS_A6,PHP_DNS_A6,CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(DNS_ANY,   PHP_DNS_ANY,   CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(DNS_ALL,   PHP_DNS_ALL,   CONST_CS | 
CONST_PERSISTENT);
+   return SUCCESS;
+}
+#endif /* HAVE_DNS_FUNCS */
+
 /*
  * Local variables:
  * tab-width: 4
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dns.h?r1=1.24r2=1.25diff_format=u
Index: php-src/ext/standard/dns.h
diff -u php-src/ext/standard/dns.h:1.24 php-src/ext/standard/dns.h:1.25
--- php-src/ext/standard/dns.h:1.24 Wed Dec 31 14:33:41 2008
+++ php-src/ext/standard/dns.h  Tue Jan  6 20:44:56 2009
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: dns.h,v 1.24 2008/12/31 14:33:41 iliaa Exp $ */
+/* $Id: dns.h,v 1.25 2009/01/06 20:44:56 pajoye Exp $ */
 
 #ifndef DNS_H
 #define DNS_H
@@ -35,21 +35,20 @@
 PHP_FUNCTION(gethostname);
 #endif
 
-#if HAVE_RES_SEARCH  !(defined(__BEOS__)||defined(PHP_WIN32))
+#if defined(PHP_WIN32) || (HAVE_RES_SEARCH  !(defined(__BEOS__) || 
defined(NETWARE)))
 
-PHP_FUNCTION(dns_check_record);
-# if HAVE_DN_SKIPNAME  HAVE_DN_EXPAND
+# if defined(PHP_WIN32) || (HAVE_DN_SKIPNAME  HAVE_DN_EXPAND)
 PHP_FUNCTION(dns_get_mx);
+PHP_FUNCTION(dns_check_record);
 # endif
 
-# if HAVE_DNS_FUNCS
-
+#if defined(PHP_WIN32) || HAVE_DNS_FUNCS
 PHP_FUNCTION(dns_get_record);
 
 PHP_MINIT_FUNCTION(dns);
-
 # endif
-#endif
+
+#endif /* defined(PHP_WIN32) || (HAVE_RES_SEARCH  !(defined(__BEOS__) || 
defined(NETWARE))) */
 
 #ifndef INT16SZ
 #define INT16SZ2

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dns_win32.c?view=markuprev=1.1
Index: php-src/ext/standard/dns_win32.c
+++ php-src/ext/standard/dns_win32.c
/*
   +--+
   | PHP Version 5|
   +--+
   | Copyright (c) 2008-2009 The PHP Group|
   +--+
   | This source file is subject to version 3.01 of the PHP license,  |
   | that is bundled with this package in the file LICENSE, and is|
   | available through the world-wide-web at the following url:   |
   | http://www.php.net/license/3_01.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  |
   | lice...@php.net so we can mail you a copy immediately.   |
   +--+
   | Authors: Pierre A. Joye pie...@php.net |
   +--+
 */

#include php.h

#include windows.h
#include Winbase.h 
#include Windns.h

#include dns.h

#define PHP_DNS_NUM_TYPES   12  /* Number of DNS Types Supported by PHP 
currently */

#define PHP_DNS_A  0x0001
#define PHP_DNS_NS 0x0002
#define PHP_DNS_CNAME  0x0010
#define PHP_DNS_SOA0x0020
#define PHP_DNS_PTR0x0800
#define PHP_DNS_HINFO  0x1000
#define PHP_DNS_MX 0x4000
#define PHP_DNS_TXT0x8000
#define PHP_DNS_A6 0x0100
#define PHP_DNS_SRV0x0200
#define PHP_DNS_NAPTR  0x0400
#define PHP_DNS_   0x0800
#define PHP_DNS_ANY0x1000
#define PHP_DNS_ALL
(PHP_DNS_A|PHP_DNS_NS|PHP_DNS_CNAME|PHP_DNS_SOA|PHP_DNS_PTR|PHP_DNS_HINFO|PHP_DNS_MX|PHP_DNS_TXT|PHP_DNS_A6|PHP_DNS_SRV|PHP_DNS_NAPTR|PHP_DNS_)

PHP_FUNCTION(dns_get_mx) /* {{{ */
{
char *hostname;
int hostname_len;
zval *mx_list, *weight_list = NULL;

DNS_STATUS  status; /* Return value of DnsQuery_A() 
function */
PDNS_RECORD pResult, pRec;  /* Pointer to DNS_RECORD 
structure */

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, sz|z, hostname, 
hostname_len, mx_list, weight_list) == FAILURE) {
return;
}

status = DnsQuery_A(hostname, DNS_TYPE_MX, DNS_QUERY_STANDARD, NULL, 
pResult, NULL);

if (status) {
RETURN_FALSE;
}

zval_dtor(mx_list);
array_init(mx_list);

if (weight_list) {
zval_dtor(weight_list);
array_init

[PHP-DOC] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c config.w32 dns.c dns.h dns_win32.c

2009-01-06 Thread Pierre-Alain Joye
+# if defined(PHP_WIN32) || (HAVE_DN_SKIPNAME  HAVE_DN_EXPAND)
 PHP_FUNCTION(dns_get_mx);
+PHP_FUNCTION(dns_check_record);
 # endif
 
-# if HAVE_DNS_FUNCS
-
+#if defined(PHP_WIN32) || HAVE_DNS_FUNCS
 PHP_FUNCTION(dns_get_record);
-
 PHP_MINIT_FUNCTION(dns);
-
 # endif
-#endif
+
+#endif /* defined(PHP_WIN32) || (HAVE_RES_SEARCH  !(defined(__BEOS__) || 
defined(NETWARE))) */
 
 #ifndef INT16SZ
 #define INT16SZ2

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dns_win32.c?view=markuprev=1.1
Index: php-src/ext/standard/dns_win32.c
+++ php-src/ext/standard/dns_win32.c
/*
   +--+
   | PHP Version 5|
   +--+
   | Copyright (c) 2008-2009 The PHP Group|
   +--+
   | This source file is subject to version 3.01 of the PHP license,  |
   | that is bundled with this package in the file LICENSE, and is|
   | available through the world-wide-web at the following url:   |
   | http://www.php.net/license/3_01.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  |
   | lice...@php.net so we can mail you a copy immediately.   |
   +--+
   | Authors: Pierre A. Joye pie...@php.net |
   +--+
 */

#include php.h

#include windows.h
#include Winbase.h 
#include Windns.h

#include dns.h

#define PHP_DNS_NUM_TYPES   12  /* Number of DNS Types Supported by PHP 
currently */

#define PHP_DNS_A  0x0001
#define PHP_DNS_NS 0x0002
#define PHP_DNS_CNAME  0x0010
#define PHP_DNS_SOA0x0020
#define PHP_DNS_PTR0x0800
#define PHP_DNS_HINFO  0x1000
#define PHP_DNS_MX 0x4000
#define PHP_DNS_TXT0x8000
#define PHP_DNS_A6 0x0100
#define PHP_DNS_SRV0x0200
#define PHP_DNS_NAPTR  0x0400
#define PHP_DNS_   0x0800
#define PHP_DNS_ANY0x1000
#define PHP_DNS_ALL
(PHP_DNS_A|PHP_DNS_NS|PHP_DNS_CNAME|PHP_DNS_SOA|PHP_DNS_PTR|PHP_DNS_HINFO|PHP_DNS_MX|PHP_DNS_TXT|PHP_DNS_A6|PHP_DNS_SRV|PHP_DNS_NAPTR|PHP_DNS_)

PHP_FUNCTION(dns_get_mx) /* {{{ */
{
char *hostname;
int hostname_len;
zval *mx_list, *weight_list = NULL;

DNS_STATUS  status; /* Return value of DnsQuery_A() 
function */
PDNS_RECORD pResult, pRec;  /* Pointer to DNS_RECORD 
structure */

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, sz|z, hostname, 
hostname_len, mx_list, weight_list) == FAILURE) {
return;
}

status = DnsQuery_A(hostname, DNS_TYPE_MX, DNS_QUERY_STANDARD, NULL, 
pResult, NULL);

if (status) {
RETURN_FALSE;
}

zval_dtor(mx_list);
array_init(mx_list);

if (weight_list) {
zval_dtor(weight_list);
array_init(weight_list);
}

for (pRec = pResult; pRec; pRec = pRec-pNext) {
DNS_SRV_DATA *srv = pRec-Data.Srv;

add_next_index_string(mx_list, pRec-Data.MX.pNameExchange, 1);
if (weight_list) {
add_next_index_long(weight_list, srv-wPriority);
}
}

/* Free memory allocated for DNS records. */
DnsRecordListFree(pResult, DnsFreeRecordListDeep);

RETURN_TRUE;
}
/* }}} */

/* {{{ proto bool dns_check_record(string host [, string type])
   Check DNS records corresponding to a given Internet host name or IP address 
*/
PHP_FUNCTION(dns_check_record)
{
char *hostname, *rectype = NULL;
int hostname_len, rectype_len = 0;
int type = DNS_TYPE_MX;

DNS_STATUS  status; /* Return value of DnsQuery_A() 
function */
PDNS_RECORD pResult, pRec;  /* Pointer to DNS_RECORD 
structure */

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|s, hostname, 
hostname_len, rectype, rectype_len) == FAILURE) {
return;
}

if (rectype) {
 if (!strcasecmp(A, rectype)) type = DNS_TYPE_A;
else if (!strcasecmp(NS,rectype)) type = DNS_TYPE_NS;
else if (!strcasecmp(MX,rectype)) type = DNS_TYPE_MX;
else if (!strcasecmp(PTR,   rectype)) type = DNS_TYPE_PTR;
else if (!strcasecmp(ANY,   rectype)) type = DNS_TYPE_ANY;
else if (!strcasecmp(SOA,   rectype)) type = DNS_TYPE_SOA;
else if (!strcasecmp(TXT,   rectype)) type = DNS_TYPE_TEXT

[PHP-DOC] cvs: php-src(PHP_5_3) /ext/standard dns_win32.c

2009-01-06 Thread Pierre-Alain Joye
pajoye  Tue Jan  6 23:23:28 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   dns_win32.c 
  Log:
  - [DOC] VC6 does not have NAPTR
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dns_win32.c?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/standard/dns_win32.c
diff -u php-src/ext/standard/dns_win32.c:1.1.2.2 
php-src/ext/standard/dns_win32.c:1.1.2.3
--- php-src/ext/standard/dns_win32.c:1.1.2.2Tue Jan  6 20:48:21 2009
+++ php-src/ext/standard/dns_win32.cTue Jan  6 23:23:28 2009
@@ -93,7 +93,7 @@
int type = DNS_TYPE_MX;
 
DNS_STATUS  status; /* Return value of DnsQuery_A() 
function */
-   PDNS_RECORD pResult, pRec;  /* Pointer to DNS_RECORD 
structure */
+   PDNS_RECORD pResult;  /* Pointer to DNS_RECORD structure */
 
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|s, hostname, 
hostname_len, rectype, rectype_len) == FAILURE) {
return;
@@ -260,7 +260,9 @@
 
case DNS_TYPE_NAPTR:
{
+#ifdef DNS_NAPTR_DATA
DNS_NAPTR_DATA * data_naptr = pRec-Data.Naptr;
+
add_assoc_string(*subarray, type, NAPTR, 1);
add_assoc_long(*subarray, order, 
data_naptr-wOrder);
add_assoc_long(*subarray, pref, 
data_naptr-wPreference);
@@ -268,6 +270,7 @@
add_assoc_string(*subarray, services, 
data_naptr-pService, 1);
add_assoc_string(*subarray, regex, 
data_naptr-pRegularExpression, 1);
add_assoc_string(*subarray, replacement, 
data_naptr-pReplacement, 1);
+#endif
}
break;
 




[PHP-DOC] cvs: php-src /ext/standard dns_win32.c

2009-01-06 Thread Pierre-Alain Joye
pajoye  Tue Jan  6 23:50:30 2009 UTC

  Modified files:  
/php-src/ext/standard   dns_win32.c 
  Log:
  - [DOC] MFB: VC6 does not have NAPTR
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dns_win32.c?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/dns_win32.c
diff -u php-src/ext/standard/dns_win32.c:1.1 
php-src/ext/standard/dns_win32.c:1.2
--- php-src/ext/standard/dns_win32.c:1.1Tue Jan  6 20:44:56 2009
+++ php-src/ext/standard/dns_win32.cTue Jan  6 23:50:30 2009
@@ -260,6 +260,7 @@
 
case DNS_TYPE_NAPTR:
{
+#ifdef DNS_NAPTR_DATA
DNS_NAPTR_DATA * data_naptr = pRec-Data.Naptr;
add_assoc_string(*subarray, type, NAPTR, 1);
add_assoc_long(*subarray, order, 
data_naptr-wOrder);
@@ -268,6 +269,7 @@
add_assoc_string(*subarray, services, 
data_naptr-pService, 1);
add_assoc_string(*subarray, regex, 
data_naptr-pRegularExpression, 1);
add_assoc_string(*subarray, replacement, 
data_naptr-pReplacement, 1);
+#endif
}
break;
 




[PHP-DOC] Re: [PHP-DEV] Differences in VC6 and VC9 Windows builds and MSSQL Driver.

2009-01-02 Thread Pierre Joye
hi William,

On Fri, Jan 2, 2009 at 5:01 PM, William A. Rowe, Jr.
wr...@rowe-clan.net wrote:
 Uwe Schindler wrote:

 I am not sure, if VC6 can be dropped easily. E.g. some SAPIs that directly
 map into servers may have problems if using the wrong CRT. Until now, I had
 no time to build up a Windows Sun Java System Webserver and test it with
 both CRTs. The code compiles fine on the snaps box, but I am not sure, if
 the DLL loads into the server.

 Precisely.  Note that httpd 2.4 (.next) will not be compiled with VC6, but
 may continue to use msvcrt.dll - if I successfully validate a proper method
 (which might rely on some sdk/wdk includes) for continuing to use this
 lowest common denominator crt with sources compiled on modern compilers,
 I'll be sure to send this feedback in.  99% certain that the classic method
 is simply wrong (link32 msvcrt.lib /ignore:msvcrXX.lib) since the correct
 clib headers corresponding to msvcrt are required to avoid abi issues.

I'm not sure it is worth the effort. What would be the gains besides
not having to distribute the 9.0 CRT (which is a non issue for the
installers and a one time install for the other)?


Cheers,
-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org


[PHP-DOC] Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/sockets php_sockets.h sockets.c

2009-01-01 Thread Pierre Joye
hi!

On Thu, Jan 1, 2009 at 7:31 PM, Kalle Sommer Nielsen ka...@php.net wrote:

 Because of stream_socket_pair(), and then it would only work if
 ext/sockets was built too, so unless we move it into the core and
 export it then it should be like that.

Does it even work? I would not enable again this function without
first having tests for it. There is certainly reasons why it was
disabled (well, ext/socket is a reason already...).

Cheers,
-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org


[PHP-DOC] Re: [PHP-DEV] Differences in VC6 and VC9 Windows builds and MSSQL Driver.

2008-12-31 Thread Pierre Joye
hi Richard,

On Wed, Dec 31, 2008 at 11:11 AM, Richard Quadling
rquadl...@googlemail.com wrote:
 Hi.

 With regard to http://bugs.php.net/bug.php?id=46971,

Can you repost (and subscribe to the list if you did not subscribe
yet) to the right list please (Windows Internals list)?

Thanks,
--
Pierre

http://blog.thepimp.net | http://www.libgd.org


[PHP-DOC] Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard basic_functions.c /main SAPI.h main.c /sapi/cgi cgi_main.c /sapi/cli php_cli.c /sapi/embed php_embed.c

2008-12-31 Thread Pierre Joye
hi Marcus,

On Wed, Dec 31, 2008 at 3:27 PM, Marcus Boerger he...@php.net wrote:


   arginfo_popen)
 http://cvs.php.net/viewvc.cgi/php-src/main/SAPI.h?r1=1.114.2.1.2.3.2.5r2=1.114.2.1.2.3.2.6diff_format=u
 Index: php-src/main/SAPI.h
 diff -u php-src/main/SAPI.h:1.114.2.1.2.3.2.5 
 php-src/main/SAPI.h:1.114.2.1.2.3.2.6
 --- php-src/main/SAPI.h:1.114.2.1.2.3.2.5   Wed Dec 31 11:15:47 2008
 +++ php-src/main/SAPI.h Wed Dec 31 14:27:09 2008
 @@ -16,7 +16,7 @@
+--+
  */

 -/* $Id: SAPI.h,v 1.114.2.1.2.3.2.5 2008/12/31 11:15:47 sebastian Exp $ */
 +/* $Id: SAPI.h,v 1.114.2.1.2.3.2.6 2008/12/31 14:27:09 helly Exp $ */

  #ifndef SAPI_H
  #define SAPI_H
 @@ -264,6 +264,7 @@
int phpinfo_as_text;

char *ini_entries;
 +   const zend_function_entry *additional_functions;
  };

This addition breaks the builds, zend_function_entry is not defined at
this point and breaks as long as one includes SAPI.h (like
ext/filter). Should zend_API.h not included in zend.h? or do you want
to manually include it in mainco?

Cheers,
--
Pierre

http://blog.thepimp.net | http://www.libgd.org


[PHP-DOC] cvs: php-src(PHP_5_3) /win32/build config.w32.h.in

2008-12-31 Thread Pierre-Alain Joye
pajoye  Wed Dec 31 19:47:14 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/win32/buildconfig.w32.h.in 
  Log:
  - enable gehostname on windows [DOC]
  
http://cvs.php.net/viewvc.cgi/php-src/win32/build/config.w32.h.in?r1=1.7.2.4.2.3.2.6r2=1.7.2.4.2.3.2.7diff_format=u
Index: php-src/win32/build/config.w32.h.in
diff -u php-src/win32/build/config.w32.h.in:1.7.2.4.2.3.2.6 
php-src/win32/build/config.w32.h.in:1.7.2.4.2.3.2.7
--- php-src/win32/build/config.w32.h.in:1.7.2.4.2.3.2.6 Wed Dec 31 14:30:38 2008
+++ php-src/win32/build/config.w32.h.in Wed Dec 31 19:47:13 2008
@@ -1,6 +1,6 @@
 /*
Build Configuration Template for Win32.
-   $Id: config.w32.h.in,v 1.7.2.4.2.3.2.6 2008/12/31 14:30:38 iliaa Exp $
+   $Id: config.w32.h.in,v 1.7.2.4.2.3.2.7 2008/12/31 19:47:13 pajoye Exp $
 */
 
 /* Define the minimum supported version */
@@ -41,6 +41,7 @@
 #define HAVE_GETSERVBYPORT 1
 #define HAVE_GETPROTOBYNAME 1
 #define HAVE_GETPROTOBYNUMBER 1
+#define HAVE_GETHOSTNAME 1
 #define STDIN_FILENO 0
 #define STDOUT_FILENO 1
 #define STDERR_FILENO 2




[PHP-DOC] cvs: php-src /win32/build config.w32.h.in

2008-12-31 Thread Pierre-Alain Joye
pajoye  Wed Dec 31 19:49:06 2008 UTC

  Modified files:  
/php-src/win32/buildconfig.w32.h.in 
  Log:
  - MFB: enable gehostname on windows [DOC]
  
http://cvs.php.net/viewvc.cgi/php-src/win32/build/config.w32.h.in?r1=1.20r2=1.21diff_format=u
Index: php-src/win32/build/config.w32.h.in
diff -u php-src/win32/build/config.w32.h.in:1.20 
php-src/win32/build/config.w32.h.in:1.21
--- php-src/win32/build/config.w32.h.in:1.20Sat Nov 22 15:16:42 2008
+++ php-src/win32/build/config.w32.h.in Wed Dec 31 19:49:06 2008
@@ -1,6 +1,6 @@
 /*
Build Configuration Template for Win32.
-   $Id: config.w32.h.in,v 1.20 2008/11/22 15:16:42 scottmac Exp $
+   $Id: config.w32.h.in,v 1.21 2008/12/31 19:49:06 pajoye Exp $
 */
 
 /* Define the minimum supported version */
@@ -40,6 +40,7 @@
 #define HAVE_GETSERVBYPORT 1
 #define HAVE_GETPROTOBYNAME 1
 #define HAVE_GETPROTOBYNUMBER 1
+#define HAVE_GETHOSTNAME 1
 #define STDIN_FILENO 0
 #define STDOUT_FILENO 1
 #define STDERR_FILENO 2




[PHP-DOC] Re: [PHP-CVS] Re: [PHP-DOC] cvs: php-src /ext/standard/tests/network inet.phpt

2008-09-09 Thread Pierre Joye
On Tue, Sep 9, 2008 at 4:36 PM, Hannes Magnusson
[EMAIL PROTECTED] wrote:
 2008/8/22 Pierre-Alain Joye [EMAIL PROTECTED]:
 pajoye  Thu Aug 21 23:28:21 2008 UTC

  Modified files:
/php-src/ext/standard/tests/network inet.phpt
  Log:
  - [DOC] fix test, chr uses codepoint as input

 I assume that is as of PHP6? :]

Yes :)


-- 
Pierre
http://blog.thepimp.net | http://www.libgd.org


[PHP-DOC] cvs: php-src(PHP_5_3) / NEWS

2008-08-29 Thread Pierre-Alain Joye
pajoye  Fri Aug 29 11:20:19 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  - [DOC] ming has been moved to pecl
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.291r2=1.2027.2.547.2.965.2.292diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.291 
php-src/NEWS:1.2027.2.547.2.965.2.292
--- php-src/NEWS:1.2027.2.547.2.965.2.291   Fri Aug 29 11:12:34 2008
+++ php-src/NEWSFri Aug 29 11:20:18 2008
@@ -64,6 +64,7 @@
   . ext/fbsql
   . ext/fdf
   . ext/ncurses
+  . ext/ming
   . ext/sybase (not maintained anymore, sybase_ct has to be used instead)
 
 - Removed the experimental RPL (master/slave) functions from mysqli. (Andrey)




[PHP-DOC] cvs: php-src /ext/standard/tests/network inet.phpt

2008-08-21 Thread Pierre-Alain Joye
pajoye  Thu Aug 21 23:28:21 2008 UTC

  Modified files:  
/php-src/ext/standard/tests/network inet.phpt 
  Log:
  - [DOC] fix test, chr uses codepoint as input
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/network/inet.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/standard/tests/network/inet.phpt
diff -u php-src/ext/standard/tests/network/inet.phpt:1.3 
php-src/ext/standard/tests/network/inet.phpt:1.4
--- php-src/ext/standard/tests/network/inet.phpt:1.3Tue May 27 07:41:44 2008
+++ php-src/ext/standard/tests/network/inet.phptThu Aug 21 23:28:21 2008
@@ -8,10 +8,10 @@
 --FILE--
 ?php
 
-$packed = chr(127) . chr(0) . chr(0) . chr(1);
+$packed = pack(, 127, 0, 0, 1);
 var_dump(inet_ntop((binary)$packed));
 
-$packed = chr(255) . chr(255) . chr(255) . chr(0);
+$packed = pack(, 255, 255, 255, 0);
 var_dump(inet_ntop((binary)$packed));
 
 var_dump(inet_ntop());




[PHP-DOC] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c

2008-08-18 Thread Pierre-Alain Joye
pajoye  Mon Aug 18 07:11:01 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
  Log:
  - [DOC] MFH: make putenv behaves like unix putenv on Windows:
   .  FOO=1234 = set FOO to 1234
   .  FOO= = set FOO to an empty string
   .  FOO= = unset FOO
   . Use Set/GetEnvironmnent variable only
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.52r2=1.725.2.31.2.64.2.53diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.52 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.53
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.52 Sat Aug 16 
11:11:46 2008
+++ php-src/ext/standard/basic_functions.c  Mon Aug 18 07:11:00 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.52 2008/08/16 11:11:46 bjori Exp 
$ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.53 2008/08/18 07:11:00 pajoye 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -63,7 +63,11 @@
 #include netinet/in.h
 #endif
 
-#includenetdb.h
+#ifndef PHP_WIN32
+# includenetdb.h
+#else
+# include win32/inet.h
+#endif
 
 #if HAVE_ARPA_INET_H
 # include arpa/inet.h
@@ -3874,10 +3878,6 @@
 # if HAVE_UNSETENV
unsetenv(pe-key);
 # elif defined(PHP_WIN32)
-   char *del_string = emalloc(pe-key_len+2);
-   snprintf(del_string, pe-key_len+2, %s=, pe-key);
-   putenv(del_string);
-   efree(del_string);
SetEnvironmentVariable(pe-key, NULL);
 # else
char **env;
@@ -4402,13 +4402,37 @@
if (ptr) {
RETURN_STRING(ptr, 0);
}
+#ifdef PHP_WIN32
+   {
+   char dummybuf;
+   int size;
 
+   SetLastError(0);
+   /*If the given bugger is not large enough to hold the data, the 
return value is 
+   the buffer size,  in characters, required to hold the string 
and its terminating 
+   null character. We use this return value to alloc the final 
buffer. */
+   size = GetEnvironmentVariableA(str, dummybuf, 0);
+   if (GetLastError() == ERROR_ENVVAR_NOT_FOUND) {
+   /* The environment variable doesn't exist. */
+   RETURN_FALSE;
+   }
+
+   if (size == 0) {
+   /* env exists, but it is empty */
+   RETURN_EMPTY_STRING();
+   }
+
+   ptr = emalloc(size);
+   size = GetEnvironmentVariableA(str, ptr, size);
+   RETURN_STRING(ptr, 0);
+   }
+#else
/* system method returns a const */
ptr = getenv(str);
if (ptr) {
RETURN_STRING(ptr, 1);
}
-
+#endif
RETURN_FALSE;
 }
 /* }}} */
@@ -4428,13 +4452,31 @@
if (setting_len) {
char *p, **env;
putenv_entry pe;
+#ifdef PHP_WIN32
+   char *value = NULL;
+   int equals = 0;
+#endif
 
pe.putenv_string = estrndup(setting, setting_len);
pe.key = estrndup(setting, setting_len);
if ((p = strchr(pe.key, '='))) {/* nullify the '=' if 
there is one */
*p = '\0';
+#ifdef PHP_WIN32
+   equals = 1;
+#endif
}
+
pe.key_len = strlen(pe.key);
+#ifdef PHP_WIN32
+   if (equals) {
+   if (pe.key_len  setting_len - 2) {
+   value = p + 1;
+   } else {
+   /* empty string*/
+   value = p;
+   }
+   }
+#endif
 
if (PG(safe_mode)) {
/* Check the protected list */
@@ -4485,21 +4527,17 @@
}
}
 
-#if _MSC_VER = 1300
-   /* VS.Net has a bug in putenv() when setting a variable that
-* is already set; if the SetEnvironmentVariable() API call
-* fails, the Crt will double free() a string.
-* We try to avoid this by setting our own value first */
-   SetEnvironmentVariable(pe.key, bugbug);
-#endif
-
 #if HAVE_UNSETENV
if (!p) { /* no '=' means we want to unset it */
unsetenv(pe.putenv_string);
}
if (!p || putenv(pe.putenv_string) == 0) { /* success */
 #else
+# ifndef PHP_WIN32
if (putenv(pe.putenv_string) == 0) { /* success */
+# else
+   if (SetEnvironmentVariableA(pe.key, value) != 0) { /* success */
+# endif
 #endif
zend_hash_add(BG(putenv_ht), pe.key, pe.key_len + 1, 
(void **) pe, 

[PHP-DOC] cvs: php-src /ext/standard basic_functions.c

2008-08-18 Thread Pierre-Alain Joye
pajoye  Mon Aug 18 07:09:20 2008 UTC

  Modified files:  
/php-src/ext/standard   basic_functions.c 
  Log:
  - [DOC] make putenv behaves like unix putenv on Windows:
   .  FOO=1234 = set FOO to 1234
   .  FOO= = set FOO to an empty string
   .  FOO= = unset FOO
   . Use Set/GetEnvironmnent variable only
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.918r2=1.919diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.918 
php-src/ext/standard/basic_functions.c:1.919
--- php-src/ext/standard/basic_functions.c:1.918Sat Aug 16 10:57:26 2008
+++ php-src/ext/standard/basic_functions.c  Mon Aug 18 07:09:20 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.918 2008/08/16 10:57:26 bjori Exp $ */
+/* $Id: basic_functions.c,v 1.919 2008/08/18 07:09:20 pajoye Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -61,7 +61,11 @@
 #include netinet/in.h
 #endif
 
-#includenetdb.h
+#ifndef PHP_WIN32
+# includenetdb.h
+#else
+# include win32/inet.h
+#endif
 
 #if HAVE_ARPA_INET_H
 # include arpa/inet.h
@@ -4391,15 +4395,39 @@
/* SAPI method returns an emalloc()'d string */
ptr = sapi_getenv(str, str_len TSRMLS_CC);
if (ptr) {
-   RETURN_RT_STRING(ptr, ZSTR_AUTOFREE);
+   RETURN_STRING(ptr, ZSTR_AUTOFREE);
}
+#ifdef PHP_WIN32
+   {
+   char dummybuf;
+   int size;
 
+   SetLastError(0);
+   /*If the given bugger is not large enough to hold the data, the 
return value is 
+   the buffer size,  in characters, required to hold the string 
and its terminating 
+   null character. We use this return value to alloc the final 
buffer. */
+   size = GetEnvironmentVariableA(str, dummybuf, 0);
+   if (GetLastError() == ERROR_ENVVAR_NOT_FOUND) {
+   /* The environment variable doesn't exist. */
+   RETURN_FALSE;
+   }
+
+   if (size == 0) {
+   /* env exists, but it is empty */
+   RETURN_EMPTY_STRING();
+   }
+
+   ptr = emalloc(size);
+   size = GetEnvironmentVariableA(str, ptr, size);
+   RETURN_STRING(ptr, 0);
+   }
+#else
/* system method returns a const */
ptr = getenv(str);
if (ptr) {
RETURN_RT_STRING(ptr, ZSTR_DUPLICATE);
}
-
+#endif
RETURN_FALSE;
 }
 /* }}} */
@@ -4419,14 +4447,33 @@
if (setting_len) {
char *p, **env;
putenv_entry pe;
+#ifdef PHP_WIN32
+   char *value = NULL;
+   int equals = 0;
+#endif
 
pe.putenv_string = estrndup(setting, setting_len);
pe.key = estrndup(setting, setting_len);
if ((p = strchr(pe.key, '='))) {/* nullify the '=' if 
there is one */
*p = '\0';
+#ifdef PHP_WIN32
+   equals = 1;
+#endif
}
+
pe.key_len = strlen(pe.key);
 
+#ifdef PHP_WIN32
+   if (equals) {
+   if (pe.key_len  setting_len - 2) {
+   value = p + 1;
+   } else {
+   /* empty string*/
+   value = p;
+   }
+   }
+#endif
+
zend_hash_del(BG(putenv_ht), pe.key, pe.key_len+1);
 
/* find previous value */
@@ -4443,23 +4490,19 @@
}
}
 
-#if _MSC_VER = 1300
-   /* VS.Net has a bug in putenv() when setting a variable that
-* is already set; if the SetEnvironmentVariable() API call
-* fails, the Crt will double free() a string.
-* We try to avoid this by setting our own value first */
-   SetEnvironmentVariable(pe.key, bugbug);
-#endif
-
 #if HAVE_UNSETENV
if (!p) { /* no '=' means we want to unset it */
unsetenv(pe.putenv_string);
}
if (!p || putenv(pe.putenv_string) == 0) { /* success */
 #else
+# ifndef PHP_WIN32
if (putenv(pe.putenv_string) == 0) { /* success */
+# else
+   if (SetEnvironmentVariableA(pe.key, value) != 0) { /* success */
+# endif
 #endif
-   zend_hash_add(BG(putenv_ht), pe.key, pe.key_len+1, 
(void **) pe, sizeof(putenv_entry), NULL);
+   zend_hash_add(BG(putenv_ht), pe.key, pe.key_len + 1, 
(void **) pe, sizeof(putenv_entry), NULL);
 #ifdef HAVE_TZSET
if (!strncmp(pe.key, TZ, pe.key_len)) {
tzset();




[PHP-DOC] cvs: php-src /ext/standard exec.c /ext/standard/tests/general_functions escapeshellcmd-win32.phpt

2008-08-17 Thread Pierre-Alain Joye
pajoye  Sun Aug 17 15:23:23 2008 UTC

  Modified files:  
/php-src/ext/standard   exec.c 
/php-src/ext/standard/tests/general_functions   

escapeshellcmd-win32.phpt 
  Log:
  - [DOC] improve fix for #43261 for % and 
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/exec.c?r1=1.135r2=1.136diff_format=u
Index: php-src/ext/standard/exec.c
diff -u php-src/ext/standard/exec.c:1.135 php-src/ext/standard/exec.c:1.136
--- php-src/ext/standard/exec.c:1.135   Tue Jul 22 21:56:25 2008
+++ php-src/ext/standard/exec.c Sun Aug 17 15:23:22 2008
@@ -16,7 +16,7 @@
| Ilia Alshanetsky [EMAIL PROTECTED] |
+--+
  */
-/* $Id: exec.c,v 1.135 2008/07/22 21:56:25 scottmac Exp $ */
+/* $Id: exec.c,v 1.136 2008/08/17 15:23:22 pajoye Exp $ */
 
 #include stdio.h
 #include php.h
@@ -272,9 +272,9 @@
}
 
switch (str[x]) {
+#ifndef PHP_WIN32
case '':
case '\'':
-#ifndef PHP_WIN32
if (!p  (p = memchr(str + x + 1, str[x], l - 
x - 1))) {
/* noop */
} else if (p  *p == str[x]) {
@@ -285,7 +285,9 @@
cmd[y++] = str[x];
break;
 #else
-   /* This is Windows specific for enviromental variables 
*/
+   /* % is Windows specific for enviromental variables, 
^%PATH% will 
+   output PATH whil ^%PATH^% not. escapeshellcmd 
will escape all %.
+   */
case '%':
cmd[y++] = ' ';
break;
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt
diff -u 
php-src/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt:1.1 
php-src/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt:1.2
--- php-src/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt:1.1  
Tue Jul 22 16:18:37 2008
+++ php-src/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt  
Sun Aug 17 15:23:23 2008
@@ -16,7 +16,8 @@
'()[]{}$',
'%^',
'#;`|*?',
-   '~\\'
+   '~\\',
+   '%NOENV%'
 );
 
 $count = 1;
@@ -38,9 +39,11 @@
 -- Test 4 --
 string(14) ^(^)^[^]^{^}^$
 -- Test 5 --
-string(2) ^^
+string(4) ^%^^
 -- Test 6 --
 string(14) ^#^^;^`^|^*^?
 -- Test 7 --
 string(8) ^~^^^\
+-- Test 8 --
+string(9) ^%NOENV^%
 Done




[PHP-DOC] cvs: php-src(PHP_5_3) /ext/standard exec.c /ext/standard/tests/general_functions escapeshellcmd-win32.phpt

2008-08-17 Thread Pierre-Alain Joye
pajoye  Sun Aug 17 15:23:45 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   exec.c 
/php-src/ext/standard/tests/general_functions   

escapeshellcmd-win32.phpt 
  Log:
  - [DOC] MFH: improve fix for #43261 for % and 
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/exec.c?r1=1.113.2.3.2.1.2.11r2=1.113.2.3.2.1.2.12diff_format=u
Index: php-src/ext/standard/exec.c
diff -u php-src/ext/standard/exec.c:1.113.2.3.2.1.2.11 
php-src/ext/standard/exec.c:1.113.2.3.2.1.2.12
--- php-src/ext/standard/exec.c:1.113.2.3.2.1.2.11  Tue Jul 22 21:53:53 2008
+++ php-src/ext/standard/exec.c Sun Aug 17 15:23:45 2008
@@ -16,7 +16,7 @@
| Ilia Alshanetsky [EMAIL PROTECTED] |
+--+
  */
-/* $Id: exec.c,v 1.113.2.3.2.1.2.11 2008/07/22 21:53:53 scottmac Exp $ */
+/* $Id: exec.c,v 1.113.2.3.2.1.2.12 2008/08/17 15:23:45 pajoye Exp $ */
 
 #include stdio.h
 #include php.h
@@ -287,9 +287,9 @@
}
 
switch (str[x]) {
+#ifndef PHP_WIN32
case '':
case '\'':
-#ifndef PHP_WIN32
if (!p  (p = memchr(str + x + 1, str[x], l - 
x - 1))) {
/* noop */
} else if (p  *p == str[x]) {
@@ -300,10 +300,12 @@
cmd[y++] = str[x];
break;
 #else
-   /* This is Windows specific for enviromental variables 
*/
+   /* % is Windows specific for enviromental variables, 
^%PATH% will 
+   output PATH whil ^%PATH^% not. escapeshellcmd 
will escape all %.
+   */
case '%':
-   cmd[y++] = ' ';
-   break;
+   case '':
+   case '\'':
 #endif
case '#': /* This is character-set independent */
case '':
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt
diff -u 
php-src/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt:1.1.2.2 
php-src/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt:1.1.2.3
--- 
php-src/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt:1.1.2.2  
Tue Jul 22 16:21:16 2008
+++ php-src/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt  
Sun Aug 17 15:23:45 2008
@@ -16,7 +16,8 @@
'()[]{}$',
'%^',
'#;`|*?',
-   '~\\'
+   '~\\',
+   '%NOENV%'
 );
 
 $count = 1;
@@ -38,9 +39,11 @@
 -- Test 4 --
 string(14) ^(^)^[^]^{^}^$
 -- Test 5 --
-string(2) ^^
+string(4) ^%^^
 -- Test 6 --
 string(14) ^#^^;^`^|^*^?
 -- Test 7 --
 string(8) ^~^^^\
+-- Test 8 --
+string(9) ^%NOENV^%
 Done




[PHP-DOC] cvs: php-src /ext/standard file.c /ext/standard/tests/file copy_variation4-win32.phpt copy_variation4.phpt

2008-08-11 Thread Pierre-Alain Joye
pajoye  Mon Aug 11 13:09:01 2008 UTC

  Removed files:   
/php-src/ext/standard/tests/filecopy_variation4-win32.phpt 

  Modified files:  
/php-src/ext/standard   file.c 
/php-src/ext/standard/tests/filecopy_variation4.phpt 
  Log:
  - [DOC] detect if dest is a dir (if the given stream layer supports stat) 
and fails
   . remove win32 specific test. The errors are not the same 
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.522r2=1.523diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.522 php-src/ext/standard/file.c:1.523
--- php-src/ext/standard/file.c:1.522   Wed Jul 23 11:24:34 2008
+++ php-src/ext/standard/file.c Mon Aug 11 13:09:01 2008
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: file.c,v 1.522 2008/07/23 11:24:34 tony2001 Exp $ */
+/* $Id: file.c,v 1.523 2008/08/11 13:09:01 pajoye Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -1892,9 +1892,26 @@
php_error_docref(NULL TSRMLS_CC, E_WARNING, The first argument 
to copy() function cannot be a directory);
return FAILURE;
}
+   
+   switch (php_stream_stat_path_ex(dest, PHP_STREAM_URL_STAT_QUIET, 
dest_s, NULL)) {
+   case -1:
+   /* non-statable stream */
+   goto safe_to_copy;
+   break;
+   case 0:
+   break;
+   default: /* failed to stat file, does not exist? */
+   return ret;
+   }
+   if (S_ISDIR(dest_s.sb.st_mode)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, The second 
argument to copy() function cannot be a directory);
+   return FAILURE;
+   }
+   /*
if (php_stream_stat_path_ex(dest, PHP_STREAM_URL_STAT_QUIET, dest_s, 
NULL) != 0) {
goto safe_to_copy;
}
+*/
if (!src_s.sb.st_ino || !dest_s.sb.st_ino) {
goto no_stat;
}
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation4.phpt?r1=1.5r2=1.6diff_format=u
Index: php-src/ext/standard/tests/file/copy_variation4.phpt




[PHP-DOC] cvs: php-src(PHP_5_3) /ext/standard file.c /ext/standard/tests/file copy_variation4-win32.phpt copy_variation4.phpt

2008-08-11 Thread Pierre-Alain Joye
pajoye  Mon Aug 11 13:11:31 2008 UTC

  Removed files:   (Branch: PHP_5_3)
/php-src/ext/standard/tests/filecopy_variation4-win32.phpt 

  Modified files:  
/php-src/ext/standard   file.c 
/php-src/ext/standard/tests/filecopy_variation4.phpt 
  Log:
  - [DOC] MFH: detect if dest is a dir (if the given stream layer supports stat)
and fails
   . remove win32 specific test. The errors are not the same
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.409.2.6.2.28.2.19r2=1.409.2.6.2.28.2.20diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.409.2.6.2.28.2.19 
php-src/ext/standard/file.c:1.409.2.6.2.28.2.20
--- php-src/ext/standard/file.c:1.409.2.6.2.28.2.19 Wed Jul 23 11:25:14 2008
+++ php-src/ext/standard/file.c Mon Aug 11 13:11:30 2008
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: file.c,v 1.409.2.6.2.28.2.19 2008/07/23 11:25:14 tony2001 Exp $ */
+/* $Id: file.c,v 1.409.2.6.2.28.2.20 2008/08/11 13:11:30 pajoye Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -1731,8 +1731,20 @@
php_error_docref(NULL TSRMLS_CC, E_WARNING, The first argument 
to copy() function cannot be a directory);
return FAILURE;
}
-   if (php_stream_stat_path_ex(dest, PHP_STREAM_URL_STAT_QUIET, dest_s, 
NULL) != 0) {
-   goto safe_to_copy;
+   
+   switch (php_stream_stat_path_ex(dest, PHP_STREAM_URL_STAT_QUIET, 
dest_s, NULL)) {
+   case -1:
+   /* non-statable stream */
+   goto safe_to_copy;
+   break;
+   case 0:
+   break;
+   default: /* failed to stat file, does not exist? */
+   return ret;
+   }
+   if (S_ISDIR(dest_s.sb.st_mode)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, The second 
argument to copy() function cannot be a directory);
+   return FAILURE;
}
if (!src_s.sb.st_ino || !dest_s.sb.st_ino) {
goto no_stat;
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation4.phpt?r1=1.1.2.2.2.4r2=1.1.2.2.2.5diff_format=u
Index: php-src/ext/standard/tests/file/copy_variation4.phpt




[PHP-DOC] cvs: php-src /ext/date/tests 009.phpt 009_win32.phpt

2008-08-10 Thread Pierre-Alain Joye
pajoye  Sun Aug 10 11:27:26 2008 UTC

  Added files: 
/php-src/ext/date/tests 009_win32.phpt 

  Modified files:  
/php-src/ext/date/tests 009.phpt 
  Log:
  - [DOC] win's strftime does not support all posix formatting code and have 
some win specific rules see 
http://msdn.microsoft.com/en-us/library/fe06s4ak(VS.80).aspx for a complete 
list: split test for  win32 and posix
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/009.phpt?r1=1.5r2=1.6diff_format=u
Index: php-src/ext/date/tests/009.phpt
diff -u php-src/ext/date/tests/009.phpt:1.5 php-src/ext/date/tests/009.phpt:1.6
--- php-src/ext/date/tests/009.phpt:1.5 Tue May 27 18:16:00 2008
+++ php-src/ext/date/tests/009.phpt Sun Aug 10 11:27:26 2008
@@ -2,6 +2,11 @@
 strftime() and gmstrftime() tests
 --INI--
 date.timezone=Asia/Jerusalem
+--SKIPIF--
+?php
+if (substr(PHP_OS, 0, 3) == 'WIN') die('skip posix only test.');
+if (!function_exists('strftime')) die(skip, strftime not available);
+?
 --FILE--
 ?php
 
@@ -25,22 +30,22 @@
 
 echo Done\n;
 ?
---EXPECTF--
+--EXPECTF--
 Warning: strftime() expects at least 1 parameter, 0 given in %s on line %d
 bool(false)
 bool(false)
-unicode(%d) Tue Tuesday Jun June Tue Jun 27 00:00:00 2006 %s
+string(%d) Tue Tuesday Jun June Tue Jun 27 00:00:00 2006 %s
 %s %
-unicode(5) %q %a
-unicode(%d) %s
-unicode(4) blah
+string(5) %q %a
+string(%d) %s
+string(4) blah
 
 Warning: gmstrftime() expects at least 1 parameter, 0 given in %s on line %d
 bool(false)
 bool(false)
-unicode(%d) Mon Monday Jun June Mon Jun 26 21:00:00 2006 %s
+string(%d) Mon Monday Jun June Mon Jun 26 21:00:00 2006 %s
 %s %
-unicode(5) %q %a
-unicode(%d) %s
-unicode(4) blah
+string(5) %q %a
+string(%d) %s
+string(4) blah
 Done

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/009_win32.phpt?view=markuprev=1.1
Index: php-src/ext/date/tests/009_win32.phpt
+++ php-src/ext/date/tests/009_win32.phpt
--TEST--
strftime() and gmstrftime() tests
--INI--
date.timezone=Asia/Jerusalem
--SKIPIF--
?php
if (substr(PHP_OS, 0, 3) != 'WIN') die('skip only windows test.');
if (!function_exists('strftime')) die(skip, strftime not available);
?
--FILE--
?php

$t = mktime(0,0,0, 6, 27, 2006);

var_dump(strftime());

var_dump(strftime());

var_dump(strftime(%a %A %b %B %c %d %H %I %j %m %M %p %S %U %W %w %x %X %y %Y 
%Z %z %%, $t));

var_dump(strftime(%%q %%a, $t));

var_dump(strftime(blah, $t));

var_dump(gmstrftime());

var_dump(gmstrftime());

var_dump(gmstrftime(%a %A %b %B %c %d %H %I %j %m %M %p %S %U %W %w %x %X %y 
%Y %Z %z %%, $t));

var_dump(gmstrftime(%%q %%a, $t));

var_dump(gmstrftime(blah, $t));

echo Done\n;
?
--EXPECTF-- 
Warning: strftime() expects at least 1 parameter, 0 given in 
C:\Users\pierre\Documents\php-sdk\vc9\x86\php_5_3\ext\date\tests\009_win32.php 
on line 5
bool(false)
bool(false)
string(147) Tue Tuesday Jun June 06/27/06 00:00:00 27 00 12 178 06 00 AM 00 26 
26 2 06/27/06 00:00:00 06 2006 W. Europe Daylight Time W. Europe Daylight Time 
%
string(5) %q %a
string(4) blah

Warning: gmstrftime() expects at least 1 parameter, 0 given in 
C:\Users\pierre\Documents\php-sdk\vc9\x86\php_5_3\ext\date\tests\009_win32.php 
on line 15
bool(false)
bool(false)
string(146) Mon Monday Jun June 06/26/06 21:00:00 26 21 09 177 06 00 PM 00 26 
26 1 06/26/06 21:00:00 06 2006 W. Europe Standard Time W. Europe Standard Time 
%
string(5) %q %a
string(4) blah
Done




[PHP-DOC] cvs: php-src(PHP_5_3) /ext/date/tests 009.phpt 009_win32.phpt

2008-08-10 Thread Pierre-Alain Joye
pajoye  Sun Aug 10 11:27:48 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/date/tests 009_win32.phpt 

  Modified files:  
/php-src/ext/date/tests 009.phpt 
  Log:
  - [DOC] win's strftime does not support all posix formatting code and have 
some win specific rules see 
http://msdn.microsoft.com/en-us/library/fe06s4ak(VS.80).aspx for a complete 
list: split test for  win32 and posix
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/009.phpt?r1=1.1.2.5r2=1.1.2.5.2.1diff_format=u
Index: php-src/ext/date/tests/009.phpt
diff -u php-src/ext/date/tests/009.phpt:1.1.2.5 
php-src/ext/date/tests/009.phpt:1.1.2.5.2.1
--- php-src/ext/date/tests/009.phpt:1.1.2.5 Thu Jun 29 22:45:19 2006
+++ php-src/ext/date/tests/009.phpt Sun Aug 10 11:27:48 2008
@@ -2,6 +2,11 @@
 strftime() and gmstrftime() tests
 --INI--
 date.timezone=Asia/Jerusalem
+--SKIPIF--
+?php
+if (substr(PHP_OS, 0, 3) == 'WIN') die('skip posix only test.');
+if (!function_exists('strftime')) die(skip, strftime not available);
+?
 --FILE--
 ?php
 

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/009_win32.phpt?view=markuprev=1.1
Index: php-src/ext/date/tests/009_win32.phpt
+++ php-src/ext/date/tests/009_win32.phpt
--TEST--
strftime() and gmstrftime() tests
--INI--
date.timezone=Asia/Jerusalem
--SKIPIF--
?php
if (substr(PHP_OS, 0, 3) != 'WIN') die('skip only windows test.');
if (!function_exists('strftime')) die(skip, strftime not available);
?
--FILE--
?php

$t = mktime(0,0,0, 6, 27, 2006);

var_dump(strftime());

var_dump(strftime());

var_dump(strftime(%a %A %b %B %c %d %H %I %j %m %M %p %S %U %W %w %x %X %y %Y 
%Z %z %%, $t));

var_dump(strftime(%%q %%a, $t));

var_dump(strftime(blah, $t));

var_dump(gmstrftime());

var_dump(gmstrftime());

var_dump(gmstrftime(%a %A %b %B %c %d %H %I %j %m %M %p %S %U %W %w %x %X %y 
%Y %Z %z %%, $t));

var_dump(gmstrftime(%%q %%a, $t));

var_dump(gmstrftime(blah, $t));

echo Done\n;
?
--EXPECTF-- 
Warning: strftime() expects at least 1 parameter, 0 given in 
C:\Users\pierre\Documents\php-sdk\vc9\x86\php_5_3\ext\date\tests\009_win32.php 
on line 5
bool(false)
bool(false)
string(147) Tue Tuesday Jun June 06/27/06 00:00:00 27 00 12 178 06 00 AM 00 26 
26 2 06/27/06 00:00:00 06 2006 W. Europe Daylight Time W. Europe Daylight Time 
%
string(5) %q %a
string(4) blah

Warning: gmstrftime() expects at least 1 parameter, 0 given in 
C:\Users\pierre\Documents\php-sdk\vc9\x86\php_5_3\ext\date\tests\009_win32.php 
on line 15
bool(false)
bool(false)
string(146) Mon Monday Jun June 06/26/06 21:00:00 26 21 09 177 06 00 PM 00 26 
26 1 06/26/06 21:00:00 06 2006 W. Europe Standard Time W. Europe Standard Time 
%
string(5) %q %a
string(4) blah
Done




[PHP-DOC] Re: [PHP-DEV] [Fwd: #45687 [Opn-Bgs]: Why is PCNTL marked experimental]

2008-08-02 Thread Pierre Joye
hi,

On Sat, Aug 2, 2008 at 7:03 PM, Maciek Sokolewicz [EMAIL PROTECTED] wrote:
 Right, so, if this _is_ still considered experimental, then we should fix it
 in the documentation; and if it's not, we should fix the configure script.

 Which one will it be? :)

Please use the bug report to reply. If it is a documentation problem,
then change the category (or anyone who can change it).


-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org


[PHP-DOC] cvs: php-src(PHP_5_3) /win32/build confutils.js

2008-06-23 Thread Pierre-Alain Joye
pajoye  Mon Jun 23 08:11:31 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/win32/buildconfutils.js 
  Log:
  - add a MESSAGE function
[DOC] to be used instead of STDOUT in config.w32, it allows them to be 
redirected (like in a quiet mode)
  - add the list of enabled SAPI
  - improve the table output
  
http://cvs.php.net/viewvc.cgi/php-src/win32/build/confutils.js?r1=1.60.2.1.2.8.2.15r2=1.60.2.1.2.8.2.16diff_format=u
Index: php-src/win32/build/confutils.js
diff -u php-src/win32/build/confutils.js:1.60.2.1.2.8.2.15 
php-src/win32/build/confutils.js:1.60.2.1.2.8.2.16
--- php-src/win32/build/confutils.js:1.60.2.1.2.8.2.15  Sun Jun 22 23:15:54 2008
+++ php-src/win32/build/confutils.jsMon Jun 23 08:11:31 2008
@@ -17,7 +17,7 @@
   +--+
 */
 
-// $Id: confutils.js,v 1.60.2.1.2.8.2.15 2008/06/22 23:15:54 pajoye Exp $
+// $Id: confutils.js,v 1.60.2.1.2.8.2.16 2008/06/23 08:11:31 pajoye Exp $
 
 var STDOUT = WScript.StdOut;
 var STDERR = WScript.StdErr;
@@ -28,7 +28,7 @@
 var PROGRAM_FILES = WshShell.Environment(Process).Item(ProgramFiles);
 
 var extensions_enabled = new Array();
-
+var sapi_enabled = new Array();
 
 if (PROGRAM_FILES == null) {
PROGRAM_FILES = C:\\Program Files;
@@ -1008,6 +1008,7 @@
}
 
MFO.WriteBlankLines(1);
+   sapi_enabled[sapi_enabled.length] = [sapiname];
 }
 
 function ADD_DIST_FILE(filename)
@@ -1318,12 +1319,19 @@
max[j] = tmax;
min[j] = tmin;
}
+
sep = ;
-   k = max[0] + max[1] + 7;
+   k = 0;
+   for (i = 0; i  l; i++) {
+   k += max[i] + 3;
+   }
+   k++;
+
for (j=0; j  k; j++) {
sep += -;
}
 
+   STDOUT.WriteLine(sep);
out = |;
for (j=0; j  l; j++) {
out +=   + header[j];
@@ -1384,9 +1392,16 @@
generate_internal_functions();
generate_config_h();
 
+   STDOUT.WriteBlankLines(2);
+
+   STDOUT.WriteLine(Enabled extensions:);
output_as_table([Extension, Mode], extensions_enabled);
STDOUT.WriteBlankLines(2);
 
+   STDOUT.WriteLine(Enabled SAPI:);
+   output_as_table([Sapi Name], sapi_enabled);
+   STDOUT.WriteBlankLines(2);
+
STDOUT.WriteLine(Done.);
STDOUT.WriteBlankLines(1);
if (PHP_SNAPSHOT_BUILD != no) {
@@ -1545,6 +1560,11 @@
}
 }
 
+function MESSAGE(msg)
+{
+   STDERR.WriteLine( + msg);
+}
+
 function ERROR(msg)
 {
STDERR.WriteLine(ERROR:  + msg);




[PHP-DOC] cvs: php-src /ext/standard basic_functions.c basic_functions.h

2008-05-24 Thread Pierre-Alain Joye
pajoye  Sat May 24 14:36:16 2008 UTC

  Modified files:  
/php-src/ext/standard   basic_functions.c basic_functions.h 
  Log:
  - [DOC] restore get_magic_quotes_gpc and get_magic_quotes_runtime
they always return false.
(let save the world, spare bandwidth and kill the trolls 1/2)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.899r2=1.900diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.899 
php-src/ext/standard/basic_functions.c:1.900
--- php-src/ext/standard/basic_functions.c:1.899Mon May 12 08:46:49 2008
+++ php-src/ext/standard/basic_functions.c  Sat May 24 14:36:16 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.899 2008/05/12 08:46:49 tony2001 Exp $ */
+/* $Id: basic_functions.c,v 1.900 2008/05/24 14:36:16 pajoye Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -769,6 +769,14 @@
 ZEND_END_ARG_INFO()
 
 static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_get_magic_quotes_gpc, 0, 0, 0)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_get_magic_quotes_runtime, 0, 0, 0)
+ZEND_END_ARG_INFO()
+
+static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_error_log, 0, 0, 1)
ZEND_ARG_INFO(0, message)
ZEND_ARG_INFO(0, message_type)
@@ -3384,6 +3392,9 @@
PHP_FE(set_time_limit,  
arginfo_set_time_limit)
PHP_FE(get_cfg_var, 
arginfo_get_cfg_var)
 
+   PHP_FE(get_magic_quotes_gpc,
NULL)
+   PHP_FE(get_magic_quotes_runtime,
NULL)
+
PHP_FE(import_request_variables,
arginfo_import_request_variables)
PHP_FE(error_log,   
arginfo_error_log)
PHP_FE(error_get_last,  
arginfo_error_get_last)
@@ -4884,6 +4895,22 @@
 }
 /* }}} */
 
+/* {{{ proto mixed get_magic_quotes_runtime(void) U
+   Get the value of a PHP configuration option */
+PHP_FUNCTION(get_magic_quotes_runtime)
+{
+   RETURN_FALSE;
+}
+/* }}} */
+
+/* {{{ proto mixed get_magic_quotes_gpc(void) U
+   Get the value of a PHP configuration option */
+PHP_FUNCTION(get_magic_quotes_gpc)
+{
+   RETURN_FALSE;
+}
+/* }}} */
+
 /*
1st arg = error message
2nd arg = error option
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.h?r1=1.163r2=1.164diff_format=u
Index: php-src/ext/standard/basic_functions.h
diff -u php-src/ext/standard/basic_functions.h:1.163 
php-src/ext/standard/basic_functions.h:1.164
--- php-src/ext/standard/basic_functions.h:1.163Tue Apr 15 08:43:48 2008
+++ php-src/ext/standard/basic_functions.h  Sat May 24 14:36:16 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: basic_functions.h,v 1.163 2008/04/15 08:43:48 jani Exp $ */
+/* $Id: basic_functions.h,v 1.164 2008/05/24 14:36:16 pajoye Exp $ */
 
 #ifndef BASIC_FUNCTIONS_H
 #define BASIC_FUNCTIONS_H
@@ -71,7 +71,6 @@
 PHP_FUNCTION(set_time_limit);
 
 PHP_FUNCTION(get_cfg_var);
-PHP_FUNCTION(set_magic_quotes_runtime);
 PHP_FUNCTION(get_magic_quotes_runtime);
 PHP_FUNCTION(get_magic_quotes_gpc);
 




[PHP-DOC] cvs: php-src(PHP_5_3) / NEWS /main main.c

2008-02-15 Thread Pierre-Alain Joye
pajoye  Fri Feb 15 14:51:39 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
/php-src/main   main.c 
  Log:
  - [DOC] add PHP_MAJOR_VERSION, PHP_MINOR_VERSION, PHP_RELEASE_VERSION,
PHP_EXTRA_VERSION, PHP_VERSION_ID, PHP_ZTS and PHP_DEBUG constants
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.113r2=1.2027.2.547.2.965.2.114diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.113 
php-src/NEWS:1.2027.2.547.2.965.2.114
--- php-src/NEWS:1.2027.2.547.2.965.2.113   Fri Feb 15 12:48:13 2008
+++ php-src/NEWSFri Feb 15 14:51:39 2008
@@ -11,6 +11,8 @@
 (Etienne Kneuss)
   . Improved checks for callbacks. (Marcus)
   . Added __DIR__ constant. (Lars Strojny)
+  . Added PHP_MAJOR_VERSION, PHP_MINOR_VERSION, PHP_RELEASE_VERSION,
+PHP_EXTRA_VERSION, PHP_VERSION_ID, PHP_ZTS and PHP_DEBUG constants (Pierre)
 
 - Added new date/time functionality: (Derick)
   . date_parse_from_format(): Parse date/time strings according to a format.
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.8r2=1.640.2.23.2.57.2.9diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.8 
php-src/main/main.c:1.640.2.23.2.57.2.9
--- php-src/main/main.c:1.640.2.23.2.57.2.8 Mon Feb  4 20:39:21 2008
+++ php-src/main/main.c Fri Feb 15 14:51:39 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.8 2008/02/04 20:39:21 jani Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.9 2008/02/15 14:51:39 pajoye Exp $ */
 
 /* {{{ includes
  */
@@ -1743,6 +1743,17 @@
 
/* Register constants */
REGISTER_MAIN_STRINGL_CONSTANT(PHP_VERSION, PHP_VERSION, 
sizeof(PHP_VERSION)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_MAJOR_VERSION, PHP_MAJOR_VERSION, 
CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_MINOR_VERSION, PHP_MINOR_VERSION, 
CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_RELEASE_VERSION, PHP_RELEASE_VERSION, 
CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT(PHP_EXTRA_VERSION, PHP_EXTRA_VERSION, 
sizeof(PHP_EXTRA_VERSION) - 1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_VERSION_ID, PHP_VERSION_ID, 
CONST_PERSISTENT | CONST_CS);
+#ifdef ZTS
+   REGISTER_MAIN_LONG_CONSTANT(PHP_ZTS, 1, CONST_PERSISTENT | CONST_CS);
+#else
+   REGISTER_MAIN_LONG_CONSTANT(PHP_ZTS, 0, CONST_PERSISTENT | CONST_CS);
+#endif
+   REGISTER_MAIN_LONG_CONSTANT(PHP_DEBUG, PHP_DEBUG, CONST_PERSISTENT | 
CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT(PHP_OS, php_os, strlen(php_os), 
CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT(PHP_SAPI, sapi_module.name, 
strlen(sapi_module.name), CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT(DEFAULT_INCLUDE_PATH, 
PHP_INCLUDE_PATH, sizeof(PHP_INCLUDE_PATH)-1, CONST_PERSISTENT | CONST_CS);


[PHP-DOC] cvs: php-src /main main.c

2008-02-15 Thread Pierre-Alain Joye
pajoye  Fri Feb 15 15:09:57 2008 UTC

  Modified files:  
/php-src/main   main.c 
  Log:
  - [DOC] MFB: add PHP_MAJOR_VERSION, PHP_MINOR_VERSION, PHP_RELEASE_VERSION,
PHP_EXTRA_VERSION, PHP_VERSION_ID, PHP_ZTS and PHP_DEBUG constants
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.757r2=1.758diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.757 php-src/main/main.c:1.758
--- php-src/main/main.c:1.757   Mon Feb  4 20:38:42 2008
+++ php-src/main/main.c Fri Feb 15 15:09:56 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.757 2008/02/04 20:38:42 jani Exp $ */
+/* $Id: main.c,v 1.758 2008/02/15 15:09:56 pajoye Exp $ */
 
 /* {{{ includes
  */
@@ -1743,6 +1743,17 @@
 /* {{{ php_module_startup
  */
 int php_module_startup(sapi_module_struct *sf, zend_module_entry 
*additional_modules, uint num_additional_modules)
+   REGISTER_MAIN_LONG_CONSTANT(PHP_MAJOR_VERSION, PHP_MAJOR_VERSION, 
CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_MINOR_VERSION, PHP_MINOR_VERSION, 
CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_RELEASE_VERSION, PHP_RELEASE_VERSION, 
CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT(PHP_EXTRA_VERSION, PHP_EXTRA_VERSION, 
sizeof(PHP_EXTRA_VERSION) - 1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_VERSION_ID, PHP_VERSION_ID, 
CONST_PERSISTENT | CONST_CS);
+#ifdef ZTS
+   REGISTER_MAIN_LONG_CONSTANT(PHP_ZTS, 1, CONST_PERSISTENT | CONST_CS);
+#else
+   REGISTER_MAIN_LONG_CONSTANT(PHP_ZTS, 0, CONST_PERSISTENT | CONST_CS);
+#endif
+   REGISTER_MAIN_LONG_CONSTANT(PHP_DEBUG, PHP_DEBUG, CONST_PERSISTENT | 
CONST_CS);
 {
zend_utility_functions zuf;
zend_utility_values zuv;


[PHP-DOC] cvs: php-src(PHP_5_2) / NEWS /ext/gd gd.c /ext/gd/libgd gd.c

2007-09-11 Thread Pierre-Alain Joye
pajoye  Tue Sep 11 21:03:48 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
/php-src/ext/gd gd.c 
/php-src/ext/gd/libgd   gd.c 
  Log:
  - [DOC] add alpha support for imagefilter's IMG_FILTER_COLORIZE
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.940r2=1.2027.2.547.2.941diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.940 php-src/NEWS:1.2027.2.547.2.941
--- php-src/NEWS:1.2027.2.547.2.940 Mon Sep 10 23:42:54 2007
+++ php-src/NEWSTue Sep 11 21:03:47 2007
@@ -11,6 +11,7 @@
 
 - Upgraded PCRE to version 7.3 (Nuno)
 - Added optional parameter $provide_object to debug_backtrace(). (Sebastian)
+- Added alpha support for imagefilter's IMG_FILTER_COLORIZE
 
 - Fixed Bug #42596 (session.save_path MODE option does not work). (Ilia)
 - Fixed bug #42590 (Make the engine recornize \v and \f escape sequences). 
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.31r2=1.312.2.20.2.32diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.31 php-src/ext/gd/gd.c:1.312.2.20.2.32
--- php-src/ext/gd/gd.c:1.312.2.20.2.31 Wed Aug 29 06:26:30 2007
+++ php-src/ext/gd/gd.c Tue Sep 11 21:03:48 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.31 2007/08/29 06:26:30 pajoye Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.32 2007/09/11 21:03:48 pajoye Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -5178,8 +5178,9 @@
zval *SIM;
gdImagePtr im_src;
long r,g,b,tmp;
+   long a = 0;
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, SIM, 
tmp, r, g, b) == FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r|l, SIM, 
tmp, r, g, b, a) == FAILURE) {
RETURN_FALSE;
}
 
@@ -5189,7 +5190,7 @@
RETURN_FALSE;
}
 
-   if (gdImageColor(im_src, (int) r, (int) g, (int) b) == 1) {
+   if (gdImageColor(im_src, (int) r, (int) g, (int) b, (int) a) == 1) {
RETURN_TRUE;
}
 
@@ -5298,7 +5299,7 @@
php_image_filter_smooth
};
 
-   if (ZEND_NUM_ARGS()  2 || ZEND_NUM_ARGS()  5) {
+   if (ZEND_NUM_ARGS()  2 || ZEND_NUM_ARGS()  6) {
WRONG_PARAM_COUNT;
} else if (zend_parse_parameters(2 TSRMLS_CC, rl, tmp, filtertype) 
== FAILURE) {
return;
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd.c?r1=1.90.2.1.2.20r2=1.90.2.1.2.21diff_format=u
Index: php-src/ext/gd/libgd/gd.c
diff -u php-src/ext/gd/libgd/gd.c:1.90.2.1.2.20 
php-src/ext/gd/libgd/gd.c:1.90.2.1.2.21
--- php-src/ext/gd/libgd/gd.c:1.90.2.1.2.20 Sun Sep  9 13:05:51 2007
+++ php-src/ext/gd/libgd/gd.c   Tue Sep 11 21:03:48 2007
@@ -3807,15 +3807,14 @@
 }
 
 
-int gdImageColor(gdImagePtr src, int red, int green, int blue)
+int gdImageColor(gdImagePtr src, const int red, const int green, const int 
blue, const int alpha)
 {
int x, y;
-   int r,g,b,a;
int new_pxl, pxl;
typedef int (*FuncPtr)(gdImagePtr, int, int);
FuncPtr f;
 
-   if (src==NULL || (red-255||red255) || (green-255||green255) || 
(blue-255||blue255)) {
+   if (src == NULL) {
return 0;
}
 
@@ -3823,6 +3822,8 @@
 
for (y=0; ysrc-sy; ++y) {
for (x=0; xsrc-sx; ++x) {
+   int r,g,b,a;
+
pxl = f(src, x, y);
r = gdImageRed(src, pxl);
g = gdImageGreen(src, pxl);
@@ -3832,14 +3833,16 @@
r = r + red;
g = g + green;
b = b + blue;
+   a = a + alpha;
 
-   r = (r  255)? 255 : ((r  0)? 0:r);
-   g = (g  255)? 255 : ((g  0)? 0:g);
-   b = (b  255)? 255 : ((b  0)? 0:b);
+   r = (r  255)? 255 : ((r  0)? 0 : r);
+   g = (g  255)? 255 : ((g  0)? 0 : g);
+   b = (b  255)? 255 : ((b  0)? 0 : b);
+   a = (a  127)? 127 : ((a  0)? 0 : a);
 
-   new_pxl = gdImageColorAllocateAlpha(src, (int)r, 
(int)g, (int)b, a);
+   new_pxl = gdImageColorAllocateAlpha(src, r, g, b, a);
if (new_pxl == -1) {
-   new_pxl = gdImageColorClosestAlpha(src, (int)r, 
(int)g, (int)b, a);
+   new_pxl = gdImageColorClosestAlpha(src, r, g, 
b, a);
}
gdImageSetPixel (src, x, y, new_pxl);
}


[PHP-DOC] cvs: phpdoc /en/reference/zip/functions ziparchive-getfromname.xml

2007-06-24 Thread Pierre-Alain Joye
pajoye  Sun Jun 24 21:49:35 2007 UTC

  Modified files:  
/phpdoc/en/reference/zip/functions  ziparchive-getfromname.xml 
  Log:
  - remove wrong flags, they do not work with this method
  
  
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/zip/functions/ziparchive-getfromname.xml?r1=1.5r2=1.6diff_format=u
Index: phpdoc/en/reference/zip/functions/ziparchive-getfromname.xml
diff -u phpdoc/en/reference/zip/functions/ziparchive-getfromname.xml:1.5 
phpdoc/en/reference/zip/functions/ziparchive-getfromname.xml:1.6
--- phpdoc/en/reference/zip/functions/ziparchive-getfromname.xml:1.5Wed Jun 
20 22:25:39 2007
+++ phpdoc/en/reference/zip/functions/ziparchive-getfromname.xmlSun Jun 
24 21:49:35 2007
@@ -1,5 +1,5 @@
 ?xml version=1.0 encoding=iso-8859-1?
-!-- $Revision: 1.5 $ --
+!-- $Revision: 1.6 $ --
 refentry xml:id=function.ziparchive-getfromname 
xmlns=http://docbook.org/ns/docbook;
  refnamediv
   refnameZipArchive::getFromName/refname
@@ -37,16 +37,6 @@
itemizedlist
 listitem
  para
-  constantZIPARCHIVE::FL_NOCASE/constant
- /para
-/listitem
-listitem
- para
-  constantZIPARCHIVE::FL_NODIR/constant
- /para
-/listitem
-listitem
- para
   constantZIPARCHIVE::FL_UNCHANGED/constant
  /para
 /listitem


[PHP-DOC] cvs: phpdoc /en/reference/filter reference.xml

2007-06-14 Thread Pierre-Alain Joye
pajoye  Thu Jun 14 08:03:47 2007 UTC

  Modified files:  
/phpdoc/en/reference/filter reference.xml 
  Log:
  - #41681, missing option and constant for FILTER_VALIDATE_FLOAT
  
  
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filter/reference.xml?r1=1.8r2=1.9diff_format=u
Index: phpdoc/en/reference/filter/reference.xml
diff -u phpdoc/en/reference/filter/reference.xml:1.8 
phpdoc/en/reference/filter/reference.xml:1.9
--- phpdoc/en/reference/filter/reference.xml:1.8Sun May  6 00:36:44 2007
+++ phpdoc/en/reference/filter/reference.xmlThu Jun 14 08:03:47 2007
@@ -1,5 +1,5 @@
 ?xml version=1.0 encoding=iso-8859-1?
-!-- $Revision: 1.8 $ --
+!-- $Revision: 1.9 $ --
 !-- Purpose: basic.vartype --
 !-- Membership: pecl --
 !-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. 
--
@@ -58,8 +58,12 @@
row
 entryconstantFILTER_VALIDATE_FLOAT/constant/entry
 entryfloat/entry
-entry/entry
-entry/entry
+entry
+ parameterdecimal/parameter
+/entry
+entry
+ constantFILTER_FLAG_ALLOW_THOUSAND/constant
+/entry
 entryValidates value as float./entry
/row
 


[PHP-DOC] cvs: php-src(PHP_5_2) /ext/gd config.w32 gd.c php_gd.h

2007-04-17 Thread Pierre-Alain Joye
pajoye  Tue Apr 17 15:31:45 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd config.w32 gd.c php_gd.h 
  Log:
  - MFH: add imagegrabwindow and imagegrabscreen (win32 only) [DOC]
capture a window using its handle or a full screen
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/config.w32?r1=1.10.4.3r2=1.10.4.4diff_format=u
Index: php-src/ext/gd/config.w32
diff -u php-src/ext/gd/config.w32:1.10.4.3 php-src/ext/gd/config.w32:1.10.4.4
--- php-src/ext/gd/config.w32:1.10.4.3  Wed Apr 11 11:44:20 2007
+++ php-src/ext/gd/config.w32   Tue Apr 17 15:31:45 2007
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.10.4.3 2007/04/11 11:44:20 pajoye Exp $
+// $Id: config.w32,v 1.10.4.4 2007/04/17 15:31:45 pajoye Exp $
 // vim:ft=javascript
 
 ARG_WITH(gd, Bundled GD support, yes,shared);
@@ -24,6 +24,9 @@
CHECK_LIB(zlib.lib, gd, PHP_GD);
}
 
+   CHECK_LIB(User32.lib, gd, PHP_GD);
+   CHECK_LIB(Gdi32.lib, gd, PHP_GD);
+
EXTENSION(gd, gd.c gdttf.c, null, -Iext/gd/libgd, 
php_gd2.dll);
ADD_SOURCES(ext/gd/libgd, gd2copypal.c gd_arc_f_buggy.c gd.c 
\
gdcache.c gdfontg.c gdfontl.c gdfontmb.c gdfonts.c 
gdfontt.c \
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.20r2=1.312.2.20.2.21diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.20 php-src/ext/gd/gd.c:1.312.2.20.2.21
--- php-src/ext/gd/gd.c:1.312.2.20.2.20 Fri Apr  6 15:38:35 2007
+++ php-src/ext/gd/gd.c Tue Apr 17 15:31:45 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.20 2007/04/06 15:38:35 pajoye Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.21 2007/04/17 15:31:45 pajoye Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -52,6 +52,9 @@
 #ifdef PHP_WIN32
 # include io.h
 # include fcntl.h
+#include windows.h
+#include Winuser.h
+#include Wingdi.h
 #endif
 
 #if HAVE_LIBGD
@@ -314,6 +317,18 @@
 ZEND_END_ARG_INFO()
 #endif
 
+#ifdef PHP_WIN32
+static
+ZEND_BEGIN_ARG_INFO(arginfo_imagegrabwindow, 0, 0, 1)
+   ZEND_ARG_INFO(0, handle)
+   ZEND_ARG_INFO(0, client_area)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO(arginfo_imagegrabscreen, 0)
+ZEND_END_ARG_INFO()
+#endif
+
 #ifdef HAVE_GD_BUNDLED
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_imagerotate, 0, 0, 3)
@@ -1020,6 +1035,11 @@
PHP_FE(imagecopyresampled,  
arginfo_imagecopyresampled)
 #endif
 
+#ifdef PHP_WIN32
+   PHP_FE(imagegrabwindow, 
arginfo_imagegrabwindow)
+   PHP_FE(imagegrabscreen, 
arginfo_imagegrabscreen)
+#endif
+
 #ifdef HAVE_GD_BUNDLED
PHP_FE(imagerotate, 
arginfo_imagerotate)
PHP_FE(imageantialias,  
arginfo_imageantialias)
@@ -2069,6 +2089,155 @@
 /* }}} */
 #endif
 
+#ifdef PHP_WIN32
+/* {{{ proto resource imagegrabwindow(int window_handle [, int client_area])
+   Grab a window or its client area using a windows handle (HWND property in 
COM instance) */
+PHP_FUNCTION(imagegrabwindow)
+{
+   HWND window;
+   long client_area = 0;
+   RECT rc = {0};
+   RECT rc_win = {0};
+   int Width, Height;
+   HDC hdc;
+   HDC memDC;
+   HBITMAP memBM;
+   HBITMAP hOld;
+   HINSTANCE handle;
+   long lwindow_handle;
+   typedef BOOL (WINAPI *tPrintWindow)(HWND, HDC,UINT);
+   tPrintWindow pPrintWindow = 0;
+   gdImagePtr im;
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l|l, 
lwindow_handle, client_area) == FAILURE) {
+   RETURN_FALSE;
+   }
+
+   window = (HWND) lwindow_handle;
+
+   if (!IsWindow(window)) {
+   php_error_docref(NULL TSRMLS_CC, E_NOTICE, Invalid window 
handle);
+   RETURN_FALSE;
+   }
+
+   hdc = GetDC(0);
+
+   if (client_area) {
+   GetClientRect(window, rc);
+   Width = rc.right;
+   Height = rc.bottom;
+   } else {
+   GetWindowRect(window, rc);
+   Width   = rc.right - rc.left;
+   Height  = rc.bottom - rc.top;
+   }
+
+   Width   = (Width/4)*4;
+
+   memDC   = CreateCompatibleDC(hdc);
+   memBM   = CreateCompatibleBitmap(hdc, Width, Height);
+   hOld= (HBITMAP) SelectObject (memDC, memBM);
+
+
+   handle = LoadLibrary(User32.dll);
+   if ( handle == 0 ) {
+   goto clean;
+   }
+   pPrintWindow = (tPrintWindow) GetProcAddress(handle, PrintWindow);  
+
+   if ( pPrintWindow )  {
+   pPrintWindow(window, memDC, (UINT) client_area);
+   } else {
+   

[PHP-DOC] cvs: phpdoc /entities global.ent

2007-04-10 Thread Pierre-Alain Joye
pajoye  Tue Apr 10 13:32:19 2007 UTC

  Modified files:  
/phpdoc/entitiesglobal.ent 
  Log:
  - fix libgd url
  
  
http://cvs.php.net/viewvc.cgi/phpdoc/entities/global.ent?r1=1.289r2=1.290diff_format=u
Index: phpdoc/entities/global.ent
diff -u phpdoc/entities/global.ent:1.289 phpdoc/entities/global.ent:1.290
--- phpdoc/entities/global.ent:1.289Wed Apr  4 12:59:59 2007
+++ phpdoc/entities/global.ent  Tue Apr 10 13:32:19 2007
@@ -1,6 +1,6 @@
 !-- -*- SGML -*-
 
- $Id: global.ent,v 1.289 2007/04/04 12:59:59 bjori Exp $
+ $Id: global.ent,v 1.290 2007/04/10 13:32:19 pajoye Exp $
 
  Contains global macros for all the XML documents.
 
@@ -104,7 +104,7 @@
 !ENTITY url.freetype http://www.freetype.org/;
 !ENTITY url.freeodbc http://www.jepstone.net/FreeODBC/;
 !ENTITY url.fribidi http://fribidi.org/;
-!ENTITY url.gd http://www.boutell.com/gd/;
+!ENTITY url.gd http://www.libgd.org/;
 !ENTITY url.gdbm ftp://ftp.gnu.org/pub/gnu/gdbm/;
 !ENTITY url.gentoo http://www.gentoo.org/;
 !ENTITY url.gentoo.forums http://forums.gentoo.org/;


Re: [PHP-DOC] cvs: phpdoc /en/install pecl.xml

2006-10-21 Thread Pierre
From: Pierre [EMAIL PROTECTED]
To: Friedhelm Betz [EMAIL PROTECTED]
Cc: Pierre-Alain Joye [EMAIL PROTECTED], phpdoc@lists.php.net
Subject: Re: [PHP-DOC] cvs: phpdoc /en/install pecl.xml
Date: Sat, 21 Oct 2006 12:38:03 +0200
X-Mailer: Sylpheed-Claws 2.5.5 (GTK+ 2.8.20; x86_64-unknown-linux-gnu)

On Sat, 21 Oct 2006 10:50:18 +0200
Friedhelm Betz [EMAIL PROTECTED] wrote:

 Hi Pierre,
 
 Pierre-Alain Joye wrote:  
  pajoye  Thu Oct 19 21:09:02 2006 UTC
  
Modified files:  
  /phpdoc/en/install  pecl.xml 
Log:
- replace pear by pecl. pecl is the pecl.php.net installer
  (default channel of pecl is pecl.php.net not pear.php.net)  
 
 
 And pecl is available as of PHP x.x.x?
 What should people use with versions = PHP x.x.x?
 Or is this an issue, which Version if PEAR is installed?
 
 Think, that should be in the docs.  

PEAR 1.4.0 or earlier, available in all recent (and supported) PHP
releases. The installation of the pecl command is done by the installer
(gopear or with php releases). It has to be used to install pecl
packages, not pear.

-- Pierre


Re: [PHP-DOC] cvs: phpdoc /en/install pecl.xml

2006-10-21 Thread Pierre

Hello,

On 10/21/06, Friedhelm Betz [EMAIL PROTECTED] wrote:

Pierre wrote:

[...]


 And pecl is available as of PHP x.x.x?
 What should people use with versions = PHP x.x.x?
 Or is this an issue, which Version if PEAR is installed?

 Think, that should be in the docs.

 PEAR 1.4.0 or earlier, available in all recent (and supported) PHP
 releases. The installation of the pecl command is done by the installer
 (gopear or with php releases).

The question form my POV and maybe our users remain:

Installed with php-release:
pecl-command is available as of PHP x.x.x?
in all recent (and supported) PHP releases is a vague term.

There must be a PHP Version we can name, where pecl-command is installed
first time, no?
We should offer this piece of info to our readers :-)


No idea,  5.1.0?

However, it is more important to introduce the notion of *installer*
and package versions and not only php versions. There is more pear
releases than php releases. Some (important) bugs can be fixed between
two PHP releases, just like bugs in extensions can be fixed in a PECL
release.

--Pierre


Re: [PHP-DOC] cvs: phpdoc /en/install pecl.xml

2006-10-21 Thread Pierre

Hello,

On 10/21/06, Friedhelm Betz [EMAIL PROTECTED] wrote:

Pierre wrote:
 Hello,

 On 10/21/06, Friedhelm Betz [EMAIL PROTECTED] wrote:
 Pierre wrote:

 [...]

 
  And pecl is available as of PHP x.x.x?
  What should people use with versions = PHP x.x.x?
  Or is this an issue, which Version if PEAR is installed?
 
  Think, that should be in the docs.
 
  PEAR 1.4.0 or earlier, available in all recent (and supported) PHP
  releases. The installation of the pecl command is done by the installer
  (gopear or with php releases).

 The question form my POV and maybe our users remain:

 Installed with php-release:
 pecl-command is available as of PHP x.x.x?
 in all recent (and supported) PHP releases is a vague term.

 There must be a PHP Version we can name, where pecl-command is installed
 first time, no?
 We should offer this piece of info to our readers :-)

 No idea,  5.1.0?

Anyone?

 However, it is more important to introduce the notion of *installer*
 and package versions and not only php versions.

I agree completly, that it is important to introduce the notion of
*installer* version.

But I didn't get the part about more important. More important than what?


More important than the first PHP release having pear 1.4.0. A user
reading require PEAR-1.4.0 or earlier (check it with pear -V) will
simply run pear -V, no matter if it uses php 5.0, 5.1, or 4.4.



Don't get me wrong:
but imagine someone is reading the docs, how to install a pecl-extension
as outlined, fires up her terminal, types pecl install
pecl-extension and pecl-command is not available? No hint in the
docs, thats bad, whats going on ;-)
Wchich steps should she take to get the required pecl-command or maybe
she can still use pear install...  ?


if PEAR is already installed but is too old, point to the pear manual
orfaq, the short explanation being:

pear upgrade pear
then
pecl instal foo

She can still install a pecl package with pear using this command:

pear install pecl/pear

But the recommended way is to use the pecl command. For example if the
extension is already loaded by PHP, it is possible that the .so/dll
cannot be replaced.

--Pierre


  1   2   >